Configuration
, java.io.Serializable
public class ConfigurationLatticeSimple extends java.lang.Object implements Configuration, java.io.Serializable
Iteration over the indexes yields integer arrays, and with each iteration the array is passed to the site method of the lattice which returns the position for placement of the next molecule. Each array index is iterated to a maximum value determined by the number of molecules to be placed, the dimensions of the box in which they are placed, and the lattice constants of the lattice.
An instance of this class may be configured to place atoms such that they uniformly fill the volume of the box. It will attempt this by scaling the lattice constants of the configuration in an appropriate way. Success in getting a good spatial distribution may vary.
An instance can also be configured to remember the indices used to get lattice position for each molecule that is placed. This can be useful if it is desired to associate each molecule with a lattice site.
Modifier and Type | Field | Description |
---|---|---|
protected MoleculeActionTranslateTo |
atomActionTranslateTo |
|
protected IndexIteratorSizable |
indexIterator |
|
protected SpaceLattice |
lattice |
Constructor | Description |
---|---|
ConfigurationLatticeSimple(SpaceLattice lattice,
IndexIteratorSizable indexIterator,
Space space) |
Construct class that will place atoms on sites of the given lattice,
proceeding in the order resulting from iteration through the given index
iterator.
|
ConfigurationLatticeSimple(SpaceLattice lattice,
Space space) |
Constructs class using instance of IndexIteratorRectangular as the default
index iterator.
|
Modifier and Type | Method | Description |
---|---|---|
protected int[] |
calculateLatticeDimensions(int nCells,
Vector shape) |
|
void |
initializeCoordinates(Box box) |
Places the molecules in the given box on the positions of the
lattice.
|
protected final SpaceLattice lattice
protected final IndexIteratorSizable indexIterator
protected final MoleculeActionTranslateTo atomActionTranslateTo
public ConfigurationLatticeSimple(SpaceLattice lattice, Space space)
public ConfigurationLatticeSimple(SpaceLattice lattice, IndexIteratorSizable indexIterator, Space space)
public void initializeCoordinates(Box box)
initializeCoordinates
in interface Configuration
protected int[] calculateLatticeDimensions(int nCells, Vector shape)