public class P1Smash extends java.lang.Object implements PotentialSoft
Modifier and Type | Field and Description |
---|---|
protected double |
g |
protected IVectorMutable[] |
gradient |
Modifier and Type | Method and 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.
|
IVector[] |
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.
|
IVector[] |
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(IBox 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 IVectorMutable[] gradient
protected double g
public P1Smash(ISpace space)
public void setBox(IBox newBox)
etomica.api.IPotential
setBox
in interface IPotential
public int nBody()
etomica.api.IPotential
nBody
in interface IPotential
public void setG(double newG)
public double getG()
public double virial(IAtomList atoms)
virial
in interface PotentialSoft
public IVector[] gradient(IAtomList atoms, Tensor pressureTensor)
etomica.potential.PotentialSoft
gradient
in interface PotentialSoft
public IVector[] gradient(IAtomList atoms)
etomica.potential.PotentialSoft
gradient
in interface PotentialSoft
public double energy(IAtomList atoms)
etomica.api.IPotentialAtomic
energy
in interface IPotentialAtomic
public double getRange()
etomica.api.IPotential
getRange
in interface IPotential