6.2. CRD structure files in MDAnalysis — MDAnalysis.coordinates.CRD

Read and write coordinates in CHARMM CARD coordinate format (suffix “crd”). The CHARMM “extended format” is handled automatically.

class MDAnalysis.coordinates.CRD.CRDReader(filename, convert_units=True, n_atoms=None, **kwargs)[source]

CRD reader that implements the standard and extended CRD coordinate formats

Changed in version 0.11.0: Now returns a ValueError instead of FormatError. Frames now 0-based instead of 1-based.

Writer(filename, **kwargs)[source]

Returns a CRDWriter for filename.

Parameters

filename (str) – filename of the output CRD file

Return type

CRDWriter

class MDAnalysis.coordinates.CRD.CRDWriter(filename, **kwargs)[source]

CRD writer that implements the CHARMM CRD coordinate format.

It automatically writes the CHARMM EXT extended format if there are more than 99,999 atoms.

Requires the following attributes to be present: - resids - resnames - names - chainIDs - tempfactors

Changed in version 0.11.0: Frames now 0-based instead of 1-based

Parameters

filename (str or NamedStream) – name of the output file or a stream

write(selection, frame=None)[source]

Write selection at current trajectory frame to file.

Parameters
  • selection (AtomGroup) – group of atoms to be written

  • frame (int (optional)) – Move the trajectory to frame frame; by default, write the current frame.