Package org.openscience.cdk
Class SingleElectron
java.lang.Object
org.openscience.cdk.ChemObject
org.openscience.cdk.ElectronContainer
org.openscience.cdk.SingleElectron
- All Implemented Interfaces:
Serializable
,Cloneable
,ICDKObject
,IChemObject
,IElectronContainer
,ISingleElectron
- Direct Known Subclasses:
DebugSingleElectron
public class SingleElectron
extends ElectronContainer
implements Serializable, ISingleElectron, Cloneable
A Single Electron is an orbital which is occupied by only one electron.
A radical in CDK is represented by an AtomContainer that contains an Atom
and a SingleElectron type ElectronContainer:
AtomContainer radical = new AtomContainer(); Atom carbon = new Atom("C"); carbon.setImplicitHydrogens(3); radical.addElectronContainer(new SingleElectron(carbon));
- See Also:
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- radical, electron, unpaired
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IAtom
The atom with which this single electron is associated.protected final int
Number of electron for this class is defined as one. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an single electron orbital with an associated Atom.SingleElectron
(IAtom atom) Constructs an single electron orbital on an Atom. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this SingleElectron object, including a clone of the atom for which the SingleElectron is defined.boolean
Returns true if the given atom participates in this SingleElectron.getAtom()
Returns the associated Atom.Returns the number of electrons in this SingleElectron.void
Sets the associated Atom.toString()
Returns a one line string representation of this SingleElectron.Methods inherited from class org.openscience.cdk.ElectronContainer
setElectronCount
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, 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, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
Methods inherited from interface org.openscience.cdk.interfaces.IElectronContainer
setElectronCount
-
Field Details
-
electronCount
protected final int electronCountNumber of electron for this class is defined as one.- See Also:
-
atom
The atom with which this single electron is associated.
-
-
Constructor Details
-
SingleElectron
Constructs an single electron orbital on an Atom.- Parameters:
atom
- The atom to which the single electron belongs.
-
SingleElectron
public SingleElectron()Constructs an single electron orbital with an associated Atom.
-
-
Method Details
-
getElectronCount
Returns the number of electrons in this SingleElectron.- Specified by:
getElectronCount
in interfaceIElectronContainer
- Overrides:
getElectronCount
in classElectronContainer
- Returns:
- The number of electrons in this SingleElectron.
- See Also:
-
getAtom
Returns the associated Atom.- Specified by:
getAtom
in interfaceISingleElectron
- Returns:
- the associated Atom.
- See Also:
-
setAtom
Sets the associated Atom.- Specified by:
setAtom
in interfaceISingleElectron
- Parameters:
atom
- the Atom this SingleElectron will be associated with- See Also:
-
contains
Returns true if the given atom participates in this SingleElectron.- Specified by:
contains
in interfaceISingleElectron
- Parameters:
atom
- The atom to be tested if it participates in this bond- Returns:
- true if this SingleElectron is associated with the atom
-
toString
Returns a one line string representation of this SingleElectron. This method is conform RFC #9.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classElectronContainer
- Returns:
- The string representation of this SingleElectron
-
clone
Clones this SingleElectron object, including a clone of the atom for which the SingleElectron is defined.- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classElectronContainer
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-