Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::IonizeRule Class Reference

#include <ionizeRule.hpp>

Inheritance diagram for massXpert::IonizeRule:

massXpert::Formula

List of all members.


Detailed Description

The IonizeRule class provides an ionization rule.

Ionizations are chemical reactions that bring a charge(or more charges) to an analyte. The chemical reaction is described by the inherited Formula class. The electric charge that is brought by this reaction is described by a member of the class, charge. It might happen that for polymers, ionization reactions might occur more than once. This is described by one member of the class, level.

For example, in protein chemistry, the ionization reaction is mainly a protonation reaction, which brings ---per reaction--- a single charge. Thus, the Formula would be "+H" and the charge 1. In MALDI, we would have a single protonation, thus level would be 1 by default. In electrospray ionization, more than one ionization reaction occurs, and we could have a level value of 25, for example.

Note that both charge and level should be positive values, since the real nature of the ionization is beared by the Formula(with "+H" for protonation in protein chemistry and "-H" for deprotonation in nucleic acids chemistry, for example).

Thus, an IonizeRule is valid if it generates a m/z ratio after ionization of the analyte that is different than the previous(M) and if its Formula validates. This means that the following should be true:

Note that we do not consider compulsory that the Formula brings atoms whatsoever, because some ionizations might not involve heavy mass transfers, like electron gain or electron loss.

Definition at line 91 of file ionizeRule.hpp.


Public Member Functions

bool accountAtoms (const QList< Atom * > &, int)
 Accounts the atoms in the formula times times.
bool accountInList (AtomCount *, int *=0)
 Accounts the atomCount instance into the list.
virtual bool accountMasses (const QList< Atom * > &, Ponderable *, int=1)
 Accounts this formula's mono/avg masses.
virtual bool accountMasses (const QList< Atom * > &, double *=0, double *=0, int=1)
 Accounts this formula's mono/avg masses.
QChar actions () const
 Tells the actions found in the formula.
QChar actions (const QString &) const
 Tells the actions found in the formula.
const QList< AtomCount * > & atomCountList () const
 Returns the list of atom count objects.
int charge () const
 Returns the charge.
bool checkSyntax ()
 Checks the syntax of the formula.
virtual void clone (Formula *) const
 Modifies other to be identical to this.
void clone (IonizeRule *) const
 Modifies other to be identical to this.
IonizeRuleclone () const
 Creates a new ionization rule.
void debugPutStdErr ()
bool deepAtomCopy (const QList< Atom * > &refList)
 Performs a deep copy of the atom count objects.
QString elementalComposition () const
 Computes a formula string.
QString * formatXmlIonizeRuleElement (int, const QString &=QString(" "))
 Formats a string suitable to use as an XML element.
QString formula () const
 Returns the formula.
 IonizeRule (const IonizeRule &)
 Constructs a copy of other.
 IonizeRule ()
 Constructs an ionization rule.
bool isValid () const
 Returns the validity.
int level () const
 Returns the ionization level.
virtual void mold (const Formula &)
 Modifies this to be identical to other.
void mold (const IonizeRule &)
 Modifies this to be identical to other.
virtual bool operator!= (const Formula &) const
 Tests inequality.
bool operator!= (const IonizeRule &) const
IonizeRuleoperator= (const IonizeRule &)
 Assigns other to this ionization rule.
virtual bool operator== (const Formula &) const
 Tests equality.
bool operator== (const IonizeRule &) const
bool renderXmlFormulaElement (const QDomElement &)
 Parses a formula XML element and sets the data to the formula.
bool renderXmlIonizeRuleElement (const QDomElement &)
 Renders an ionization rule XML element.
void setCharge (int)
 Sets the charge.
void setFormula (const Formula &)
 Sets the formula.
void setFormula (const QString &)
 Sets the formula.
void setLevel (int)
 Set the level.
int totalAtoms () const
 Computes the total number of atoms.
bool totalEntities (const QList< Atom * > &refList, int *=0, int *=0) const
 Computes the number of entities(atoms and isotopes).
int totalIsotopes (const QList< Atom * > &refList) const
 Computes the total number of isotopes.
virtual bool validate (const QList< Atom * > &, bool=false, bool=false)
 Validates the formula.
bool validate (const QList< Atom * > &)
 Validates the IonizeRule.

Static Public Member Functions

static bool checkSyntax (QString &)
 Checks the syntax of the formula.

Protected Member Functions

const QString & minusFormula () const
 Returns the minus-formula.
bool parse (const QList< Atom * > &, const QString &, int=1, bool=false, bool=false)
 Parses the formula using the reference atom list.
const QString & plusFormula () const
 Returns the plus-formula.
void setMinusFormula (const QString &)
 Sets the minus-formula.
void setPlusFormula (const QString &)
 Sets the plus-formula.
int splitParts (const QList< Atom * > &, int=1, bool=false, bool=false)
 Splits the formula according to its plus-/minus- actions.

Protected Attributes

QList< AtomCount * > m_atomCountList
 List of dynamically allocated AtomCount objects.
QString m_formula
 Formula or action-formula.
QString m_minusFormula
 Minus-formula(or '-'-associated formula).
QString m_plusFormula
 Plus-formula(or '+'-associated formula).

Private Attributes

int m_charge
 Charge brought by one ionization reaction.
bool m_isValid
int m_level
 Level at which the ionization reaction should occur, that is.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index