Class ForceFieldMMFF94
- java.lang.Object
-
- com.actelion.research.chem.forcefield.AbstractForceField
-
- com.actelion.research.chem.forcefield.mmff.ForceFieldMMFF94
-
- All Implemented Interfaces:
ForceField
public final class ForceFieldMMFF94 extends AbstractForceField
- Author:
- joel
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MMFF94
static java.lang.String
MMFF94S
static java.lang.String
MMFF94SPLUS
static java.util.Map<java.lang.String,Tables>
mTables
-
Fields inherited from class com.actelion.research.chem.forcefield.AbstractForceField
EPS, FUNCTOL, listeners, MAXSTEP, mDim, mFixedAtoms, mGrad, mIsInterrupted, mMol, mNewpos, MOVETOL, mPos, mTimeInterval, mTotalEnergy, TOLX
-
-
Constructor Summary
Constructors Constructor Description ForceFieldMMFF94(StereoMolecule mol, java.lang.String tablename)
Forcefield constructor.ForceFieldMMFF94(StereoMolecule m, java.lang.String tablename, java.util.Map<java.lang.String,java.lang.Object> options)
Forcefield constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEnergyTerm(EnergyTerm term)
double[]
getCurrentPositions()
MMFFMolecule
getMMFFMolecule()
double
getTotalEnergy()
Gets the total energy of the molecule as the sum of the energy terms.double
getTotalEnergy(double[] pos)
Gets the total energy of the molecule as the sum of the energy terms.Requires the atomic positions to be in the correct order.static void
initialize(java.lang.String tableSet)
static void
loadTable(java.lang.String name, Tables table)
Loads and registers a tables object with the ForceField class so it can be used by new ForceField instances.int
size()
Returns the total number of atoms in this force field.static Tables
table(java.lang.String name)
Returns a table given a table name.double
updateGradient()
Minimise the current molecule using default parameter values for the number of iterations, energy tolerance and gradient tolerance.void
zeroGradient()
zeroes out gradient for fixed atoms-
Methods inherited from class com.actelion.research.chem.forcefield.AbstractForceField
addGradient, addListener, coordVariance, getState, interrupt, minimise, minimise, run_minimiser, setFixedAtoms, setState
-
-
-
-
Field Detail
-
MMFF94
public static final java.lang.String MMFF94
- See Also:
- Constant Field Values
-
MMFF94S
public static final java.lang.String MMFF94S
- See Also:
- Constant Field Values
-
MMFF94SPLUS
public static final java.lang.String MMFF94SPLUS
- See Also:
- Constant Field Values
-
mTables
public static java.util.Map<java.lang.String,Tables> mTables
-
-
Constructor Detail
-
ForceFieldMMFF94
public ForceFieldMMFF94(StereoMolecule m, java.lang.String tablename, java.util.Map<java.lang.String,java.lang.Object> options)
Forcefield constructor.- Parameters:
m
- The molecule to construct the forcefield on.tablename
- The string name for the Tables to be used. There must be a table with this name that has been loaded with "loadTable()".options
- A Map containing the ForceField options and values. See class description of a list of options.
-
ForceFieldMMFF94
public ForceFieldMMFF94(StereoMolecule mol, java.lang.String tablename)
Forcefield constructor. Overloaded to pass the default (empty) options to a ForceField.- Parameters:
mol
- The molecule to construct the forcefield on.tablename
- The string name for the Tables to be used. There must be a table with this name that has been loaded with "loadTable()".
-
-
Method Detail
-
size
public int size()
Returns the total number of atoms in this force field.- Returns:
- Total number of atoms.
-
updateGradient
public double updateGradient()
Minimise the current molecule using default parameter values for the number of iterations, energy tolerance and gradient tolerance.- Returns:
- Return code, 0 on success.
-
zeroGradient
public void zeroGradient()
Description copied from interface:ForceField
zeroes out gradient for fixed atoms- Specified by:
zeroGradient
in interfaceForceField
- Overrides:
zeroGradient
in classAbstractForceField
-
getCurrentPositions
public double[] getCurrentPositions()
-
getTotalEnergy
public double getTotalEnergy(double[] pos)
Gets the total energy of the molecule as the sum of the energy terms.Requires the atomic positions to be in the correct order.- Parameters:
pos
- The positions array representing the atoms positions in space.- Returns:
- The total force field energy.
-
getTotalEnergy
public double getTotalEnergy()
Gets the total energy of the molecule as the sum of the energy terms. This function passes the force fields `pos` array to getTotalEnergy().- Returns:
- The total force field energy.
-
initialize
public static void initialize(java.lang.String tableSet)
-
loadTable
public static void loadTable(java.lang.String name, Tables table)
Loads and registers a tables object with the ForceField class so it can be used by new ForceField instances.- Parameters:
name
- The string name used to identifiy the tables object.table
- The tables object.
-
table
public static Tables table(java.lang.String name)
Returns a table given a table name.- Parameters:
name
- The string name of a table.- Returns:
- The tables object.
-
getMMFFMolecule
public MMFFMolecule getMMFFMolecule()
-
addEnergyTerm
public void addEnergyTerm(EnergyTerm term)
-
-