IPotential
, IPotentialAtomic
, PotentialSoft
public class P1Sinusoidal extends java.lang.Object implements IPotential, PotentialSoft
Modifier and Type | Field | Description |
---|---|---|
protected double |
b45 |
|
protected Vector[] |
gradient |
|
protected Vector |
offset |
|
protected Vector |
r |
|
protected Space |
space |
|
protected Vector[] |
waveVectors |
Constructor | Description |
---|---|
P1Sinusoidal(Space space) |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IAtomList atoms) |
Returns the interaction energy between the given atoms.
|
double |
getB() |
|
Vector |
getOffset() |
|
double |
getRange() |
Returns the range over which the potential applies.
|
Vector[] |
gradient(IAtomList atoms) |
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 atoms,
Tensor pressureTensor) |
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 |
setB(double newB) |
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
void |
setCellSize(double xSize,
double zSize) |
|
void |
setOffset(Vector newOffset) |
|
double |
virial(IAtomList atoms) |
protected final Space space
protected double b45
protected final Vector offset
protected final Vector r
protected final Vector[] waveVectors
protected final Vector[] gradient
public P1Sinusoidal(Space space)
public void setOffset(Vector newOffset)
public Vector getOffset()
public void setB(double newB)
public double getB()
public void setCellSize(double xSize, double zSize)
public double energy(IAtomList atoms)
IPotentialAtomic
energy
in interface IPotentialAtomic
public Vector[] gradient(IAtomList atoms)
PotentialSoft
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoft
gradient
in interface PotentialSoft
public double virial(IAtomList atoms)
virial
in interface PotentialSoft
public double getRange()
IPotential
getRange
in interface IPotential
public int nBody()
IPotential
nBody
in interface IPotential
public void setBox(Box box)
IPotential
setBox
in interface IPotential