vmdInter |
index |
VMDInter Objects
Objects in this module are used to communicate with the external VMD
program.
Constructor:
VMDInter(host,port) - arguments are optional. Default to the env variables
DP_HOST and DP_PORT. These correspond to the host and
port on which VMD is listening.
Methods:
makeObj(name) - return a new VMDObject with given name.
getObj(name) - return an existing VMDObject with given name.
deleteAll() - delete all VMD graphical objects associated with this
xplor session.
tclCommand(cmd) - execute TCL command in the VMD interpreter.
setCenter(v) - set the center of rotation to the 3-tuple v
vmdLocal() - return true true if VMD and XPLOR are running on
the same computer, else false.
makeTop(name) - make object with given name VMD's ``top'' molecule.
loadFiles(args) - load multiple structures at once. See help for this method.
bondInit(name) - add graphics object with given name- returns the associated
molecule number. This is a fairly fragile low-level
interface.
addBond(mol,
v1,v2,
color="",
width=1 )- draw a line from v1 to v2 to the graphics object specified
by the integer mol (-1 for top molecule), with the given
color and with. If a blank is specified, the color can be
modified by the usual VMD-XPLOR color manipulation tools.
bondEnd() - specify that no more lines will be drawn.
VMDObject Objects
are created by the appropriate VMDInter method
Methods:
color(colorSpec) - set the color of the associated graphical object.
delete() - delete the associated VMD graphical object
labels(sel) - draw labels at the positions of the atoms specified by the
sel AtomSel. The format of the label is controlled
by the following boolean members:
labelSegID - print segment ID
labelResName - print residue name
labelResID - print residue ID
labelAtomName - print atom name
bonds(atomSel,
style="lines"
colorBy="Molecule") - draw molecular representation
including the atoms specified by atomSel. If the
second argument is omitted, lines are draw between
the atoms. Other styles include any of the VMD rendering
styles. colorBy corresponds to the VMD coloring method.
append() - append the current coordinates to the graphical object
and create a new VMD animation frame.
Example:
from vmdInter import VMDInter, VMDTraj
vmd=VMDInter()
vobj=vmd.makeObj("struct") #creates a new VMD molecule
# named ``struct''
vobj.bonds("name C or name N or name CA") #draw backbone atoms
#ivm is an ivm.IVM object
# the next line will cause a new animation frame to be appended to
# the VMD trajectory for molecule named ``struct'' - every 100 steps
# of dynamics or minimization
ivm.setTrajectory( VMDTraj(vobj,saveInterval=100) )
Xplor-NIH interface to the VMD-XPLOR visualization package
constructor:
VMDInter(host,port) -- see __init__ below.
methods:
makeObj - defined below
getObj - defined below
loadFiles - defined below
tclCommand(cmd) -
execute a tcl command within VMD
deleteAll() -
delete all VMD-XPLOR objects.
deleteObj(name) -
delete named VMD-XPLOR object.
makeTop(name) -
make the named VMD-XPLOR object `top,' or active.
setCenter(vec3) -
set the center point for VMD rotations.
setColor(name,color) -
set the color of the named VMD-XPLOR object.
vmdLocal() -
boolean - returns true if VMD-XPLOR is running on the local machine.
the following methods should usually not be called directly, rather through
the VMDObject interface:
appendFrame()
labels()
loadFrame()
Classes | ||||||||||||||||||||||||||
|
Functions | ||
|