| | |
The ChemicalGroup class provides a model for specifying the acido-basic behaviour of a chemical group of either a Monomer object or of a Modif object. More...
| Header: | #include <ChemicalGroup.hpp> |
| ChemicalGroup(const QString &name = QString(), float pka = 7.0, bool is_acid_charged = true, MsXpS::libXpertMassCore::Enums::ChemicalGroupTrapped polymerization_rule = Enums::ChemicalGroupTrapped::NEVER) | |
| ChemicalGroup(const MsXpS::libXpertMassCore::ChemicalGroup &other) | |
| ~ChemicalGroup() | |
| MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr | findRuleByEntity(const QString &entity, std::size_t &index) const |
| MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr | findRuleByEntityAndName(const QString &entity, const QString &name, std::size_t &index) const |
| MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr | findRuleByName(const QString &name, std::size_t &index) const |
| QString | getName() const |
| float | getPka() const |
| MsXpS::libXpertMassCore::Enums::ChemicalGroupTrapped | getPolRule() const |
| const std::vector<MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr> & | getRulesCstRef() const |
| std::vector<MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr> & | getRulesRef() |
| bool | isAcidCharged() const |
| bool | isValid() const |
| bool | renderXmlMdfElement(const QDomElement &element) |
| bool | renderXmlMnmElement(const QDomElement &element) |
| void | setAcidCharged(bool acid_charged) |
| void | setName(QString name) |
| void | setPka(float pka) |
| void | setPolRule(MsXpS::libXpertMassCore::Enums::ChemicalGroupTrapped pol_rule) |
| bool | validate(MsXpS::libXpertMassCore::ErrorList *error_list_p) const |
| MsXpS::libXpertMassCore::ChemicalGroup & | operator=(const MsXpS::libXpertMassCore::ChemicalGroup &other) |
| bool | m_acidCharged |
| QString | m_name |
| float | m_pka |
| MsXpS::libXpertMassCore::Enums::ChemicalGroupTrapped | m_polymerizationRule |
| std::vector<MsXpS::libXpertMassCore::ChemicalGroupRuleSPtr> | m_rules |
If the ChemicalGroup does not prove sufficient to characterize precisely the acido-basic properties of an entity, ChemicalGroupRule instances can be added to that effect.
In an pkaphpidata definition file, the following xml structure is encountered:
<pkaphpidata> <monomers> <monomer> <code>A</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup> <mnmchemgroup> <name>C-term COOH</name> <pka>2.35</pka> <acidcharged>FALSE</acidcharged> <polrule>right_trapped</polrule> </mnmchemgroup> </monomer> <monomer> <code>C</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup> <mnmchemgroup> <name>C-term COOH</name> <pka>2.35</pka> <acidcharged>FALSE</acidcharged> <polrule>right_trapped</polrule> </mnmchemgroup> <mnmchemgroup> <name>Lateral SH2</name> <pka>8.3</pka> <acidcharged>FALSE</acidcharged> <polrule>never_trapped</polrule> </mnmchemgroup> </monomer> ..... <modifs> <modif> <name>Phosphorylation</name> <mdfchemgroup> <name>none_set</name> <pka>1.2</pka> <acidcharged>FALSE</acidcharged> </mdfchemgroup> <mdfchemgroup> <name>none_set</name> <pka>6.5</pka> <acidcharged>FALSE</acidcharged> </mdfchemgroup> </modif> </modifs> </pkaphpidata>
See also ChemicalGroupRule.
Constructs a ChemicalGroup instance.
name The name of this ChemicalGroup. pka The pKa value of this ChemicalGroup. is_acid_charged Tells if the ChemicalGroup bears a charge when in acidic conditions. polymerization_rule Specifies the polymerization rule.
Upon construction the object is validated and m_isValid is set to the result of that validation.
Construct a ChemicalGroup instance as a copy of other.
There is no checking of the validity of other.
[noexcept] ChemicalGroup::~ChemicalGroup()Destructs this ChemicalGroup instance.
Searches by entity for a ChemicalGroupRule instance.
Returns the index of the ChemicalGroupRule instance in the member list of ChemicalGroupRule instances or -1 if not found.
Searches by entity and name for a ChemicalGroupRule instance.
Returns the index of the ChemicalGroupRule instance in the member list of ChemicalGroupRule instances or -1 if not found.
Searches by name for a ChemicalGroupRule instance.
Returns the index of the ChemicalGroupRule instance in the member list of ChemicalGroupRule instances or -1 if not found.
Returns the name.
Returns the pKa.
Returns the polymerization rule.
Returns a const reference to the container of ChemicalGroupRule instances.
Returns a reference to the container of ChemicalGroupRule instances.
Returns the charge condition in acidic conditions.
If true, the group bears a charge when the pH is less than the pKa.
Returns the validity status of this instance.
Parses the ChemicalGroup XML element related to a Modif.
Upon parsing of the element (tag <mnmchemgroup>), its data are validated and set to this ChemicalGroup instance, thus essentially initializing it.
In an pkaphpidata definition file, the following xml structure is encountered:
<pkaphpidata> <monomers> <monomer> <code>A</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup> <mnmchemgroup> <name>C-term COOH</name> <pka>2.35</pka> <acidcharged>FALSE</acidcharged> <polrule>right_trapped</polrule> </mnmchemgroup> </monomer> ....... </monomers> <modifs> <modif> <name>Phosphorylation</name> <mdfchemgroup> <name>none_set</name> <pka>1.2</pka> <acidcharged>FALSE</acidcharged> </mdfchemgroup> <mdfchemgroup> <name>none_set</name> <pka>6.5</pka> <acidcharged>FALSE</acidcharged> </mdfchemgroup> </modif> </modifs> </pkaphpidata>
Upon parsing of the element, all the data are validated and set to this ChemicalGroup instance, thus essentially initializing it. If there are ChemicalGroupRules associated to the ChemicalGroup element, these are rendered also.
Returns true if parsing and validation were successful, false otherwise.
Parses the ChemicalGroup XML element related to a Monomer.
Upon parsing of the element (tag
are validated and set to this ChemicalGroup instance, thus essentially initializing it. In an pkaphpidata definition file, the following xml structure is encountered: \code <pkaphpidata> <monomers> <monomer> <code>A</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup> <mnmchemgroup> <name>C-term COOH</name> <pka>2.35</pka> <acidcharged>FALSE</acidcharged> <polrule>right_trapped</polrule> </mnmchemgroup> </monomer> <monomer> <code>C</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup> <mnmchemgroup> <name>C-term COOH</name> <pka>2.35</pka> <acidcharged>FALSE</acidcharged> <polrule>right_trapped</polrule> </mnmchemgroup> <mnmchemgroup> <name>Lateral SH2</name> <pka>8.3</pka> <acidcharged>FALSE</acidcharged> <polrule>never_trapped</polrule> </mnmchemgroup> </monomer>
Upon parsing of the element, all the data are validated and set to this ChemicalGroup instance, thus essentially initializing it. If there are ChemicalGroupRules associated to the ChemicalGroup element, these are rendered also.
Returns true if parsing and validation were successful, false otherwise.
Sets the charge condition in acidic conditions to acid_charged.
If true, the group bears a charge when the pH is less than the pKa.
See also isAcidCharged().
Sets the name.
Sets the pKa to pka.
Sets the polymerization rule to pol_rule.
The polymerization rule determines if the chemical group is trapped upon formation of a Monomer-to-Monomer bond.
Validates this instance, setting eventual error messages in error_list_p.
Note: error_list_p is not cleared.
If the validation is successful, m_isValid is set to true, otherwise it is set to false. That result is returned.
Assigns other to this ChemicalGroup instance.
Note: The ChemicalGroupRule instances in other are deep-duplicated.
Returns a reference to this ChemicalGroup instance.
Tells if the group is charged when in acid conditions (that is, the pH is less than the pKa).
This variable holds the name of the ChemicalGroup instance.
This variable holds the pKa of the ChemicalGroup instance.
This variable holds the way this ChemicalGroup behaves upon polymerization of the chemical entity into a Polymer.
This variable holds the container of ChemicalGroupRule instances.