Package org.openscience.cdk
Class LonePair
java.lang.Object
org.openscience.cdk.ChemObject
org.openscience.cdk.ElectronContainer
org.openscience.cdk.LonePair
- All Implemented Interfaces:
Serializable
,Cloneable
,ICDKObject
,IChemObject
,IElectronContainer
,ILonePair
- Direct Known Subclasses:
DebugLonePair
A LonePair is an orbital primarily located with one Atom, containing
two electrons.
- See Also:
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- orbital, lone-pair
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IAtom
The atom with which this lone pair is associated.protected final int
Number of electrons in the lone pair. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this LonePair object, including a clone of the atom for which the lone pair is defined.boolean
Returns true if the given atom participates in this lone pair.getAtom()
Returns the associated Atom.Returns the number of electrons in a LonePair.void
Sets the associated Atom.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, 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 electrons in the lone pair.- See Also:
-
atom
The atom with which this lone pair is associated.
-
-
Constructor Details
-
LonePair
public LonePair()Constructs an unconnected lone pair. -
LonePair
Constructs an lone pair on an Atom.- Parameters:
atom
- Atom to which this lone pair is connected
-
-
Method Details
-
getElectronCount
Returns the number of electrons in a LonePair.- Specified by:
getElectronCount
in interfaceIElectronContainer
- Overrides:
getElectronCount
in classElectronContainer
- Returns:
- The number of electrons in a LonePair.
- See Also:
-
getAtom
Returns the associated Atom. -
setAtom
Sets the associated Atom. -
contains
Returns true if the given atom participates in this lone pair. -
clone
Clones this LonePair object, including a clone of the atom for which the lone pair is defined.- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classElectronContainer
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
toString
Returns a one line string representation of this LonePair. This method is conform RFC #9.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classElectronContainer
- Returns:
- The string representation of this LonePair
-