public class CatalysisLattice extends AbstractGrowthLattice
Modifier and Type | Field and Description |
---|---|
private int[][] |
coverage
Current CO and O coverages, for sites BR, CUS.
|
private java.util.List<double[][]> |
last1000events |
private java.util.List<java.lang.Double> |
last1000eventsTime |
private int |
MAX |
private java.lang.String |
ratesLibrary |
(package private) java.util.ArrayList<LinearRegression> |
regressions |
Y_RATIO
Constructor and Description |
---|
CatalysisLattice(int hexaSizeI,
int hexaSizeJ,
java.lang.String ratesLibrary) |
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.
|
int |
countIslands(java.io.PrintWriter print)
There are no islands in catalysis.
|
private CatalysisAtom[][] |
createAtoms() |
private int |
createId(int i,
int j) |
void |
deposit(AbstractGrowthAtom a,
boolean forceNucleation) |
double |
extract(AbstractGrowthAtom a)
Extract the given atom from the lattice.
|
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) |
CatalysisAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
Point2D |
getCentralCartesianLocation() |
float |
getCoverage() |
float |
getCoverage(byte type) |
float[] |
getCoverages()
Computes a partial coverage for CO and O in BR and CUS sites.
|
AbstractGrowthAtom |
getFarSite(AbstractGrowthAtom atom,
int distance) |
float |
getGapCoverage() |
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.
|
AbstractGrowthAtom |
getNeighbour(int iHexa,
int jHexa,
int neighbour) |
double[] |
getR2() |
void |
init() |
void |
initialiseRates(double[][][] probabilities)
Default rates to jump from one type to the other.
|
boolean |
isStationary(double time)
Identifies stationary situation, when sufficient number of previous steps are saved and their
R² is lower than 0.1 for all the species.
|
void |
reset() |
private void |
updateCoCus(CatalysisAtom atom)
Check whether two CO^CUS atoms are together.
|
addAtom, addBondAtom, addOccupied, countPerimeter, getAtom, getAtom, getAtom, getAtom, getAtomTypesCounter, getAverageGyradius, getCentreOfMass, getCmDistance, 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, resetOccupied, setAngles, setAtoms, setAtomsTypesCounter, setInsideCircle, setInsideSquare, size, subtractOccupied, swapAtomsInMultiAtom, swapIsland
getHexaSizeI, getHexaSizeJ, getHexaSizeK, getUnitCellSize, isPaused, setHexaSizeI, setHexaSizeJ, setHexaSizeK, setPaused, setProbabilities, setUnitCellSize
private final java.lang.String ratesLibrary
private final int[][] coverage
private final java.util.List<double[][]> last1000events
private final java.util.List<java.lang.Double> last1000eventsTime
private final int MAX
java.util.ArrayList<LinearRegression> regressions
public CatalysisLattice(int hexaSizeI, int hexaSizeJ, java.lang.String ratesLibrary)
public boolean isStationary(double time)
time
- public double[] getR2()
public CatalysisAtom getCentralAtom()
AbstractGrowthLattice
getCentralAtom
in class AbstractGrowthLattice
public AbstractGrowthAtom getNeighbour(int iHexa, int jHexa, int neighbour)
getNeighbour
in class AbstractGrowthLattice
public float getCartSizeX()
getCartSizeX
in class AbstractGrowthLattice
public float getCartSizeY()
getCartSizeY
in class AbstractGrowthLattice
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 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 Point2D getCentralCartesianLocation()
getCentralCartesianLocation
in class AbstractGrowthLattice
public float getCoverage(byte type)
public float[] getCoverages()
public void initialiseRates(double[][][] probabilities)
probabilities
- Default rates.public void init()
public void deposit(AbstractGrowthAtom a, boolean forceNucleation)
deposit
in class AbstractGrowthLattice
public double extract(AbstractGrowthAtom a)
AbstractGrowthLattice
extract
in class AbstractGrowthLattice
a
- the atom to be extracted.public void reset()
reset
in class AbstractGrowthLattice
public float getCoverage()
getCoverage
in class AbstractGrowthLattice
public float getGapCoverage()
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 levelpublic int countIslands(java.io.PrintWriter print)
countIslands
in class AbstractGrowthLattice
print
- public int getAvailableDistance(AbstractGrowthAtom atom, int thresholdDistance)
public AbstractGrowthAtom getFarSite(AbstractGrowthAtom atom, int distance)
private int createId(int i, int j)
private CatalysisAtom[][] createAtoms()
private void updateCoCus(CatalysisAtom atom)
atom
-