OpenMM
 All Classes Namespaces Functions Variables Pages
CharmmRstFile Class Reference

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

+ Inheritance diagram for CharmmRstFile:

Public Member Functions

def __init__
 
def printcoords
 

Public Attributes

 header
 
 title
 
 enrgstat
 
 positionsold
 
 positions
 
 velocities
 
 ff_version
 
 natom
 
 npriv
 
 nstep
 
 nsavc
 
 nsavv
 
 jhstrt
 

Detailed Description

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

Main attributes:

  • natom (int) : Number of atoms in the system
  • resname (list) : Names of all residues
  • positions (list) : All cartesian coordinates [x1, y1, z1, x2, ...]
  • positionsold (list) : Old cartesian coordinates
  • velocities (list) : List of all cartesian velocities

Example:

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

Constructor & Destructor Documentation

def __init__ (   self,
  fname 
)

Member Function Documentation

def printcoords (   self,
  crds 
)

Member Data Documentation

enrgstat
ff_version
header
jhstrt
natom
npriv
nsavc
nsavv
nstep
positionsold
title
velocities

The documentation for this class was generated from the following file: