VMD-L Mailing List
Date: Sat Dec 21 2013 - 02:06:18 CST
Try escaping internal quotes: simply add backslash (\) before each of them:
set sel [atomselect top "type \"c-\""]
> Dear Axel,
> Thank you.
> type "c-" works using the Graphical Representation window but what should
> do if I am using tcl for defining the representations:
> since, ****mol representation "type "c-" " **** does not certainly work
> Apology for the primitive question!
> Thanks, Fatima
> On Fri, Nov 29, 2013 at 8:43 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>> please *always* copy the mailing list on your replies. thanks.
>> On Sat, Nov 30, 2013 at 3:09 AM, Fatemesadat Emami <fe2_at_zips.uakron.edu>
>> > Dear Axel,
>> > For example, I want to select atoms with charge =-1 (or whatever
>> > No.). If in the "Graphical Representation/Selected Atoms" I write
>> > -1" I get the error message "the atom selection you typed could not be
>> > understood".
>> that is the correct behavior, since "charge -1" is not a valid atom
>> selection syntax. you should look up the detailed explanation in the
>> users guide, including the parts about the "atomselect" command and
>> the associated tables.
>> tests for atom properties have to be proper logical expressions like:
>> "charge < 0" or "charge == -1"
>> > same thing with selections such as "type c-" or "type h*" - without
>> > quotation of course
>> this is because "-" and "*" are interpreted as operators of the atom
>> selection syntax. otherwise things like this expression would not
>> work: sqrt(x*x+y*y+z*z) < 5.0
>> (which selects all atoms closer than 5 angstrom to the origin).
>> you have to use quotes to set proper precedence, e.g.: type "c-"
>> however, quotation marks also enable regular expressions, so to match
>> "h*" you have to use: type "h\*"
>> > Thank you
>> > FSE
>> > On Fri, Nov 29, 2013 at 7:17 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>> >> It is not quite clear to me what you are asking. Can you provide a
>> >> example file and give some more detailed descriptions of what you did
>> >> what kind of error you got or what the undesired result was.
>> >> Axel.
>> >> --
>> >> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>> >> International Centre for Theoretical Physics, Trieste. Italy.
>> >> ________________________________
>> >> From: Fatemesadat Emami <fe2_at_zips.uakron.edu>
>> >> Sender: owner-vmd-l_at_ks.uiuc.edu
>> >> Date: Fri, 29 Nov 2013 18:13:17 -0600
>> >> To: <vmd-l_at_ks.uiuc.edu>
>> >> Subject: vmd-l: atoms selection/special characters
>> >> Dear vmd Users,
>> >> I do have a question which I suppose must be an easy one! I have
>> >> structure into vmd and would like to select some atoms whose
>> names/types are
>> >> O- or H* but vmd does not understand these combinations. Same as if I
>> >> to select an atom with charge -1 (for instance I want to have a
>> selection as
>> >> "charge -1"). I will be appreciated for any comment on this.
>> >> Thanks
>> >> Fatima
>> >> --
>> >> Fateme S. Emami, Ph.D.
>> >> Postdoctoral Fellow
>> >> Non-Equilibrium Research Centre (NERC)
>> >> Northwestern University
>> >> Email: fatemesadat.emami_at_northwestern.edu
>> > --
>> > Fateme S. Emami, Ph.D.
>> > Postdoctoral Fellow
>> > Non-Equilibrium Research Centre (NERC)
>> > Northwestern University
>> > Email: fatemesadat.emami_at_northwestern.edu
>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>> International Centre for Theoretical Physics, Trieste. Italy.
> *Fateme S. Emami, Ph.D.*
> *Postdoctoral Fellow *
> *Non-Equilibrium Research Centre (NERC)**Northwestern University*
> *Email: fatemesadat.emami_at_northwestern.edu