next up previous contents index
Next: An atom selection example Up: Python Text Interface Previous: Python modules within VMD   Contents   Index


Atom selections in Python

VMD provides an atom selection class for use in the Python interpreter. Instances of this class correspond to a set of atom indices in a particular molecule for a particular coordinate set. Once an atom selection is made, you can query the properties of the selected atoms, such as their names, residue ids, or coordinates. In a similar fashion, you can set the values of these properties. You can also perform logical operations on atom selections, including finding the intersection or union of two atom selections or finding the inverse of the set. Finally, you can perform tuple operations on the atom selection object to query the indices of the atoms in the selection.

Atom selection macros can be defined using the macro method of the AtomSel module. The syntax is just as in the corresponding atomselect macro and atomselect delmacro Tcl commands; see section 8.3.2 for details.

Below we summarize the methods available from the AtomSel class.



Subsections
next up previous contents index
Next: An atom selection example Up: Python Text Interface Previous: Python modules within VMD   Contents   Index
vmd@ks.uiuc.edu