VMD-L Mailing List
From: Vlad Cojocaru (Vlad.Cojocaru_at_eml-r.villa-bosch.de)
Date: Thu Apr 19 2007 - 07:58:27 CDT
- Next message: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Previous message: John Stone: "Re: How can i obtain a force and trajectory data of a PHANTOM in IMD simulation"
- Next in thread: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Reply: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Reply: Peter Freddolino: "Re: tcl variable withing variable name"
- Reply: Ana Celia Araujo Vila Verde: "RE: tcl variable withing variable name"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear vmd users,
It might be a stupid question but still I couldnt figure out the answer
... I am trying to do something like the following:
set LEU_AT "name CD1 CD2"
set VAL_AT "name CG1 CG2"
foreach res {77 183 188 198} {
set CA [atomselect 0 "name CA and resid $res"]
set RESNAME [$CA get resname]
set RES_SEL ?$${RESNAME_AT??
set A [atomselect 0 "$RES_SEL and resid $res"]
.............
}
The problem is at line 6 when defining $RES_SEL (see question marks) .
$RESNAME would become VAL or LEU and I would like to select that
selection corresponding to $RESNAME ... For that I would need to assign
one variable name ($RES_SEL) using another variable ($RESNAME)
Can anybody tell how to do this in tcl ?
If naybody has a better solution to do this ... I would appreciate ..
Thanks
Vlad
-- ---------------------------------------------------------------------------- Dr. Vlad Cojocaru EML Research gGmbH Schloss-Wolfsbrunnenweg 33 69118 Heidelberg Tel: ++49-6221-533266 Fax: ++49-6221-533298 e-mail:Vlad.Cojocaru[at]eml-r.villa-bosch.de http://projects.villa-bosch.de/mcm/people/cojocaru/ ---------------------------------------------------------------------------- EML Research gGmbH Amtgericht Mannheim / HRB 337446 Managing Partner: Dr. h.c. Klaus Tschira Scientific and Managing Director: Prof. Dr.-Ing. Andreas Reuter http://www.eml-r.org ----------------------------------------------------------------------------
- Next message: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Previous message: John Stone: "Re: How can i obtain a force and trajectory data of a PHANTOM in IMD simulation"
- Next in thread: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Reply: Axel Kohlmeyer: "Re: tcl variable withing variable name"
- Reply: Peter Freddolino: "Re: tcl variable withing variable name"
- Reply: Ana Celia Araujo Vila Verde: "RE: tcl variable withing variable name"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]