Package org.openscience.cdk.silent
Class LonePair
- java.lang.Object
-
- org.openscience.cdk.silent.ChemObject
-
- org.openscience.cdk.silent.ElectronContainer
-
- org.openscience.cdk.silent.LonePair
-
- All Implemented Interfaces:
Serializable,Cloneable,ICDKObject,IChemObject,IElectronContainer,ILonePair
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
- Source code:
- main
- Belongs to CDK module:
- silent
- Keywords:
- orbital, lone-pair
-
-
Field Summary
Fields Modifier and Type Field Description protected IAtomatomThe atom with which this lone pair is associated.protected intelectronCountNumber of electrons in the lone pair.-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Clones this LonePair object, including a clone of the atom for which the lone pair is defined.booleancontains(IAtom atom)Returns true if the given atom participates in this lone pair.IAtomgetAtom()Returns the associated Atom.IntegergetElectronCount()Returns the number of electrons in a LonePair.voidsetAtom(IAtom atom)Sets the associated Atom.StringtoString()Returns a one line string representation of this LonePair.-
Methods inherited from class org.openscience.cdk.silent.ElectronContainer
setElectronCount
-
Methods inherited from class org.openscience.cdk.silent.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, 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.IElectronContainer
setElectronCount
-
-
-
-
Field Detail
-
electronCount
protected final int electronCount
Number of electrons in the lone pair.- See Also:
- Constant Field Values
-
atom
protected IAtom atom
The atom with which this lone pair is associated.
-
-
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:
getElectronCountin interfaceIElectronContainer- Overrides:
getElectronCountin classElectronContainer- 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:
getAtomin interfaceILonePair- Returns:
- the associated Atom.
- See Also:
setAtom(org.openscience.cdk.interfaces.IAtom)
-
setAtom
public void setAtom(IAtom atom)
Sets the associated Atom.
-
contains
public boolean contains(IAtom atom)
Returns true if the given atom participates in this lone pair.
-
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:
clonein interfaceIChemObject- Overrides:
clonein classElectronContainer- 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:
toStringin interfaceIChemObject- Overrides:
toStringin classElectronContainer- Returns:
- The string representation of this LonePair
-
-