java.io.Serializable
PrimitiveBcc
, PrimitiveCubic
, PrimitiveFcc
, PrimitiveGeneral
, PrimitiveHexagonal
, PrimitiveHexagonal2D
, PrimitiveMonoclinic
, PrimitiveOrthorhombic
, PrimitiveOrthorhombicHexagonal
, PrimitiveTetragonal
, PrimitiveTriclinic
, PrimitiveTrigonal
public abstract class Primitive
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected double[] |
angle |
|
protected int |
D |
|
protected int[] |
idx |
|
protected Vector[] |
latticeVectors |
|
protected static double |
rightAngle |
|
protected double[] |
size |
|
protected Space |
space |
Constructor | Description |
---|---|
Primitive(Space space) |
This constructor is called directly when a Primitive is constructing
its reciprocal primitive.
|
Modifier and Type | Method | Description |
---|---|---|
abstract Primitive |
copy() |
Returns a new, identical instance of this primitive.
|
double[] |
getSize() |
Returns a new array with values equal to the lengths of the primitive vectors.
|
Space |
getSpace() |
|
abstract int[] |
latticeIndex(Vector r) |
Returns the index which would give the unit cell containing the given
point if the index were passed to a the site method of a sufficiently
large lattice that uses this primitive.
|
abstract int[] |
latticeIndex(Vector r,
int[] dimensions) |
Same as latticeIndex(Space.Vector), but gives index for periodic system
with number of unit cells in each direction as given by the dimensions array.
|
abstract Primitive |
makeReciprocal() |
Method defining and constructing reciprocal primitive;
|
abstract void |
scaleSize(double scale) |
Scales (multiplies) the size of each primitive vector by the given value.
|
protected void |
setAngles(double[] newAngle) |
Sets the angles between the primitive vector to the corresponding
values in the given array.
|
protected void |
setSize(double[] newSize) |
Sets the length of each primitive vector to the corresponding
value in the given array.
|
Polytope |
unitCell() |
Returns a the unit cell specified by this primitive.
|
protected abstract void |
update() |
|
Vector[] |
vectors() |
Returns the primitive vectors.
|
abstract Polytope |
wignerSeitzCell() |
Returns the Wigner-Seitz cell specified by this primitive.
|
protected final Vector[] latticeVectors
protected final int[] idx
protected final int D
protected final double[] size
protected final double[] angle
protected final Space space
protected static final double rightAngle
public Primitive(Space space)
public abstract Primitive makeReciprocal()
public final Space getSpace()
public double[] getSize()
protected final void setSize(double[] newSize)
protected final void setAngles(double[] newAngle)
protected abstract void update()
public abstract void scaleSize(double scale)
public Vector[] vectors()
public abstract Primitive copy()
public abstract int[] latticeIndex(Vector r)
public abstract int[] latticeIndex(Vector r, int[] dimensions)
public abstract Polytope wignerSeitzCell()
public Polytope unitCell()