Next: material
Up: Controlling VMD from Python
Previous: imd
Contents
Index
label
Python operations available from the label module, used to
create, show/hide, and delete labels for atoms, bonds, angles, or dihedrals.
- ATOM, BOND, ANGLE, DIHEDRAL:
Label types defined by the label module, for use as the first argument
to the add, listall, show, hide, and delete methods.
- add(type, molids, atomids):
Create a label of the given type. molids and atomids
must be tuples containing 1, 2, 3, or 4 integers for ATOM, BOND, ANGLE, or
DIHEDRAL labels, respectively. If the label already exists, no action
is performed. Returns a dict corresponding to the referenced label that
can be used in the show(), hide(), delete(), and getvalues() methods.
- listall(type):
Returns a list of labels of the given type. The elements of the
list are python dictionary objects, with the following keys: molid,
atomid, value, on. The values for molid and
atomid are tuples containing the molecule id and atom id for the
label. value is the numerical value of the geometry label, or zero
for ATOM labels. on is 1 if the label is shown, and 0 if the label is
hidden.
- show(type, label):
Turn the given label on. label must be a dictionary containing
molid and atomid keys whose values are tuples. If the tuples
match the molecule ids and atom ids of the atoms in an existing label,
the label will be turned on. Raises ValueError if the label does not
exist.
- hide(type, label):
Turn the given label off. label must be a dictionary containing
molid and atomid keys whose values are tuples. If the tuples
match the molecule ids and atom ids of the atoms in an existing label,
the label will be turned off. Raises ValueError if the label does not
exist.
- delete(type, label):
Delete the given label. label must be a dictionary containing
molid and atomid keys whose values are tuples. If the tuples
match the molecule ids and atom ids of the atoms in an existing label,
the label will be deleted. Raises ValueError if the label does not
exist.
- getvalues(type, label):
Returns a list of values of the given label for each coordinate frame
in the label. If the atoms in the label belong to different molecules, only
the coordinates of the first molecule will be cycled. If the labels don't
have values (like atom labels), None is returned.
Next: material
Up: Controlling VMD from Python
Previous: imd
Contents
Index
vmd@ks.uiuc.edu