test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: private final static
test_class.original_string: private final static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: tool/formula/src/test/java/org/openscience/cdk/formula/IsotopePatternGeneratorTest.java
test_class.identifier: IsotopePatternGeneratorTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testGetIsotopes_IMolecularFormula_withoutONE() {
          IMolecularFormula molFor = MolecularFormulaManipulator.getMajorIsotopeMolecularFormula("C41H79N8O3P", builder);
          IsotopePatternGenerator isotopeGe = new IsotopePatternGenerator(.01);
          IsotopePattern isos = isotopeGe.getIsotopes(molFor);
          Assert.assertEquals(6, isos.getNumberOfIsotopes(), 0.001);
      }
test_case.class_method_signature: IsotopePatternGeneratorTest.testGetIsotopes_IMolecularFormula_withoutONE()
test_case.full_signature: @Test public void testGetIsotopes_IMolecularFormula_withoutONE()
test_case.identifier: testGetIsotopes_IMolecularFormula_withoutONE
test_case.invocations: getMajorIsotopeMolecularFormula getIsotopes assertEquals getNumberOfIsotopes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetIsotopes_IMolecularFormula_withoutONE()
focal_class.declarator: builder        = null
focal_class.modifier: private
focal_class.original_string: private IChemObjectBuilder builder        = null;
focal_class.type: IChemObjectBuilder
focal_class.var_name: builder
focal_class.declarator: isoFactory
focal_class.modifier: private
focal_class.original_string: private IsotopeFactory     isoFactory;
focal_class.type: IsotopeFactory
focal_class.var_name: isoFactory
focal_class.declarator: logger         = LoggingToolFactory.createLoggingTool(IsotopePatternGenerator.class)
focal_class.modifier: private
focal_class.original_string: private ILoggingTool       logger         = LoggingToolFactory.createLoggingTool(IsotopePatternGenerator.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: minIntensity = 0.00001
focal_class.modifier: private
focal_class.original_string: private double  minIntensity = 0.00001;
focal_class.type: double
focal_class.var_name: minIntensity
focal_class.declarator: minAbundance = 1E-10
focal_class.modifier: private
focal_class.original_string: private double  minAbundance = 1E-10;
focal_class.type: double
focal_class.var_name: minAbundance
focal_class.declarator: resolution   = 0.00005f
focal_class.modifier: private
focal_class.original_string: private double  resolution   = 0.00005f;
focal_class.type: double
focal_class.var_name: resolution
focal_class.declarator: storeFormula = false
focal_class.modifier: private
focal_class.original_string: private boolean storeFormula = false;
focal_class.type: boolean
focal_class.var_name: storeFormula
focal_class.file: tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternGenerator.java
focal_class.identifier: IsotopePatternGenerator
focal_class.class_method_signature: IsotopePatternGenerator.IsotopePatternGenerator()
focal_class.full_signature: public  IsotopePatternGenerator()
focal_class.identifier: IsotopePatternGenerator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IsotopePatternGenerator()
focal_class.class_method_signature: IsotopePatternGenerator.IsotopePatternGenerator(double minIntensity)
focal_class.full_signature: public  IsotopePatternGenerator(double minIntensity)
focal_class.identifier: IsotopePatternGenerator
focal_class.modifiers: public
focal_class.parameters: (double minIntensity)
focal_class.signature:  IsotopePatternGenerator(double minIntensity)
focal_class.class_method_signature: IsotopePatternGenerator.setMinIntensity(double minIntensity)
focal_class.full_signature: public IsotopePatternGenerator setMinIntensity(double minIntensity)
focal_class.identifier: setMinIntensity
focal_class.modifiers: public
focal_class.parameters: (double minIntensity)
focal_class.return: IsotopePatternGenerator
focal_class.signature: IsotopePatternGenerator setMinIntensity(double minIntensity)
focal_class.class_method_signature: IsotopePatternGenerator.setMinResolution(double resolution)
focal_class.full_signature: public IsotopePatternGenerator setMinResolution(double resolution)
focal_class.identifier: setMinResolution
focal_class.modifiers: public
focal_class.parameters: (double resolution)
focal_class.return: IsotopePatternGenerator
focal_class.signature: IsotopePatternGenerator setMinResolution(double resolution)
focal_class.class_method_signature: IsotopePatternGenerator.setStoreFormulas(boolean storeFormula)
focal_class.full_signature: public IsotopePatternGenerator setStoreFormulas(boolean storeFormula)
focal_class.identifier: setStoreFormulas
focal_class.modifiers: public
focal_class.parameters: (boolean storeFormula)
focal_class.return: IsotopePatternGenerator
focal_class.signature: IsotopePatternGenerator setStoreFormulas(boolean storeFormula)
focal_class.class_method_signature: IsotopePatternGenerator.getIsotopes(IMolecularFormula molFor)
focal_class.full_signature: public IsotopePattern getIsotopes(IMolecularFormula molFor)
focal_class.identifier: getIsotopes
focal_class.modifiers: public
focal_class.parameters: (IMolecularFormula molFor)
focal_class.return: IsotopePattern
focal_class.signature: IsotopePattern getIsotopes(IMolecularFormula molFor)
focal_class.class_method_signature: IsotopePatternGenerator.asFormula(IIsotope isotope)
focal_class.full_signature: private IMolecularFormula asFormula(IIsotope isotope)
focal_class.identifier: asFormula
focal_class.modifiers: private
focal_class.parameters: (IIsotope isotope)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula asFormula(IIsotope isotope)
focal_class.class_method_signature: IsotopePatternGenerator.union(IMolecularFormula a, IMolecularFormula b)
focal_class.full_signature: private IMolecularFormula union(IMolecularFormula a, IMolecularFormula b)
focal_class.identifier: union
focal_class.modifiers: private
focal_class.parameters: (IMolecularFormula a, IMolecularFormula b)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula union(IMolecularFormula a, IMolecularFormula b)
focal_class.class_method_signature: IsotopePatternGenerator.findExisting(List<IsotopeContainer> containers,
                                                   double mass, double treshhold)
focal_class.full_signature: private static IsotopeContainer findExisting(List<IsotopeContainer> containers,
                                                   double mass, double treshhold)
focal_class.identifier: findExisting
focal_class.modifiers: private static
focal_class.parameters: (List<IsotopeContainer> containers,
                                                   double mass, double treshhold)
focal_class.return: IsotopeContainer
focal_class.signature: IsotopeContainer findExisting(List<IsotopeContainer> containers,
                                                   double mass, double treshhold)
focal_class.class_method_signature: IsotopePatternGenerator.addDistinctFormula(IsotopeContainer container, IMolecularFormula mf)
focal_class.full_signature: private void addDistinctFormula(IsotopeContainer container, IMolecularFormula mf)
focal_class.identifier: addDistinctFormula
focal_class.modifiers: private
focal_class.parameters: (IsotopeContainer container, IMolecularFormula mf)
focal_class.return: void
focal_class.signature: void addDistinctFormula(IsotopeContainer container, IMolecularFormula mf)
focal_class.class_method_signature: IsotopePatternGenerator.calculateAbundanceAndMass(IsotopePattern current, List<IsotopeContainer> additional)
focal_class.full_signature: private IsotopePattern calculateAbundanceAndMass(IsotopePattern current, List<IsotopeContainer> additional)
focal_class.identifier: calculateAbundanceAndMass
focal_class.modifiers: private
focal_class.parameters: (IsotopePattern current, List<IsotopeContainer> additional)
focal_class.return: IsotopePattern
focal_class.signature: IsotopePattern calculateAbundanceAndMass(IsotopePattern current, List<IsotopeContainer> additional)
focal_class.class_method_signature: IsotopePatternGenerator.cleanAbundance(IsotopePattern isopattern, double minIntensity)
focal_class.full_signature: private IsotopePattern cleanAbundance(IsotopePattern isopattern, double minIntensity)
focal_class.identifier: cleanAbundance
focal_class.modifiers: private
focal_class.parameters: (IsotopePattern isopattern, double minIntensity)
focal_class.return: IsotopePattern
focal_class.signature: IsotopePattern cleanAbundance(IsotopePattern isopattern, double minIntensity)
focal_method.body: public IsotopePattern getIsotopes(IMolecularFormula molFor) {
  
          if (builder == null) {
              try {
                  isoFactory = Isotopes.getInstance();
                  builder = molFor.getBuilder();
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
          String mf = MolecularFormulaManipulator.getString(molFor, true);
  
          IMolecularFormula molecularFormula = MolecularFormulaManipulator.getMajorIsotopeMolecularFormula(mf, builder);
  
          IsotopePattern abundance_Mass = null;
  
          for (IIsotope isos : molecularFormula.isotopes()) {
              String elementSymbol = isos.getSymbol();
              int atomCount = molecularFormula.getIsotopeCount(isos);
  
              // Generate possible isotope containers for the current atom's
              // these will then me 'multiplied' with the existing patten
              List<IsotopeContainer> additional = new ArrayList<>();
              for (IIsotope isotope : isoFactory.getIsotopes(elementSymbol)) {
                  double mass      = isotope.getExactMass();
                  double abundance = isotope.getNaturalAbundance();
                  if (abundance <= 0.000000001)
                      continue;
                  IsotopeContainer container = new IsotopeContainer(mass, abundance);
                  if (storeFormula)
                      container.setFormula(asFormula(isotope));
                  additional.add(container);
              }
  
              for (int i = 0; i < atomCount; i++)
                  abundance_Mass = calculateAbundanceAndMass(abundance_Mass, additional);
          }
  
          IsotopePattern isoP = IsotopePatternManipulator.sortAndNormalizedByIntensity(abundance_Mass);
          isoP = cleanAbundance(isoP, minIntensity);
          IsotopePattern isoPattern = IsotopePatternManipulator.sortByMass(isoP);
          return isoPattern;
  
      }
focal_method.class_method_signature: IsotopePatternGenerator.getIsotopes(IMolecularFormula molFor)
focal_method.full_signature: public IsotopePattern getIsotopes(IMolecularFormula molFor)
focal_method.identifier: getIsotopes
focal_method.invocations: getInstance getBuilder printStackTrace getString getMajorIsotopeMolecularFormula isotopes getSymbol getIsotopeCount getIsotopes getExactMass getNaturalAbundance setFormula asFormula add calculateAbundanceAndMass sortAndNormalizedByIntensity cleanAbundance sortByMass
focal_method.modifiers: public
focal_method.parameters: (IMolecularFormula molFor)
focal_method.return: IsotopePattern
focal_method.signature: IsotopePattern getIsotopes(IMolecularFormula molFor)