EmpiricalFormula

class pyopenms.EmpiricalFormula

Bases: object

Cython implementation of _EmpiricalFormula

Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1EmpiricalFormula.html

__init__()
  • Cython signature: void EmpiricalFormula() Representation of an empirical formula

  • Cython signature: void EmpiricalFormula(EmpiricalFormula &)

  • Cython signature: void EmpiricalFormula(String) EmpiricalFormula Constructor from string

  • Cython signature: void EmpiricalFormula(ptrdiff_t number, Element * element, ptrdiff_t charge) EmpiricalFormula Constructor with element pointer and number

Methods

__init__

  • Cython signature: void EmpiricalFormula()

calculateTheoreticalIsotopesNumber

Cython signature: double calculateTheoreticalIsotopesNumber()

contains

Cython signature: bool contains(EmpiricalFormula ef) Returns true if all elements from ef ( empirical formula ) are LESS abundant (negative allowed) than the corresponding elements of this EmpiricalFormula

estimateFromWeightAndComp

Cython signature: bool estimateFromWeightAndComp(double average_weight, double C, double H, double N, double O, double S, double P) Fills this EmpiricalFormula with an approximate elemental composition for a given average weight and approximate elemental stoichiometry

estimateFromWeightAndCompAndS

Cython signature: bool estimateFromWeightAndCompAndS(double average_weight, unsigned int S, double C, double H, double N, double O, double P) Fills this EmpiricalFormula with an approximate elemental composition for a given average weight, exact number of sulfurs, and approximate elemental stoichiometry

getAverageWeight

Cython signature: double getAverageWeight() Returns the average weight of the formula (includes proton charges)

getCharge

Cython signature: ptrdiff_t getCharge() Returns the total charge

getConditionalFragmentIsotopeDist

Cython signature: IsotopeDistribution getConditionalFragmentIsotopeDist(EmpiricalFormula & precursor, libcpp_set[unsigned int] & precursor_isotopes, CoarseIsotopePatternGenerator method)

getElementalComposition

Cython signature: libcpp_map[libcpp_string,int] getElementalComposition() Get elemental composition as a hash {'Symbol' -> NrAtoms}

getIsotopeDistribution

  • Cython signature: IsotopeDistribution getIsotopeDistribution(CoarseIsotopePatternGenerator)

getMonoWeight

Cython signature: double getMonoWeight() Returns the mono isotopic weight of the formula (includes proton charges)

getNumberOfAtoms

Cython signature: size_t getNumberOfAtoms() Returns the total number of atoms

hasElement

Cython signature: bool hasElement(Element * element) Returns true if the formula contains the element

isCharged

Cython signature: bool isCharged() Returns true if charge is not equal to zero

isEmpty

Cython signature: bool isEmpty() Returns true if the formula does not contain a element

setCharge

Cython signature: void setCharge(ptrdiff_t charge) Sets the charge

toString

Cython signature: String toString() Returns the formula as a string (charges are not included)

calculateTheoreticalIsotopesNumber()

Cython signature: double calculateTheoreticalIsotopesNumber()

contains()

Cython signature: bool contains(EmpiricalFormula ef) Returns true if all elements from ef ( empirical formula ) are LESS abundant (negative allowed) than the corresponding elements of this EmpiricalFormula

estimateFromWeightAndComp()

Cython signature: bool estimateFromWeightAndComp(double average_weight, double C, double H, double N, double O, double S, double P) Fills this EmpiricalFormula with an approximate elemental composition for a given average weight and approximate elemental stoichiometry

estimateFromWeightAndCompAndS()

Cython signature: bool estimateFromWeightAndCompAndS(double average_weight, unsigned int S, double C, double H, double N, double O, double P) Fills this EmpiricalFormula with an approximate elemental composition for a given average weight, exact number of sulfurs, and approximate elemental stoichiometry

getAverageWeight()

Cython signature: double getAverageWeight() Returns the average weight of the formula (includes proton charges)

getCharge()

Cython signature: ptrdiff_t getCharge() Returns the total charge

getConditionalFragmentIsotopeDist()

Cython signature: IsotopeDistribution getConditionalFragmentIsotopeDist(EmpiricalFormula & precursor, libcpp_set[unsigned int] & precursor_isotopes, CoarseIsotopePatternGenerator method)

getElementalComposition()

Cython signature: libcpp_map[libcpp_string,int] getElementalComposition() Get elemental composition as a hash {‘Symbol’ -> NrAtoms}

getIsotopeDistribution()
  • Cython signature: IsotopeDistribution getIsotopeDistribution(CoarseIsotopePatternGenerator) Computes the isotope distribution of an empirical formula using the CoarseIsotopePatternGenerator or the FineIsotopePatternGenerator method

  • Cython signature: IsotopeDistribution getIsotopeDistribution(FineIsotopePatternGenerator)

getMonoWeight()

Cython signature: double getMonoWeight() Returns the mono isotopic weight of the formula (includes proton charges)

getNumberOfAtoms()

Cython signature: size_t getNumberOfAtoms() Returns the total number of atoms

hasElement()

Cython signature: bool hasElement(Element * element) Returns true if the formula contains the element

isCharged()

Cython signature: bool isCharged() Returns true if charge is not equal to zero

isEmpty()

Cython signature: bool isEmpty() Returns true if the formula does not contain a element

setCharge()

Cython signature: void setCharge(ptrdiff_t charge) Sets the charge

toString()

Cython signature: String toString() Returns the formula as a string (charges are not included)