11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9.5.7 labelPython operations available from the label module, used to create, show/hide, and delete labels foratoms, bonds, angles, or dihedrals.• ATOM, BOND, ANGLE, DIHEDRAL: Label types defined by the label module, for use as the firstargument to the add, listall, show, hide, and delete methods.• add(type, molids, atomids): Create a label of the given type. molids and atomids mustbe 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 correspondingto 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 arepython dictionary objects, with the following keys: molid, atomid, value, on. The valuesfor molid and atomid are tuples containing the molecule id and atom id for the label. valueis the numerical value of the geometry label, or zero for ATOM labels. on is 1 if the label isshown, and 0 if the label is hidden.• show(type, label): Turn the given label on. label must be a dictionary containing molidand atomid keys whose values are tuples. If the tuples match the molecule ids and atom idsof the atoms in an existing label, the label will be turned on. Raises ValueError if the labeldoes not exist.• hide(type, label): Turn the given label off. label must be a dictionary containing molidand atomid keys whose values are tuples. If the tuples match the molecule ids and atom idsof the atoms in an existing label, the label will be turned off. Raises ValueError if the labeldoes not exist.• delete(type, label): Delete the given label. label must be a dictionary containing molidand atomid keys whose values are tuples. If the tuples match the molecule ids and atom idsof the atoms in an existing label, the label will be deleted. Raises ValueError if the label doesnot exist.• getvalues(type, label): Returns a list of values of the given label for each coordinateframe in the label. If the atoms in the label belong to different molecules, only the coordinatesof the first molecule will be cycled. If the labels don’t have values (like atom labels), None isreturned.9.5.8 materialPython operations available from the material module, used to create and modify material propertiesof molecular representations.• listall():Returns a Python list of the names of all available materials.• settings(name):the given name.Returns a Python dictionary of the material settings for material with137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!