Labelopt defines custom labels containing attribute values, alone or in combinations with each other and arbitrary text. For labeling with arbitrary text alone (without attribute values), setattr should be used instead. Labels already shown are not changed; if descriptor values change, the labels must be displayed again to reflect the changes. See also: label, rlabel, 2dlabels, custom residue labeling
The info keyword is used for atom labels, resinfo for residue labels. The label-contents can be:
The latter, more complicated form would be used to combine multiple descriptors with each other and with text, and/or to control specific aspects of the format such as the number of decimal places. Examples:
labelopt info B = %(bfactor).2f
label solvent
- show labels something like “B = 43.70” containing B-factor values
labelopt resinfo %(name)s %(number)s
rlabel :150-160
- show residue labels like “TYR 151”
labelopt info %(charge)+.3f
label :his
- show atomic partial charges as labels something like “-0.278” and “+0.332”
For atoms, a descriptor can be the name of any atom attribute, whether built-in or created during use of Chimera, plus a few hard-wired options that are not attributes:
For residues, a descriptor can be the name of any residue attribute, whether built-in or created during use of Chimera, as well as the following:
For either atom or residue labels, a format can be several things, described as components #3-7 of a conversion specifier in the Python documentation, but useful possibilities include: