| | |
The CrossLinker class provides abstractions to define the chemical basis of a cross-linking reaction. More...
| Header: | #include <CrossLinker.hpp> |
| CrossLinker(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp) | |
| CrossLinker(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp, const QDomElement &element, int version = 1) | |
| CrossLinker(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp = nullptr, const QString &name = QString(), const QString &formula = QString(), double mono = 0.0, double avg = 0.0) | |
| CrossLinker(const MsXpS::libXpertMassCore::CrossLinker &other) | |
| virtual | ~CrossLinker() |
| const MsXpS::libXpertMassCore::CrossLinker & | accountMasses(double &mono, double &avg, int times = 1) const |
| const MsXpS::libXpertMassCore::CrossLinker & | accountMasses(double *mono_p = nullptr, double *avg_p = nullptr, int times = 1) const |
| bool | appendModif(MsXpS::libXpertMassCore::ModifCstSPtr modif_csp) |
| bool | calculateMasses(const MsXpS::libXpertMassCore::IsotopicDataCstSPtr &isotopic_data_csp) |
| bool | calculateMasses(const MsXpS::libXpertMassCore::IsotopicDataCstSPtr &isotopic_data_csp, double &mono, double &avg) const |
| QString | formatXmlClkElement(int offset, const QString &indent = Utils::xmlIndentationToken) const |
| const MsXpS::libXpertMassCore::CrossLinkerCstSPtr | getFromPolChemDefByName() const |
| double | getMass(MsXpS::libXpertMassCore::Enums::MassType mass_type) const |
| MsXpS::libXpertMassCore::ModifCstSPtr | getModifAt(std::size_t index) const |
| const std::vector<MsXpS::libXpertMassCore::ModifCstSPtr> & | getModifsCstRef() const |
| std::vector<MsXpS::libXpertMassCore::ModifCstSPtr> & | getModifsRef() |
| QString | getName() const |
| const MsXpS::libXpertMassCore::PolChemDefCstSPtr & | getPolChemDefCstSPtr() const |
| bool | hasModif(const QString &modif_name) |
| bool | initialize(const QDomElement &element, int version = 1) |
| bool | insertModifAt(MsXpS::libXpertMassCore::ModifCstSPtr modif_csp, std::size_t index) |
| MsXpS::libXpertMassCore::Enums::PolChemDefEntityStatus | isKnownByNameInPolChemDef() const |
| bool | isValid() const |
| int | modifIndex(const QString &modif_name) |
| bool | removeModifAt(std::size_t index) |
| bool | renderXmlClkElement(const QDomElement &element, int version) |
| void | setFormula(const QString &formula_string) |
| void | setName(const QString &name) |
| void | setPolChemDefCstSPtr(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp) |
| QString | toString() const |
| bool | validate(MsXpS::libXpertMassCore::ErrorList *error_list_p) const |
| bool | operator!=(const MsXpS::libXpertMassCore::CrossLinker &other) const |
| MsXpS::libXpertMassCore::CrossLinker & | operator=(const MsXpS::libXpertMassCore::CrossLinker &other) |
| bool | operator==(const MsXpS::libXpertMassCore::CrossLinker &other) const |
| double | m_avg |
| QString | m_formula |
| bool | m_isValid |
| std::vector<MsXpS::libXpertMassCore::ModifCstSPtr> | m_modifs |
| double | m_mono |
| QString | m_name |
| MsXpS::libXpertMassCore::PolChemDefCstSPtr | mcsp_polChemDef |
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 that completes the chemical reactions described by the Modif instances.
Constructs a CrossLinker instance with the pol_chem_def_csp PolChemDef.
Constructs a CrossLinker instance starting from an XML <clk> element and a pol_chem_def_csp PolChemDef. The version indicates what version of the XML element is to be used.
This is the current format:
<clk> <name>CFP-chromophore</name> <formula></formula> <modifname>Chromo-O</modifname> <modifname>Chromo-H3</modifname> <modifname>Chromo-H</modifname> </clk>
The rendering of the Modif instances requires that the PolChemDef be available. If this is not the case, the rendering of the CrossLinker is stopped at the first <modifname> element and false is returned.
See also renderXmlClkElement().
Constructs a CrossLinker instance.
Constructs a CrossLinker instance as a copy of other.
[virtual noexcept] CrossLinker::~CrossLinker()Destructs this CrossLinker instance
Increases mono and avg by the corresponding member masses first compounded by times.
Returns this CrossLinker.
Increases mono_p and avg_p by the corresponding member masses first compounded by times.
Returns this CrossLinker.
Adds modif_csp to this CrossLinker instance.
Returns true.
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 (m_mono and m_avg) are updated.
The reference data for the computations are accessed at isotopic_data_csp.
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 masses calculated are set to mono and avg.
The calculations are performed using reference data in isotopic_data_csp.
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 CrossLinker instance from the polymer chemistry definition registered in this instance.
The key to search the CrossLinker is this instance's member name.
If there is no PolChemDef available, nullptr is returned.
If no CrossLinker instance is found by this instance's name, nullptr is returned.
Returns the mass of the type defined by mass_type.
Returns the Modif instance at index.
index cannot be out-of-bounds.
Returns a constant reference to the container of Modif instances.
Returns a reference to the container of Modif instances.
Returns the name.
Returns the PolChemDef.
Returns an iterator to the found Modif instance by modif_name in the container.
Initializes this CrossLinker instance using element, according to version.
Returns true if the rendering of element was successful, false otherwise.
See also renderXmlClkElement().
Sets the Modif at index index to modif_csp.
index cannot be out-of-bounds (fatal error).
Returns true.
Returns the status of this CrossLinker instance the polymer chemistry definition registered in this instance.
The key to search the CrossLinker is this instance's member name.
If there is no PolChemDef available, Enums::PolChemDefEntityStatus::POL_CHEM_DEF_NOT_AVAILABLE is returned.
If no CrossLinker instance is found by this instance's name, Enums::PolChemDefEntityStatus::ENTITY_NOT_KNOWN is returned, otherwise Enums::PolChemDefEntityStatus::ENTITY_KNOWN is returned.
Returns the validity status of this CrossLinker.
Returns the index of the found Modif instance by modif_name in the container, -1 otherwise.
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.
The format of the element is:
<clk> <name>CFP-chromophore</name> <formula></formula> <modifname>Chromo-O</modifname> <modifname>Chromo-H3</modifname> <modifname>Chromo-H</modifname> </clk>
Sets the formula to formula_string.
Sets the name of the CrossLinker.
Sets the PolChemDef to pol_chem_def_csp.
Returns a string representing this CrossLinker instance.
Returns true if this CrossLinker instance validates successfully, false otherwise.
The validation involves the following:
When an error occurs, the message is stored in error_list_p.
Returns true if this CrossLinker and other are different.
Returns the negated result of operator==().
Assigns other to this CrossLinker instance.
Returns a reference to this CrossLinker instance.
Returns true if this CrossLinker and other are identical.
This variable holds the average mass of the CrossLinker.
This variable holds the formula that must be applied when the cross-link occurs.
Note: This formula can be empty because the CrossLinker can be fully described, from a chemical standpoint, by listing Modif instances in the member m_modifs container of Modif instances.
Tells if the CrossLinker is valid.
This variable holds the container 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.
This variable holds the monoisotopic mass of the CrossLinker.
This variable holds the name of the CrossLinker, "DisulphideBond", for example.
This variable holds the reference polymer chemistry definition.