Gromacs TOP - BLOCKS boiler-plate code

Classes

class gromacs.fileformats.blocks.System

Top-level class containing molecule topology.

Contains all the parameter types (AtomTypes, BondTypes, … ) and molecules.

class gromacs.fileformats.blocks.Molecule

Class that represents a Molecule

Contains all the molecule attributes: atoms, bonds, angles dihedrals. Also contains settle, cmap and exclusion sections, if present.

anumb_to_atom(anumb)

Returns the atom object corresponding to an atom number

renumber_atoms()

Reset the molecule’s atoms number to be 1-indexed

class gromacs.fileformats.blocks.Atom

Class that represents an Atom

Contains only the simplest atom attributes, that are contained like in section example below.

Molecule cantains an atoms that’s a list-container for Atom instances.

class gromacs.fileformats.blocks.Param(format)

Class that represents an abstract Parameter.

This class is the parent to AtomType, BondType and all the other parameter types.

The class understands a parameter line and that a comment that may follow. CMapType is an exception (it’s a multi-line parameter).

convert() provides a rudimentary support for parameter unit conversion between GROMACS and CHARMM notation: change kJ/mol into kcal/mol and nm into Angstrom.

disabled for supressing output when writing-out to a file.

class gromacs.fileformats.blocks.AtomType(format)
class gromacs.fileformats.blocks.BondType(format)
class gromacs.fileformats.blocks.AngleType(format)
class gromacs.fileformats.blocks.DihedralType(format)
class gromacs.fileformats.blocks.ImproperType(format)
class gromacs.fileformats.blocks.CMapType(format)
class gromacs.fileformats.blocks.InteractionType(format)
class gromacs.fileformats.blocks.SettleType(format)
class gromacs.fileformats.blocks.ConstraintType(format)
class gromacs.fileformats.blocks.NonbondedParamType(format)
class gromacs.fileformats.blocks.VirtualSites3Type(format)
class gromacs.fileformats.blocks.Exclusion

Class to define non-interacting pairs of atoms, or “exclusions”.

Note

Does not inherit from Param unlike other classes in blocks

History

Sources adapted from code by Reza Salari https://github.com/resal81/PyTopol