public class Atom extends AtomType implements IAtom, Serializable, Cloneable
An Atom class is instantiated with at least the atom symbol:
Atom a = new Atom("C");
Once instantiated all field not filled by passing parameters to the constructor are null. Atoms can be configured by using the IsotopeFactory.configure() method:
IsotopeFactory if = IsotopeFactory.getInstance(a.getNewBuilder()); if.configure(a);
More examples about using this class can be found in the Junit test for this class.
IsotopeFactory.getInstance(org.openscience.cdk.interfaces.IChemObjectBuilder)
,
Serialized FormIAtomType.Hybridization
exactMass, naturalAbundance
Constructor and Description |
---|
Atom()
Constructs an completely unset Atom.
|
Atom(IElement element)
Constructs an isotope by copying the symbol, atomic number,
flags, identifier, exact mass, natural abundance, mass
number, maximum bond order, bond order sum, van der Waals
and covalent radii, formal charge, hybridization, electron
valency, formal neighbour count and atom type name from the
given IAtomType.
|
Atom(String elementSymbol)
Constructs an Atom from a String containing an element symbol.
|
Atom(String elementSymbol,
javax.vecmath.Point2d point2d)
Constructs an Atom from an Element and a Point2d.
|
Atom(String elementSymbol,
javax.vecmath.Point3d point3d)
Constructs an Atom from an Element and a Point3d.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this atom object and its content.
|
boolean |
compare(Object object)
Compares a atom with this atom.
|
Double |
getCharge()
Returns the partial charge of this atom.
|
javax.vecmath.Point3d |
getFractionalPoint3d()
Returns a point specifying the location of this
atom in a Crystal unit cell.
|
Integer |
getImplicitHydrogenCount()
Returns the hydrogen count of this atom.
|
javax.vecmath.Point2d |
getPoint2d()
Returns a point specifying the location of this
atom in a 2D space.
|
javax.vecmath.Point3d |
getPoint3d()
Returns a point specifying the location of this
atom in a 3D space.
|
Integer |
getStereoParity()
Returns the stereo parity of this atom.
|
void |
setCharge(Double charge)
Sets the partial charge of this atom.
|
void |
setFractionalPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this
atom in a Crystal unit cell.
|
void |
setImplicitHydrogenCount(Integer hydrogenCount)
Sets the number of implicit hydrogen count of this atom.
|
void |
setPoint2d(javax.vecmath.Point2d point2d)
Sets a point specifying the location of this
atom in a 2D space.
|
void |
setPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this
atom in 3D space.
|
void |
setStereoParity(Integer stereoParity)
Sets the stereo parity for this atom.
|
String |
toString()
Returns a one line string representation of this Atom.
|
getAtomTypeName, getBondOrderSum, getCovalentRadius, getFormalCharge, getFormalNeighbourCount, getHybridization, getMaxBondOrder, getValency, setAtomTypeName, setBondOrderSum, setCovalentRadius, setFormalCharge, setFormalNeighbourCount, setHybridization, setMaxBondOrder, setValency
getExactMass, getMassNumber, getNaturalAbundance, setExactMass, setMassNumber, setNaturalAbundance
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
addListener, getBuilder, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAtomTypeName, getBondOrderSum, getCovalentRadius, getFormalCharge, getFormalNeighbourCount, getHybridization, getMaxBondOrder, getValency, setAtomTypeName, setBondOrderSum, setCovalentRadius, setFormalCharge, setFormalNeighbourCount, setHybridization, setMaxBondOrder, setValency
getExactMass, getMassNumber, getNaturalAbundance, setExactMass, setMassNumber, setNaturalAbundance
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
addListener, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
public Atom()
public Atom(String elementSymbol)
elementSymbol
- The String describing the element for the Atompublic Atom(String elementSymbol, javax.vecmath.Point3d point3d)
elementSymbol
- The symbol of the atompoint3d
- The 3D coordinates of the atompublic Atom(String elementSymbol, javax.vecmath.Point2d point2d)
elementSymbol
- The Elementpoint2d
- The Pointpublic Atom(IElement element)
element
- IAtomType to copy information frompublic void setCharge(Double charge)
setCharge
in interface IAtom
charge
- The partial chargegetCharge()
public Double getCharge()
getCharge
in interface IAtom
setCharge(java.lang.Double)
public void setImplicitHydrogenCount(Integer hydrogenCount)
setImplicitHydrogenCount
in interface IAtom
hydrogenCount
- The number of hydrogen atoms bonded to this atom.getImplicitHydrogenCount()
public Integer getImplicitHydrogenCount()
getImplicitHydrogenCount
in interface IAtom
setImplicitHydrogenCount(java.lang.Integer)
public void setPoint2d(javax.vecmath.Point2d point2d)
setPoint2d
in interface IAtom
point2d
- A point in a 2D planegetPoint2d()
public void setPoint3d(javax.vecmath.Point3d point3d)
setPoint3d
in interface IAtom
point3d
- A point in a 3-dimensional spacegetPoint3d()
public void setFractionalPoint3d(javax.vecmath.Point3d point3d)
setFractionalPoint3d
in interface IAtom
point3d
- A point in a 3d fractional unit cell spacegetFractionalPoint3d()
,
Crystal
public void setStereoParity(Integer stereoParity)
setStereoParity
in interface IAtom
stereoParity
- The stereo parity for this atomfor predefined values.
,
getStereoParity()
public javax.vecmath.Point2d getPoint2d()
getPoint2d
in interface IAtom
setPoint2d(javax.vecmath.Point2d)
public javax.vecmath.Point3d getPoint3d()
getPoint3d
in interface IAtom
setPoint3d(javax.vecmath.Point3d)
public javax.vecmath.Point3d getFractionalPoint3d()
getFractionalPoint3d
in interface IAtom
setFractionalPoint3d(javax.vecmath.Point3d)
,
for predefined values.
public Integer getStereoParity()
getStereoParity
in interface IAtom
CDKConstants
,
setStereoParity(java.lang.Integer)
public boolean compare(Object object)
public String toString()
toString
in interface IChemObject
toString
in class AtomType
public Object clone() throws CloneNotSupportedException
clone
in interface IChemObject
clone
in class AtomType
CloneNotSupportedException
- if the IChemObject cannot be cloned