IPotential
, IPotentialAtomic
, PotentialSoft
public class P1Tension extends java.lang.Object implements PotentialSoft
Modifier and Type | Field | Description |
---|---|---|
protected Box |
box |
|
protected Vector[] |
force |
|
protected Space |
space |
|
protected double |
w |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IAtomList a) |
Returns the interaction energy between the given atoms.
|
double |
getRange() |
Returns the range over which the potential applies.
|
double |
getSpringConstant() |
|
Dimension |
getSpringConstantDimension() |
Not implemented correctly.
|
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 t) |
Returns the same gradient as gradient(AtomSet) and also adds in the
contribution of the AtomSet to the pressureTensor.
|
int |
nBody() |
The number of atoms on which the potential depends.
|
void |
setBox(Box newBox) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
void |
setSpringConstant(double springConstant) |
|
double |
virial(IAtomList a) |
protected final Space space
protected double w
protected final Vector[] force
protected Box box
public P1Tension(Space space)
public int nBody()
IPotential
nBody
in interface IPotential
public double getRange()
IPotential
getRange
in interface IPotential
public void setSpringConstant(double springConstant)
public double getSpringConstant()
public Dimension getSpringConstantDimension()
public void setBox(Box newBox)
IPotential
setBox
in interface IPotential
public double energy(IAtomList a)
IPotentialAtomic
energy
in interface IPotentialAtomic
public Vector[] gradient(IAtomList a, Tensor t)
PotentialSoft
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList a)
PotentialSoft
gradient
in interface PotentialSoft
public double virial(IAtomList a)
virial
in interface PotentialSoft