Package org.openscience.cdk
Class AtomType
- java.lang.Object
-
- org.openscience.cdk.ChemObject
-
- org.openscience.cdk.Element
-
- org.openscience.cdk.Isotope
-
- org.openscience.cdk.AtomType
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IAtomType
,ICDKObject
,IChemObject
,IElement
,IIsotope
- Direct Known Subclasses:
Atom
,DebugAtomType
public class AtomType extends Isotope implements IAtomType, Serializable, Cloneable
The base class for atom types. Atom types are typically used to describe the behaviour of an atom of a particular element in different environment like sp3 hybridized carbon C3, etc., in some molecular modelling applications.- Author:
- steinbeck
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- atom, type
- Created on:
- 2001-08-08
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.interfaces.IAtomType
IAtomType.Hybridization
-
-
Field Summary
Fields Modifier and Type Field Description protected Integer
electronValency
The electron Valency of this atom with CDKConstants.UNSET as default.protected Integer
formalCharge
The formal charge of the atom with CDKConstants.UNSET as default.protected Integer
formalNeighbourCount
The formal number of neighbours this atom type can have with CDKConstants_UNSET as default.protected IAtomType.Hybridization
hybridization
The hybridization state of this atom with CDKConstants.HYBRIDIZATION_UNSET as default.-
Fields inherited from class org.openscience.cdk.Isotope
exactMass, naturalAbundance
-
Fields inherited from class org.openscience.cdk.Element
atomicNumber
-
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
-
Fields inherited from interface org.openscience.cdk.interfaces.IElement
Ac, Ag, Al, Am, Ar, As, At, Au, B, Ba, Be, Bh, Bi, Bk, Br, C, Ca, Cd, Ce, Cf, Cl, Cm, Cn, Co, Cr, Cs, Cu, Db, Ds, Dy, Er, Es, Eu, F, Fe, Fl, Fm, Fr, Ga, Gd, Ge, H, He, Hf, Hg, Ho, Hs, I, In, Ir, K, Kr, La, Li, Lr, Lu, Lv, Mc, Md, Mg, Mn, Mo, Mt, N, Na, Nb, Nd, Ne, Nh, Ni, No, Np, O, Og, Os, P, Pa, Pb, Pd, Pm, Po, Pr, Pt, Pu, Ra, Rb, Re, Rf, Rg, Rh, Rn, Ru, S, Sb, Sc, Se, Sg, Si, Sm, Sn, Sr, Ta, Tb, Tc, Te, Th, Ti, Tl, Tm, Ts, U, V, W, Wildcard, Xe, Y, Yb, Zn, Zr
-
-
Constructor Summary
Constructors Constructor Description AtomType(String elementSymbol)
Constructor for the AtomType object.AtomType(String identifier, String elementSymbol)
Constructor for the AtomType object.AtomType(IElement element)
Constructs an isotope by copying the symbol, atomic number, flags, identifier, exact mass, natural abundance and mass number from the given IIsotope.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Clones thisIChemObject
.boolean
compare(Object object)
Compares a atom type with this atom type.String
getAtomTypeName()
Gets the id attribute of the AtomType object.Double
getBondOrderSum()
Gets the bondOrderSum attribute of the AtomType object.Double
getCovalentRadius()
Returns the covalent radius for this AtomType.Integer
getFormalCharge()
Returns the formal charge of this atom.Integer
getFormalNeighbourCount()
Returns the formal neighbour count of this atom.IAtomType.Hybridization
getHybridization()
Returns the hybridization of this atom.IBond.Order
getMaxBondOrder()
Gets the MaxBondOrder attribute of the AtomType object.Integer
getValency()
Gets the the exact electron valency of the AtomType object.void
setAtomTypeName(String identifier)
Sets the if attribute of the AtomType object.void
setBondOrderSum(Double bondOrderSum)
Sets the the exact bond order sum attribute of the AtomType object.void
setCovalentRadius(Double radius)
Sets the covalent radius for this AtomType.void
setFormalCharge(Integer charge)
Sets the formal charge of this atom.void
setFormalNeighbourCount(Integer count)
Sets the formal neighbour count of this atom.void
setHybridization(IAtomType.Hybridization hybridization)
Sets the hybridization of this atom.void
setMaxBondOrder(IBond.Order maxBondOrder)
Sets the MaxBondOrder attribute of the AtomType object.void
setValency(Integer valency)
Sets the the exact electron valency of the AtomType object.String
toString()
A string representation of this isotope.-
Methods inherited from class org.openscience.cdk.Isotope
getExactMass, getMassNumber, getNaturalAbundance, setExactMass, setMassNumber, setNaturalAbundance
-
Methods inherited from class org.openscience.cdk.Element
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, clear, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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.IElement
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
Methods inherited from interface org.openscience.cdk.interfaces.IIsotope
getExactMass, getMassNumber, getNaturalAbundance, setExactMass, setMassNumber, setNaturalAbundance
-
-
-
-
Field Detail
-
formalCharge
protected Integer formalCharge
The formal charge of the atom with CDKConstants.UNSET as default. Implements RFC #6. Note that some constructors (AtomType(String)
andAtomType(String, String)
) will explicitly set this field to 0
-
hybridization
protected IAtomType.Hybridization hybridization
The hybridization state of this atom with CDKConstants.HYBRIDIZATION_UNSET as default.
-
electronValency
protected Integer electronValency
The electron Valency of this atom with CDKConstants.UNSET as default.
-
formalNeighbourCount
protected Integer formalNeighbourCount
The formal number of neighbours this atom type can have with CDKConstants_UNSET as default. This includes explicitely and implicitly connected atoms, including implicit hydrogens.
-
-
Constructor Detail
-
AtomType
public AtomType(String elementSymbol)
Constructor for the AtomType object. Defaults to a zero formal charge. All other fields are set toCDKConstants.UNSET
.- Parameters:
elementSymbol
- Symbol of the atom
-
AtomType
public AtomType(String identifier, String elementSymbol)
Constructor for the AtomType object. Defaults to a zero formal charge.- Parameters:
identifier
- An id for this atom type, like C3 for sp3 carbonelementSymbol
- The element symbol identifying the element to which this atom type applies
-
AtomType
public AtomType(IElement element)
Constructs an isotope by copying the symbol, atomic number, flags, identifier, exact mass, natural abundance and mass number from the given IIsotope. It does not copy the listeners and properties. If the element is an instance of IAtomType, then the maximum bond order, bond order sum, van der Waals and covalent radii, formal charge, hybridization, electron valency, formal neighbour count and atom type name are copied too.- Parameters:
element
- IIsotope to copy information from
-
-
Method Detail
-
setAtomTypeName
public void setAtomTypeName(String identifier)
Sets the if attribute of the AtomType object.- Specified by:
setAtomTypeName
in interfaceIAtomType
- Parameters:
identifier
- The new AtomTypeID value. Null if unset.- See Also:
getAtomTypeName()
-
setMaxBondOrder
public void setMaxBondOrder(IBond.Order maxBondOrder)
Sets the MaxBondOrder attribute of the AtomType object.- Specified by:
setMaxBondOrder
in interfaceIAtomType
- Parameters:
maxBondOrder
- The new MaxBondOrder value- See Also:
getMaxBondOrder()
-
setBondOrderSum
public void setBondOrderSum(Double bondOrderSum)
Sets the the exact bond order sum attribute of the AtomType object.- Specified by:
setBondOrderSum
in interfaceIAtomType
- Parameters:
bondOrderSum
- The new bondOrderSum value- See Also:
getBondOrderSum()
-
getAtomTypeName
public String getAtomTypeName()
Gets the id attribute of the AtomType object.- Specified by:
getAtomTypeName
in interfaceIAtomType
- Returns:
- The id value
- See Also:
setAtomTypeName(java.lang.String)
-
getMaxBondOrder
public IBond.Order getMaxBondOrder()
Gets the MaxBondOrder attribute of the AtomType object.- Specified by:
getMaxBondOrder
in interfaceIAtomType
- Returns:
- The MaxBondOrder value
- See Also:
setMaxBondOrder(org.openscience.cdk.interfaces.IBond.Order)
-
getBondOrderSum
public Double getBondOrderSum()
Gets the bondOrderSum attribute of the AtomType object.- Specified by:
getBondOrderSum
in interfaceIAtomType
- Returns:
- The bondOrderSum value
- See Also:
setBondOrderSum(java.lang.Double)
-
setFormalCharge
public void setFormalCharge(Integer charge)
Sets the formal charge of this atom.- Specified by:
setFormalCharge
in interfaceIAtomType
- Parameters:
charge
- The formal charge- See Also:
getFormalCharge()
-
getFormalCharge
public Integer getFormalCharge()
Returns the formal charge of this atom.- Specified by:
getFormalCharge
in interfaceIAtomType
- Returns:
- the formal charge of this atom
- See Also:
setFormalCharge(java.lang.Integer)
-
setFormalNeighbourCount
public void setFormalNeighbourCount(Integer count)
Sets the formal neighbour count of this atom.- Specified by:
setFormalNeighbourCount
in interfaceIAtomType
- Parameters:
count
- The neighbour count- See Also:
getFormalNeighbourCount()
-
getFormalNeighbourCount
public Integer getFormalNeighbourCount()
Returns the formal neighbour count of this atom.- Specified by:
getFormalNeighbourCount
in interfaceIAtomType
- Returns:
- the formal neighbour count of this atom
- See Also:
setFormalNeighbourCount(java.lang.Integer)
-
setHybridization
public void setHybridization(IAtomType.Hybridization hybridization)
Sets the hybridization of this atom.- Specified by:
setHybridization
in interfaceIAtomType
- Parameters:
hybridization
- The hybridization- See Also:
getHybridization()
-
getHybridization
public IAtomType.Hybridization getHybridization()
Returns the hybridization of this atom.- Specified by:
getHybridization
in interfaceIAtomType
- Returns:
- the hybridization of this atom
- See Also:
setHybridization(org.openscience.cdk.interfaces.IAtomType.Hybridization)
-
compare
public boolean compare(Object object)
Compares a atom type with this atom type.
-
setCovalentRadius
public void setCovalentRadius(Double radius)
Sets the covalent radius for this AtomType.- Specified by:
setCovalentRadius
in interfaceIAtomType
- Parameters:
radius
- The covalent radius for this AtomType- See Also:
getCovalentRadius()
-
getCovalentRadius
public Double getCovalentRadius()
Returns the covalent radius for this AtomType.- Specified by:
getCovalentRadius
in interfaceIAtomType
- Returns:
- The covalent radius for this AtomType
- See Also:
setCovalentRadius(java.lang.Double)
-
setValency
public void setValency(Integer valency)
Sets the the exact electron valency of the AtomType object.- Specified by:
setValency
in interfaceIAtomType
- Parameters:
valency
- The new valency value- See Also:
getValency()
-
getValency
public Integer getValency()
Gets the the exact electron valency of the AtomType object.- Specified by:
getValency
in interfaceIAtomType
- Returns:
- The valency value
- See Also:
setValency(java.lang.Integer)
-
clone
public Object clone() throws CloneNotSupportedException
Description copied from class:ChemObject
Clones thisIChemObject
. It clones the identifier, flags, properties and pointer vectors. The ChemObjectListeners are not cloned, and neither is the content of the pointer vectors.- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classIsotope
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-