Class CrystalGeometryTools

java.lang.Object
org.openscience.cdk.geometry.CrystalGeometryTools

public class CrystalGeometryTools extends Object
A set of static methods for working with crystal coordinates.
Author:
Egon Willighagen <egonw@sci.kun.nl>
Source code:
main
Belongs to CDK module:
standard
Keywords:
fractional coordinates, crystal
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.vecmath.Vector3d[]
    calcInvertedAxes(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis)
    Inverts three cell axes.
    static javax.vecmath.Point3d
    cartesianToFractional(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis, javax.vecmath.Point3d cartPoint)
     
    static double[]
    cartesianToNotional(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis)
     
    static javax.vecmath.Point3d
    fractionalToCartesian(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis, javax.vecmath.Point3d frac)
     
    static void
    Creates Cartesian coordinates for all Atoms in the Crystal.
    static boolean
    Determines if this model contains fractional (crystal) coordinates.
    static javax.vecmath.Vector3d[]
    notionalToCartesian(double alength, double blength, double clength, double alpha, double beta, double gamma)
    Calculates Cartesian vectors for unit cell axes from axes lengths and angles between axes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CrystalGeometryTools

      public CrystalGeometryTools()
  • Method Details

    • calcInvertedAxes

      public static javax.vecmath.Vector3d[] calcInvertedAxes(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis)
      Inverts three cell axes.
      Returns:
      a 3x3 matrix with the three Cartesian vectors representing the unit cell axes. The a axis is the first row.
    • cartesianToFractional

      public static javax.vecmath.Point3d cartesianToFractional(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis, javax.vecmath.Point3d cartPoint)
      Dictionary pointer(s):
      convertCartesianIntoFractionalCoordinates in the Blue Obelisk Chemoinformatics Dictionary [blue-obelisk:convertCartesianIntoFractionalCoordinates]
    • fractionalToCartesian

      public static javax.vecmath.Point3d fractionalToCartesian(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis, javax.vecmath.Point3d frac)
      Dictionary pointer(s):
      convertFractionIntoCartesianCoordinates in the Blue Obelisk Chemoinformatics Dictionary [blue-obelisk:convertFractionIntoCartesianCoordinates]
    • notionalToCartesian

      public static javax.vecmath.Vector3d[] notionalToCartesian(double alength, double blength, double clength, double alpha, double beta, double gamma)
      Calculates Cartesian vectors for unit cell axes from axes lengths and angles between axes.

      To calculate Cartesian coordinates, it places the a axis on the x axes, the b axis in the xy plane, making an angle gamma with the a axis, and places the c axis to fulfill the remaining constraints. (See also the CCL archive.)

      Parameters:
      alength - length of the a axis
      blength - length of the b axis
      clength - length of the c axis
      alpha - angle between b and c axes in degrees
      beta - angle between a and c axes in degrees
      gamma - angle between a and b axes in degrees
      Returns:
      an array of Vector3d objects with the three Cartesian vectors representing the unit cell axes.
      Dictionary pointer(s):
      convertNotionalIntoCartesianCoordinates in the Blue Obelisk Chemoinformatics Dictionary [blue-obelisk:convertNotionalIntoCartesianCoordinates]
      Keywords:
      notional coordinates
    • cartesianToNotional

      public static double[] cartesianToNotional(javax.vecmath.Vector3d aAxis, javax.vecmath.Vector3d bAxis, javax.vecmath.Vector3d cAxis)
      Dictionary pointer(s):
      convertCartesianIntoNotionalCoordinates in the Blue Obelisk Chemoinformatics Dictionary [blue-obelisk:convertCartesianIntoNotionalCoordinates]
    • hasCrystalCoordinates

      public static boolean hasCrystalCoordinates(IAtomContainer container)
      Determines if this model contains fractional (crystal) coordinates.
      Returns:
      boolean indication that 3D coordinates are available
    • fractionalToCartesian

      public static void fractionalToCartesian(ICrystal crystal)
      Creates Cartesian coordinates for all Atoms in the Crystal.