vermouth.processors.name_moltype module¶
Provides a processor to assign molecule type names to molecules.
A molecule type (moltype) is Gromacs’s concept of a molecule. Providing a name
for a molecule type is required to write an ITP file for that molecule. We also
use the molecule type name to group molecules sharing the same molecule type.
Molecule type identity is tested based on
vermouth.molecule.Molecule.share_moltype_with()
.
- class vermouth.processors.name_moltype.NameMolType(deduplicate=True, meta_key='moltype', molname='molecule')[source]¶
Bases:
Processor
Assigns molecule type (moltype) names to molecules.
Moltype names are the names given to molecules in an ITP file. This processor assign consecutive names to the molecule. If the deduplicate argument is set to True, then the processor assigns the same name to all molecules with the same topology.
By default, the moltype name is written under the “moltype” key of the molecule meta attributes. This key can be changed with the meta_key argument.
- Parameters:
See also
vermouth.processors.set_molecule_meta.SetMoleculeMeta
This processor can set key/value pairs in the meta attributes of one molecule, or all molecules in a system. It can be used to set the moltype manually.
vermouth.gmx.itp.write_molecule_itp
Writes the ITP file for a molecule, and use the ‘moltype’ meta to name the molecule.