VMD User's Guide
VMD User's Guide
VMD User's Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
• set center(molid, vector):as a Python list.Get/set the coordinates of the center of the given molecule• get scale(molid):• set scale(molid,scale):Get/set the scale factor used to display the given molecule.• get rotation(molid):• set rotation(molid, matrix): Get/set the rotation matrix for the given molecule as a16-element Python list in row-major order.• get trans(molid):• set trans(molid, vector):as a Python list.Get/set the global translation applied to the given molecule• is fixed(molid): Returns whether the molecule with the given id is fixed; that is, whetherit is affected by translation, rotation, or scaling. Fixed molecules may still be animated (seeis active in the animate section).• fix(molid, trueorfalse):Make the molecule with the given id fixed or not.• is shown(molid):Returns whether the molecule with the given id is shown or not.• show(molid, trueorfalse):Make the molecule with the given id shown or not.9.5.13 vmdnumpyThis optional module is made available from within the toplevel <strong>VMD</strong> module if <strong>VMD</strong> detects aNumeric Python installation in the Python search path. When present, the following methods areprovided:• timestep(molid, frame): Returns a single-precision Numeric array containing a directreference to the given set of atom coordinates. Atom coordinates are arranged xyzxyzxyz...for each atom in the molecule. No copy of <strong>VMD</strong>’s internal coordinates is made; therefore,modifications to this array will directly affect atom coordinates in <strong>VMD</strong>. Using the array afterthe timestep has been deleted will likely cause <strong>VMD</strong> to crash. The advantage is maximumefficiency and the ability to easily modify atom coordinates without going through the atomselection interface.• atomselect(molid, frame, selection): Returns an array of int’s representing flags foron/off atoms in the given atom selection. The syntax for the selection is the same as forthe AtomSel class. An array of this form can be used in conjunction with the Numeric takefunction to get selected coordinates from a timestep. Creating the array in this way can be50-100 times faster than converting from an AtomSel object.142