Class Crystal

All Implemented Interfaces:
Serializable, Cloneable, IAtomContainer, ICDKObject, IChemObject, IChemObjectListener, ICrystal

public class Crystal extends AtomContainer implements Serializable, ICrystal, Cloneable
Class representing a molecular crystal. The crystal is described with molecules in fractional coordinates and three cell axes: a,b and c.

The crystal is designed to store only the asymmetric atoms. Though this is not enforced, it is assumed by all methods.

See Also:
Source code:
main
Belongs to CDK module:
silent
Keywords:
crystal
  • Constructor Details

    • Crystal

      public Crystal()
      Constructs a new crystal with zero length cell axis.
    • Crystal

      public Crystal(IAtomContainer container)
      Constructs a new crystal with zero length cell axis and adds the atoms in the AtomContainer as cell content.
      Parameters:
      container - the AtomContainer providing the atoms and bonds
  • Method Details

    • setA

      public void setA(javax.vecmath.Vector3d newAxis)
      Sets the A unit cell axes in Cartesian coordinates in a Euclidean space.
      Specified by:
      setA in interface ICrystal
      Parameters:
      newAxis - the new A axis
      See Also:
    • getA

      public javax.vecmath.Vector3d getA()
      Gets the A unit cell axes in Cartesian coordinates as a three element double array.
      Specified by:
      getA in interface ICrystal
      Returns:
      a Vector3D representing the A axis
      See Also:
    • setB

      public void setB(javax.vecmath.Vector3d newAxis)
      Sets the B unit cell axes in Cartesian coordinates.
      Specified by:
      setB in interface ICrystal
      Parameters:
      newAxis - the new B axis
      See Also:
    • getB

      public javax.vecmath.Vector3d getB()
      Gets the B unit cell axes in Cartesian coordinates as a three element double array.
      Specified by:
      getB in interface ICrystal
      Returns:
      a Vector3D representing the B axis
      See Also:
    • setC

      public void setC(javax.vecmath.Vector3d newAxis)
      Sets the C unit cell axes in Cartesian coordinates.
      Specified by:
      setC in interface ICrystal
      Parameters:
      newAxis - the new C axis
      See Also:
    • getC

      public javax.vecmath.Vector3d getC()
      Gets the C unit cell axes in Cartesian coordinates as a three element double array.
      Specified by:
      getC in interface ICrystal
      Returns:
      a Vector3D representing the C axis
      See Also:
    • getSpaceGroup

      public String getSpaceGroup()
      Gets the space group of this crystal.
      Specified by:
      getSpaceGroup in interface ICrystal
      Returns:
      the space group of this crystal structure
      See Also:
    • setSpaceGroup

      public void setSpaceGroup(String group)
      Sets the space group of this crystal.
      Specified by:
      setSpaceGroup in interface ICrystal
      Parameters:
      group - the space group of this crystal structure
      See Also:
    • getZ

      public Integer getZ()
      Gets the number of asymmetric parts in the unit cell.
      Specified by:
      getZ in interface ICrystal
      Returns:
      the number of asymmetric parts in the unit cell
      See Also:
    • setZ

      public void setZ(Integer value)
      Sets the number of asymmetric parts in the unit cell.
      Specified by:
      setZ in interface ICrystal
      Parameters:
      value - the number of asymmetric parts in the unit cell
      See Also:
    • clone

      public ICrystal clone() throws CloneNotSupportedException
      Makes a clone of this crystal.
      Specified by:
      clone in interface IAtomContainer
      Specified by:
      clone in interface IChemObject
      Specified by:
      clone in interface ICrystal
      Overrides:
      clone in class AtomContainer
      Returns:
      The cloned crystal.
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned
    • toString

      public String toString()
      Returns a String representation of this crystal.
      Specified by:
      toString in interface IChemObject
      Overrides:
      toString in class AtomContainer
      Returns:
      a String representation of this object