ff
A module for defining force fields that can be applied to a universe
Each force field consists of a combination of interaction functions, and also the values of the parameters within these functions. In this instance water models (such as SPCE and TIP3P) are also defined as force fields, even though the parameter sets are restricted to describing water. Each force field module is self contained, although adding a new force field may require changes to the MD engine facades, so that a correspondence is established between the MDMC force field and the MD engine equivalent.
- class MDMC.MD.force_fields.ff.FileForceField[source]
Abstract class for force fields that are read from files
- property absolute_path
Get the absolute path of the data
- Returns:
The absolute path (including file name) of the force field data file
- Return type:
- property atoms
Get file parameters for the atoms defined within the force field
May includes the normal number of bonds that this atom type should possess, which is not currently used but could be an additional check on the validity of the topology
- Returns:
A
DataFramewith the force field atom type, atom group, element, mass, charge, and name- Return type:
- property bond_angles
Get file parameters for the bond angles of the force field
- Returns:
A
DataFramewith all bond angles, atom groups, and the parameters of the bond angle- Return type:
- property bonds
Get file parameters for the bonds of the force field
- Returns:
A
DataFramewith all bonds, atom groups, and the parameters of the bonds- Return type:
- property dispersions
Get file parameters for the dispersion interactions of the force field
- Returns:
A
DataFramewith all dispersion interactions, atom types, and the parameters of the dispersion interaction- Return type:
- abstract property file_name
Get the file name of the data
- filter_element(element)[source]
Filters the atoms in the
FileForceFieldby element- Parameters:
element (str) – The element by which the atoms in the FileForceField will be filtered
- Returns:
A filtered
DataFramewhere each row is an atom type that has an element specified byelement- Return type:
- property impropers
Get file parameters for the improper dihedrals of the force field
- Returns:
A
DataFramewith all improper dihedrals, atom groups, and the parameters of the improper dihedral- Return type:
- property interaction_dictionary
The dict of interactions that exist within the
ForceField- Returns:
{
Interaction:Elements} whereElementsis an ordered tuple of elemental symbols, and values ofInteractionFunctionobjects.- Return type:
- property propers
Get file parameters for the proper dihedrals of the force field
- Returns:
A
DataFramewith all proper dihedrals, atom groups, and the parameters of the proper dihedral- Return type:
- class MDMC.MD.force_fields.ff.ForceField[source]
Abstract class defining a force field
For each interaction type that it uses (non-bonded, bonds, bond angles etc), a force field must define the interaction function (LJ, harmonic etc). It must also define the parameters for each of these functions.
- abstract property interaction_dictionary
The dict of interactions that exist within the
ForceField- Returns:
{
Interaction:Elements} whereElementsis an ordered tuple of elemental symbols, and values ofInteractionFunctionobjects.- Return type: