org.openscience.cdk
Class LonePair

java.lang.Object
  extended by org.openscience.cdk.ChemObject
      extended by org.openscience.cdk.ElectronContainer
          extended by org.openscience.cdk.LonePair
All Implemented Interfaces:
Serializable, Cloneable, ICDKObject, IChemObject, IElectronContainer, ILonePair
Direct Known Subclasses:
DebugLonePair, NNLonePair

public class LonePair
extends ElectronContainer
implements Serializable, ILonePair, Cloneable

A LonePair is an orbital primarily located with one Atom, containing two electrons.

See Also:
Serialized Form
Keywords:
orbital, lone-pair
Belongs to CDK module:
data
Source code:
HEAD

Constructor Summary
LonePair()
          Constructs an unconnected lone pair.
LonePair(IAtom atom)
          Constructs an lone pair on an Atom.
 
Method Summary
 Object clone()
          Clones this LonePair object, including a clone of the atom for which the lone pair is defined.
 boolean contains(IAtom atom)
          Returns true if the given atom participates in this lone pair.
 IAtom getAtom()
          Returns the associated Atom.
 Integer getElectronCount()
          Returns the number of electrons in a LonePair.
 void setAtom(IAtom atom)
          Sets the associated Atom.
 String toString()
          Returns a one line string representation of this LonePair.
 
Methods inherited from class org.openscience.cdk.ElectronContainer
setElectronCount
 
Methods inherited from class org.openscience.cdk.ChemObject
addListener, compare, getBuilder, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openscience.cdk.interfaces.IElectronContainer
setElectronCount
 
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
 
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
 

Constructor Detail

LonePair

public LonePair()
Constructs an unconnected lone pair.


LonePair

public LonePair(IAtom atom)
Constructs an lone pair on an Atom.

Parameters:
atom - Atom to which this lone pair is connected
Method Detail

getElectronCount

public Integer getElectronCount()
Returns the number of electrons in a LonePair.

Specified by:
getElectronCount in interface IElectronContainer
Overrides:
getElectronCount in class ElectronContainer
Returns:
The number of electrons in a LonePair.
See Also:
ElectronContainer.setElectronCount(java.lang.Integer)

getAtom

public IAtom getAtom()
Returns the associated Atom.

Specified by:
getAtom in interface ILonePair
Returns:
the associated Atom.
See Also:
setAtom(org.openscience.cdk.interfaces.IAtom)

setAtom

public void setAtom(IAtom atom)
Sets the associated Atom.

Specified by:
setAtom in interface ILonePair
Parameters:
atom - the Atom this lone pair will be associated with
See Also:
getAtom()

contains

public boolean contains(IAtom atom)
Returns true if the given atom participates in this lone pair.

Specified by:
contains in interface ILonePair
Parameters:
atom - The atom to be tested if it participates in this bond
Returns:
true if this lone pair is associated with the atom

clone

public Object clone()
             throws CloneNotSupportedException
Clones this LonePair object, including a clone of the atom for which the lone pair is defined.

Specified by:
clone in interface IChemObject
Overrides:
clone in class ElectronContainer
Returns:
The cloned object
Throws:
CloneNotSupportedException - if the IChemObject cannot be cloned

toString

public String toString()
Returns a one line string representation of this LonePair. This method is conform RFC #9.

Specified by:
toString in interface IChemObject
Overrides:
toString in class ElectronContainer
Returns:
The string representation of this LonePair