trajFile
index


 
Produce XPLOR DCD files with the ivm.IVM objects.

 
Classes
       
builtins.object
TrajFile

 
class TrajFile(builtins.object)
    TrajFile(filename, start=0, saveInterval=1, freeAtoms='all', isFormatted=False, printCoords=False, fixXY=False, read=False, constantTime=False, delta_t=0.02)
 
a trajectory object to be used with an ivm.IVM object, used to
write coordinates to a XPLOR-style DCD file during a trajectory run.
Use the IVM setTrajectory method to write a given ivm
trajectory. Example:
 
from ivm import IVM
integrator=IVM()
 
from trajFile import TrajFile
traj=TrajFile("traj.dcd",saveInterval=2)
integrator.setTrajectory( traj)
 
integrator.run()
 
  Methods defined here:
__del__(s)
__init__(s, filename, start=0, saveInterval=1, freeAtoms='all', isFormatted=False, printCoords=False, fixXY=False, read=False, constantTime=False, delta_t=0.02)
Specify the filename for the output trajectory
file. freeAtoms is an atomSel.AtomSel specifying which
atoms are moving. start specifies at which frame trajectory
writing commences, while saveInterval specifies how many
frames to skip between writing. If isFormatted=True, an ASCII
trajectory file is written. If printCoords=True, in addition
to writing the trajectory file, all freeAtoms coordinates are
printed at each specified saveInterval. If fixXY is set to true, the
x- and y- coordinates of the entire trajectory are centered on their
center of mass values.
 
If constantTime=True, frames will be 
interpolated and written at equal time increments such that the
  time = index * delta_t
close(s)
create(s, read)
read(s, istep=1, start=1, stop=999999, skip=1)
Read the next frame from the trajectory file into the simulation
specified in the constructor, optionally skipping the specified number
of frames. On return the time member is set to the current time.
readNext(s, skip=None)
Read the next trajectory frame. If the skip argument is specified,
skip by that number of steps.
write(s, iter, time)
Write the current coordinates specified by the freeAtoms argument
of the constructor.
 
The time argument should be the current time for iter>0.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)