public class AgUcLattice extends AgLattice
Modifier and Type | Field and Description |
---|---|
private Point2D |
centralCartesianLocation |
private int[] |
shift
List to store free area that current atom has.
|
private int |
sizeI
How many unit cells are in X axis.
|
private int |
sizeJ
How many unit cells are in Y axis.
|
private AgUc[][] |
ucArray
Unit cell array.
|
private java.util.List<AgUc> |
ucList
Unit cell list.
|
Y_RATIO
Constructor and Description |
---|
AgUcLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
HopsPerStep distancePerStep,
int type)
Creates a lattice to work with hexagonal Ag simulation, based on unit cells (UC).
|
Modifier and Type | Method and Description |
---|---|
void |
changeOccupationByHand(double xMouse,
double yMouse,
int scale)
Changes the occupation of the clicked atom from unoccupied to occupied, or vice versa.
|
private AbstractGrowthAtom |
chooseClearAreaStep(AbstractGrowthAtom atom,
int distance) |
private AbstractGrowthAtom |
chooseClearAreaTerrace(AbstractGrowthAtom atom,
int distance) |
private void |
createAtoms(int type)
Creates all atoms and assigns it neighbours.
|
AgAtom |
getAtom(int iHexa,
int jHexa)
We ignore the unitCellPos by now, we get directly the atom of i,j hexagonal location.
|
AgAtom |
getAtom(int iHexa,
int jHexa,
int pos)
Returns an atom of given unit cell and lattice position.
|
int |
getAvailableDistance(AbstractGrowthAtom atom,
int thresholdDistance) |
float |
getCartSizeX() |
float |
getCartSizeY() |
AgAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
Point2D |
getCentralCartesianLocation() |
private int |
getClearAreaStep(AbstractGrowthAtom atom,
int thresholdDistance) |
private int |
getClearAreaTerrace(AbstractGrowthAtom atom,
int thresholdDistance)
We only care about the largest possible distance atoms.
|
private int |
getClearAreaTerrace(AbstractGrowthAtom atom,
int thresholdDistance,
boolean changeLevel,
int currentLevel,
int position,
int turnDirection,
byte errorCode) |
float |
getCoverage()
The area is the number of cells * 2.
|
AbstractGrowthAtom |
getFarSite(AbstractGrowthAtom atom,
int distance) |
AgUc |
getUc(int pos) |
AgUc |
getUc(int i,
int j) |
int |
size() |
deposit, extract, getCartesianLocation, getCartX, getCartY, getHexagonalCoordinates, getiHexa, getjHexa, getNeighbour, init
addAtom, addBondAtom, addOccupied, countIslands, countPerimeter, getAtom, getAtom, getAtomTypesCounter, getAverageGyradius, getCentreOfMass, getCmDistance, getDistancesToCentre, getDistanceToCenter, getDistanceToCenter, getEmptyTypesCounter, getInnerPerimeterLenght, getIsland, getIslandCount, getIslandIterator, getMobileAtoms, getMonomerCount, getMultiAtom, getMultiAtomCount, getMultiAtomIterator, getMultiAtomsIterator, getOccupied, getOuterPerimeterLenght, getTotalHops, getTracerDistance, identifyAddMultiAtom, identifyIsland, identifyRemoveMultiAtomIsland, initialiseRates, printDistances, reset, resetOccupied, setAngles, setAtoms, setAtomsTypesCounter, setInsideCircle, setInsideSquare, subtractOccupied, swapAtomsInMultiAtom, swapIsland
getHexaSizeI, getHexaSizeJ, getHexaSizeK, getUnitCellSize, isPaused, setHexaSizeI, setHexaSizeJ, setHexaSizeK, setPaused, setProbabilities, setUnitCellSize
private final Point2D centralCartesianLocation
private int sizeI
private int sizeJ
private java.util.List<AgUc> ucList
private AgUc[][] ucArray
private final int[] shift
public AgUcLattice(int hexaSizeI, int hexaSizeJ, ModifiedBuffer modified, HopsPerStep distancePerStep, int type)
hexaSizeI
- size in I direction. How many points horizontally.hexaSizeJ
- size in J direction. How many points vertically.modified
- temporary buffer.distancePerStep
- auxiliary class for Devita.type
- whether to use Ag simple, normal or concertedpublic float getCartSizeX()
getCartSizeX
in class AgLattice
public float getCartSizeY()
getCartSizeY
in class AgLattice
public AgUc getUc(int pos)
getUc
in class AbstractGrowthLattice
public AgUc getUc(int i, int j)
getUc
in class AbstractGrowthLattice
public float getCoverage()
getCoverage
in class AbstractGrowthLattice
public int size()
size
in class AbstractGrowthLattice
public AgAtom getAtom(int iHexa, int jHexa)
AbstractGrowthLattice
getAtom
in class AbstractGrowthLattice
public AgAtom getAtom(int iHexa, int jHexa, int pos)
getAtom
in class AbstractGrowthLattice
iHexa
- jHexa
- pos
- public AgAtom getCentralAtom()
AbstractGrowthLattice
getCentralAtom
in class AgLattice
public Point2D getCentralCartesianLocation()
getCentralCartesianLocation
in class AgLattice
public int getAvailableDistance(AbstractGrowthAtom atom, int thresholdDistance)
getAvailableDistance
in interface IDevitaLattice
getAvailableDistance
in class AgLattice
public AbstractGrowthAtom getFarSite(AbstractGrowthAtom atom, int distance)
getFarSite
in interface IDevitaLattice
getFarSite
in class AgLattice
public void changeOccupationByHand(double xMouse, double yMouse, int scale)
changeOccupationByHand
in class AgLattice
xMouse
- absolute X location of the pressed pointyMouse
- absolute Y location of the pressed pointscale
- zoom levelprivate void createAtoms(int type)
type
- 0 = AgAtomSimple, type 1 = AgAtom, type 2 = ConcertedAtom.private int getClearAreaTerrace(AbstractGrowthAtom atom, int thresholdDistance)
atom
- thresholdDistance
- private int getClearAreaTerrace(AbstractGrowthAtom atom, int thresholdDistance, boolean changeLevel, int currentLevel, int position, int turnDirection, byte errorCode)
private AbstractGrowthAtom chooseClearAreaTerrace(AbstractGrowthAtom atom, int distance)
atom
- origin atom.distance
- how far we have to move.private int getClearAreaStep(AbstractGrowthAtom atom, int thresholdDistance)
private AbstractGrowthAtom chooseClearAreaStep(AbstractGrowthAtom atom, int distance)