|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.nbr.list.NeighborListManager
public class NeighborListManager
Initiates the process of updating the neighbor lists. Instance is constructed by PotentialMasterNbr constructor. Acts as a listener of the integrator(s), and performs the update at regular intervals upon receiving interval events. Each event causes the manager to loop through all boxs acted upon by the integrator (as given by the integrator's getBox method), and check each atom against any neighbor criteria that apply to it, seeing if it has changed (e.g., moved) in a way that requires its neighbor lists to be updated. When this is found for any atom, all atom neighbor lists are updated via a call to the calculate method of PotentialMasterNbr, passing a PotentialCalculationCellAssign instance as the PotentialCalculation.
| Nested Class Summary | |
|---|---|
static class |
NeighborListManager.AtomPotential1ListSource
|
| Field Summary | |
|---|---|
protected AtomSetSinglet |
atomSetSinglet
|
protected IBox |
box
|
protected boolean |
doApplyPBC
|
protected boolean |
initialized
|
protected PotentialMasterList |
potentialMaster
|
| Constructor Summary | |
|---|---|
NeighborListManager(PotentialMasterList potentialMasterList,
double range,
IBox box,
ISpace space)
Configures instance for use by the given PotentialMaster. |
|
| Method Summary | |
|---|---|
void |
addAtomNotify(IAtom atom)
Constructs neighbor lists for the given atom |
void |
dispose()
|
Class |
getAgentClass()
Returns the Class of the agent. |
NeighborCriterion[] |
getCriterion(IAtomType atomType)
|
boolean |
getDoApplyPBC()
|
IAtomList[] |
getDownList(IAtom atom)
|
NeighborListEventManager |
getEventManager()
|
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(IIntegratorEvent e)
Invoked when integration begins. |
void |
integratorStepFinished(IIntegratorEvent e)
Invoked at the end of each integrator step. |
void |
integratorStepStarted(IIntegratorEvent e)
Invoked at the beginning of each integrator step. |
boolean |
isQuiet()
|
Object |
makeAgent(IAtom atom)
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(Object agent,
IAtom atom)
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 |
setPbcEnforcer(BoxImposePbc pbcEnforcer)
|
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 |
updateLists()
|
void |
updateNbrsIfNeeded()
Checks whether any atom needs neighbor list updating, and if one is found, performs neighbor list updates of all atom neighbor lists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final AtomSetSinglet atomSetSinglet
protected final PotentialMasterList potentialMaster
protected IBox box
protected boolean initialized
protected boolean doApplyPBC
| Constructor Detail |
|---|
public NeighborListManager(PotentialMasterList potentialMasterList,
double range,
IBox box,
ISpace space)
| Method Detail |
|---|
public void setDoApplyPBC(boolean newDoApplyPBC)
public boolean getDoApplyPBC()
public void updateLists()
public void integratorInitialized(IIntegratorEvent e)
IIntegratorListener
integratorInitialized in interface IIntegratorListenerpublic void integratorStepFinished(IIntegratorEvent e)
IIntegratorListener
integratorStepFinished in interface IIntegratorListenerpublic void integratorStepStarted(IIntegratorEvent e)
IIntegratorListener
integratorStepStarted in interface IIntegratorListenerpublic void reset()
public void updateNbrsIfNeeded()
public int getUpdateInterval()
public void setUpdateInterval(int updateInterval)
public NeighborCriterion[] getCriterion(IAtomType atomType)
public BoxImposePbc getPbcEnforcer()
public void setPbcEnforcer(BoxImposePbc pbcEnforcer)
pbcEnforcer - The pbcEnforcer to set.protected void neighborSetup()
box - box in which neighbor setup is performed.public void addAtomNotify(IAtom atom)
public void setRange(double d)
public double getRange()
public boolean isQuiet()
public void setQuiet(boolean quiet)
quiet - if true, no error will be generated; default is falsepublic IAtomList[] getUpList(IAtom atom)
public IAtomList[] getDownList(IAtom atom)
public AtomPotentialList getPotential1BodyList(IAtom atom)
public void dispose()
public NeighborListEventManager getEventManager()
public Class getAgentClass()
AtomLeafAgentManager.AgentSource
getAgentClass in interface AtomLeafAgentManager.AgentSourcepublic Object makeAgent(IAtom atom)
AtomLeafAgentManager.AgentSource
makeAgent in interface AtomLeafAgentManager.AgentSource
public void releaseAgent(Object agent,
IAtom atom)
AtomLeafAgentManager.AgentSource
releaseAgent in interface AtomLeafAgentManager.AgentSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||