[Chimera-users] Command line for labelling specific residues in a zone

Elaine Meng meng at cgl.ucsf.edu
Thu Nov 16 13:04:33 PST 2017

Hi Mark,
Question received about a half hour ago (time shown below). 

The basic issues are: how to specify a zone, how to specify polar or nonpolar residues, and how to custom-label residues using 1-letter codes.  It is difficult to answer succinctly because there are so many different ways to specify the same set of atoms. Short example first, but see explanations below for more possibilities...

labelopt resinfo %(1-letter code)s
rlabel hydrophobic & :53.a at ca z<5
color red,l

… specify custom residue labeling, label residues that are hydrophobic AND that are within 5 angstroms of  CA atom of residue 53 in chain A, color labels red

(A) Zones are specified with < and > in the command line, see:

The following command would select all residues within 4.5 angstroms of residue HEM in chain A:

select :hem.a z<4.5

You could specify the zone-defining atoms in dozens of other ways, e.g. “ligand” or model number, residue number(s), atom name(s), etc. as I showed in the example up top. Command-line atom specification is a broad topicl:

(B) Polar or nonpolar.  Assuming you mean amino acids, you could use “polar”  or “hydrophobic” in the command line.  However, people’s definitions of polar and hydrophobic may vary, so another possibility is just to list the residue names you want:

select :asp,glu,asn,gln,lys,his

The built-in amino acid categories are described here

(C) “rlabel” shows residue labels, 

… with “labelopt” used beforehand to customize what will be shown:

I don’t remember the weird % strings for “labelopt" off the top of my head… I just use menu: Actions…Label… residue… custom and click the buttons of interest and see what the dialog shows.

A completely different approach is to use 2D labels that don’t move along with the structure… it’s like adding arbitrary labels to the final image in something like Photoshop, and placing them exactly where you want.  They may look nicer and can be in multiple different sizes/fonts, whereas all the labels that move along with the structure have to be the same size and font as each other, as specified in the Preferences (category: Labels). 

I hope this helps,
Elaine C. Meng, Ph.D. 
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Nov 16, 2017, at 12:26 PM, Mark Rosenberg <mark.rosenberg at manchester.ac.uk> wrote:
> I am not sure if this request was missed.
> I am having difficulty finding the syntax to write a line command in Chimera to label   the non-polar or polar  residues in  say a  5 Angstroms zone.  
> I would be grateful  if you could advise me how to code the  command line for labelling  these residues with  a 1-letter code  please ?
> Once I see the format then I can  readily adapt this to other situations.
> Thank you in advance.
> Mark

More information about the Chimera-users mailing list