IPotential
, IPotentialAtomic
, PotentialSoft
public class P1Harmonic extends Potential1 implements PotentialSoft
Potential1.Intramolecular
boundary
Constructor | Description |
---|---|
P1Harmonic(Space space) |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IAtomList a) |
Returns the interaction energy between the given atoms.
|
double |
getSpringConstant() |
|
Dimension |
getSpringConstantDimension() |
|
Vector |
getX0() |
|
Dimension |
getX0Dimension() |
|
Vector[] |
gradient(IAtomList a) |
Returns the gradient of the potential as it applies to each atom in the
given AtomSet, indicating how the energy would change as the position of
the first atom is varied.
|
Vector[] |
gradient(IAtomList a,
Tensor pressureTensor) |
Returns the same gradient as gradient(AtomSet) and also adds in the
contribution of the AtomSet to the pressureTensor.
|
void |
setSpringConstant(double springConstant) |
|
void |
setX0(Vector x0) |
|
double |
virial(IAtomList a) |
getRange, nBody, setBox
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRange, setBox
public P1Harmonic(Space space)
public void setSpringConstant(double springConstant)
public double getSpringConstant()
public void setX0(Vector x0)
public Vector getX0()
public Dimension getX0Dimension()
public Dimension getSpringConstantDimension()
public double energy(IAtomList a)
Potential
energy
in interface IPotentialAtomic
energy
in class Potential
public double virial(IAtomList a)
virial
in interface PotentialSoft
public Vector[] gradient(IAtomList a)
PotentialSoft
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList a, Tensor pressureTensor)
PotentialSoft
gradient
in interface PotentialSoft