Class MassToFormulaTool

java.lang.Object
org.openscience.cdk.formula.MassToFormulaTool

@Deprecated public class MassToFormulaTool extends Object
Deprecated.
Please use MolecularFormulaGenerator

Tool to determine molecular formula consistent with a given accurate mass. The molecular formulas are not validate. It only consist in generate combination according object (see MolecularFormulaChecker). The algorithm is published in Rojas-Cherto M. et.al. [Rojas-Cherto, Miguel et. al.. Bioinformatics. 2011. ].

   MassToFormulaTool mf = new MassToFormulaTool();
   double myMass = 133.004242;
   IMolecularFormulaSet mfSet = mf.generate(myMass);
 

The elements are listed according on difference with the proposed mass.

Author:
miguelrojasch
Source code:
main
Belongs to CDK module:
formula
Created on:
2007-03-01
  • Constructor Details

    • MassToFormulaTool

      public MassToFormulaTool(IChemObjectBuilder builder)
      Deprecated.
      Construct an instance of MassToFormulaTool. It is necessary because different matrix have to build. Furthermore the default restrictions are initiated.
      See Also:
  • Method Details

    • setRestrictions

      public void setRestrictions(List<IRule> rulesNew) throws CDKException
      Deprecated.
      Set the restrictions that must be presents in the molecular formula.
      Parameters:
      rulesNew - The restrictions to impose
      Throws:
      CDKException
      See Also:
    • getRestrictions

      public List<IRule> getRestrictions()
      Deprecated.
      Get the restrictions that must be presents in the molecular formula.
      Returns:
      The restrictions to be imposed
      See Also:
    • setDefaultRestrictions

      public void setDefaultRestrictions()
      Deprecated.
      Set the default restrictions that must be presents in the molecular formula.
      See Also:
    • generate

      public IMolecularFormulaSet generate(double mass)
      Deprecated.
      Method that actually does the work of extracting the molecular formula.
      Parameters:
      mass - molecular formula to create from the mass
      Returns:
      the filled molecular formulas as IMolecularFormulaSet