Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::Polymer Class Reference

#include <polymer.hpp>

Inheritance diagram for massXpert::Polymer:

massXpert::Sequence massXpert::Ionizable massXpert::PolChemDefEntity massXpert::Ponderable

List of all members.

Detailed Description

The Polymer class provides a polymer.

A polymer is a sequence(Sequence) to which data are aggregated to make it able to perform a number of tasks.

The polymer has a name and a code, so that it is possible to refer to it in printed material...

Because Polymer derives from Ionizable, which itself derives from PolChemDefEntity, it holds a pointer to the polymer chemistry definition of the polymer sequence. Without that datum, using the polymer in a complex context would be impossible, as the polymer chemistry definition will provide a huge amount of data required to operate the polymer efficiently. Because Ionizable inherits Ponderable, the polymer has a mono mass and an average mass.

The polymer also has modifications(left-end and right-end) to characterize it better.

Definition at line 77 of file polymer.hpp.


void crossLinkChangedSignal (Polymer *)
void crossLinksPartiallyEncompassedSignal (int) const
void polymerDestroyedSignal (Polymer *)

Public Member Functions

bool accountCappingMasses (int, int=1)
bool accountEndModifMasses (int)
virtual bool accountMasses (double *=0, double *=0, int=1) const
 Increments the masses in the arguments.
bool accountMasses (const CalcOptions &)
void appendMonomerText (const QString &)
 Appends text to the sequence text.
const Monomerat (int) const
 Returns the monomer at index index.
QString author () const
 Returns the user name.
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 masses of this Ionizable.
bool calculateMasses (const CalcOptions &, bool=true)
virtual int charge () const
 Returns the ionization charge of this Ionizable.
quint16 checksum (int=-1, int=-1, bool=false) const
void clearMasses ()
 Clears the monoisotopic and average masses by setting both to 0.
virtual void clone (Ponderable *) const
 Modifies other to be identical to this.
virtual void clone (PolChemDefEntity *) const
 Modifies other to be identical to this.
virtual void clone (Ionizable *) const
 Modifies other to be identical to this.
virtual Ionizableclone () const
 Creates a new Ionizable.
QString code () const
 Returns the code.
bool crossLink (CrossLink *)
const CrossLinkList & crossLinkList () const
CrossLinkList * crossLinkListPtr ()
QString dateTime () const
 Returns the date and time in a string form.
void debugPutStdErr ()
 Outputs a string to the standard error console.
void decrementAvg (double)
 Decrements the average mass by mass.
void decrementMono (double)
 Decrements the monoisotopic mass by mass.
virtual int deionize ()
 Deionizes this Ionizable.
QString filePath () const
 Returns the file path.
bool findForwardMotif (Sequence *, const PolChemDef *, int *)
QString * formatXmlCrossLinksElement (int, const QString &=QString(" "))
QString * formatXmlDtd ()
 Creates the XML DTD for a polymer sequence file.
QString * formatXmlPolSeqElement (int, const QString &=QString(" "))
 Formats a string suitable to use as an XML element.
void incrementAvg (double)
 Increments the average mass by mass.
void incrementMass (double, MassType)
void incrementMono (double)
 Increments the monoisotopic mass by mass.
bool insertMonomerAt (const Monomer *, int)
 Inserts the monomer at index index.
virtual int ionize (const IonizeRule &)
 Ionizes this Ionizable.
virtual int ionize ()
 Ionizes this Ionizable.
IonizeRuleionizeRule ()
 Returns the IonizeRule as a pointer.
const IonizeRuleionizeRule () const
 Returns the IonizeRule as a constant reference.
bool isIonized () const
 Returns the ionization status of this Ionizable.
const ModifleftEndModif () const
int makeMonomerList (const PolChemDef *, bool=true, QList< int > *=0)
 Creates a list of monomers from the string sequence.
virtual int makeMonomerText ()
 Creates the string representation of the sequence.
double mass (MassType) const
void masses (double *=0, double *=0) const
 Updates the arguments with the monoisotopic and average masses.
virtual void mold (const Ponderable &)
 Modifies this to be identical to other.
virtual void mold (const PolChemDefEntity &)
 Modifies this to be identical to other.
virtual void mold (const Ionizable &)
 Modifies this to be identical to other.
virtual double molecularMass (MassType)
QString mono (const QLocale &, int=10) const
 Returns the monoisotopic mass as a string.
double mono () const
 Returns the monoisotopic mass.
int monomerIndex (const Monomer *)
const QList< const Monomer * > & monomerList () const
 Returns the sequence as a list of monomers.
QList< const Monomer * > * monomerListPtr ()
 Returns the sequence as a list of monomers.
