7.14. PQR file format — MDAnalysis.coordinates.PQR

class MDAnalysis.coordinates.PQR.PQRReader(filename, convert_units=None, n_atoms=None, **kwargs)[source]

Read a PQR file into MDAnalysis.

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

Writer(filename, **kwargs)[source]

Returns a PQRWriter for filename.

Parameters:filename (str) – filename of the output PQR file
Returns:
Return type:PQRWriter
class MDAnalysis.coordinates.PQR.PQRWriter(filename, convert_units=None, **kwargs)[source]

Write a single coordinate frame in whitespace-separated PQR format.

Charges (“Q”) are taken from the MDAnalysis.core.groups.Atom.charge attribute while radii are obtaine from the MDAnalysis.core.groups.Atom.radius attribute.

  • If the segid is ‘SYSTEM’ then it will be set to the empty string. Otherwise the first letter will be used as the chain ID.
  • The serial number always starts at 1 and increments sequentially for the atoms.

The output format is similar to pdb2pqr --whitespace.

New in version 0.9.0.

Set up a PQRWriter with full whitespace separation.

Parameters:
  • filename (str) – output filename
  • remarks (str (optional)) – remark lines (list of strings) or single string to be added to the top of the PQR file
write(selection, frame=None)[source]

Write selection at current trajectory frame to file.

Parameters:
  • selection (AtomGroup or Universe) – MDAnalysis AtomGroup or Universe
  • frame (int (optional)) – optionally move to frame index frame; by default, write the current frame

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