parmed.amber.AmberMdcrd

class parmed.amber.AmberMdcrd(fname, natom, hasbox, mode='r', title=None)[source]

A class to parse Amber ASCII trajectory files. This is much slower than parsing NetCDF files (or the equivalent parsing done in a compiled language like C or C++). For large trajectories, this may be significant.

Attributes
box
coordinates
frame
positions

Methods

add_box(stuff)

Prints ‘stuff’ (which must be a 3-element list, array.array, tuple, or np.ndarray) as the box lengths for this frame

add_coordinates(stuff)

Prints ‘stuff’ (which must be either an iterable of 3*natom or have an attribute ‘flatten’ that converts it into an iterable of 3*natom) to the open file handler.

close()

Close the open file handler

id_format(filename)

Identifies the file type as an Amber mdcrd file

__init__(fname, natom, hasbox, mode='r', title=None)

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

Methods

__init__(fname, natom, hasbox[, mode, title])

Initialize self.

add_box(stuff)

Prints ‘stuff’ (which must be a 3-element list, array.array, tuple, or np.ndarray) as the box lengths for this frame

add_coordinates(stuff)

Prints ‘stuff’ (which must be either an iterable of 3*natom or have an attribute ‘flatten’ that converts it into an iterable of 3*natom) to the open file handler.

close()

Close the open file handler

id_format(filename)

Identifies the file type as an Amber mdcrd file

Attributes

CRDS_PER_LINE

DEFAULT_TITLE

box

coordinates

extra_args

frame

positions