next up previous contents index
Next: MoleculeRep Up: High-level Python Interface Previous: High-level Python Interface   Contents   Index

Molecule

The Molecule class is a proxy for molecules loaded into VMD. Most operations raise ValueError if the proxy no longer refers to a valid molecule (i.e. if the molecule has been deleted).

Molecule instances provide the following methods:

Examples:

>>> from VMD import *
>>> from Molecule import *
>>> bR=Molecule()
>>> bR.load('../proteins/brH.pdb')
     <snip>
<Molecule.Molecule instance at 0x406d878c>
>>> bR.name()
'molecule'
>>> bR.rename('bR')
<Molecule.Molecule instance at 0x406d878c>
>>> bR.name()
'bR'
>>> bR.numAtoms()
3762
>>> bR.dupFrame()
<Molecule.Molecule instance at 0x406d878c>
>>> bR.numFrames()
2


next up previous contents index
Next: MoleculeRep Up: High-level Python Interface Previous: High-level Python Interface   Contents   Index
vmd@ks.uiuc.edu