Package org.openscience.cdk.interfaces
Interface IAdductFormula
-
- All Superinterfaces:
Cloneable
,ICDKObject
,IMolecularFormulaSet
- All Known Implementing Classes:
AdductFormula
,AdductFormula
,DebugAdductFormula
public interface IAdductFormula extends IMolecularFormulaSet
Class defining an adduct object in a MolecularFormula. It maintains a list of list IMolecularFormula.Examples:
[C2H4O2+Na]+
- Author:
- miguelrojasch
- Source code:
- main
- Belongs to CDK module:
- interfaces
- Keywords:
- molecular formula
- Created on:
- 2007-11-20
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
clone()
Clones this IAdductFormula object and its content.boolean
contains(IIsotope isotope)
True, if the AdductFormula contains the given IIsotope object.Integer
getCharge()
Returns the partial charge of this Adduct.int
getIsotopeCount()
Checks a set of Nodes for the number of different isotopes in the adduct formula.int
getIsotopeCount(IIsotope isotope)
Checks a set of Nodes for the occurrence of the isotope in the adduct formula from a particular isotope.Iterable<IIsotope>
isotopes()
Returns an Iterator for looping over all isotopes in this adduct formula.void
setCharge(Integer charge)
Sets the partial charge of this adduct formula.-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IMolecularFormulaSet
add, addMolecularFormula, contains, getMolecularFormula, molecularFormulas, removeAllMolecularFormulas, removeMolecularFormula, removeMolecularFormula, size
-
-
-
-
Method Detail
-
getIsotopeCount
int getIsotopeCount(IIsotope isotope)
Checks a set of Nodes for the occurrence of the isotope in the adduct formula from a particular isotope. It returns 0 if the does not exist.- Parameters:
isotope
- The IIsotope to look for- Returns:
- The occurrence of this isotope in this adduct
- See Also:
getIsotopeCount()
-
getIsotopeCount
int getIsotopeCount()
Checks a set of Nodes for the number of different isotopes in the adduct formula.- Returns:
- The the number of different isotopes in this adduct formula
- See Also:
getIsotopeCount(IIsotope)
-
isotopes
Iterable<IIsotope> isotopes()
Returns an Iterator for looping over all isotopes in this adduct formula.- Returns:
- An Iterator with the isotopes in this adduct formula
-
getCharge
Integer getCharge()
Returns the partial charge of this Adduct. If the charge has not been set the return value is Double.NaN.- Returns:
- the charge of this Adduct
- See Also:
setCharge(java.lang.Integer)
-
contains
boolean contains(IIsotope isotope)
True, if the AdductFormula contains the given IIsotope object.- Parameters:
isotope
- The IIsotope this AdductFormula is searched for- Returns:
- True, if the AdductFormula contains the given isotope object
-
setCharge
void setCharge(Integer charge)
Sets the partial charge of this adduct formula.- Parameters:
charge
- The partial charge- See Also:
getCharge()
-
clone
Object clone() throws CloneNotSupportedException
Clones this IAdductFormula object and its content.- Specified by:
clone
in interfaceIMolecularFormulaSet
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
-
-