| 
    libpappsomspp
    
   Library for mass spectrometry 
   | 
 
#include <chemicalformula.h>
  
Public Member Functions | |
| ChemicalFormula () | |
| ChemicalFormula (const AtomNumberInterface &atom_interface) | |
| ChemicalFormula (const ChemicalFormula &other) | |
| virtual | ~ChemicalFormula () | 
| pappso::ChemicalFormula & | operator= (const pappso::ChemicalFormula &other) | 
| pappso::ChemicalFormula | operator- () const | 
| pappso::ChemicalFormula | operator+ (const pappso::ChemicalFormula &to_add) const | 
| int | getNumberOfAtom (Enums::AtomIsotopeSurvey atom) const override | 
| get the number of atom C, O, N, H in the molecule   | |
| int | getNumberOfIsotope (Enums::Isotope isotope) const override | 
| get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule   | |
| double | getMass () const | 
| void | setOboPsiModTerm (const OboPsiModTerm &term) | 
| get formula from an Obo term   | |
| void | addIsotopeCount (const IsotopeCount &isotope_count) | 
| add an atom or isotope to the forumla   | |
| const QString | toString () const | 
| void | setFullIsotope (Enums::Isotope isotope) | 
| set full isotope labels   | |
  Public Member Functions inherited from pappso::AtomNumberInterface | |
| virtual const ChemicalFormula | getChemicalFormula () const | 
Private Member Functions | |
| void | setPsimodDiffFormula (const QString &diff_formula) | 
| void | setUnimodDiffFormula (const QString &diff_formula) | 
| void | addIsotopeNumberCount (const QString &atom_str, const QString &atom_isotope_number, std::int8_t count) | 
| void | simplify () | 
| simplify chemical formula sort, group isotope, remove 0   | |
Private Attributes | |
| std::vector< IsotopeCount > | m_isotopeVector | 
Definition at line 42 of file chemicalformula.h.
| pappso::ChemicalFormula::ChemicalFormula | ( | ) | 
Definition at line 88 of file chemicalformula.cpp.
Referenced by operator+(), and operator-().
| pappso::ChemicalFormula::ChemicalFormula | ( | const AtomNumberInterface & | atom_interface | ) | 
Definition at line 102 of file chemicalformula.cpp.
References pappso::Enums::C, pappso::Enums::C13, pappso::AtomNumberInterface::getNumberOfAtom(), pappso::AtomNumberInterface::getNumberOfIsotope(), pappso::Enums::H, pappso::Enums::H2, m_isotopeVector, pappso::Enums::N, pappso::Enums::N15, pappso::Enums::O, pappso::Enums::O17, pappso::Enums::O18, pappso::Enums::P, pappso::Enums::S, pappso::Enums::S33, pappso::Enums::S34, and pappso::Enums::S36.
| pappso::ChemicalFormula::ChemicalFormula | ( | const ChemicalFormula & | other | ) | 
Definition at line 96 of file chemicalformula.cpp.
References m_isotopeVector.
      
  | 
  virtual | 
Definition at line 92 of file chemicalformula.cpp.
| void pappso::ChemicalFormula::addIsotopeCount | ( | const IsotopeCount & | isotope_count | ) | 
add an atom or isotope to the forumla
Definition at line 641 of file chemicalformula.cpp.
References pappso::IsotopeCount::count, pappso::IsotopeCount::isotope, and m_isotopeVector.
Referenced by pappso::PeptideInterface::getChemicalFormulaCharge().
      
  | 
  private | 
Definition at line 498 of file chemicalformula.cpp.
References pappso::Enums::C, pappso::Enums::C13, pappso::Enums::H, pappso::Enums::H2, m_isotopeVector, pappso::Enums::N, pappso::Enums::N15, pappso::Enums::O, pappso::Enums::O17, pappso::Enums::O18, pappso::Enums::S, pappso::Enums::S33, pappso::Enums::S34, and pappso::Enums::S36.
Referenced by setPsimodDiffFormula(), and setUnimodDiffFormula().
| double pappso::ChemicalFormula::getMass | ( | ) | const | 
Definition at line 296 of file chemicalformula.cpp.
References pappso::Enums::C, pappso::Enums::C13, pappso::DIFFC12C13(), pappso::DIFFH1H2(), pappso::DIFFN14N15(), pappso::DIFFO16O17(), pappso::DIFFO16O18(), pappso::DIFFS32S33(), pappso::DIFFS32S34(), pappso::DIFFS32S36(), pappso::Enums::H, pappso::Enums::H2, m_isotopeVector, pappso::MASSCARBON(), pappso::MASSNITROGEN(), pappso::MASSOXYGEN(), pappso::MASSPHOSPHORUS(), pappso::MASSSULFUR(), pappso::MPROTIUM(), pappso::Enums::N, pappso::Enums::N15, pappso::Enums::O, pappso::Enums::O17, pappso::Enums::O18, pappso::Enums::P, pappso::Enums::S, pappso::Enums::S33, pappso::Enums::S34, and pappso::Enums::S36.
Referenced by pappso::Peptide::getMass().
      
  | 
  overridevirtual | 
