public class BaseVoronoiCell
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Atom |
Atom
Atom at the center of this cell
|
protected java.util.List<BaseVoronoiFace> |
Faces
List of faces
|
protected boolean |
Radical
Whether to use radical plane method
|
protected double |
Volume
Volume of cell.
|
Constructor and Description |
---|
BaseVoronoiCell(Atom atom,
boolean radical)
Initialize a Voronoi cell for a specific atom.
|
Modifier and Type | Method and Description |
---|---|
boolean |
geometryIsValid()
Determine whether the geometry of this structure is sound.
|
Atom |
getAtom()
Get atom at center of this cell
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getCoordinationShellShape(java.util.List<BaseVoronoiCell> cells)
Get the shape of the coordination polyhedron around this atom.
|
java.util.List<BaseVoronoiFace> |
getExtendedFaces(java.util.List<BaseVoronoiCell> cells,
int index)
Get faces on the outside of a polyhedron formed by the Voronoi
cells and its neighbors.
|
java.util.Set<BaseVoronoiFace> |
getFaces()
Get all faces
|
double |
getMaximumVertexDistance()
Get largest distance between any two vertices
|
double |
getMinimumVertexDistance()
Get closest distance between any two vertices
|
double[] |
getNeighborDistances()
Get distances between central atom and each neighbor.
|
java.util.List<AtomImage> |
getNeighbors()
Get list of neighboring atoms.
|
java.util.Map<AtomImage,java.lang.Double> |
getNeighborsByWalks(java.util.List<BaseVoronoiCell> cells,
int shell)
Get the neighbors in a certain shell, along with weights defined by face sizes.
|
java.util.Set<AtomImage> |
getNeighborShell(java.util.List<BaseVoronoiCell> cells,
int index)
Get list of atoms in a certain coordination shell.
|
java.util.List<java.util.Set<AtomImage>> |
getNeighborShells(java.util.List<BaseVoronoiCell> cells,
int index)
Get list of atoms in all coordination cells.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getNeighborTypes()
Get the number of neighbors of each type
|
protected int |
getNumberSharedBonds(BaseVoronoiCell cell,
int[] direction,
java.util.List<AtomImage> neighbors)
Compute number of shared bonds.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getPolyhedronShape()
Compute the polyhedron shape index.
|
double |
getSurfaceArea()
Get surface area of cell
|
java.util.Set<BaseVoronoiVertex> |
getVertices()
Get all vertices in this cell
|
double |
getVolume()
Get volume of this cell
|
int |
nFaces() |
protected final Atom Atom
protected final java.util.List<BaseVoronoiFace> Faces
protected final boolean Radical
protected double Volume
public BaseVoronoiCell(Atom atom, boolean radical)
atom
- Atom at center of cellradical
- Whether to add faces using the radical plane Voronoi
tessellation method.VoronoiTessellationCalculator
public Atom getAtom()
public java.util.Set<BaseVoronoiFace> getFaces()
public int nFaces()
public java.util.Set<BaseVoronoiVertex> getVertices()
public java.util.Map<java.lang.Integer,java.lang.Integer> getNeighborTypes()
public java.util.List<AtomImage> getNeighbors()
public double[] getNeighborDistances()
public java.util.List<BaseVoronoiFace> getExtendedFaces(java.util.List<BaseVoronoiCell> cells, int index)
Note: The coordinates of the center of each face may not be correct.
cells
- Voronoi cells of all other atoms (arranged by Atom ID)index
- Index of largest neighbor shell to be included
(0 == faces of atom, 1 == faces of atom + 1st nearest neighbor shell, etc.)public java.util.List<java.util.Set<AtomImage>> getNeighborShells(java.util.List<BaseVoronoiCell> cells, int index)
cells
- Voronoi cells of all other atoms (arranged by atom ID)index
- Index of largest neighbor shell to be consideredpublic java.util.Map<AtomImage,java.lang.Double> getNeighborsByWalks(java.util.List<BaseVoronoiCell> cells, int shell)
The neighbor shell of an atom is typically defined as all atoms that can be reach ed in no fewer than a certain number of steps along the a network defined by faces of a Voronoi tessellation. While this works in theory, it is complicated by the fact that Voronoi tessellations computed numerically often contain very small faces due to numerical problems. These atoms with very small faces would be conventionally defined as 2nd nearest neighbors but, due to the small faces, would be counted as as 1st nearest neighbors.
To combat this problem, we weighing each neighbor based on the face sizes. For a first neighbor shell, the weight of an atom is associated with its the fraction of the surface area of the cell related to the area of the face corresponding to it. To extend this idea to shells past the 1st, we compute the probability of a walker originating from this cell ends up at a certain atom after N, non-backtracking walks where the probability that it will take a certain step is related to the fraction of the face size area.
For example, let's assume this cell is part of a simple-cubic crystal, where each cell has 6, equally-sized faces. The probability that it ends up at any first shell neighbor is 1/6. After this step, there are 5 possible steps (no backtracking). So, each walk has an equal probability of 1/30. There are six atoms that are two steps in the same direction (ex: 2,0,0), which can be reached by only 1 path and therefore have 1/30 weight. Additionally, there are 12 atoms that can be reached by 2 different sets of two orthogonal steps (ex: 1,1,0) that, therefore, have a weight of 2/30.
cells
- Voronoi cells of all other atoms (arranged by atom ID)shell
- Which neighbor shell to evaluatepublic java.util.Set<AtomImage> getNeighborShell(java.util.List<BaseVoronoiCell> cells, int index)
cells
- Voronoi cells of all other atoms (arranged by atom ID)index
- Index of neighbor shellpublic java.util.Map<java.lang.Integer,java.lang.Integer> getCoordinationShellShape(java.util.List<BaseVoronoiCell> cells)
Citation: Ward et al. PRB (2013)
cells
- Voronoi cells of all other atoms (arranged by atom ID)protected int getNumberSharedBonds(BaseVoronoiCell cell, int[] direction, java.util.List<AtomImage> neighbors)
This code determines how many common entries occur between a Voronoi cell and a list of neighbor IDs from this cell. Note that in order for bonds to be shared, they must connect to the same image of a certain atom. That is where the direction parameter comes into play.
cell
- Voronoi cell of neighboring atomdirection
- Difference between image of neighboring atom and this cellneighbors
- IDs and Image Positions of all neighboring atoms to this cellpublic java.util.Map<java.lang.Integer,java.lang.Integer> getPolyhedronShape()
Citation: Finney (1970)
public double getVolume()
public double getSurfaceArea()
public double getMinimumVertexDistance()
public double getMaximumVertexDistance()
public boolean geometryIsValid()