Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::FragSpec Class Reference

#include <fragSpec.hpp>

Inheritance diagram for massXpert::FragSpec:

massXpert::PolChemDefEntity massXpert::Formula

List of all members.

Detailed Description

The FragSpec class provides a fragmentation specification.

Fragmentation specifications determine the chemical reaction that governs the fragmentation of the polymer in the gas-phase. The chemical reaction is embodied by a formula. The side of the polymer (left or right) that makes the fragment after the fragmentation has occurred is described by a fragmentation-end enumeration.

A fragmentation specification might not be enough information to determine the manner in which a polymer fragments in the gas-phase. Fragmentation rules might be required to refine the specification. A fragmentation specification might hold as many fragmentation rules as required.

Definition at line 78 of file fragSpec.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.
void appendRule (FragRule *)
 Append fragmentation rule to the list.
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 (FragSpec *) const
 Modifies other to be identical to this.
FragSpecclone () const
 Creates a new fragmentation specification.
QString comment () const
 Returns the comment.
bool deepAtomCopy (const QList< Atom * > &refList)
 Performs a deep copy of the atom count objects.
QString elementalComposition () const
 Computes a formula string.
QString * formatXmlFgsElement (int, const QString &=QString(" "))
 Formats a string suitable to use as an XML element.
QString formula () const
 Returns the formula.
MxtFragEnd fragEnd () const
 Returns the fragmentation end.
 FragSpec (const FragSpec &)
 Constructs a copy of other.
 FragSpec (const PolChemDef *, QString, QString)
 Constructs a fragmentation specification.
 FragSpec (const PolChemDef *, QString, QString=QString(), MxtFragEnd=MXT_FRAG_END_NONE, const QString &=QString())
 Constructs a fragmentation specification.
void insertRuleAt (int, FragRule *)
 Insert fragmentation rule to the list at index index.
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 FragSpec &)
 Modifies this to be identical to other.
QString name () const
 Returns the name.
virtual bool operator!= (const Formula &) const
 Tests inequality.
virtual bool operator!= (const PolChemDefEntity &) const
 Tests inequality.
FragSpecoperator= (const FragSpec &)
 Assigns other to this fragmentation specification.
virtual bool operator== (const Formula &) const
 Tests equality.
virtual bool operator== (const PolChemDefEntity &) const
 Tests equality.
const PolChemDefpolChemDef () const
 Returns the polymer chemistry definition.
void removeRuleAt (int)
 Remove fragmentation rule from the list at index index.
bool renderXmlFgsElement (const QDomElement &element, int)
 Parses a fragmentation specification XML element.
bool renderXmlFgsElementV2 (const QDomElement &)
bool renderXmlFormulaElement (const QDomElement &)
 Parses a formula XML element and sets the data to the formula.
QList< FragRule * > & ruleList ()
 Returns the list of fragmentation rules.
void setComment (const QString &)
 Sets the comment.
void setFormula (const Formula &)
 Sets the formula.
void setFormula (const QString &)
 Sets the formula.
void setFragEnd (MxtFragEnd)
 Sets the fragmentation end.
void setName (const QString &)
 Sets the name.
void setPolChemDef (PolChemDef *)
void setSideChainContribution (int)
int sideChainContribution ()
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 specification.
 ~FragSpec ()
 Destroys the fragmentation specification.

Static Public Member Functions

static bool checkSyntax (QString &)
 Checks the syntax of the formula.
static int isNameInList (const QString &, const QList< FragSpec * > &, FragSpec *=0)
 Searches a fragmentation specification 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
MxtFragEnd m_fragEnd
 Fragmentation end.
QList< FragRule * > m_ruleList
 List of fragmentation rules.
int m_sideChainContribution
 Fragmented monomer' side chain contribution.

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

Generated by  Doxygen 1.6.0   Back to index