User Tools

Site Tools


command:label

label

“label” labels one or more atoms in a selection by evaluating an Python expression referencing properties for each atom.

Usage

label [ selection [, expression ]]

Arguments

selection = string: a selection-expression

expression = string: a Python expression that can be converted to a string

Examples

label chain A, chain 
label name ca,"%s-%s" % (resn,resi) 
label resi 200,"%1.3f" % partial_charge 

Notes

The symbols defined in the label name space for each atom are:

name, resi, resn, resv, chain, segi, model, alt, q, b, type, index, rank, ID, ss, vdw, elec_radius, label, elem, geom, flags, color, cartoon, valence, formal_charge, partial_charge, numeric_type, text_type

All strings in the expression must be explicitly quoted.

This operation typically takes several seconds per thousand atoms labelled.

To clear labels, simply omit the expression or set it to ''.

See Also

Plus

command/label.txt · Last modified: 2013/08/19 21:00 (external edit)