parmed.charmm.CharmmCrdFile¶

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

Reads and parses a CHARMM coordinate file (.crd) into its components, namely the coordinates, CHARMM atom types, resid, resname, etc.

Parameters: fname : str Name of the restart file to parse

Attributes

 positions Atomic coordinates with units attached to them with the shape (natom, 3)
 natom (int) Number of atoms in the system resname (list of str) List of all residue names in the system coordinates (np.ndarray with shape (1, natom, 3)) Atomic coordinates in a numpy array

Methods

 id_format(filename) Identifies the file type as a CHARMM coordinate file write(struct, dest) Writes a CHARMM coordinate file from a structure
__init__(fname)[source]

Methods

 __init__(fname) id_format(filename) Identifies the file type as a CHARMM coordinate file write(struct, dest) Writes a CHARMM coordinate file from a structure

Attributes

 box coordinates positions Atomic coordinates with units attached to them with the shape (natom, 3)
static id_format(filename)[source]

Identifies the file type as a CHARMM coordinate file

Parameters: filename : str Name of the file to check format for is_fmt : bool True if it is a CHARMM coordinate file
positions

Atomic coordinates with units attached to them with the shape (natom, 3)

static write(struct, dest)[source]

Writes a CHARMM coordinate file from a structure

Parameters: The input structure to write the CHARMM coordinate file from dest : str or file-like object The file name or file object to write the coordinate file to