QString * monomerText (const CoordinateList &, bool, bool) const
QString * monomerText (int, int, bool) const
const QString * monomerText ()
 Returns the sequence as a string of monomer codes.
QString name () const
 Returns the name.
int nextCode (QString *, int *, QString *, int)
 Returns the next code occurring in the sequence.
virtual bool operator!= (const Ponderable &) const
 Inquality operator.
virtual bool operator!= (const PolChemDefEntity &) const
 Tests inequality.
virtual bool operator!= (const Ionizable &) const
virtual bool operator== (const Ponderable &) const
 Equality operator.
virtual bool operator== (const PolChemDefEntity &) const
 Tests equality.
virtual bool operator== (const Ionizable &) const
const PolChemDefpolChemDef () const
 Returns the polymer chemistry definition.
 Polymer (const PolChemDef *, const QString &=QString("NOT_SET"), const QString &=QString("NOT_SET"), const QString &=QString("NOT SET"))
 Constructs a polymer.
virtual bool prepareMonomerRemoval (const Monomer *)
virtual bool prepareMonomerRemoval (Monomer *)
double & ravg ()
 Returns a reference to the average mass.
virtual bool removeMonomerAt (int)
 Removes the monomer at index index.
bool renderXmlCodesElement (const QDomElement &element)
 Parses an XML element holding a stretch of monomer codes.
bool renderXmlCrossLinksElement (const QDomElement &, int)
bool renderXmlPolymerFile (QString=QString(""))
 Parses a polymer sequence file.
bool renderXmlPolymerModifElement (const QDomElement &)
bool renderXmlPolymerModifElement (const QDomElement &, int)
bool renderXmlPolymerModifElementV3 (const QDomElement &)
bool renderXmlPolymerModifElementV4 (const QDomElement &)
const ModifrightEndModif () const
double & rmono ()
 Returns a reference to the monoisotopic mass.
void setAuthor (const QString &)
 Sets the user name.
bool setAvg (const QString &, const QLocale &)
 Sets the average mass to mass.
void setAvg (double)
 Sets the average mass to mass.
int setCharge (int)
 Sets the charge of this Ionizable.
void setCode (const QString &)
 Sets the code.
void setDateTime (const QString &)
 Sets the date and time(date, hours, minutes, seconds).
void setFilePath (const QString &)
 Sets the file path.
bool setLeftEndModif (const Modif &)
bool setLeftEndModif (const QString &=QString())
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 setMonomerText (const QString &)
 Sets the sequence text.
void setName (const QString &)
 Sets the name.
void setPolChemDef (PolChemDef *)
bool setRightEndModif (const Modif &)
bool setRightEndModif (const QString &=QString())
int size () const
 Returns the size of the sequence.
bool uncrossLink (CrossLink *)
void unspacifyMonomerText ()
 Removes all spaces, carriage returns and linefeeds.
virtual bool validate () const
bool validate (const PolChemDef *)
bool validate ()
bool writeXmlFile ()
 Write the polymer sequence to file.
virtual ~Polymer ()
 Destroys the polymer.

Static Public Member Functions

static bool accountCappingMasses (Polymer *, int, double *, double *, int=1)
static bool accountEndModifMasses (Polymer *, int, Ponderable *)
static bool accountEndModifMasses (Polymer *, int, double *, double *)
static bool accountMasses (Polymer *, const CalcOptions &, double *, double *)
static bool calculateMasses (Polymer *, const CalcOptions &, double *, double *, bool=true)
static int deionize (Ionizable *)
static int ionize (Ionizable *, const IonizeRule &)
 Ionizes ionizable.
static QString xmlPolymerFileGetPolChemDefName (const QString &filePath)
 Extract the polymer chemistry definition name.

Protected Attributes

double m_avg
 Average mass.
IonizeRule m_ionizeRule
 IonizeRule that is used to ionize this Ionizable.
bool m_isIonized
 Indicates if this Ionizable has been effectively ionized.
double m_mono
 Monoisotopic mass.
QList< const Monomer * > m_monomerList
 List of monomers in the sequence. Empty upon creation.
QString m_monomerText
 Sequence in the form of a string of concatenated monomer codes.
const PolChemDefmp_polChemDef
 Pointer to the reference polymer chemistry definition.

Private Attributes

QString m_author
 Name of the last user having last modified the polymer sequence.
QString m_code
CrossLinkList m_crossLinkList
 The list of CrossLink instances.
QDateTime m_dateTime
 Date and time of the last modification.
QString m_filePath
 File name.
Modif m_leftEndModif
 Left end modification.
QString m_name
Modif m_rightEndModif
 Right end modification.

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

Generated by  Doxygen 1.6.0   Back to index