vermouth.gmx.topology module

I/O of topology parameters that are not molecules.

class vermouth.gmx.topology.Atomtype(molecule, node, sigma, epsilon, meta)

Bases: tuple

Create new instance of Atomtype(molecule, node, sigma, epsilon, meta)

epsilon

Alias for field number 3

meta

Alias for field number 4

molecule

Alias for field number 0

node

Alias for field number 1

sigma

Alias for field number 2

class vermouth.gmx.topology.NonbondParam(atoms, sigma, epsilon, meta)

Bases: tuple

Create new instance of NonbondParam(atoms, sigma, epsilon, meta)

atoms

Alias for field number 0

epsilon

Alias for field number 2

meta

Alias for field number 3

sigma

Alias for field number 1

vermouth.gmx.topology.sigma_epsilon_to_C6_C12(sigma, epsilon)[source]

Convert the LJ potential from sigma epsilon form to C6 C12 form.

vermouth.gmx.topology.write_atomtypes(system, itp_path, C6C12=False)[source]

Writes the [atomtypes] directive to file. All atomtypes are defined in system.gmx_topology_params. Masses and further information are taken from the molecule directly.

vermouth.gmx.topology.write_gmx_topology(system, top_path, itp_paths={'atomtypes': 'extra_atomtypes.itp', 'nonbond_params': 'extra_nbparams.itp'}, C6C12=False, defines=(), header=())[source]

Writes a Gromacs .top file for the specified system. Gromacs topology files are defined by directives for example [ atomtypes ]. However, Gromacs supports writing parts of the topology to so called .itp files which can be inculded into a toplevel topology file with the extension .top using #include statements. The topology writer will generate such a toplevel topology file where the different directives are written to seperate .itp files and included into the toplevel file.

Parameters:
  • system (vermouth.system.System)

  • top_path (pathlib.Path) – path for topology file

  • itp_paths (dict[str, pathlib.Path]) – list of paths for writing the topology parameters like atomtypes with the key being the name of the directive.

  • C6C12 (bool) – write non-bonded interaction parameters using LJ C6C12 form

  • defines (tuple(str)) – define statments to include in the topology

  • header (tuple(str)) – any comment lines to include at the beginning

vermouth.gmx.topology.write_nonbond_params(system, itp_path, C6C12=False)[source]

Writes the [nonbond_params] directive to file. All atomtypes are defined in system.gmx_topology_params. Masses and further information are taken from the molecule directly.