public class BoundaryTruncatedOctahedron extends Boundary
There are no subclasses for periodic and nonperiodic boundary conditions for this class because nonperiodic boundary conditions are not applicable for truncated octahedrons.
Modifier and Type | Field | Description |
---|---|---|
protected Vector |
dimensions |
|
protected Vector |
dimensionsHalf |
|
protected Vector |
intoTruncatedOctahedron |
|
protected Vector |
rrounded |
|
protected float[][] |
shift |
|
protected float[][] |
shift0 |
box, eventManager, inflateEvent, shape, space
Constructor | Description |
---|---|
BoundaryTruncatedOctahedron(Space _space) |
|
BoundaryTruncatedOctahedron(Space _space,
double boxSize) |
Modifier and Type | Method | Description |
---|---|---|
Vector |
centralImage(Vector r) |
Determines the translation vector needed to apply a periodic-image
transformation that moves the given point to an image point within the
boundary (if it lies outside, in a direction subject to periodic
imaging).
|
Vector |
getBoxSize() |
Returns the length of the sides of a rectangular box oriented in the lab
frame and in which the boundary is inscribed.
|
Vector |
getEdgeVector(int d) |
Returns the vector that defines the edge of this boundary for the given
dimension.
|
IndexIteratorSizable |
getIndexIterator() |
|
boolean |
getPeriodicity(int i) |
Returns true if the boundary is periodic in the given direction (as
defined by the getEdgeVector method).
|
double[][] |
imageOrigins(int nShells) |
Set of vectors describing the displacements needed to translate the
central image to all of the periodic images.
|
void |
nearestImage(Vector dr) |
The nearest image is the pair of atom images that are closest when all
periodic-boundary images are considered.
|
Vector |
randomPosition() |
|
void |
setBoxSize(Vector v) |
Scales the boundary dimensions such that the boundary's would be
inscribed within a rectangle of the of the given size.
|
getBox, getCenter, getEventManager, getPeriodicity, getShape, setBox, volume
protected final Vector intoTruncatedOctahedron
protected final Vector rrounded
protected final Vector dimensions
protected final Vector dimensionsHalf
protected final float[][] shift0
protected float[][] shift
public BoundaryTruncatedOctahedron(Space _space)
public BoundaryTruncatedOctahedron(Space _space, double boxSize)
public boolean getPeriodicity(int i)
Boundary
getPeriodicity
in class Boundary
i
- the dimension of the desired periodicitypublic final Vector getBoxSize()
Boundary
Manipulation of this copy will not cause any change to the boundary's dimensions.
getBoxSize
in class Boundary
public Vector randomPosition()
public IndexIteratorSizable getIndexIterator()
getIndexIterator
in class Boundary
public void setBoxSize(Vector v)
Boundary
setBoxSize
in class Boundary
v
- the box's new sizepublic Vector getEdgeVector(int d)
Boundary
getEdgeVector
in class Boundary
d
- the dimension of the desired edge vectorpublic double[][] imageOrigins(int nShells)
Boundary
imageOrigins
in class Boundary
nShells
- the number of shells of images to be computedpublic void nearestImage(Vector dr)
Boundary
If the vector passed to this method is the displacement vector between two points, the vector will be transformed such that it corresponds to the vector between the nearest image of those two points.
nearestImage
in class Boundary
dr
- the vector to be transformedpublic Vector centralImage(Vector r)
Boundary
centralImage
in class Boundary
r
- vector position of untransformed point; r is not changed by
this method