BoxCellManager
, MoleculeAgentManager.MoleculeAgentSource
, BoundaryEventListener
, java.io.Serializable
NeighborCellManagerListMolecular
public class NeighborCellManagerMolecular extends java.lang.Object implements BoxCellManager, BoundaryEventListener, MoleculeAgentManager.MoleculeAgentSource, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected MoleculeAgentManager |
agentManager |
|
protected Box |
box |
|
protected int |
cellRange |
|
protected boolean |
doApplyPBC |
|
protected CellLattice |
lattice |
|
protected IMoleculePositionDefinition |
moleculeSite |
|
protected int[] |
numCells |
|
protected IMoleculePositionDefinition |
positionDefinition |
|
protected double |
range |
|
protected Simulation |
sim |
|
protected Space |
space |
|
protected Vector |
v |
Constructor | Description |
---|---|
NeighborCellManagerMolecular(Simulation sim,
Box box,
double potentialRange,
IMoleculePositionDefinition positionDefinition,
Space space) |
Construct manager for neighbor cells in the given box.
|
NeighborCellManagerMolecular(Simulation sim,
Box box,
double potentialRange,
Space _space) |
Constructs manager for neighbor cells in the given box.
|
Modifier and Type | Method | Description |
---|---|---|
void |
assignCell(IMolecule molecule) |
Assigns the cell for the given atom.
|
void |
assignCellAll() |
Assigns cells to all interacting atoms in the box.
|
void |
boundaryInflate(BoundaryEvent e) |
Informs the listener that the boundary shape and/or size has changed.
|
protected boolean |
checkDimensions() |
Checks the box's dimensions to make sure the number of cells is
appropriate.
|
CellMolecular |
getCell(IMolecule molecule) |
|
int |
getCellRange() |
Returns the cellRange.
|
boolean |
getDoApplyPBC() |
|
CellLattice |
getLattice() |
Returns the lattice that defines the cell arrangement.
|
double |
getPotentialRange() |
Returns the potential range.
|
java.lang.Object |
makeAgent(IMolecule molecule) |
Returns the cell containing the given atom.
|
IListener |
makeMCMoveListener() |
|
void |
releaseAgent(java.lang.Object cell,
IMolecule molecule) |
Removes the given atom from the cell.
|
void |
setCellRange(int newCellRange) |
Sets the cell range to the given value.
|
void |
setDoApplyPBC(boolean newDoApplyPBC) |
|
void |
setPotentialRange(double newRange) |
Sets the potential range to the given value.
|
protected final Simulation sim
protected final CellLattice lattice
protected final IMoleculePositionDefinition positionDefinition
protected final Box box
protected int cellRange
protected double range
protected final MoleculeAgentManager agentManager
protected boolean doApplyPBC
protected final Vector v
protected final int[] numCells
protected IMoleculePositionDefinition moleculeSite
protected Space space
public NeighborCellManagerMolecular(Simulation sim, Box box, double potentialRange, Space _space)
public NeighborCellManagerMolecular(Simulation sim, Box box, double potentialRange, IMoleculePositionDefinition positionDefinition, Space space)
public void setDoApplyPBC(boolean newDoApplyPBC)
public boolean getDoApplyPBC()
public CellLattice getLattice()
BoxCellManager
getLattice
in interface BoxCellManager
public void setPotentialRange(double newRange)
public double getPotentialRange()
public int getCellRange()
public void setCellRange(int newCellRange)
public void boundaryInflate(BoundaryEvent e)
BoundaryEventListener
boundaryInflate
in interface BoundaryEventListener
e
- event, which can be used to determine the boundary that changed.protected boolean checkDimensions()
public void assignCellAll()
assignCellAll
in interface BoxCellManager
public CellMolecular getCell(IMolecule molecule)
public void assignCell(IMolecule molecule)
public IListener makeMCMoveListener()
public java.lang.Object makeAgent(IMolecule molecule)
makeAgent
in interface MoleculeAgentManager.MoleculeAgentSource
public void releaseAgent(java.lang.Object cell, IMolecule molecule)
releaseAgent
in interface MoleculeAgentManager.MoleculeAgentSource