IPotential
, IPotentialAtomic
, Potential2Spherical
, PotentialHard
public class P2XOrder extends Potential2 implements Potential2Spherical, PotentialHard
Modifier and Type | Field | Description |
---|---|---|
protected Box |
box |
|
protected Vector |
dr |
|
protected boolean |
hasPBC |
|
protected Potential2HardSpherical |
wrappedPotential |
Constructor | Description |
---|---|
P2XOrder(Space space,
Potential2HardSpherical wrappedPotential) |
Modifier and Type | Method | Description |
---|---|---|
void |
bump(IAtomList atom,
double falseTime) |
Implements the collision dynamics.
|
double |
collisionTime(IAtomList atom,
double falseTime) |
Computes the time of collision of the given atom(s) with the hard
potential, assuming no intervening collisions.
|
double |
energy(IAtomList pair) |
Interaction energy of the pair.
|
double |
energyChange() |
returns change in potential energy due to the last collision
|
double |
getRange() |
Returns infinity.
|
Potential2Spherical |
getWrappedPotential() |
|
double |
lastCollisionVirial() |
Value of the virial from the most recent collision.
|
Tensor |
lastCollisionVirialTensor() |
Value of the virial from the most recent collision, decomposed into it
tensoral elements.
|
void |
setBox(Box newBox) |
Informs the potential of the box on which it acts.
|
double |
u(double r2) |
The pair energy u(r^2) with no truncation applied.
|
nBody
protected final Vector dr
protected Box box
protected Potential2HardSpherical wrappedPotential
protected boolean hasPBC
public P2XOrder(Space space, Potential2HardSpherical wrappedPotential)
public double energy(IAtomList pair)
energy
in interface IPotentialAtomic
energy
in class Potential
public double getRange()
getRange
in interface IPotential
getRange
in class Potential
public Potential2Spherical getWrappedPotential()
public void setBox(Box newBox)
Potential
setBox
in interface IPotential
setBox
in class Potential
public void bump(IAtomList atom, double falseTime)
PotentialHard
bump
in interface PotentialHard
public double collisionTime(IAtomList atom, double falseTime)
PotentialHard
collisionTime
in interface PotentialHard
public double energyChange()
PotentialHard
energyChange
in interface PotentialHard
public double lastCollisionVirial()
PotentialHard
lastCollisionVirial
in interface PotentialHard
public Tensor lastCollisionVirialTensor()
PotentialHard
lastCollisionVirialTensor
in interface PotentialHard
public double u(double r2)
Potential2Spherical
u
in interface Potential2Spherical
r2
- the square of the distance between the particles.