parmed.charmm.CharmmRstFile

class parmed.charmm.CharmmRstFile(fname)[source]

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

Parameters
fnamestr

Name of the restart file to parse

Attributes
natomint

Number of atoms in the system

resnamelist of str

Names of all residues in the system

coordinatesnp.ndarray shape(1, natom, 3)

List of all coordinates in the format [x1, y1, z1, x2, y2, z2, …]

coordinatesoldnp.ndarray shape(1, natom, 3)

List of all old coordinates in the format [x1, y1, z1, x2, y2, z2, …]

velocitiesnp.ndarray shape(1, natom, 3)

Atomic velocities in Angstroms/picoseconds

positionsnatom x 3 distance Quantity

Atomic positions with units

positionsoldnatom x 3 distance Quantity

Old atomic positions with units

Methods

id_format(filename)

Identifies the file type as a CHARMM restart file

scan

__init__(fname)[source]

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

Methods

__init__(fname)

Initialize self.

id_format(filename)

Identifies the file type as a CHARMM restart file

scan(handle, str[, r])

Attributes

box

coordinates

coordinatesold

positions

Atomic positions with units

positionsold

Old atomic positions with units

velocities

Atomic velocities in Angstroms/picoseconds