AtomLeafAgentManager.AgentSource<P2HardBondedList.BondArrayList>
, IPotential
, IPotentialAtomic
, PotentialHard
public class P2HardBondedList extends Potential2 implements PotentialHard, AtomLeafAgentManager.AgentSource<P2HardBondedList.BondArrayList>
Modifier and Type | Class | Description |
---|---|---|
class |
P2HardBondedList.BondArrayList |
Constructor | Description |
---|---|
P2HardBondedList(Simulation sim,
PotentialHard bondedPotential,
PotentialHard nonBondedPotential) |
Modifier and Type | Method | Description |
---|---|---|
void |
bump(IAtomList pair,
double falseTime) |
Implements the collision dynamics.
|
double |
collisionTime(IAtomList pair,
double falseTime) |
Computes the time of collision of the given atom(s) with the hard
potential, assuming no intervening collisions.
|
double |
energy(IAtomList pair) |
Returns the interaction energy between the given atoms.
|
double |
energyChange() |
returns change in potential energy due to the last collision
|
P2HardBondedList.BondArrayList |
getBondedList(IAtom atom) |
Returns the list containing the bonds for the given atom.
|
double |
getRange() |
Returns the range over which the potential applies.
|
boolean |
isBonded(IAtomList pair) |
|
boolean |
isBonded(IAtom atom0,
IAtom atom1) |
Returns true if the pair of atoms are on each others' bonded list; false otherwise.
|
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.
|
P2HardBondedList.BondArrayList |
makeAgent(IAtom a,
Box agentBox) |
Returns an agent for the given Atom.
|
void |
releaseAgent(P2HardBondedList.BondArrayList agent,
IAtom atom,
Box agentBox) |
This informs the agent source that the agent is going away and that
the agent source should disconnect the agent from other elements.
|
void |
setBonded(boolean bonding,
IAtom atom0,
IAtom atom1,
double bondLengthSquared) |
Adds/removes the pair of atoms to/from each other's bonded list.
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts.
|
nBody
public P2HardBondedList(Simulation sim, PotentialHard bondedPotential, PotentialHard nonBondedPotential)
public double getRange()
IPotential
getRange
in interface IPotential
getRange
in class Potential
public void bump(IAtomList pair, double falseTime)
PotentialHard
bump
in interface PotentialHard
public double collisionTime(IAtomList pair, 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 energy(IAtomList pair)
Potential
energy
in interface IPotentialAtomic
energy
in class Potential
public void setBox(Box box)
Potential
setBox
in interface IPotential
setBox
in class Potential
public boolean isBonded(IAtom atom0, IAtom atom1)
public boolean isBonded(IAtomList pair)
public void setBonded(boolean bonding, IAtom atom0, IAtom atom1, double bondLengthSquared)
bonding
- true for adding to bonded list; false for removingjava.lang.IndexOutOfBoundsException
- if specifying unbonding, and atoms are not bonded alreadypublic P2HardBondedList.BondArrayList getBondedList(IAtom atom)
public P2HardBondedList.BondArrayList makeAgent(IAtom a, Box agentBox)
AtomLeafAgentManager.AgentSource
makeAgent
in interface AtomLeafAgentManager.AgentSource<P2HardBondedList.BondArrayList>
agentBox
- TODOpublic void releaseAgent(P2HardBondedList.BondArrayList agent, IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSource
releaseAgent
in interface AtomLeafAgentManager.AgentSource<P2HardBondedList.BondArrayList>