Class CrystalTransform

java.lang.Object
org.biojava.nbio.structure.xtal.CrystalTransform
All Implemented Interfaces:
Serializable

public class CrystalTransform extends Object implements Serializable
Representation of a transformation in a crystal: - a transformation id (each of the transformations in a space group, 0 to m) - a crystal translation The transformation matrix in crystal basis is stored, representing the basic transformation together with the crystal translation. Contains methods to check for equivalent transformations.
Author:
duarte_j
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final javax.vecmath.Matrix4d
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Copy constructor
    Creates a new CrystalTransform representing the identity transform in cell (0,0,0)
    CrystalTransform(SpaceGroup sg, int transformId)
    Represents the n-th transform
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.vecmath.Point3i
     
    javax.vecmath.Matrix4d
     
    int
     
    Returns the TransformType of this transformation: AU, crystal translation, fractional translation , 2 3 4 6-fold rotations, 2 3 4 6-fold screw rotations, -1 -3 -2 -4 -6 inversions/rotoinversions.
    javax.vecmath.Vector3d
     
    static javax.vecmath.Vector3d
    getTranslScrewComponent(javax.vecmath.Matrix4d m)
    Given a transformation matrix containing a rotation and translation returns the screw component of the rotation.
    boolean
    Returns true if the given CrystalTransform is equivalent to this one.
    boolean
    Tells whether this transformation contains a fractional translational component (whatever its rotational component).
    boolean
    Tells whether this transformation is the identity: no rotation and no translation
    boolean
    Tells whether this transformation is a pure crystal lattice translation, i.e.
    boolean
    Tells whether this transformation is a pure translation: either a pure crystal (lattice) translation or a fractional (within unit cell) translation: space groups Ixxx, Cxxx, Fxxx have operators with fractional translations within the unit cell.
    boolean
    Tells whether this transformation is a rotation disregarding the translational component, i.e.
    void
    setMatTransform(javax.vecmath.Matrix4d matTransform)
     
    void
    setTransformId(int transformId)
     
     
    Expresses this transformation in terms of x,y,z fractional coordinates.
    void
    translate(javax.vecmath.Point3i translation)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • IDENTITY

      public static final javax.vecmath.Matrix4d IDENTITY
  • Constructor Details

    • CrystalTransform

      public CrystalTransform(SpaceGroup sg)
      Creates a new CrystalTransform representing the identity transform in cell (0,0,0)
    • CrystalTransform

      public CrystalTransform(SpaceGroup sg, int transformId)
      Represents the n-th transform
      Parameters:
      sg -
      transformId -
    • CrystalTransform

      public CrystalTransform(CrystalTransform transform)
      Copy constructor
      Parameters:
      transform -
  • Method Details

    • getMatTransform

      public javax.vecmath.Matrix4d getMatTransform()
    • setMatTransform

      public void setMatTransform(javax.vecmath.Matrix4d matTransform)
    • getCrystalTranslation

      public javax.vecmath.Point3i getCrystalTranslation()
    • translate

      public void translate(javax.vecmath.Point3i translation)
    • isEquivalent

      public boolean isEquivalent(CrystalTransform other)
      Returns true if the given CrystalTransform is equivalent to this one. Two crystal transforms are equivalent if one is the inverse of the other, i.e. their transformation matrices multiplication is equal to the identity.
      Parameters:
      other -
      Returns:
    • isPureCrystalTranslation

      public boolean isPureCrystalTranslation()
      Tells whether this transformation is a pure crystal lattice translation, i.e. no rotational component and an integer translation vector.
      Returns:
    • isIdentity

      public boolean isIdentity()
      Tells whether this transformation is the identity: no rotation and no translation
      Returns:
    • isPureTranslation

      public boolean isPureTranslation()
      Tells whether this transformation is a pure translation: either a pure crystal (lattice) translation or a fractional (within unit cell) translation: space groups Ixxx, Cxxx, Fxxx have operators with fractional translations within the unit cell.
      Returns:
    • isFractionalTranslation

      public boolean isFractionalTranslation()
      Tells whether this transformation contains a fractional translational component (whatever its rotational component). A fractional translation together with a rotation means a screw axis.
      Returns:
    • isRotation

      public boolean isRotation()
      Tells whether this transformation is a rotation disregarding the translational component, i.e. either pure rotation or screw rotation, but not improper rotation.
      Returns:
    • getTransformType

      public TransformType getTransformType()
      Returns the TransformType of this transformation: AU, crystal translation, fractional translation , 2 3 4 6-fold rotations, 2 3 4 6-fold screw rotations, -1 -3 -2 -4 -6 inversions/rotoinversions.
      Returns:
    • getTranslScrewComponent

      public javax.vecmath.Vector3d getTranslScrewComponent()
    • getTransformId

      public int getTransformId()
    • setTransformId

      public void setTransformId(int transformId)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXYZString

      public String toXYZString()
      Expresses this transformation in terms of x,y,z fractional coordinates. Examples:
      Returns:
    • getTranslScrewComponent

      public static javax.vecmath.Vector3d getTranslScrewComponent(javax.vecmath.Matrix4d m)
      Given a transformation matrix containing a rotation and translation returns the screw component of the rotation. See http://www.crystallography.fr/mathcryst/pdf/Gargnano/Aroyo_Gargnano_1.pdf
      Parameters:
      m -
      Returns: