Class AbstractForceField
- java.lang.Object
-
- com.actelion.research.chem.forcefield.AbstractForceField
-
- All Implemented Interfaces:
ForceField
- Direct Known Subclasses:
ForceFieldMMFF94
public abstract class AbstractForceField extends java.lang.Object implements ForceField
-
-
Field Summary
Fields Modifier and Type Field Description static double
EPS
static double
FUNCTOL
protected java.util.ArrayList<ForceFieldChangeListener>
listeners
static double
MAXSTEP
protected int
mDim
protected int[]
mFixedAtoms
protected double[]
mGrad
protected boolean
mIsInterrupted
protected StereoMolecule
mMol
protected double[]
mNewpos
static double
MOVETOL
protected double[]
mPos
protected long
mTimeInterval
protected double
mTotalEnergy
static double
TOLX
-
Constructor Summary
Constructors Constructor Description AbstractForceField(StereoMolecule mol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGradient(double[] grad)
void
addListener(ForceFieldChangeListener listener)
Return the variance across all atoms in a molecule for the specified coordinate.double
coordVariance(int c)
void
getState(double[] pos)
void
interrupt()
int
minimise()
int
minimise(int maxIts, double gradTol, double funcTol)
Minimise the current molecule.int
run_minimiser(int maxIts, double gradTol, double funcTol)
void
setFixedAtoms(int[] fixedAtoms)
void
setState(double[] pos)
void
zeroGradient()
zeroes out gradient for fixed atoms-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.actelion.research.chem.forcefield.ForceField
getCurrentPositions, getTotalEnergy, getTotalEnergy, updateGradient
-
-
-
-
Field Detail
-
FUNCTOL
public static final double FUNCTOL
- See Also:
- Constant Field Values
-
MOVETOL
public static final double MOVETOL
- See Also:
- Constant Field Values
-
EPS
public static final double EPS
- See Also:
- Constant Field Values
-
TOLX
public static final double TOLX
- See Also:
- Constant Field Values
-
MAXSTEP
public static final double MAXSTEP
- See Also:
- Constant Field Values
-
listeners
protected java.util.ArrayList<ForceFieldChangeListener> listeners
-
mMol
protected StereoMolecule mMol
-
mDim
protected final int mDim
-
mPos
protected double[] mPos
-
mNewpos
protected double[] mNewpos
-
mGrad
protected double[] mGrad
-
mFixedAtoms
protected int[] mFixedAtoms
-
mTotalEnergy
protected double mTotalEnergy
-
mTimeInterval
protected long mTimeInterval
-
mIsInterrupted
protected volatile boolean mIsInterrupted
-
-
Constructor Detail
-
AbstractForceField
public AbstractForceField(StereoMolecule mol)
-
-
Method Detail
-
addListener
public void addListener(ForceFieldChangeListener listener)
Return the variance across all atoms in a molecule for the specified coordinate.- Specified by:
addListener
in interfaceForceField
- Parameters:
listener
-
-
addGradient
public void addGradient(double[] grad)
-
getState
public void getState(double[] pos)
-
setState
public void setState(double[] pos)
-
coordVariance
public double coordVariance(int c)
-
minimise
public int minimise()
- Specified by:
minimise
in interfaceForceField
-
setFixedAtoms
public void setFixedAtoms(int[] fixedAtoms)
- Specified by:
setFixedAtoms
in interfaceForceField
-
zeroGradient
public void zeroGradient()
Description copied from interface:ForceField
zeroes out gradient for fixed atoms- Specified by:
zeroGradient
in interfaceForceField
-
minimise
public int minimise(int maxIts, double gradTol, double funcTol)
Minimise the current molecule.- Parameters:
maxIts
- The maximum number of iterations to run for.gradTol
- The gradient tolerance.funcTol
- The energy tolerance.- Returns:
- Return code, 0 on success.
-
run_minimiser
public int run_minimiser(int maxIts, double gradTol, double funcTol)
-
interrupt
public void interrupt()
- Specified by:
interrupt
in interfaceForceField
-
-