Class MolecularFormulaSetManipulator
java.lang.Object
org.openscience.cdk.tools.manipulator.MolecularFormulaSetManipulator
Class with convenience methods that provide methods to manipulate
MolecularFormulaSet's. For example:
IMolecularFormula molecularFormula = MolecularManipulatorSet.getMaxOccurrenceElements(molecularFormulaSet);.
- Author:
- miguelrojasch
- Source code:
- main
- Belongs to CDK module:
- formula
- Created on:
- 2007-11-20
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
contains
(IMolecularFormulaSet formulaSet, IMolecularFormula formula) True, if the IMolecularFormulaSet contains the given IMolecularFormula but not as object.static IMolecularFormula
Extract from a set of MolecularFormula the maximum occurrence of each element found and put the element and occurrence in a new IMolecularFormula.static IMolecularFormula
Extract from a set of MolecularFormula the minimal occurrence of each element found and put the element and occurrence in a new IMolecularFormula.static IMolecularFormulaSet
remove
(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange) Remove all those IMolecularFormula which are not fit theirs IElement occurrence into a limits.static IMolecularFormulaSet
remove
(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin, IMolecularFormula formulaMax) Remove all those IMolecularFormula which are not fit theirs IElement occurrence into a limits.
-
Constructor Details
-
MolecularFormulaSetManipulator
public MolecularFormulaSetManipulator()
-
-
Method Details
-
getMaxOccurrenceElements
Extract from a set of MolecularFormula the maximum occurrence of each element found and put the element and occurrence in a new IMolecularFormula.- Parameters:
mfSet
- The set of molecularFormules to inspect- Returns:
- A IMolecularFormula containing the maximum occurrence of the elements
- See Also:
-
getMinOccurrenceElements
Extract from a set of MolecularFormula the minimal occurrence of each element found and put the element and occurrence in a new IMolecularFormula.- Parameters:
mfSet
- The set of molecularFormules to inspect- Returns:
- A IMolecularFormula containing the minimal occurrence of the elements
- See Also:
-
remove
public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin, IMolecularFormula formulaMax) Remove all those IMolecularFormula which are not fit theirs IElement occurrence into a limits. The limits are given from formulaMax and formulaMin. In the minimal IMolecularFormula must contain all those IElement found in the minimal IMolecularFormula.- Parameters:
formulaSet
- IMolecularFormulaSet to look forformulaMax
- A IMolecularFormula which contains the maximal representation of the ElementsformulaMin
- A IMolecularFormula which contains the minimal representation of the Elements- Returns:
- A IMolecularFormulaSet with only the IMolecularFormula which the IElements are into the correct occurrence
-
contains
True, if the IMolecularFormulaSet contains the given IMolecularFormula but not as object. It compare according contains the same number and type of Isotopes. It is not based on compare objects.- Parameters:
formulaSet
- The IMolecularFormulaSetformula
- The IMolecularFormula this IMolecularFormulaSet is searched for- Returns:
- True, if the IMolecularFormulaSet contains the given formula
- See Also:
-
remove
public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange) Remove all those IMolecularFormula which are not fit theirs IElement occurrence into a limits. The limits are given from formulaMax and formulaMin. In the minimal IMolecularFormula must contain all those IElement found in the minimal IMolecularFormula.- Parameters:
formulaSet
- IMolecularFormulaSet to look forformulaRange
- A IMolecularFormulaRange which contains the range representation of the IIsotope
-