Configuration
public class ConfigurationLatticeWithPlane extends ConfigurationLattice
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.
ConfigurationLattice.MyLattice
atomActionTranslateTo, boundaryPadding, indexIterator, lattice, myLat, positionDefinition, rescalingToFitVolume, space
Constructor | Description |
---|---|
ConfigurationLatticeWithPlane(SpaceLattice lattice,
Plane plane,
Space space) |
Constructs class using instance of IndexIteratorRectangular as the default
index iterator.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addSpecies(ISpecies newSpecies) |
|
float |
getSpeciesAllocation(ISpecies sp) |
Sets the initial allocation of the species on the left side
of the plane.
|
void |
initializeCoordinates(Box box) |
Places the molecules in the given box on the positions of the
lattice.
|
void |
removeSpecies(ISpecies remSpecies) |
|
void |
setSpeciesAllocation(ISpecies sp,
float pct) |
Sets the initial allocation of the species on the left side
of the plane.
|
calculateLatticeDimensions, getBoundaryPadding, getLatticeMemento, initializeCoordinates, isRescalingToFitVolume, setBoundaryPadding, setRescalingToFitVolume
public ConfigurationLatticeWithPlane(SpaceLattice lattice, Plane plane, Space space)
public void addSpecies(ISpecies newSpecies)
newSpecies
- : species that will need to be configuredpublic void removeSpecies(ISpecies remSpecies)
remSpecies
- : species that should be removed from configurationpublic void setSpeciesAllocation(ISpecies sp, float pct)
sp
- : Species to set allocation forpct
- : Percentage of species to initially allocate
on the left side of the plane (0.0 <= pct <= 1.0)public float getSpeciesAllocation(ISpecies sp)
sp
- : Species to set allocation forpublic void initializeCoordinates(Box box)
initializeCoordinates
in interface Configuration
initializeCoordinates
in class ConfigurationLattice