All Classes Namespaces Functions Variables Pages
GromacsTopFile Class Reference

GromacsTopFile parses a Gromacs top file and constructs a Topology and (optionally) an OpenMM System from it. More...

Inheritance diagram for GromacsTopFile:

## Public Member Functions

def | __init__
| Load a top file. More...
def | createSystem
| Construct an OpenMM System representing the topology described by this prmtop file. More...

## Public Attributes

| topology
| The Topology read from the prmtop file. More...

## Detailed Description

GromacsTopFile parses a Gromacs top file and constructs a Topology and (optionally) an OpenMM System from it.

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | file,
|  |  | periodicBoxVectors = `None`,
|  |  | unitCellDimensions = `None`,
|  |  | includeDir = `None`,
|  |  | defines = `None`
| ) |  |

Load a top file.

Parameters

  file | (string) the name of the file to load
  periodicBoxVectors | (tuple of Vec3=None) the vectors defining the periodic box
  unitCellDimensions | (Vec3=None) the dimensions of the crystallographic unit cell. For non-rectangular unit cells, specify periodicBoxVectors instead.
  includeDir | (string=None) A directory in which to look for other files included from the top file. If not specified, we will attempt to locate a gromacs installation on your system. When gromacs is installed in /usr/local, this will resolve to /usr/local/gromacs/share/gromacs/top
  defines | (dict={}) preprocessor definitions that should be predefined when parsing the file

References GromacsTopFile._angleTypes, ForceField._atomTypes, GromacsTopFile._atomTypes, GromacsTopFile._bondTypes, GromacsTopFile._cmapTypes, GromacsTopFile._currentCategory, GromacsTopFile._currentMoleculeType, GromacsTopFile._defines, GromacsTopFile._dihedralTypes, GromacsTopFile._elseStack, GromacsTopFile._genpairs, GromacsTopFile._ifStack, GromacsTopFile._implicitTypes, GromacsTopFile._includeDirs, GromacsTopFile._molecules, GromacsTopFile._moleculeTypes, GromacsTopFile._pairTypes, and GromacsTopFile._processFile().

## Member Function Documentation

def createSystem | ( |  | self,
|  |  | nonbondedMethod = `ff.NoCutoff`,
|  |  | nonbondedCutoff = `1.0*unit.nanometer`,
|  |  | constraints = `None`,
|  |  | rigidWater = `True`,
|  |  | implicitSolvent = `None`,
|  |  | soluteDielectric = `1.0`,
|  |  | solventDielectric = `78.5`,
|  |  | ewaldErrorTolerance = `0.0005`,
|  |  | removeCMMotion = `True`,
|  |  | hydrogenMass = `None`
| ) |  |

Construct an OpenMM System representing the topology described by this prmtop file.

Parameters

  nonbondedMethod | (object=NoCutoff) The method to use for nonbonded interactions. Allowed values are NoCutoff, CutoffNonPeriodic, CutoffPeriodic, Ewald, or PME.
  nonbondedCutoff | (distance=1*nanometer) The cutoff distance to use for nonbonded interactions
  constraints | (object=None) Specifies which bonds and angles should be implemented with constraints. Allowed values are None, HBonds, AllBonds, or HAngles.
  rigidWater | (boolean=True) If true, water molecules will be fully rigid regardless of the value passed for the constraints argument
  implicitSolvent | (object=None) If not None, the implicit solvent model to use. The only allowed value is OBC2.
  soluteDielectric | (float=1.0) The solute dielectric constant to use in the implicit solvent model.
  solventDielectric | (float=78.5) The solvent dielectric constant to use in the implicit solvent model.
  ewaldErrorTolerance | (float=0.0005) The error tolerance to use if nonbondedMethod is Ewald or PME.
  removeCMMotion | (boolean=True) If true, a CMMotionRemover will be added to the System
  hydrogenMass | (mass=None) The mass to use for hydrogen atoms bound to heavy atoms. Any mass added to a hydrogen is subtracted from the heavy atom to keep their total mass the same.

Returns
  the newly created System

References GromacsTopFile._angleTypes, ForceField._atomTypes, GromacsTopFile._atomTypes, GromacsTopFile._bondTypes, GromacsTopFile._cmapTypes, GromacsTopFile._defaults, GromacsTopFile._dihedralTypes, GromacsTopFile._genpairs, GromacsTopFile._implicitTypes, GromacsTopFile._molecules, GromacsTopFile._moleculeTypes, and GromacsTopFile._pairTypes.

## Member Data Documentation

topology

The Topology read from the prmtop file.

Referenced by Modeller.add(), Modeller.addExtraParticles(), Modeller.addHydrogens(), Modeller.addSolvent(), Modeller.convertWater(), Modeller.delete(), Modeller.getTopology(), DesmondDMSFile.getTopology(), PDBFile.getTopology(), and PDBxFile.getTopology().

The documentation for this class was generated from the following file:

- gromacstopfile.py