Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::Monomer Class Reference

#include <monomer.hpp>

Inheritance diagram for massXpert::Monomer:

massXpert::PolChemDefEntity massXpert::Formula massXpert::Ponderable massXpert::PropListHolder

List of all members.


Detailed Description

The Monomer class provides a monomer.

A monomer is the building block of a polymer sequence. It is mainly characterized by a name, a code and a formula.

Definition at line 63 of file monomer.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.
bool accountMasses (Ponderable *, int) const
 Increments the masses in the argument.
bool accountMasses (double *=0, double *=0, int=1) const
 Increments the masses in the arguments.
QChar actions () const
 Tells the actions found in the formula.
QChar actions (const QString &) const
 Tells the actions found in the formula.
bool appendProp (Prop *)
const QList< AtomCount * > & atomCountList () const
 Returns the list of atom count objects.
QString avg (const QLocale &, int=10) const
 Returns the average mass as a string.
double avg () const
 Returns the average mass.
virtual bool calculateMasses ()
 Calculates the monoisotopic and average masses.
bool calculateMasses (int=MXT_MONOMER_CHEMENT_NONE)
 Calculates the masses(mono and avg).
bool checkCodeSyntax () const
 Checks the code syntax.
bool checkSyntax ()
 Checks the syntax of the formula.
void clearMasses ()
 Clears the monoisotopic and average masses by setting both to 0.
virtual void clone (PropListHolder *) const
virtual void clone (Ponderable *) const
 Modifies other to be identical to this.
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 (Monomer *) const
 Modifies other to be similar(shallow cloning) to this.
Monomerclone () const
 Creates a new monomer.
QString code () const
 Returns the code.
void debugPutStdErr () const
 Creates a string.
void decrementAvg (double)
 Decrements the average mass by mass.
void decrementMono (double)
 Decrements the monoisotopic mass by mass.
bool deepAtomCopy (const QList< Atom * > &refList)
 Performs a deep copy of the atom count objects.
QString elementalComposition () const
 Computes a formula string.
QString * formatXmlMnmElement (int, const QString &=QString(" "))
 Formats a string suitable to use as an XML element.
QString * formatXmlMonomerElement (int, const QString &=QString(" ")) const
 Formats a string suitable to use as an XML element.
QString formula () const
 Returns the formula.
void incrementAvg (double)
 Increments the average mass by mass.
void incrementMass (double, MassType)
void incrementMono (double)
 Increments the monoisotopic mass by mass.
int isCodeKnown () const
 Searches this monomer in a list according to code.
bool isModified () const
bool isModifTarget (const Modif &) const
int isNameKnown () const
 Searches this monomer in a list according to name.
double mass (MassType) const
void masses (double *=0, double *=0) const
 Updates the arguments with the monoisotopic and average masses.
int modifCount (const QString &)
QList< Modif * > * modifList () const
bool modify (Modif *, bool, QStringList &)
virtual void mold (const PropListHolder &)
virtual void mold (const Ponderable &)
 Modifies this to be identical to other.
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 Monomer &)
 Modifies this to be similar(shallow molding) to other.
QString mono (const QLocale &, int=10) const
 Returns the monoisotopic mass as a string.
double mono () const
 Returns the monoisotopic mass.
 Monomer (const PolChemDef *, QString, QString=QString(), QString=QString())
 Constructs a monomer.
QString name () const
 Returns the name.
virtual bool operator!= (const Ponderable &) const
 Inquality operator.
virtual bool operator!= (const Formula &) const
 Tests inequality.
virtual bool operator!= (const PolChemDefEntity &) const
 Tests inequality.
bool operator!= (const Monomer &) const
 Tests inequality.
virtual bool operator== (const Ponderable &) const
 Equality operator.
virtual bool operator== (const Formula &) const
 Tests equality.
virtual bool operator== (const PolChemDefEntity &) const
 Tests equality.
bool operator== (const Monomer &) const
 Tests equality.
const PolChemDefpolChemDef () const
 Returns the polymer chemistry definition.
Propprop (const QString &, int *=0)
int propIndex (const QString &, Prop *=0)
QList< Prop * > & propList ()
const QList< Prop * > & propList () const
int propListSize () const
double & ravg ()
 Returns a reference to the average mass.
bool removeProp (const QString &)
bool removeProp (Prop *)
bool renderXmlFormulaElement (const QDomElement &)
 Parses a formula XML element and sets the data to the formula.
bool renderXmlMnmElement (const QDomElement &, int)
 Parses a monomer XML element from a polymer chemistry definition.
bool renderXmlMonomerElement (const QDomElement &, int)
 Parses a monomer XML element from a polymer sequence.
bool renderXmlMonomerElementV2 (const QDomElement &, int)
double & rmono ()
 Returns a reference to the monoisotopic mass.
bool setAvg (const QString &, const QLocale &)
 Sets the average mass to mass.
void setAvg (double)
 Sets the average mass to mass.
void setCode (const QString &)
 Sets the code.
void setFormula (const Formula &)
 Sets the formula.
void setFormula (const QString &)
 Sets the formula.
void setMass (double, MassType)
void setMasses (double, double)
 Sets the monoisotopic and average masses.
bool setMono (const QString &, const QLocale &)
 Sets the monoisotopic mass to mass.
void setMono (double)
 Sets the monoisotopic mass to mass.
void setName (const QString &)
 Sets the name.
void setPolChemDef (PolChemDef *)
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.
bool unmodify (Modif *)
 Unmodifies the monomer for the specific modif.
bool unmodify ()
 Unmodifies the monomer totally(all its modifications).
virtual bool validate (const QList< Atom * > &, bool=false, bool=false)
 Validates the formula.
virtual bool validate () const
bool validate ()
 Validates this monomer.
 ~Monomer ()
 Destroys the monomer.

Static Public Member Functions

static bool checkSyntax (QString &)
 Checks the syntax of the formula.
static int isCodeInList (const QString &, const QList< Monomer * > &, Monomer *=0)
 Searches a monomer in a list according to the str code.
static int isNameInList (const QString &, const QList< Monomer * > &, Monomer *=0)
 Searches a monomer in a list according to the str name.

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.
double m_avg
 Average mass.
QString m_formula
 Formula or action-formula.
QString m_minusFormula
 Minus-formula(or '-'-associated formula).
double m_mono
 Monoisotopic mass.
QString m_name
 Name.
QString m_plusFormula
 Plus-formula(or '+'-associated formula).
QList< Prop * > m_propList
const PolChemDefmp_polChemDef
 Pointer to the reference polymer chemistry definition.

Private Attributes

QString m_code
 Code.
QList< Modif * > * mpa_modifList

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

Generated by  Doxygen 1.6.0   Back to index