meshi.energy.solvate.hydrogenBonds
Class AbstractHydrogenBond
java.lang.Object
meshi.energy.solvate.hydrogenBonds.AbstractHydrogenBond
- Direct Known Subclasses:
- HydrogenBondDahiyat
public abstract class AbstractHydrogenBond
- extends java.lang.Object
A super class with the most general treatment of hydrogen bond.
A specific implementation should put content to these abstract methods.
The constructor gets a distance matrix object, and an AtomList object of
all the atoms participating in the bond. The only condition on the list is
that the donor and acceptor must be its first two elements (their relative
order is not important).
IPORTANT IMPORTANT IMPORTANT
NOTE: The distance matrix must be in an updated state before any of this class's
methods are called. If it is not up to date, the results would be meaningless!!!
This class does not update the distance matrix on its own at any time!!
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
atomList
protected AtomList atomList
dm
protected DistanceMatrix dm
hbVal
protected double hbVal
derivatives
protected double[][] derivatives
- derivatives[i][0] is the derivative of the HB value relative to the X coordinate of atom i.
derivatives[i][1] is the derivative of the HB value relative to the Y coordinate of atom i.
derivatives[i][2] is the derivative of the HB value relative to the Z coordinate of atom i.
AbstractHydrogenBond
public AbstractHydrogenBond()
AbstractHydrogenBond
public AbstractHydrogenBond(DistanceMatrix dm,
AtomList atomList)
updateHBvalueAndDerivatives
public abstract void updateHBvalueAndDerivatives()
- This update method should be used if a change to the atoms coordinates has occured.
Only after this update, the getter methods can produce correct values.
This class assume the distance matrix is updated.
applyForcesToAtoms
public void applyForcesToAtoms(double factor)
- FOLLOWING the activation of "update" this method can be activated,
where it will apply the forces to the atoms participating in the HB.
The forces are: factor*(minus derivative). This class is useful in energy terms that
make use of the hydrogen bond.
hbVal
public double hbVal()
derivatives
public double derivatives(int atomInd,
int xyz)
derivatives
public final double[][] derivatives()
atomList
public final AtomList atomList()
getFirstPolar
public final Atom getFirstPolar()
getSecondPolar
public final Atom getSecondPolar()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object