Loading...
Searching...
No Matches
chemicalformula.cpp
Go to the documentation of this file.
/**
* \file pappsomspp/amino_acid/chemicalformula.cpp
* \date 06/04/2025
* \author Olivier Langella
* \brief structure to describe chemical formula
*/
/*******************************************************************************
* Copyright (c) 2025 Olivier Langella
*<Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#include <QRegularExpression>
#include "pappsomspp/core/amino_acid/chemicalformula.h"
#include "../obo/obopsimodterm.h"
#include "pappsomspp/core/exception/exceptionnotfound.h"
const QString
pappso::IsotopeCount::toString() const
{
QString atom;
switch(isotope)
{
case Enums::Isotope::C:
atom = "C";
break;
case Enums::Isotope::C13:
atom = "(13)C";
break;
case Enums::Isotope::H:
atom = "H";
break;
case Enums::Isotope::H2:
atom = "(2)H";
break;
case Enums::Isotope::N:
atom = "N";
break;
case Enums::Isotope::N15:
atom = "(15)N";
break;
case Enums::Isotope::O:
atom = "O";
break;
case Enums::Isotope::O17:
atom = "(17)O";
break;
case Enums::Isotope::O18:
atom = "(18)O";
break;
case Enums::Isotope::P:
atom = "P";
break;
case Enums::Isotope::S:
atom = "S";
break;
case Enums::Isotope::S33:
atom = "(33)S";
break;
case Enums::Isotope::S34:
atom = "(34)S";
break;
case Enums::Isotope::S36:
atom = "(36)S";
break;
}
return QString("%1 %2").arg(atom).arg(count);
}
pappso::ChemicalFormula::ChemicalFormula()
{
}
pappso::ChemicalFormula::~ChemicalFormula()
{
}
pappso::ChemicalFormula::ChemicalFormula(const pappso::ChemicalFormula &other)
: m_isotopeVector(other.m_isotopeVector)
{
}
pappso::ChemicalFormula::ChemicalFormula(const pappso::AtomNumberInterface &atom_interface)
{
qDebug();
std::int16_t count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::C13);
std::int16_t count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::C) - count_iso;
qDebug() << count;
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::C, count});
}
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::C13, count_iso});
}
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::H2);
count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::H) - count_iso;
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::H, count});
}
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::H2, count_iso});
}
qDebug();
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::O17);
std::int16_t count_iso2 = atom_interface.getNumberOfIsotope(Enums::Isotope::O18);
count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::O) - count_iso - count_iso2;
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::O, count});
}
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::O17, count_iso});
}
if(count_iso2 > 0)
{
m_isotopeVector.push_back({Enums::Isotope::O18, count_iso2});
}
qDebug();
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::N15);
count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::N) - count_iso;
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::N, count});
}
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::N15, count_iso});
}
qDebug();
count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::S);
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::S33);
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::S33, count_iso});
}
count = count - count_iso;
qDebug();
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::S34);
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::S34, count_iso});
}
count = count - count_iso;
qDebug();
count_iso = atom_interface.getNumberOfIsotope(Enums::Isotope::S36);
if(count_iso > 0)
{
m_isotopeVector.push_back({Enums::Isotope::S36, count_iso});
}
count = count - count_iso;
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::S, count});
}
qDebug();
count = atom_interface.getNumberOfAtom(Enums::AtomIsotopeSurvey::P);
if(count > 0)
{
m_isotopeVector.push_back({Enums::Isotope::P, count});
}
qDebug() << m_isotopeVector.size();
}
pappso::ChemicalFormula &
pappso::ChemicalFormula::operator=(const pappso::ChemicalFormula &other)
{
m_isotopeVector = other.m_isotopeVector;
return *this;
}
pappso::ChemicalFormula
pappso::ChemicalFormula::operator-() const
{
ChemicalFormula new_formula;
for(const IsotopeCount &isotope_count : m_isotopeVector)
{
std::int16_t count = isotope_count.count * -1;
new_formula.m_isotopeVector.push_back({isotope_count.isotope, count});
}
return new_formula;
}
pappso::ChemicalFormula
pappso::ChemicalFormula::operator+(const pappso::ChemicalFormula &to_add) const
{
ChemicalFormula new_formula(*this);
new_formula.m_isotopeVector.insert(new_formula.m_isotopeVector.end(),
to_add.m_isotopeVector.begin(),
to_add.m_isotopeVector.end());
new_formula.simplify();
return new_formula;
}
int
pappso::ChemicalFormula::getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const
{
int count = 0;
for(auto &isotope_count : m_isotopeVector)
{
switch(atom)
{
case Enums::AtomIsotopeSurvey::C:
if((isotope_count.isotope == Enums::Isotope::C) ||
(isotope_count.isotope == Enums::Isotope::C13))
count += isotope_count.count;
break;
case Enums::AtomIsotopeSurvey::H:
if((isotope_count.isotope == Enums::Isotope::H) ||
(isotope_count.isotope == Enums::Isotope::H2))
count += isotope_count.count;
break;
case Enums::AtomIsotopeSurvey::O:
if((isotope_count.isotope == Enums::Isotope::O) ||
(isotope_count.isotope == Enums::Isotope::O17) ||
(isotope_count.isotope == Enums::Isotope::O18))
count += isotope_count.count;
break;
case Enums::AtomIsotopeSurvey::N:
if((isotope_count.isotope == Enums::Isotope::N) ||
(isotope_count.isotope == Enums::Isotope::N15))
count += isotope_count.count;
break;
case Enums::AtomIsotopeSurvey::S:
if((isotope_count.isotope == Enums::Isotope::S) ||
(isotope_count.isotope == Enums::Isotope::S33) ||
(isotope_count.isotope == Enums::Isotope::S34) ||
(isotope_count.isotope == Enums::Isotope::S36))
count += isotope_count.count;
break;
default:
break;
}
}
return count;
}
int
pappso::ChemicalFormula::getNumberOfIsotope(Enums::Isotope isotope) const
{
int count = 0;
for(auto &isotope_count : m_isotopeVector)
{
if(isotope_count.isotope == isotope)
count += isotope_count.count;
}
return count;
}
double
pappso::ChemicalFormula::getMass() const
{
double mass = 0;
for(auto &isotope_count : m_isotopeVector)
{
switch(isotope_count.isotope)
{
case Enums::Isotope::C13:
mass += ((DIFFC12C13 + MASSCARBON) * (double)isotope_count.count);
break;
case Enums::Isotope::C:
mass += (MASSCARBON * (double)isotope_count.count);
break;
case Enums::Isotope::H:
mass += (MPROTIUM * (double)isotope_count.count);
break;
case Enums::Isotope::H2:
mass += ((DIFFH1H2 + MPROTIUM) * (double)isotope_count.count);
break;
case Enums::Isotope::N:
mass += (MASSNITROGEN * (double)isotope_count.count);
break;
case Enums::Isotope::N15:
mass += ((MASSNITROGEN + DIFFN14N15) * (double)isotope_count.count);
break;
case Enums::Isotope::O:
mass += (MASSOXYGEN * (double)isotope_count.count);
break;
case Enums::Isotope::O17:
mass += ((DIFFO16O17 + MASSOXYGEN) * (double)isotope_count.count);
break;
case Enums::Isotope::O18:
mass += ((DIFFO16O18 + MASSOXYGEN) * (double)isotope_count.count);
break;
case Enums::Isotope::S:
mass += (MASSSULFUR * (double)isotope_count.count);
break;
case Enums::Isotope::S33:
mass += ((DIFFS32S33 + MASSSULFUR) * (double)isotope_count.count);
break;
case Enums::Isotope::S34:
mass += ((DIFFS32S34 + MASSSULFUR) * (double)isotope_count.count);
break;
case Enums::Isotope::S36:
mass += ((DIFFS32S36 + MASSSULFUR) * (double)isotope_count.count);
break;
case Enums::Isotope::P:
mass += (MASSPHOSPHORUS * (double)isotope_count.count);
break;
}
}
return mass;
}
void
pappso::ChemicalFormula::setOboPsiModTerm(const pappso::OboPsiModTerm &term)
{
m_isotopeVector.clear();
if(term.isUnimod())
{
qDebug();
setUnimodDiffFormula(term.m_diffFormula);
}
else
{
qDebug() << "is_a " << term.m_isA.join(" ");
if(term.isA("MOD:01441"))
{
qDebug() << "term.isA(MOD:01441)";
if(term.m_origin.isEmpty())
{
throw pappso::ExceptionNotFound(
QObject::tr("origin not found for term : [%1]").arg(term.getAccession()));
}
setPsimodDiffFormula(term.m_formula);
qDebug();
// new_mod->m_mass = AaBase::getAaMass(term.m_origin[0].toLatin1());
}
else
{
setPsimodDiffFormula(term.m_diffFormula);
}
}
qDebug();
}
void
pappso::ChemicalFormula::setUnimodDiffFormula(const QString &diff_formula)
{
// C(-6) 13C(6) N(-2) 15N(2)
// atom alone
QRegularExpression rx("(^|\\s)([C,H,O,N,S,P])($|\\s)");
QRegularExpressionMatchIterator i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(2) << " " << match.captured(2);
std::int8_t count = 1;
qDebug() << count;
if(match.captured(2) == "C")
{
m_isotopeVector.push_back({Enums::Isotope::C, count});
}
else if(match.captured(2) == "H")
{
m_isotopeVector.push_back({Enums::Isotope::H, count});
}
else if(match.captured(2) == "N")
{
m_isotopeVector.push_back({Enums::Isotope::N, count});
}
else if(match.captured(2) == "O")
{
m_isotopeVector.push_back({Enums::Isotope::O, count});
}
else if(match.captured(2) == "S")
{
m_isotopeVector.push_back({Enums::Isotope::S, count});
}
else if(match.captured(2) == "P")
{
m_isotopeVector.push_back({Enums::Isotope::P, count});
}
}
// C(-6) 13C(6) N(-2) 15N(2)
rx.setPattern("(^|\\s)([C,H,O,N,S,P])\\(([-]{0,1}\\d+)\\)");
i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(2) << " " << match.captured(3);
std::int8_t count = match.captured(3).toInt();
qDebug() << count;
if(match.captured(2) == "C")
{
m_isotopeVector.push_back({Enums::Isotope::C, count});
}
else if(match.captured(2) == "H")
{
m_isotopeVector.push_back({Enums::Isotope::H, count});
}
else if(match.captured(2) == "N")
{
m_isotopeVector.push_back({Enums::Isotope::N, count});
}
else if(match.captured(2) == "O")
{
m_isotopeVector.push_back({Enums::Isotope::O, count});
}
else if(match.captured(2) == "S")
{
m_isotopeVector.push_back({Enums::Isotope::S, count});
}
else if(match.captured(2) == "P")
{
m_isotopeVector.push_back({Enums::Isotope::P, count});
}
}
// C(-6) 13C(6) N(-2) 15N(2)
// look for isotopes :
rx.setPattern("(^|\\s)(\\d+)([C,H,O,N,S])($|\\s)");
i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(2) << " " << match.captured(3);
addIsotopeNumberCount(match.captured(3), match.captured(2), 1);
}
// C(-6) 13C(6) N(-2) 15N(2)
// look for isotopes :
rx.setPattern("(^|\\s)(\\d+)([C,H,O,N,S])\\(([-]{0,1}\\d+)\\)");
i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(2) << " " << match.captured(3) << " " << match.captured(4);
std::int8_t number_of_isotopes = match.captured(4).toInt();
addIsotopeNumberCount(match.captured(3), match.captured(2), number_of_isotopes);
}
}
void
pappso::ChemicalFormula::addIsotopeNumberCount(const QString &atom_str,
const QString &atom_isotope_number,
std::int8_t count)
{
if(atom_str == "C")
{
if(atom_isotope_number == "12")
{
m_isotopeVector.push_back({Enums::Isotope::C, count});
}
else if(atom_isotope_number == "13")
{
m_isotopeVector.push_back({Enums::Isotope::C13, count});
}
}
else if(atom_str == "H")
{
if(atom_isotope_number == "1")
{
m_isotopeVector.push_back({Enums::Isotope::H, count});
}
else if(atom_isotope_number == "2")
{
m_isotopeVector.push_back({Enums::Isotope::H2, count});
}
}
else if(atom_str == "N")
{
if(atom_isotope_number == "14")
{
m_isotopeVector.push_back({Enums::Isotope::N, count});
}
else if(atom_isotope_number == "15")
{
m_isotopeVector.push_back({Enums::Isotope::N15, count});
}
}
else if(atom_str == "O")
{
if(atom_isotope_number == "16")
{
m_isotopeVector.push_back({Enums::Isotope::O, count});
}
else if(atom_isotope_number == "17")
{
m_isotopeVector.push_back({Enums::Isotope::O17, count});
}
else if(atom_isotope_number == "18")
{
m_isotopeVector.push_back({Enums::Isotope::O18, count});
}
}
else if(atom_str == "S")
{
if(atom_isotope_number == "32")
{
m_isotopeVector.push_back({Enums::Isotope::S, count});
}
else if(atom_isotope_number == "33")
{
m_isotopeVector.push_back({Enums::Isotope::S33, count});
}
else if(atom_isotope_number == "34")
{
m_isotopeVector.push_back({Enums::Isotope::S34, count});
}
else if(atom_isotope_number == "36")
{
m_isotopeVector.push_back({Enums::Isotope::S36, count});
}
}
else
{
// not known
throw pappso::ExceptionNotFound(QObject::tr("atom string: [%1] with atom number %2 not found")
.arg(atom_str)
.arg(atom_isotope_number));
}
}
void
pappso::ChemicalFormula::setPsimodDiffFormula(const QString &diff_formula)
{
QRegularExpression rx("(^|\\s)([C,H,O,N,S,P])\\s([-]{0,1}\\d+)");
QRegularExpressionMatchIterator i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(2) << " " << match.captured(2) << " " << match.captured(3);
std::int8_t count = match.captured(3).toInt();
qDebug() << count;
if(match.captured(2) == "C")
{
m_isotopeVector.push_back({Enums::Isotope::C, count});
}
else if(match.captured(2) == "H")
{
m_isotopeVector.push_back({Enums::Isotope::H, count});
}
else if(match.captured(2) == "N")
{
m_isotopeVector.push_back({Enums::Isotope::N, count});
}
else if(match.captured(2) == "O")
{
m_isotopeVector.push_back({Enums::Isotope::O, count});
}
else if(match.captured(2) == "S")
{
m_isotopeVector.push_back({Enums::Isotope::S, count});
}
else if(match.captured(2) == "P")
{
m_isotopeVector.push_back({Enums::Isotope::P, count});
}
}
// look for isotopes :
rx.setPattern("\\((\\d+)\\)([C,H,O,N,S])\\s([-]{0,1}\\d+)");
i = rx.globalMatch(diff_formula);
while(i.hasNext())
{
QRegularExpressionMatch match = i.next();
qDebug() << match.captured(1) << " " << match.captured(2) << " " << match.captured(3);
std::int8_t number_of_isotopes = match.captured(3).toInt();
addIsotopeNumberCount(match.captured(2), match.captured(1), number_of_isotopes);
}
}
void
pappso::ChemicalFormula::addIsotopeCount(const pappso::IsotopeCount &isotope_count)
{
bool added = false;
for(IsotopeCount &iso_count : m_isotopeVector)
{
if(iso_count.isotope == isotope_count.isotope)
{
added = true;
iso_count.count += isotope_count.count;
}
}
if(!added)
m_isotopeVector.push_back(isotope_count);
}
const QString
pappso::ChemicalFormula::toString() const
{
QStringList str_formula;
for(const IsotopeCount &iso_count : m_isotopeVector)
{
if(iso_count.count != 0)
str_formula << iso_count.toString();
}
str_formula.sort();
return str_formula.join(" ");
}
void
pappso::ChemicalFormula::setFullIsotope(Enums::Isotope isotope)
{
IsotopeCount *isotope_ref_p = nullptr;
std::int16_t cumul_count = 0;
for(IsotopeCount &iso_count : m_isotopeVector)
{
if(isotope == Enums::Isotope::C13)
{
if(iso_count.isotope == Enums::Isotope::C)
{
cumul_count += iso_count.count;
iso_count.count = 0;
}
if(iso_count.isotope == Enums::Isotope::C13)
{
cumul_count += iso_count.count;
isotope_ref_p = &iso_count;
}
}
else if(isotope == Enums::Isotope::N15)
{
if(iso_count.isotope == Enums::Isotope::N)
{
cumul_count += iso_count.count;
iso_count.count = 0;
}
if(iso_count.isotope == Enums::Isotope::N15)
{
cumul_count += iso_count.count;
isotope_ref_p = &iso_count;
}
}
else if(isotope == Enums::Isotope::H2)
{
if(iso_count.isotope == Enums::Isotope::H)
{
cumul_count += iso_count.count;
iso_count.count = 0;
}
if(iso_count.isotope == Enums::Isotope::H2)
{
cumul_count += iso_count.count;
isotope_ref_p = &iso_count;
}
}
}
if(isotope_ref_p == nullptr)
{
if(isotope == Enums::Isotope::C13)
{
m_isotopeVector.push_back({Enums::Isotope::C13, cumul_count});
}
else if(isotope == Enums::Isotope::N15)
{
m_isotopeVector.push_back({Enums::Isotope::N15, cumul_count});
}
else if(isotope == Enums::Isotope::H2)
{
m_isotopeVector.push_back({Enums::Isotope::H2, cumul_count});
}
}
else
{
isotope_ref_p->count = cumul_count;
}
}
void
pappso::ChemicalFormula::simplify()
{
std::vector<IsotopeCount> new_vector;
std::sort(m_isotopeVector.begin(), m_isotopeVector.end(), [](IsotopeCount &a, IsotopeCount &b) {
return a.isotope < b.isotope;
});
auto it = m_isotopeVector.begin();
while(it != m_isotopeVector.end())
{
IsotopeCount current_element = *it;
it++;
if(it != m_isotopeVector.end())
{
if(it->isotope != current_element.isotope)
{
new_vector.push_back(current_element);
}
else
{
while((it != m_isotopeVector.end()) && (it->isotope == current_element.isotope))
{
current_element.count += it->count;
it++;
}
if(current_element.count != 0)
{
new_vector.push_back(current_element);
}
}
}
}
m_isotopeVector = new_vector;
}
chemicalformula.h
pappso::AtomNumberInterface
Definition atomnumberinterface.h:30
pappso::AtomNumberInterface::getNumberOfIsotope
virtual int getNumberOfIsotope(Enums::Isotope isotope) const =0
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
pappso::AtomNumberInterface::getNumberOfAtom
virtual int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const =0
get the number of atom C, O, N, H in the molecule
pappso::ChemicalFormula
Definition chemicalformula.h:44
pappso::ChemicalFormula::getNumberOfIsotope
int getNumberOfIsotope(Enums::Isotope isotope) const override
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Definition chemicalformula.cpp:284
pappso::ChemicalFormula::simplify
void simplify()
simplify chemical formula sort, group isotope, remove 0
Definition chemicalformula.cpp:741
pappso::ChemicalFormula::toString
const QString toString() const
Definition chemicalformula.cpp:659
pappso::ChemicalFormula::operator-
pappso::ChemicalFormula operator-() const
Definition chemicalformula.cpp:211
pappso::ChemicalFormula::setOboPsiModTerm
void setOboPsiModTerm(const OboPsiModTerm &term)
get formula from an Obo term
Definition chemicalformula.cpp:352
pappso::ChemicalFormula::addIsotopeNumberCount
void addIsotopeNumberCount(const QString &atom_str, const QString &atom_isotope_number, std::int8_t count)
Definition chemicalformula.cpp:498
pappso::ChemicalFormula::setPsimodDiffFormula
void setPsimodDiffFormula(const QString &diff_formula)
Definition chemicalformula.cpp:583
pappso::ChemicalFormula::m_isotopeVector
std::vector< IsotopeCount > m_isotopeVector
Definition chemicalformula.h:89
pappso::ChemicalFormula::ChemicalFormula
ChemicalFormula()
Definition chemicalformula.cpp:88
pappso::ChemicalFormula::setFullIsotope
void setFullIsotope(Enums::Isotope isotope)
set full isotope labels
Definition chemicalformula.cpp:672
pappso::ChemicalFormula::operator=
pappso::ChemicalFormula & operator=(const pappso::ChemicalFormula &other)
Definition chemicalformula.cpp:204
pappso::ChemicalFormula::getMass
double getMass() const
Definition chemicalformula.cpp:296
pappso::ChemicalFormula::operator+
pappso::ChemicalFormula operator+(const pappso::ChemicalFormula &to_add) const
Definition chemicalformula.cpp:225
pappso::ChemicalFormula::~ChemicalFormula
virtual ~ChemicalFormula()
Definition chemicalformula.cpp:92
pappso::ChemicalFormula::getNumberOfAtom
int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const override
get the number of atom C, O, N, H in the molecule
Definition chemicalformula.cpp:240
pappso::ChemicalFormula::addIsotopeCount
void addIsotopeCount(const IsotopeCount &isotope_count)
add an atom or isotope to the forumla
Definition chemicalformula.cpp:641
pappso::ChemicalFormula::setUnimodDiffFormula
void setUnimodDiffFormula(const QString &diff_formula)
Definition chemicalformula.cpp:385
pappso::ExceptionNotFound
Definition exceptionnotfound.h:32
pappso::OboPsiModTerm
Definition obopsimodterm.h:34
pappso::OboPsiModTerm::m_isA
QStringList m_isA
Definition obopsimodterm.h:69
pappso::OboPsiModTerm::m_diffFormula
QString m_diffFormula
Definition obopsimodterm.h:62
pappso::OboPsiModTerm::m_origin
QString m_origin
Definition obopsimodterm.h:64
pappso::OboPsiModTerm::isA
bool isA(const QString &accession) const
tells if this term "is_a" another accession
Definition obopsimodterm.cpp:102
pappso::OboPsiModTerm::m_formula
QString m_formula
Definition obopsimodterm.h:63
pappso::OboPsiModTerm::getAccession
const QString & getAccession() const
Definition obopsimodterm.cpp:261
pappso::OboPsiModTerm::isUnimod
bool isUnimod() const
Definition obopsimodterm.cpp:277
exceptionnotfound.h
pappso::Enums::AtomIsotopeSurvey
AtomIsotopeSurvey
Definition types.h:110
pappso::Enums::AtomIsotopeSurvey::C
@ C
Definition types.h:111
pappso::Enums::AtomIsotopeSurvey::P
@ P
Definition types.h:116
pappso::Enums::AtomIsotopeSurvey::S
@ S
Definition types.h:115
pappso::Enums::AtomIsotopeSurvey::N
@ N
Definition types.h:114
pappso::Enums::AtomIsotopeSurvey::H
@ H
Definition types.h:112
pappso::Enums::AtomIsotopeSurvey::O
@ O
Definition types.h:113
pappso::Enums::Isotope
Isotope
Definition types.h:126
pappso::Enums::Isotope::C
@ C
Definition types.h:127
pappso::Enums::Isotope::S36
@ S36
Definition types.h:139
pappso::Enums::Isotope::P
@ P
Definition types.h:140
pappso::Enums::Isotope::C13
@ C13
Definition types.h:128
pappso::Enums::Isotope::S
@ S
Definition types.h:136
pappso::Enums::Isotope::N15
@ N15
Definition types.h:135
pappso::Enums::Isotope::S33
@ S33
Definition types.h:137
pappso::Enums::Isotope::O18
@ O18
Definition types.h:133
pappso::Enums::Isotope::N
@ N
Definition types.h:134
pappso::Enums::Isotope::O17
@ O17
Definition types.h:132
pappso::Enums::Isotope::H
@ H
Definition types.h:129
pappso::Enums::Isotope::S34
@ S34
Definition types.h:138
pappso::Enums::Isotope::H2
@ H2
Definition types.h:130
pappso::Enums::Isotope::O
@ O
Definition types.h:131
pappso::DIFFS32S33
const pappso_double DIFFS32S33(32.9714589101 - MASSSULFUR)
pappso::DIFFS32S34
const pappso_double DIFFS32S34(33.9678670300 - MASSSULFUR)
pappso::DIFFO16O17
const pappso_double DIFFO16O17(16.99913150 - MASSOXYGEN)
pappso::MASSCARBON
const pappso_double MASSCARBON(12)
pappso::MASSPHOSPHORUS
const pappso_double MASSPHOSPHORUS(30.973761998)
pappso::MASSSULFUR
const pappso_double MASSSULFUR(31.9720711741)
pappso::PeptideIonNter::a
@ a
Definition peptide.h:77
pappso::PeptideIonNter::b
@ b
Definition peptide.h:74
pappso::DIFFS32S36
const pappso_double DIFFS32S36(35.9670812000 - MASSSULFUR)
pappso::MPROTIUM
const pappso_double MPROTIUM(1.007825032241)
pappso::MASSNITROGEN
const pappso_double MASSNITROGEN(14.0030740048)
pappso::MASSOXYGEN
const pappso_double MASSOXYGEN(15.99491461956)
pappso::DIFFO16O18
const pappso_double DIFFO16O18(17.9991610 - MASSOXYGEN)
pappso::DIFFN14N15
const pappso_double DIFFN14N15(15.0001088982 - MASSNITROGEN)
pappso::DIFFC12C13
const pappso_double DIFFC12C13(1.0033548378)
pappso::DIFFH1H2
const pappso_double DIFFH1H2(2.0141017778 - MPROTIUM)
obopsimodterm.h
pappso::IsotopeCount
Definition chemicalformula.h:37
pappso::IsotopeCount::count
std::int16_t count
Definition chemicalformula.h:40
pappso::IsotopeCount::toString
const QString toString() const
Definition chemicalformula.cpp:36
pappso::IsotopeCount::isotope
Enums::Isotope isotope
Definition chemicalformula.h:39