etomica.lattice.crystal
Class PrimitiveHexagonal2D

java.lang.Object
  extended by etomica.lattice.crystal.Primitive
      extended by etomica.lattice.crystal.PrimitiveHexagonal2D
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PrimitiveHexagonal2D.PrimitiveHexagonal2DReciprocal

public class PrimitiveHexagonal2D
extends Primitive

Primitive group for a 2D hexagonal system. Primitive-vector angle is 120 degrees and two vectors are of equal length.

See Also:
Serialized Form

Nested Class Summary
protected static class PrimitiveHexagonal2D.PrimitiveHexagonal2DReciprocal
           
 
Field Summary
protected  double ab
           
protected static double cosGamma
           
protected static double gamma
           
protected static double sinGamma
           
 
Fields inherited from class etomica.lattice.crystal.Primitive
angle, D, idx, latticeVectors, rightAngle, size, space
 
Constructor Summary
PrimitiveHexagonal2D(ISpace space)
           
PrimitiveHexagonal2D(ISpace space, double ab)
           
 
Method Summary
 Primitive copy()
          Returns a new PrimitiveHexagonal with the same size as this one.
 double getSizeAB()
           
 int[] latticeIndex(IVector q)
          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.
 int[] latticeIndex(IVector q, 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.
 Primitive makeReciprocal()
          Method defining and constructing reciprocal primitive;
 void scaleSize(double scale)
          Scales (multiplies) the size of each primitive vector by the given value.
 void setSizeAB(double newAB)
           
 String toString()
           
protected  void update()
           
 Polytope wignerSeitzCell()
          Returns the Wigner-Seitz cell specified by this primitive.
 
Methods inherited from class etomica.lattice.crystal.Primitive
getSize, getSpace, setAngles, setSize, unitCell, vectors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ab

protected double ab

gamma

protected static final double gamma

cosGamma

protected static final double cosGamma

sinGamma

protected static final double sinGamma
Constructor Detail

PrimitiveHexagonal2D

public PrimitiveHexagonal2D(ISpace space)

PrimitiveHexagonal2D

public PrimitiveHexagonal2D(ISpace space,
                            double ab)
Method Detail

makeReciprocal

public Primitive makeReciprocal()
Description copied from class: Primitive
Method defining and constructing reciprocal primitive;

Specified by:
makeReciprocal in class Primitive

setSizeAB

public void setSizeAB(double newAB)

getSizeAB

public double getSizeAB()

update

protected void update()
Specified by:
update in class Primitive

copy

public Primitive copy()
Returns a new PrimitiveHexagonal with the same size as this one.

Specified by:
copy in class Primitive

scaleSize

public void scaleSize(double scale)
Description copied from class: Primitive
Scales (multiplies) the size of each primitive vector by the given value.

Specified by:
scaleSize in class Primitive

latticeIndex

public int[] latticeIndex(IVector q)
Description copied from class: Primitive
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.

Specified by:
latticeIndex in class Primitive

latticeIndex

public int[] latticeIndex(IVector q,
                          int[] dimensions)
Description copied from class: Primitive
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. If lattice index corresponds to a cell outside the range of dimensions, index of image in central cells is returned.

Specified by:
latticeIndex in class Primitive

wignerSeitzCell

public Polytope wignerSeitzCell()
Description copied from class: Primitive
Returns the Wigner-Seitz cell specified by this primitive. The returned cell does not remain tied to the primitive, and will not be updated with changes to the primitive.

Specified by:
wignerSeitzCell in class Primitive

toString

public String toString()
Overrides:
toString in class Object