Examples of IsotopeContainer


Examples of org.openscience.cdk.formula.IsotopeContainer

    int numOfIsotopes = pattern.getNumberOfIsotopes();

    DataPoint dataPoints[] = new DataPoint[numOfIsotopes];

    for (int i = 0; i < numOfIsotopes; i++) {
      IsotopeContainer isotope = pattern.getIsotope(i);

      // For each unit of charge, we have to add or remove a mass of a
      // single electron. If the charge is positive, we remove electron
      // mass. If the charge is negative, we add it.
      double mass = isotope.getMass()
          + (polarity.getSign() * -1 * charge * ELECTRON_MASS);

      if (charge != 0)
        mass /= charge;

      double intensity = isotope.getIntensity();

      dataPoints[i] = new SimpleDataPoint(mass, intensity);
    }

    String formulaString = MolecularFormulaManipulator
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.