[Chimera-users] how2 select named selections using command-line [chimera1.5.3]

Elaine Meng meng at cgl.ucsf.edu
Tue Jan 31 12:46:32 PST 2012

Hi Fred,
It may be because your selection name starts with a number.  The select command may be more finicky than others because it is overloaded with two different functions, activation of models for motion (indicated by model number without #) and selection of atoms (indicated by model number with # or other specification symbol such as : for residues or @ for atoms).  Parsing the select command to try to identify the former case may interfere with recognizing your selection names.

I tried making overlapping named selections: sel1a, sel1b
and in that case you could accomplish your example with

sel sel1a & sel1b & without CA/C1'

(the last part means side chain atoms not including the CA/C1', could also use "with CA/C1' "; these are terminal entries under the Select... Structure menu, which can be used as command-line specifiers)

I personally prefer to skip selections altogether and instead use the "alias" command in a similar manner.  People may gravitate to using named selections because of Pymol terminology.   If I understand correctly, Pymol named selections are more like Chimera aliases.  For example:

alias set1 :10-20.a
alias set2 :15-35
sel set1 & set2 & ~ element.H

... see Built-In Classifications and Combinations ...

alias command:

The aliases wouldn't appear in the menu, however, except for "function" aliases as described in the documentation above.
I hope this helps,
Elaine C. Meng, Ph.D. 
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Jan 31, 2012, at 12:27 PM, frederick lee wrote:

> dear chimera users,
> i can defined named selections and they work under the
> select menu.
> however, i canNOT use the command line to select them;
> e.g., i have 4 named selections 0a,0b,1a,1b
> dis 0a | 1a works
> sel 1a NOT working
> sel :1a NOT working (said selection cleared)
> i like to be able to select multiple named selections and further
> apply filters on them; e.g.,
> "select 1a and 1b and atoms=side chain atoms"
> how do i accomplish this? as always thank you very much.
> fred

More information about the Chimera-users mailing list