From: Axel Kohlmeyer (
Date: Fri Jan 26 2007 - 10:03:14 CST

On Fri, 26 Jan 2007, Himanshu Khandelia wrote:

HK> This might be a very elementary question.
HK> In the Tkconsole, I am not being able to use wildcards in the atomselect
HK> facility. The following do not work:
HK> # To select atom names starting with the letter C,
HK> set temp [atomselect top "name "C.*""]
HK> set temp [atomselect top "name \"C.*\""]
HK> set temp [atomselect top "name 'C.*'"]
HK> set temp [atomselect top "name "C*""]
HK> What is way around this ?

the 'clean' solution is:
set temp [atomselect top {name "C.*"}]

but this one also works for me (and it should):

set temp [atomselect top "name \"C.*\""]

please check out the tcl documentation on the
syntax for defining strings and quoting characters
in strings.



Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.