IPotential, IPotentialAtomic, PotentialSoftpublic class P1Smash extends java.lang.Object implements PotentialSoft
| Modifier and Type | Field | Description |
|---|---|---|
protected double |
g |
|
protected Vector[] |
gradient |
| Modifier and Type | Method | Description |
|---|---|---|
double |
energy(IAtomList atoms) |
Returns the interaction energy between the given atoms.
|
double |
getG() |
|
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 |
setBox(Box newBox) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
void |
setG(double newG) |
|
double |
virial(IAtomList atoms) |
protected final Vector[] gradient
protected double g
public P1Smash(Space space)
public void setBox(Box newBox)
IPotentialsetBox in interface IPotentialpublic int nBody()
IPotentialnBody in interface IPotentialpublic void setG(double newG)
public double getG()
public double virial(IAtomList atoms)
virial in interface PotentialSoftpublic Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoftgradient in interface PotentialSoftpublic Vector[] gradient(IAtomList atoms)
PotentialSoftgradient in interface PotentialSoftpublic double energy(IAtomList atoms)
IPotentialAtomicenergy in interface IPotentialAtomicpublic double getRange()
IPotentialgetRange in interface IPotential