IPotential, IPotentialAtomic, PotentialSoftpublic 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)
IPotentialAtomicenergy in interface IPotentialAtomicpublic Vector[] gradient(IAtomList atoms)
PotentialSoftgradient in interface PotentialSoftpublic Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoftgradient in interface PotentialSoftpublic double virial(IAtomList atoms)
virial in interface PotentialSoftpublic double getRange()
IPotentialgetRange in interface IPotentialpublic int nBody()
IPotentialnBody in interface IPotentialpublic void setBox(Box box)
IPotentialsetBox in interface IPotential