Package ffx.crystal

Enum Class LatticeSystem

java.lang.Object
java.lang.Enum<LatticeSystem>
ffx.crystal.LatticeSystem
All Implemented Interfaces:
Serializable, Comparable<LatticeSystem>, Constable

public enum LatticeSystem extends Enum<LatticeSystem>
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
  • Enum Constant Details

    • TRICLINIC_LATTICE

      public static final LatticeSystem TRICLINIC_LATTICE
      Triclinic lattice system.
    • MONOCLINIC_LATTICE

      public static final LatticeSystem MONOCLINIC_LATTICE
      Monoclinic lattice system.
    • ORTHORHOMBIC_LATTICE

      public static final LatticeSystem ORTHORHOMBIC_LATTICE
      Orthorhombic lattice system.
    • TETRAGONAL_LATTICE

      public static final LatticeSystem TETRAGONAL_LATTICE
      Tetragonal lattice system.
    • RHOMBOHEDRAL_LATTICE

      public static final LatticeSystem RHOMBOHEDRAL_LATTICE
      Rhombohedral lattice system.
    • HEXAGONAL_LATTICE

      public static final LatticeSystem HEXAGONAL_LATTICE
      Hexagonal lattice system.
    • CUBIC_LATTICE

      public static final LatticeSystem CUBIC_LATTICE
      Cubic lattice system.
  • Method Details

    • values

      public static LatticeSystem[] 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

      public static LatticeSystem valueOf(String name)
      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 name
      NullPointerException - 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