vmdInter
index
vmdInter.py


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

 
class VMDInter(publicVMDInter.PublicVMDInter)
    
Method resolution order:
VMDInter
publicVMDInter.PublicVMDInter
__builtin__.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:
__del__(self, destroy=<built-in function delete_PublicVMDInter>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
addObject(*args)
appendFrame(*args)
deleteAll(*args)
deleteObj(*args)
labels(*args)
loadFrame(*args)
makeTop(*args)
setCenter(*args)
setColor(*args)
tclCommand(*args)
vmdLocal(*args)

Data and other attributes inherited from publicVMDInter.PublicVMDInter:
__dict__ = <dictproxy object at 0x11c9440>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'PublicVMDInter' objects>
list of weak references to the object (if defined)

 
class VMDObject
     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.
        

 
class VMDTraj
    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 assign 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)

 
Functions
       
currentSimulation(...)
help()