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
       
builtins.object
VMDObject
VMDTraj
publicVMDInter.PublicVMDInter(builtins.object)
VMDInter

 
class VMDInter(publicVMDInter.PublicVMDInter)
    VMDInter(host='', port=-1)
 

 
 
Method resolution order:
VMDInter
publicVMDInter.PublicVMDInter
builtins.object

Methods defined here:
__init__(s, host='', port=-1)
the arguments are optional.
host: where VMD-XPLOR is running. defaults to localhost or
the host specified using -host on the command line.
port: the port to which VMD-XPLOR is listening. Defaults to the
value given using -port on the command line.
getObj(s, name)
make the named object the top object and return it's Xplor-NIH
representation.
help(s)
loadFiles(s, filename, structRange=[0], command='', color='', displaySel='known', loadSel='known')
loadFiles(filename[,optional keyword arguments])
load the given files into an VMD representation. Filename can
be a single file, or a template containing the string
STRUCTURE, which is replaced by an integer from the structure
range.
keywords:
   structRange: a list of integers used to generate filename.
   command:     a string or function exec'ed after coordinates
                are read, and before structures are loaded.
   color:       color to set loaded structures.
   displaySel:  string selecting which atoms are show in
                the VMD representation.
   loadSel:     selection of which atoms are read from the
                coordinate file.
makeObj(s, name)
create a graphical object in VMD with the given name

Methods inherited from publicVMDInter.PublicVMDInter:
__repr__ = _swig_repr(self)
addBond(self, *args, **kwargs) -> 'void'
addObject(self, *args, **kwargs) -> 'int'
appendFrame(self, *args, **kwargs) -> 'void'
bondEnd(self, *args, **kwargs) -> 'void'
bondInit(self, *args, **kwargs) -> 'int'
deleteAll(self, *args, **kwargs) -> 'void'
deleteObj(self, *args, **kwargs) -> 'void'
labels(self, *args, **kwargs) -> 'void'
loadFrame(self, *args, **kwargs) -> 'void'
makeTop(self, *args, **kwargs) -> 'void'
reap(self, *args, **kwargs) -> 'void'
setCenter(self, *args, **kwargs) -> 'void'
setColor(self, *args, **kwargs) -> 'void'
tclCommand(self, *args, **kwargs) -> 'void'
vmdLocal(self, *args, **kwargs) -> 'bool'

Static methods inherited from publicVMDInter.PublicVMDInter:
__swig_destroy__ = delete_PublicVMDInter(...)

Data descriptors inherited from publicVMDInter.PublicVMDInter:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class VMDObject(builtins.object)
    VMDObject(conn, name)
 

 
  Methods defined here:
__init__(s, conn, name)
these object are created using the makeObj method of VMDInter.
append(s)
append bond frames to this object.
bonds(s, aSel, style='lines', colorBy='Molecule')
create a bonded representation between atoms specified in
the atomSel.AtomSel aSel.
 
style   is the name of the VMD drawing method.
colorBy is the VMD coloring method.
color(s, colorSpec)
set color (allow rgb or color name)
delete(s)
delete the associated vmd object
help(s)
labels(s, sel)
make vmd text objects
  the following boolean members are consulted:
    labelSegID      
    labelResName    
    labelResID
    labelAtomName
lines(s, sel)
not yet implemented.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class VMDTraj(builtins.object)
    VMDTraj(vmdObj, saveInterval=1)
 
a trajectory object to be used with an ivm.IVM object, used to
display coordinates in a VMD window during a trajectory run.
Use the IVM setTrajectory method to to view a given ivm trajectory.
 
  Methods defined here:
__init__(s, vmdObj, saveInterval=1)
specify the vmdObject to append frames. The frequency of update is
controlled via the saveInterval argument (defaults to 1 [every frame]).
write(s, iter, stepsize)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
help()
pyXplorHelp = help()