Package org.openscience.cdk
Class Crystal
- java.lang.Object
-
- org.openscience.cdk.ChemObject
-
- org.openscience.cdk.AtomContainer
-
- org.openscience.cdk.Crystal
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IAtomContainer
,ICDKObject
,IChemObject
,IChemObjectListener
,ICrystal
- Direct Known Subclasses:
DebugCrystal
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:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- crystal
-
-
Field Summary
-
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED
-
-
Constructor Summary
Constructors Constructor Description Crystal()
Constructs a new crystal with zero length cell axis.Crystal(IAtomContainer container)
Constructs a new crystal with zero length cell axis and adds the atoms in the AtomContainer as cell content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICrystal
clone()
Makes a clone of this crystal.javax.vecmath.Vector3d
getA()
Gets the A unit cell axes in Cartesian coordinates as a three element double array.javax.vecmath.Vector3d
getB()
Gets the B unit cell axes in Cartesian coordinates as a three element double array.javax.vecmath.Vector3d
getC()
Gets the C unit cell axes in Cartesian coordinates as a three element double array.String
getSpaceGroup()
Gets the space group of this crystal.Integer
getZ()
Gets the number of asymmetric parts in the unit cell.void
setA(javax.vecmath.Vector3d newAxis)
Sets the A unit cell axes in Cartesian coordinates in a Euclidean space.void
setB(javax.vecmath.Vector3d newAxis)
Sets the B unit cell axes in Cartesian coordinates.void
setC(javax.vecmath.Vector3d newAxis)
Sets the C unit cell axes in Cartesian coordinates.void
setSpaceGroup(String group)
Sets the space group of this crystal.void
setZ(Integer value)
Sets the number of asymmetric parts in the unit cell.String
toString()
Returns a String representation of this crystal.-
Methods inherited from class org.openscience.cdk.AtomContainer
add, addAtom, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, newAtom, newAtom, newBond, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, shallowCopy, singleElectrons, stateChanged, stereoElements
-
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, clear, compare, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.IAtomContainer
addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, newAtom, newAtom, newAtom, newAtom, newBond, newBond, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, singleElectrons, stereoElements
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObjectListener
stateChanged
-
-
-
-
Constructor Detail
-
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 Detail
-
setA
public void setA(javax.vecmath.Vector3d newAxis)
Sets the A unit cell axes in Cartesian coordinates in a Euclidean space.
-
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 interfaceICrystal
- Returns:
- a Vector3D representing the A axis
- See Also:
setA(javax.vecmath.Vector3d)
-
setB
public void setB(javax.vecmath.Vector3d newAxis)
Sets the B unit cell axes in Cartesian coordinates.
-
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 interfaceICrystal
- Returns:
- a Vector3D representing the B axis
- See Also:
setB(javax.vecmath.Vector3d)
-
setC
public void setC(javax.vecmath.Vector3d newAxis)
Sets the C unit cell axes in Cartesian coordinates.
-
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 interfaceICrystal
- Returns:
- a Vector3D representing the C axis
- See Also:
setC(javax.vecmath.Vector3d)
-
getSpaceGroup
public String getSpaceGroup()
Gets the space group of this crystal.- Specified by:
getSpaceGroup
in interfaceICrystal
- Returns:
- the space group of this crystal structure
- See Also:
setSpaceGroup(java.lang.String)
-
setSpaceGroup
public void setSpaceGroup(String group)
Sets the space group of this crystal.- Specified by:
setSpaceGroup
in interfaceICrystal
- Parameters:
group
- the space group of this crystal structure- See Also:
getSpaceGroup()
-
getZ
public Integer getZ()
Gets the number of asymmetric parts in the unit cell.- Specified by:
getZ
in interfaceICrystal
- Returns:
- the number of asymmetric parts in the unit cell
- See Also:
setZ(java.lang.Integer)
-
setZ
public void setZ(Integer value)
Sets the number of asymmetric parts in the unit cell.
-
clone
public ICrystal clone() throws CloneNotSupportedException
Makes a clone of this crystal.- Specified by:
clone
in interfaceIAtomContainer
- Specified by:
clone
in interfaceIChemObject
- Specified by:
clone
in interfaceICrystal
- Overrides:
clone
in classAtomContainer
- 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 interfaceIChemObject
- Overrides:
toString
in classAtomContainer
- Returns:
- a String representation of this object
-
-