|
The CrossLinker class provides abstractions to define the chemical basis of a cross-linking reaction. More...
Header: | #include <CrossLinker.hpp> |
Inherits: | MsXpS::libXpertMass::PolChemDefEntity, MsXpS::libXpertMass::Formula, and MsXpS::libXpertMass::Ponderable |
Inherited By: |
CrossLinker(PolChemDefCstSPtr pol_chem_def_csp, const QString &name, const QString &formula) | |
CrossLinker(const CrossLinker &other) | |
virtual | ~CrossLinker() |
virtual bool | accountMasses(double *mono = 0, double *avg = 0, int times = 1) |
virtual bool | accountMasses(Ponderable *ponderable, int times = 1) |
bool | appendModif(Modif *modif) |
QString * | formatXmlClkElement(int offset, const QString &indent = QString(" ")) |
QString | formula() const |
int | hasModif(const QString &modif_name) |
int | isNameKnown() |
const Modif * | modifAt(int index) const |
QList<Modif *> & | modifList() |
bool | removeModifAt(int index) |
bool | renderXmlClkElement(const QDomElement &element, int version) |
bool | setModifAt(Modif *modif, int index) |
bool | validate() |
CrossLinker & | operator=(const CrossLinker &other) |
virtual bool | operator==(const CrossLinker &other) const |
virtual bool | calculateMasses() override |
int | isNameInList(const QString &name, const QList<CrossLinker *> &cross_linker_list, CrossLinker *other = 0) |
QList<Modif *> | m_modifList |
The notion of a cross-linker is that it is the description of the chemical reaction that is carried out by Monomers in a Polymer or in an Oligomer sequence to form a CrossLink.
There are two different kinds of chemical entities potentially involved in the description of a CrossLinker:
Modif instances that are applied to Monomer instances. the Formula base class that completes the chemical reactions described by the Modif instances.
Constructs a CrossLinker instance.
Constructs a CrossLinker instance as a copy of other.
[virtual noexcept]
CrossLinker::~CrossLinker()Destructs this CrossLinker instance
[virtual]
bool CrossLinker::accountMasses(double *mono = 0, double *avg = 0, int times = 1)Copies the member masses (Ponderable base class) to mono and avg if these are non-nullptr.
Upon copying, the masses are multiplied by the compounding factor times.
Returns true.
[virtual]
bool CrossLinker::accountMasses(Ponderable *ponderable, int times = 1)Copies the member masses (Ponderable base class) to ponderable.
ponderable cannot be nullptr.
Upon copying, the masses are multiplied by the compounding factor times.
Returns true.
Adds modif to this CrossLinker instance.
Returns true.
[override virtual]
bool CrossLinker::calculateMasses()Returns true if the mass calculations for this CrossLinker instance are performed without error, false otherwise.
The calculation involved accounting masses for the Modifs (if any) and for the Formula (if non-empty). The member masses (Ponderable base class) are updated.
Formats this CrossLinker instance in a heap-allocated string to be used as an XML element in the polymer chemistry definition.
The formatting of the XML element takes into account offset and indent by prepending the string with offset * indent character substring.
indent defaults to two spaces.
Returns a dynamically allocated string that needs to be freed after use.
Returns the Formula.
Returns true if a Modif instance by modif_name is in the list of Modif instances, false otherwise.
[static]
int CrossLinker::isNameInList(const QString &name, const QList<CrossLinker *> &cross_linker_list, CrossLinker *other = 0)Returns the index of a CrossLinker found in the cross_linker_list list of CrossLinker instances by name name, -1 otherwise.
If other is non-nullptr, the found CrossLinker instance is copied into it.
Returns true if this CrossLinker instance is found in the member polymer chemistry definition, false otherwise.
Returns the Modif instance at index.
index cannot be out-of-bounds.
See also setModifAt().
Returns the list of Modif instances.
Removes the Modif instance at index.
index cannot be out-of-bounds.
Returns true.
Returns true if parsing of XML element, using a versioned function was successful, false otherwise.
The data in element are set to this CrossLinker instance if they validated successfully, thus essentially initializing this CrossLinker instance.
Sets the Modif at index index to modif.
index cannot be out-of-bounds.
Returns true.
See also modifAt().
Returns true if this CrossLinker instance validates successfully, false otherwise.
The validation involves the following:
Assigns other to this CrossLinker instance.
Returns a reference to this CrossLinker instance.
[virtual]
bool CrossLinker::operator==(const CrossLinker &other) constReturns true if this CrossLinker and other are identical.
This variable holds the list of Modif instances that describe the reaction (or the reactions) involved in the formation of a CrossLink between Monomers of a Polymer (or of an Oligomer) sequence.