mstk.forcefield.typer.Typer¶
- class mstk.forcefield.typer.Typer¶
Base class for typing engines.
Typing engine assigns atom types for atoms in a molecule or topology by some predefined rules. It is the very first step for force field assignment. It is also the basis of force field development. A well defined typing rule will make the force field development much less painful.
Methods
__init__()open(filename)Load a typer from a type definition file.
type(top_or_mol)Assign types for all atoms in a topology or molecule.
- type(top_or_mol)¶
Assign types for all atoms in a topology or molecule.
The
typeattribute of all atoms in the topology/molecule will be updated.
- static open(filename)¶
Load a typer from a type definition file.
The typing engine is determined by the TypingEngine line in the file.
- Parameters:
filename (str) – Type definition file. If the file does not exist, will search it under directories defined by MSTK_FORCEFIELD_PATH.
- Returns:
typer
- Return type:
subclass of Typer