CharmmRstFile

class simtk.openmm.app.charmmcrdfiles.CharmmRstFile(fname)

Reads and parses data, velocities and coordinates from a CHARMM restart file (.rst) of file name ‘fname’ into class attributes

natom

Number of atoms in the system

Type:int
resname

Names of all residues

Type:list
positions

All cartesian coordinates [x1, y1, z1, x2, …]

Type:list
positionsold

Old cartesian coordinates

Type:list
velocities

List of all cartesian velocities

Type:list

Examples

>>> chm = CharmmRstFile('testfiles/sample-charmm.rst')
>>> print chm.header[0]
REST    37     1
>>> natom, nc, nco = chm.natom, len(chm.positions), len(chm.positionsold)
>>> nv = len(chm.velocities)
>>> print '%d atoms; %d crds; %d old crds; %d vels' % (natom, nc, nco, nv)
256 atoms; 256 crds; 256 old crds; 256 vels
__init__(fname)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(fname) Initialize self.
printcoords(crds)