Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::FragRule Class Reference

#include <fragRule.hpp>

Inheritance diagram for massXpert::FragRule:

massXpert::PolChemDefEntity massXpert::Formula

List of all members.

Detailed Description

The FragRule class provides a fragmentation rule.

Fragmentation rules characterize in more detail the chemical reaction that governs the fragmentation of the polymer in the gas-phase. The rule is a conditional rule. Its logic is based on the presence of given monomers at the place of the fragmentation and before or after that precise location.

In saccharide chemistry, fragmentations are a very complex topic. This is because a given monomer will fragment according to a given chemistry if it is preceded in the sequence by a monomer of a given identity and according to another chemistry if its direct environment is different.

This paradigm is implemented using a sequence environment logic based on conditions that can be formulated thanks to three monomer codes:

The use of these codes is typically according to this logic:

"If current monomer is Glu and that previous monomer is Gly and following monomer is Arg, then fragmentation should occur according to this formula : "-H2O".

Definition at line 81 of file fragRule.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.
bool checkSyntax ()
 Checks the syntax of the formula.
virtual void clone (Formula *) const
 Modifies other to be identical to this.
virtual void clone (PolChemDefEntity *) const
 Modifies other to be identical to this.
void clone (FragRule *) const
 Modifies other to be identical to this.
FragRuleclone () const
 Creates a new fragmentation rule initialized according to this.
QString comment () const
 Returns the comment.
QString currCode () const
 Returns the current monomer code.
bool deepAtomCopy (const QList< Atom * > &refList)
 Performs a deep copy of the atom count objects.
QString elementalComposition () const
 Computes a formula string.
QString * formatXmlFgrElement (int, const QString &=QString(" "))
 Formats a string suitable to use as an XML element.
QString formula () const
 Returns the formula.
 FragRule (const FragRule &)
 Constructs a copy of other.
 FragRule (const PolChemDef *, QString, QString=QString(), QString=QString(), QString=QString(), QString=QString(), const QString &=QString())
 Constructs a fragmentation rule.
virtual void mold (const Formula &)
 Modifies this to be identical to other.
virtual void mold (const PolChemDefEntity &)
 Modifies this to be identical to other.
void mold (const FragRule &)
 Modifies this to be identical to other.
QString name () const
 Returns the name.
QString nextCode () const
 Returns the next monomer code.
virtual bool operator!= (const Formula &) const
 Tests inequality.
virtual bool operator!= (const PolChemDefEntity &) const
 Tests inequality.
FragRuleoperator= (const FragRule &)
 Assigns other to this fragmentation rule.
virtual bool operator== (const Formula &) const
 Tests equality.
virtual bool operator== (const PolChemDefEntity &) const
 Tests equality.
const PolChemDefpolChemDef () const
 Returns the polymer chemistry definition.
QString prevCode () const
 Returns the previous monomer code.
bool renderXmlFgrElement (const QDomElement &)
 Parses a fragmentation rule XML element.
bool renderXmlFormulaElement (const QDomElement &)
 Parses a formula XML element and sets the data to the formula.
void setComment (const QString &)
 Sets the comment.
void setCurrCode (const QString &)
 Sets the current monomer code.
void setFormula (const Formula &)
 Sets the formula.
void setFormula (const QString &)
 Sets the formula.
void setName (const QString &)
 Sets the name.
void setNextCode (const QString &)
 Sets the next monomer code.
void setPolChemDef (PolChemDef *)
void setPrevCode (const QString &)
 Sets the previous monomer code.
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.
virtual bool validate () const
bool validate ()
 Validates the fragmentation rule.
 ~FragRule ()
 Destroys the fragmentation rule.

Static Public Member Functions

static bool checkSyntax (QString &)
 Checks the syntax of the formula.
static int isNameInList (const QString &, const QList< FragRule * > &, FragRule *other=0)
 Searches a fragmentation rule in a list.

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_name
QString m_plusFormula
 Plus-formula(or '+'-associated formula).
const PolChemDefmp_polChemDef
 Pointer to the reference polymer chemistry definition.

Private Attributes

QString m_comment
QString m_currCode
 Current code.
QString m_nextCode
 Next code.
QString m_prevCode
 Previous code.

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

Generated by  Doxygen 1.6.0   Back to index