libXpertMass Developer Documentation
  • libXpertMass
  • PkaPhPi
  • PkaPhPi Class

    class MsXpS::libXpertMass::PkaPhPi

    The PkaPhPi class provides a model for specifying the acido-basic properties of a chemical entity. More...

    Header: #include <PkaPhPi.hpp>
    Inherits: MsXpS::libXpertMass::PropListHolder

    Public Functions

    PkaPhPi(Polymer &polymer, CalcOptions &calc_options, QList<Monomer *> *monomer_list_p = 0, QList<Modif *> *modif_list_p = 0)
    virtual ~PkaPhPi()
    int accountMonomerModif(const Monomer &monomer, ChemicalGroup &chemical_group)
    int accountPolymerEndModif(PolymerChemEnt end_modif, const ChemicalGroup &chemical_group)
    double calculateChargeRatio(double pka, bool is_acid_charged)
    int calculateCharges()
    int calculatePi()
    double negativeCharges()
    double ph()
    double pi()
    double positiveCharges()
    void setCalcOptions(const CalcOptions &calc_options)
    void setModifList(QList<Modif *> *modif_list_p)
    void setMonomerList(QList<Monomer *> *monomer_list_p)
    void setPh(double ph)

    Protected Variables

    CalcOptions m_calcOptions
    double m_negativeCharges
    double m_ph
    double m_pi
    const Polymer &m_polymer
    double m_positiveCharges
    QList<Modif *> *mpa_modifList
    QList<Monomer *> *mpa_monomerList

    Detailed Description

    Member Function Documentation

    PkaPhPi::PkaPhPi(Polymer &polymer, CalcOptions &calc_options, QList<Monomer *> *monomer_list_p = 0, QList<Modif *> *modif_list_p = 0)

    Constructs a PkaPhPi instance.

    [virtual noexcept] PkaPhPi::~PkaPhPi()

    Destructs this PkaPhPi instance.

    int PkaPhPi::accountMonomerModif(const Monomer &monomer, ChemicalGroup &chemical_group)

    Accounts for the chemical_group in the context of the monomer.

    A chemical group is described as follows:

    <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>

    Returns the count of rules that were accounted for, or -1 if none was.

    int PkaPhPi::accountPolymerEndModif(PolymerChemEnt end_modif, const ChemicalGroup &chemical_group)

    Accounts for the chemical_group in the context of the Polymer end_modif.

    A chemical group is described as follows:

    <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>

    Returns the count of rules that were accounted for, or -1 if none was.

    double PkaPhPi::calculateChargeRatio(double pka, bool is_acid_charged)

    Returns the ratio between the charged and the uncharged forms of the chemical entity using pka and is_acid_charged. If the charge is negative, the returned ratio is negative, positive otherwise.

    The charged and uncharged species are the AH an A- species of the acido-basic theory.

    The calculation is based on the use of the m_ph member variable value.

    int PkaPhPi::calculateCharges()

    Calculates the charges (positive and negative).

    The general scheme is :

    Get the list of the coordinates of the different Polymer region selections. For each first monomer and end monomer of a given region selection, check if the the region is an oligomer or a residual chain (m_selectionType of libXpertMass::CalcOptions); act accordingly. Also, check for each selection region if it encompasses the polymer left/right end. If the left/right end modifications are to be taken into account, act accordingly.

    The positive and negative charges are stored in the member m_positiveCharges and m_negativeCharges variables.

    Returns the count of chemical groups that have been processed.

    See also calculatePi().

    int PkaPhPi::calculatePi()

    Calculates the isoelectric point.

    The isoelectric point is the pH at which a given analyte will have a net charge of 0, that is, when the count of negative charges will be equal to the count of positive charges.

    The pI will be stored in the m_pi member variable.

    Returns the count of chemical groups that have been processed.

    See also calculateCharges().

    double PkaPhPi::negativeCharges()

    Returns the negative charges.

    double PkaPhPi::ph()

    Returns the pH.

    See also setPh().

    double PkaPhPi::pi()

    Returns the pI.

    double PkaPhPi::positiveCharges()

    Returns the positive charges.

    void PkaPhPi::setCalcOptions(const CalcOptions &calc_options)

    Sets the calculation options to calc_options.

    void PkaPhPi::setModifList(QList<Modif *> *modif_list_p)

    Sets the modification list to modif_list_p.

    The list and its contents are now owned by this PkaPhPi instance.

    void PkaPhPi::setMonomerList(QList<Monomer *> *monomer_list_p)

    Sets the monomer list to monomer_list_p.

    The list and its contents are now owned by this PkaPhPi instance.

    void PkaPhPi::setPh(double ph)

    Sets the pH to ph.

    See also ph().

    Member Variable Documentation

    CalcOptions PkaPhPi::m_calcOptions

    This variable holds the CalcOptions that configure the way the computations are to be carried out.

    double PkaPhPi::m_negativeCharges

    This variable holds the count of negative charges.

    double PkaPhPi::m_ph

    This variable holds the pH of the environment.

    This pH value is required to compute the number of charges of a given chemical entity (a Polymer) sequence, for example.

    double PkaPhPi::m_pi

    This variable holds the pI of the chemical entity.

    const Polymer &PkaPhPi::m_polymer

    This variable holds the polymer of which the acidobasic properties are computed.

    double PkaPhPi::m_positiveCharges

    This variable holds the count of positive charges.

    QList<Modif *> *PkaPhPi::mpa_modifList

    This variable holds the list of Modif instances as read from the pka_ph_pi.xml file.

    The PkaPhPi instance takes ownership of the items and of the list itself.

    QList<Monomer *> *PkaPhPi::mpa_monomerList

    This variable holds the list of Monomer instances as read from the pka_ph_pi.xml file.

    The PkaPhPi instance takes ownership of the items and of the list itself.