get the number of atom C, O, N, H in the molecule
Implements pappso::AtomNumberInterface.
Definition at line 240 of file chemicalformula.cpp.
References pappso::Enums::C, pappso::Enums::C13, pappso::Enums::H, pappso::Enums::H2, m_isotopeVector, pappso::Enums::N, pappso::Enums::N15, pappso::Enums::O, pappso::Enums::O17, pappso::Enums::O18, pappso::Enums::S, pappso::Enums::S33, pappso::Enums::S34, and pappso::Enums::S36.
Referenced by pappso::AaModification::setDiffFormula().
      
  | 
  overridevirtual | 
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Implements pappso::AtomNumberInterface.
Definition at line 284 of file chemicalformula.cpp.
References m_isotopeVector.
Referenced by pappso::AaModification::setDiffFormula().
| pappso::ChemicalFormula pappso::ChemicalFormula::operator+ | ( | const pappso::ChemicalFormula & | to_add | ) | const | 
Definition at line 225 of file chemicalformula.cpp.
References ChemicalFormula(), m_isotopeVector, and simplify().
| pappso::ChemicalFormula pappso::ChemicalFormula::operator- | ( | ) | const | 
Definition at line 211 of file chemicalformula.cpp.
References ChemicalFormula(), and m_isotopeVector.
| pappso::ChemicalFormula & pappso::ChemicalFormula::operator= | ( | const pappso::ChemicalFormula & | other | ) | 
Definition at line 204 of file chemicalformula.cpp.
References m_isotopeVector.
| void pappso::ChemicalFormula::setFullIsotope | ( | Enums::Isotope | isotope | ) | 
set full isotope labels
Definition at line 672 of file chemicalformula.cpp.
References pappso::Enums::C, pappso::Enums::C13, pappso::IsotopeCount::count, pappso::Enums::H, pappso::Enums::H2, m_isotopeVector, pappso::Enums::N, and pappso::Enums::N15.
Referenced by pappso::Peptide::getChemicalFormulaCharge().
| void pappso::ChemicalFormula::setOboPsiModTerm | ( | const OboPsiModTerm & | term | ) | 
get formula from an Obo term
Definition at line 352 of file chemicalformula.cpp.
References pappso::OboPsiModTerm::getAccession(), pappso::OboPsiModTerm::isA(), pappso::OboPsiModTerm::isUnimod(), pappso::OboPsiModTerm::m_diffFormula, pappso::OboPsiModTerm::m_formula, pappso::OboPsiModTerm::m_isA, m_isotopeVector, pappso::OboPsiModTerm::m_origin, setPsimodDiffFormula(), and setUnimodDiffFormula().
Referenced by pappso::AaModification::createInstance().
      
  | 
  private | 
Definition at line 583 of file chemicalformula.cpp.
References addIsotopeNumberCount(), pappso::Enums::C, pappso::Enums::H, m_isotopeVector, pappso::Enums::N, pappso::Enums::O, pappso::Enums::P, and pappso::Enums::S.
Referenced by setOboPsiModTerm().
      
  | 
  private | 
Definition at line 385 of file chemicalformula.cpp.
References addIsotopeNumberCount(), pappso::Enums::C, pappso::Enums::H, m_isotopeVector, pappso::Enums::N, pappso::Enums::O, pappso::Enums::P, and pappso::Enums::S.
Referenced by setOboPsiModTerm().
      
  | 
  private | 
simplify chemical formula sort, group isotope, remove 0
Definition at line 741 of file chemicalformula.cpp.
References pappso::a, pappso::b, pappso::IsotopeCount::count, pappso::IsotopeCount::isotope, and m_isotopeVector.
Referenced by operator+().
| const QString pappso::ChemicalFormula::toString | ( | ) | const | 
Definition at line 659 of file chemicalformula.cpp.
References m_isotopeVector.
Referenced by pappso::Peptide::getChemicalFormulaCharge().
      
  | 
  private | 
Definition at line 88 of file chemicalformula.h.
Referenced by ChemicalFormula(), ChemicalFormula(), addIsotopeCount(), addIsotopeNumberCount(), getMass(), getNumberOfAtom(), getNumberOfIsotope(), operator+(), operator-(), operator=(), setFullIsotope(), setOboPsiModTerm(), setPsimodDiffFormula(), setUnimodDiffFormula(), simplify(), and toString().