[Chimera-users] select many atoms by serial number

Elaine Meng meng at cgl.ucsf.edu
Mon Sep 21 09:06:31 PDT 2009


Hi Stefano,
If you really want to specify atoms by serial number, and do it many  
times, you could do that with a Chimera command script, e.g.

color red @/serialNumber=4 or serialNumber=8 or serialNumber=10
color red @/serialNumber=20
label @/serialNumber=20
color goldenrod @/serialNumber<100 and serialNumber>20
color dodger blue @/serialNumber>100

These are the same commands that could be entered at the Command Line  
(show using Favorites... Command Line) -- you can test them there.   
Then just put all the commands you want into a text file, the Chimera  
command script.  Just opening the script (named *.com or *.cmd) would  
execute the commands.
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/indexcommand.html#cmdfile 
 >
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#descriptors 
 >

However, there are many other ways to specify atoms besides serial  
number that might be easier:  atom name, residue name and number,  
values of other attributes such as element or bfactor, etc.

color red :25.a,43-57.a at ca
   (alpha-carbons of residues 25 and 43-57 in chain A)
color red @/bfactor>50
   (all atoms with B-factor >50)

<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/frameatom_spec.html 
 >

Some other approaches that would give you more flexibility in coloring:

- create your own aliases, for example

alias clust1 :25.a,43-57.a
alias clust2 :1-24.a,1-40.b
color red clust1
color dodger blue clust2

- create your own new attribute, for example named "clusterNumber" and  
assign values 1,2, ... then just use commands like

color red @/clusterNumber=1

More on how to create your own attribute:
<http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html 
 >

You can still use serial numbers when creating the aliases or defining  
a new attribute if that is the most convenient specifier.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Sep 21, 2009, at 7:02 AM, Stefano Meliga wrote:

> Hello,
> I use a clustering algorithm to find partitions of proteins.
> The output is the list of node indexes belonging to each cluster.
>
> I would like to plot the clusters in different colours.
>
> I successfully managed to select one atom in the graphical interface  
> using:
> Select > Atom Specifier and typing @\serialNumber=n
>
> Nevertheless, I need to select many atoms from a list of serial  
> numbers,
> what can I do?
> Cheers,
> Stefano




More information about the Chimera-users mailing list