Class 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
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 fractionalToCartesian​(ICrystal crystal)
      Creates Cartesian coordinates for all Atoms in the Crystal.
      static boolean hasCrystalCoordinates​(IAtomContainer container)
      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.
    • Constructor Detail

      • CrystalGeometryTools

        public CrystalGeometryTools()
    • Method Detail

      • 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.
      • 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
      • 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.