“label” labels one or more atoms in a selection by evaluating an Python expression referencing properties for each atom.
label [ selection [, expression ]]
selection = string: a selection-expression
expression = string: a Python expression that can be converted to a string
label chain A, chain label name ca,"%s-%s" % (resn,resi) label resi 200,"%1.3f" % partial_charge
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 ''.