public class GrapheneLattice extends AbstractGrowthLattice
Modifier and Type | Field and Description |
---|---|
private Point2D |
centralCartesianLocation |
private static double |
COS30 |
private static double |
COS60 |
private static int[] |
latticeNeighborhoodData |
Y_RATIO
Constructor and Description |
---|
GrapheneLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
HopsPerStep distancePerStep,
java.lang.Class<?> inputClass) |
Modifier and Type | Method and Description |
---|---|
private void |
add1stNeighbour(GrapheneAtom atom,
boolean forceNucleation) |
private void |
add2ndNeighbour(GrapheneAtom atom) |
private void |
add3rdNeighbour(GrapheneAtom atom) |
void |
changeOccupationByHand(double xMouse,
double yMouse,
int scale)
Changes the occupation of the clicked atom from unoccupied to occupied, or vice versa.
|
private AbstractGrowthAtom |
chooseClearAreaTerrace(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance,
double raw) |
private GrapheneAtom[][] |
createAtoms(int hexaSizeI,
int hexaSizeJ,
HopsPerStep distancePerStep,
java.lang.Class<?> inputClass)
Creates the atom array for graphene.
|
private int |
createId(int i,
int j) |
void |
deposit(AbstractGrowthAtom a,
boolean forceNucleation) |
private void |
evaluateModifiedWhenAddNeigh(GrapheneAtom atom,
byte newType) |
private void |
evaluateModifiedWhenRemNeigh(GrapheneAtom atom,
byte newType) |
double |
extract(AbstractGrowthAtom a)
Extrae el átomo de este lugar (pásalo a no occupied y reduce la vecindad de los átomos vecinos,
si cambia algún tipo, recalcula probabilidades)
|
int |
getAvailableDistance(AbstractGrowthAtom atom,
int thresholdDistance) |
Point2D |
getCartesianLocation(int iHexa,
int jHexa)
Obtains the spatial location of certain atom, the distance between atoms is considered as 1
Returns the Cartesian position, given the hexagonal (lattice) location.
|
float |
getCartSizeX() |
float |
getCartSizeY() |
double |
getCartX(int iHexa,
int jHexa) |
double |
getCartY(int jHexa) |
GrapheneAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
Point2D |
getCentralCartesianLocation() |
private int |
getClearAreaArmchair(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance,
int[] destinationIndex,
double raw) |
private int |
getClearAreaTerrace(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance) |
private int |
getClearAreaZigzag(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance,
int[] destinationIndex,
double raw) |
AbstractGrowthAtom |
getFarSite(AbstractGrowthAtom atom,
int distance) |
int |
getHexaPosI(int iHexa,
int jHexa,
int pos,
boolean type0) |
int |
getHexaPosJ(int iHexa,
int jHexa,
int pos,
boolean type0) |
int |
getiHexa(double xCart,
double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
int |
getjHexa(double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
GrapheneAtom |
getNeighbour(int xCart,
int yCart,
int neighbour) |
private static void |
initialiseNeighborHoodCache() |
private void |
remove1stNeighbour(GrapheneAtom atom) |
private void |
remove2ndNeighbour(GrapheneAtom atom) |
private void |
remove3rdNeighbour(GrapheneAtom atom) |
addAtom, addBondAtom, addOccupied, countIslands, countPerimeter, getAtom, getAtom, getAtom, getAtom, getAtomTypesCounter, getAverageGyradius, getCentreOfMass, getCmDistance, getCoverage, getDistancesToCentre, getDistanceToCenter, getDistanceToCenter, getEmptyTypesCounter, getInnerPerimeterLenght, getIsland, getIslandCount, getIslandIterator, getMobileAtoms, getMonomerCount, getMultiAtom, getMultiAtomCount, getMultiAtomIterator, getMultiAtomsIterator, getOccupied, getOuterPerimeterLenght, getTotalHops, getTracerDistance, getUc, getUc, identifyAddMultiAtom, identifyIsland, identifyRemoveMultiAtomIsland, initialiseRates, printDistances, reset, resetOccupied, setAngles, setAtoms, setAtomsTypesCounter, setInsideCircle, setInsideSquare, size, subtractOccupied, swapAtomsInMultiAtom, swapIsland
getHexaSizeI, getHexaSizeJ, getHexaSizeK, getUnitCellSize, isPaused, setHexaSizeI, setHexaSizeJ, setHexaSizeK, setPaused, setProbabilities, setUnitCellSize
private static int[] latticeNeighborhoodData
private static final double COS60
private static final double COS30
private final Point2D centralCartesianLocation
public GrapheneLattice(int hexaSizeI, int hexaSizeJ, ModifiedBuffer modified, HopsPerStep distancePerStep, java.lang.Class<?> inputClass)
public GrapheneAtom getCentralAtom()
AbstractGrowthLattice
getCentralAtom
in class AbstractGrowthLattice
public GrapheneAtom getNeighbour(int xCart, int yCart, int neighbour)
getNeighbour
in class AbstractGrowthLattice
public int getHexaPosI(int iHexa, int jHexa, int pos, boolean type0)
public int getHexaPosJ(int iHexa, int jHexa, int pos, boolean type0)
public int getAvailableDistance(AbstractGrowthAtom atom, int thresholdDistance)
public AbstractGrowthAtom getFarSite(AbstractGrowthAtom atom, int distance)
public float getCartSizeX()
getCartSizeX
in class AbstractGrowthLattice
public float getCartSizeY()
getCartSizeY
in class AbstractGrowthLattice
public Point2D getCentralCartesianLocation()
getCentralCartesianLocation
in class AbstractGrowthLattice
public final Point2D getCartesianLocation(int iHexa, int jHexa)
AbstractGrowthLattice
getCartesianLocation
in class AbstractGrowthLattice
iHexa
- i index in the hexagonal mesh.jHexa
- j index in the hexagonal mesh.public double getCartX(int iHexa, int jHexa)
getCartX
in class AbstractGrowthLattice
public double getCartY(int jHexa)
getCartY
in class AbstractGrowthLattice
public int getiHexa(double xCart, double yCart)
AbstractGrowthLattice
getiHexa
in class AbstractGrowthLattice
xCart
- Cartesian X coordinate.yCart
- Cartesian Y coordinate.public int getjHexa(double yCart)
AbstractGrowthLattice
getjHexa
in class AbstractGrowthLattice
yCart
- Cartesian Y coordinate.public void deposit(AbstractGrowthAtom a, boolean forceNucleation)
deposit
in class AbstractGrowthLattice
public double extract(AbstractGrowthAtom a)
extract
in class AbstractGrowthLattice
a
- atom to be extracted.public void changeOccupationByHand(double xMouse, double yMouse, int scale)
changeOccupationByHand
in class AbstractGrowthLattice
xMouse
- absolute X location of the pressed pointyMouse
- absolute Y location of the pressed pointscale
- zoom levelprivate static void initialiseNeighborHoodCache()
private int createId(int i, int j)
private GrapheneAtom[][] createAtoms(int hexaSizeI, int hexaSizeJ, HopsPerStep distancePerStep, java.lang.Class<?> inputClass)
hexaSizeI
- even number of the size in hexagonal lattice points. Currently it is
represented vertically starting from the tophexaSizeJ
- even number of the size in hexagonal lattice points. Currently it is
represented horizontally starting from the leftdistancePerStep
- private AbstractGrowthAtom chooseClearAreaTerrace(short iHexaOrigin, short jHexaOrigin, int thresholdDistance, double raw)
private int getClearAreaTerrace(short iHexaOrigin, short jHexaOrigin, int thresholdDistance)
private int getClearAreaZigzag(short iHexaOrigin, short jHexaOrigin, int thresholdDistance, int[] destinationIndex, double raw)
private int getClearAreaArmchair(short iHexaOrigin, short jHexaOrigin, int thresholdDistance, int[] destinationIndex, double raw)
private void add1stNeighbour(GrapheneAtom atom, boolean forceNucleation)
private void add2ndNeighbour(GrapheneAtom atom)
private void add3rdNeighbour(GrapheneAtom atom)
private void remove1stNeighbour(GrapheneAtom atom)
private void remove2ndNeighbour(GrapheneAtom atom)
private void remove3rdNeighbour(GrapheneAtom atom)
private void evaluateModifiedWhenRemNeigh(GrapheneAtom atom, byte newType)
private void evaluateModifiedWhenAddNeigh(GrapheneAtom atom, byte newType)