AtomLeafAgentManager.AgentSource<AtomNeighborLists>
, IntegratorListener
NeighborListManagerColloid
, NeighborListManagerSlanty
public class NeighborListManager extends java.lang.Object implements IntegratorListener, AtomLeafAgentManager.AgentSource<AtomNeighborLists>
Modifier and Type | Class | Description |
---|---|---|
static class |
NeighborListManager.AtomPotential1ListSource |
Modifier and Type | Field | Description |
---|---|---|
protected AtomLeafAgentManager<AtomPotentialList> |
agentManager1Body |
|
protected AtomLeafAgentManager<AtomNeighborLists> |
agentManager2Body |
|
protected Box |
box |
|
protected boolean |
initialized |
|
protected PotentialMasterList |
potentialMaster |
Constructor | Description |
---|---|
NeighborListManager(PotentialMasterList potentialMasterList,
double range,
Box box) |
|
NeighborListManager(PotentialMasterList potentialMasterList,
NeighborCellManager neighborCellManager,
double range,
Box box) |
Modifier and Type | Method | Description |
---|---|---|
void |
addAtomNotify(IAtom atom) |
Constructs neighbor lists for the given atom
|
void |
dispose() |
|
void |
ensureDownLists() |
|
boolean |
getDoApplyPBC() |
|
IAtomList[] |
getDownList(IAtom atom) |
|
NeighborListEventManager |
getEventManager() |
|
NeighborCellManager |
getNeighborCellManager() |
|
int |
getNumUpdates() |
Returns the number of times the neighbor lists have been updated.
|
BoxImposePbc |
getPbcEnforcer() |
|
AtomPotentialList |
getPotential1BodyList(IAtom atom) |
|
double |
getRange() |
|
int |
getUpdateInterval() |
Returns the interval for which neighbor update checks are performed.
|
IAtomList[] |
getUpList(IAtom atom) |
|
void |
integratorInitialized(IntegratorEvent e) |
Invoked when integration begins.
|
void |
integratorStepFinished(IntegratorEvent e) |
Invoked at the end of each integrator step.
|
void |
integratorStepStarted(IntegratorEvent e) |
Invoked at the beginning of each integrator step.
|
boolean |
isQuiet() |
|
AtomNeighborLists |
makeAgent(IAtom atom,
Box agentBox) |
Returns an agent for the given Atom.
|
protected void |
neighborSetup() |
Reassigns all interacting atoms to cells, then loops over all cell-list
neighbor pairs, determines for each pair whether a potential applies to it,
and if so, puts each in the other's neighbor list.
|
void |
releaseAgent(AtomNeighborLists nbrLists,
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 |
reset() |
For each box in the array, applies central image,
resets neighbors of all atoms, and sets up all neighbor
lists.
|
void |
setDoApplyPBC(boolean newDoApplyPBC) |
|
void |
setQuiet(boolean quiet) |
Sets the quiet flag, indicating if unsafe-neighbor conditions should generate
an error message (would not want this if atoms were inserted in a MC
move, for example).
|
void |
setRange(double d) |
Sets the interaction range, which affects the cell-list neighbor iteration
used to generate candidate neighbors for neighbor listing.
|
void |
setUpdateInterval(int updateInterval) |
Sets the interval for which neighbor update checks are performed.
|
void |
updateNbrsIfNeeded() |
Checks whether any atom needs neighbor list updating, and if
one is found, performs neighbor list updates of all atom
neighbor lists.
|
protected final PotentialMasterList potentialMaster
protected final AtomLeafAgentManager<AtomNeighborLists> agentManager2Body
protected final AtomLeafAgentManager<AtomPotentialList> agentManager1Body
protected Box box
protected boolean initialized
public NeighborListManager(PotentialMasterList potentialMasterList, double range, Box box)
public NeighborListManager(PotentialMasterList potentialMasterList, NeighborCellManager neighborCellManager, double range, Box box)
public NeighborCellManager getNeighborCellManager()
public boolean getDoApplyPBC()
public void setDoApplyPBC(boolean newDoApplyPBC)
public void integratorInitialized(IntegratorEvent e)
IntegratorListener
integratorInitialized
in interface IntegratorListener
public void integratorStepFinished(IntegratorEvent e)
IntegratorListener
integratorStepFinished
in interface IntegratorListener
public void integratorStepStarted(IntegratorEvent e)
IntegratorListener
integratorStepStarted
in interface IntegratorListener
public void reset()
public void updateNbrsIfNeeded()
public int getUpdateInterval()
public void setUpdateInterval(int updateInterval)
public int getNumUpdates()
public BoxImposePbc getPbcEnforcer()
protected void neighborSetup()
public void ensureDownLists()
public void addAtomNotify(IAtom atom)
public double getRange()
public void setRange(double d)
public boolean isQuiet()
public void setQuiet(boolean quiet)
quiet
- if true, no error will be generated; default is falsepublic AtomPotentialList getPotential1BodyList(IAtom atom)
public void dispose()
public NeighborListEventManager getEventManager()
public AtomNeighborLists makeAgent(IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSource
makeAgent
in interface AtomLeafAgentManager.AgentSource<AtomNeighborLists>
agentBox
- TODOpublic void releaseAgent(AtomNeighborLists nbrLists, IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSource
releaseAgent
in interface AtomLeafAgentManager.AgentSource<AtomNeighborLists>