Package ffx.crystal
Enum Class LatticeSystem
- All Implemented Interfaces:
Serializable
,Comparable<LatticeSystem>
,Constable
Enumeration of the 7 lattice systems.
Currently, the SpaceGroup class uses the HEXAGONAL_LATTICE in all cases where its also possible to use a RHOMBOHEDRAL_LATTICE.
This includes space groups 146, 148, 155, 160, 161, 166 and 167.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCubic lattice system.Hexagonal lattice system.Monoclinic lattice system.Orthorhombic lattice system.Rhombohedral lattice system.Tetragonal lattice system.Triclinic lattice system. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
check
(double x1, double x2) If the two passed values are the same, within the tolerance, return true.double[]
fixParameters
(double a, double b, double c, double alpha, double beta, double gamma) Change the lattice parameters to satisfy the restrictions of the lattice system.double
Returns the default alpha for the lattice system.double
getDefaultBAxis
(double aaxis) Returns the default b-axis for the lattice system.double
Returns the default beta for the lattice system.double
getDefaultCAxis
(double aaxis, double baxis) Returns the default c-axis for the lattice system.double
Returns the default gamma for the lattice system.double[]
Reset lattice parameters for the given lattice systems.boolean
validParameters
(double a, double b, double c, double alpha, double beta, double gamma) Check that the lattice parameters satisfy the restrictions of the lattice systems.static LatticeSystem
Returns the enum constant of this class with the specified name.static LatticeSystem[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRICLINIC_LATTICE
Triclinic lattice system. -
MONOCLINIC_LATTICE
Monoclinic lattice system. -
ORTHORHOMBIC_LATTICE
Orthorhombic lattice system. -
TETRAGONAL_LATTICE
Tetragonal lattice system. -
RHOMBOHEDRAL_LATTICE
Rhombohedral lattice system. -
HEXAGONAL_LATTICE
Hexagonal lattice system. -
CUBIC_LATTICE
Cubic lattice system.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
check
public static boolean check(double x1, double x2) If the two passed values are the same, within the tolerance, return true.- Parameters:
x1
- First value.x2
- Second value.- Returns:
- Return true if the two values are the same within specified tolerance.
-
resetUnitCellParams
public double[] resetUnitCellParams()Reset lattice parameters for the given lattice systems.- Returns:
- New unit cell parameters.
-
validParameters
public boolean validParameters(double a, double b, double c, double alpha, double beta, double gamma) Check that the lattice parameters satisfy the restrictions of the lattice systems.- Parameters:
a
- the a-axis length.b
- the b-axis length.c
- the c-axis length.alpha
- the alpha angle.beta
- the beta angle.gamma
- the gamma angle.- Returns:
- True if the restrictions are satisfied, false otherwise.
-
fixParameters
public double[] fixParameters(double a, double b, double c, double alpha, double beta, double gamma) Change the lattice parameters to satisfy the restrictions of the lattice system.- Parameters:
a
- the proposed a-axis length.b
- the proposed b-axis length.c
- the proposed c-axis length.alpha
- the proposed alpha angle.beta
- the proposed beta angle.gamma
- the proposed gamma angle.- Returns:
- Adjusted parameters if the restrictions are satisfied, original parameters otherwise.
-
getDefaultBAxis
public double getDefaultBAxis(double aaxis) Returns the default b-axis for the lattice system.- Parameters:
aaxis
- the a-axis length is the best guess for b-axis.- Returns:
- default b-axis value
-
getDefaultCAxis
public double getDefaultCAxis(double aaxis, double baxis) Returns the default c-axis for the lattice system.- Parameters:
aaxis
- the a-axis length.baxis
- the b-axis length.- Returns:
- default c-axis value
-
getDefaultAlpha
public double getDefaultAlpha()Returns the default alpha for the lattice system.- Returns:
- default alpha value
-
getDefaultBeta
public double getDefaultBeta()Returns the default beta for the lattice system.- Returns:
- default beta value
-
getDefaultGamma
public double getDefaultGamma()Returns the default gamma for the lattice system.- Returns:
- default gamma value
-