mFES - molecular Finite Element Solver
0.4
|
PQR class model to handle proteins (atoms and titratable groups). More...
#include <PQR.h>
Public Member Functions | |
PQR (string _fileName) | |
Constructor. | |
void | addInfo (INI &ini) |
Setting up some options. | |
void | parseSTFolder () |
Parsing ST files folder. | |
void | parseSTFiles () |
Parsing ST files folder wrapper. | |
int | parse () |
Parsing the PQR file. | |
void | calcModel (INI &ini) |
Wrapper method to compute molecular volume model of the protein. | |
void | calcDeltaG () |
Compute energy difference using NETGEN and nglib libraries. | |
void | calcResidues (INI &ini) |
Using the atom list from PQR file parse all residues. | |
void | calcExplicitModels (INI &ini) |
Molecular volume surfaces for titratable groups are computed if using the two-cycle approach. | |
void | writePQR (vector< Atom > &aList, string fileName) |
Write out a PQR file using a given atom list. | |
void | writePQR (Residue &titGroup, int stateNr) |
Overloading method to write out a given residue with a given state to a PQR file. | |
void | switchState (Residue &titGroup, int stateNr) |
Switches the state of a residue to a given state nr. | |
void | neutralState (Residue &titGroup, int stateNr) |
Switches a given residue into neutral state. | |
void | patch (vector< Atom > &atomList, ST &st) |
Switches a given atom list (of a residue) to another state (using ST data structure which is already in a given state). | |
void | patchNeutral (vector< Atom > &atomList, ST &st) |
Switches a given atom list (of a residue) to neutral state (using ST data structure). | |
void | writeOutW (string fileName) |
Writing out W-matrix as flat G file. | |
double | calcWmv (int state, Residue &ref, Residue &mref, Residue &mstat, string cycle) |
Computing the W-matrix element given a residue in reference and current state and cycle information. | |
void | calcW (string cycle) |
Computing the whole W-matrix for every pairwise titratable group interaction. | |
void | calcPkint (string cycleName, string refPQRFileName) |
Computing intrinsic pKA values. | |
vector< Atom > | deleteAtoms (vector< Atom > result, vector< Atom > &compareAtomList) |
Deletes from atom List "result" all atoms which are also in atom list "compareAtomList" via their atom id in PQR file. | |
vector< Atom > | getAtoms (Residue currentTitGroup, int stateNr) |
Returns a list of atoms from a given residue which is patched to a given state nr. | |
float | getCycle0Shift (string residueName, int state) |
Returns the averaged pKA value which is defined for the one-cycle approach to skip a second thermodynamic cycle computation. | |
void | calcPotat (string cycleName) |
Computes POTAT files which are needed to calculate intrinsic pKA values. | |
void | writePDE (INI &ini, string mode="explicit") |
Writes out PDE files to compute POTAT files with NGSolve. | |
void | writeOutPkint (string cycleName, string fileName, INI &ini) |
Writes out PKINT files to use with Monte-Carlo method, Karlsberg2. | |
char | getState (string residueName, int stateNr) |
Every state has a char identifier which is returned from ST file. | |
float | getShift (string residueName, int stateNr) |
Returns the pKA shift from reference to given state. | |
float | getShiftCycle0 (string residueName, int stateNr) |
Returns the averaged pKA value to skip second thermodynamic cycle. | |
Static Public Attributes | |
static bool | STparsed = false |
Are ST files already parsed. | |
static bool | calcNTE = false |
Do we have to compute the N-terminus. | |
static bool | calcCTE = false |
Do we have to compute the C-terminus. | |
static bool | explicitModels = false |
Are we using the two-cycle approach (compute models explicitly) | |
Private Attributes | |
string | fileName |
File name of the PQR file which has to be parsed (protein). | |
string | stFilesFolder |
Model | molecule |
Placeholder for molecular volume mesh computation. | |
vector< Atom > | atomList |
Atom list of all atoms with all PQR information. | |
vector< Residue > | residueList |
A list of all residues in the protein. | |
vector< Residue > | titGroupList |
vector< ST > | stList |
A list of all states in every ST file for every titratable group. | |
tCycle | cycle |
An abstraction of the thermodynamic cycle. | |
vector< vector< vector< vector < double > > > > | wmatrix |
A multidensional W-matrix vector to store pairwise interaction energies of all titratable groups with each other. |
PQR class model to handle proteins (atoms and titratable groups).
Reading options in config file. Parsing ST files (description of titratable groups in proteins). Titrating N- and/or C-terminus. Patching groups. Computing potential energies. pKA values (W-matrix, pkint PKINT files) using one- or two-cycle approach. Managing model generation (protein and titratable groups).
PQR::PQR | ( | string | _fileName | ) | [inline] |
void PQR::addInfo | ( | INI & | ini | ) | [inline] |
Setting up some options.
Here, some options are defined: ST files folder, calc termini?, use two-cycle approach?
INI | Options INI file. |
void PQR::calcDeltaG | ( | ) | [inline] |
Compute energy difference using NETGEN and nglib libraries.
An electrostatic solvation energy difference is computed. NETGEN and MUMPS is used.
void PQR::calcExplicitModels | ( | INI & | ini | ) | [inline] |
Molecular volume surfaces for titratable groups are computed if using the two-cycle approach.
Molecular volume models are computed for titratable groups if the two-cycle approach (explicit model computation) is chosen. PQR files are written out for every titratable group in every state.
INI | Configuration INI file. |
void PQR::calcModel | ( | INI & | ini | ) | [inline] |
Wrapper method to compute molecular volume model of the protein.
Compute molecular volume model of protein depending on the configuration of the INI file.
INI | Configuration INI file. |
Compute the cavity
Compute the ion exclusion layer if ionc != 0
Compute the molecular surface of the protein
void PQR::calcPkint | ( | string | cycleName, |
string | refPQRFileName | ||
) | [inline] |
Computing intrinsic pKA values.
Intrinsic pKA values (pkint) are computed parsing PKINT files computed before. Back and Born energy parts are assigned to titratable groups.
string | Name of current cycle. |
string | A reference PQR definition is needed (written out before). |
void PQR::calcPotat | ( | string | cycleName | ) | [inline] |
Computes POTAT files which are needed to calculate intrinsic pKA values.
A PDE file is written out before to control NGSolve which is a module of NETGEN. With this, POTAT files are computed which store all electrostatic potentials at every atom position of every titratable goup in every state.
string | Name of current cycle. |
void PQR::calcResidues | ( | INI & | ini | ) | [inline] |
Using the atom list from PQR file parse all residues.
All residues which define a molecular model and for every titratable group are computed in the spirit of the pKA framework of Knapp et al. Also, C- and N-termini are added if defined in config INI file.
INI | Configuration INI file. |
void PQR::calcW | ( | string | cycle | ) | [inline] |
Computing the whole W-matrix for every pairwise titratable group interaction.
A multidimensional W-matrix is generated. At first diagonal elements are set to zero. Decide which cycle is computed and compute every W element using calcWmv of one to another group for every state. Then the matrix is symmetrized.
string | Name of current cycle. |
double PQR::calcWmv | ( | int | state, |
Residue & | ref, | ||
Residue & | mref, | ||
Residue & | mstat, | ||
string | cycle | ||
) | [inline] |
Computing the W-matrix element given a residue in reference and current state and cycle information.
A W-matrix element is computed using the pKA framework defined by Knapp et al.
int | Current state number. |
Residue | Residue in reference state (protein environment). |
Residue | Residue in reference state (water environment). |
Residue | Residue in current state (water environment). |
string | Name of current cycle. |
vector<Atom> PQR::deleteAtoms | ( | vector< Atom > | result, |
vector< Atom > & | compareAtomList | ||
) | [inline] |
Deletes from atom List "result" all atoms which are also in atom list "compareAtomList" via their atom id in PQR file.
Returns the vector "result" which contains all atoms which were in list "result" before and are not same as in "compareAtomList". If same atoms are found in "result" and "compareAtomList" this aroms are erased from "result".
vector<Atom> | Atom list where same atoms with compareAtomList will be erased. |
vector<Atom> | Atom list where atoms from this list are erased in result list. |
vector<Atom> PQR::getAtoms | ( | Residue | currentTitGroup, |
int | stateNr | ||
) | [inline] |
Returns a list of atoms from a given residue which is patched to a given state nr.
A residue is patched to a given state by stateNr. Its atoms are returned as an atom list.
Residue | A titratable group which will be patched. |
int | State number to patch given residue. |
float PQR::getCycle0Shift | ( | string | residueName, |
int | state | ||
) | [inline] |
Returns the averaged pKA value which is defined for the one-cycle approach to skip a second thermodynamic cycle computation.
Averaged pKA values are given by Sakalli et al. and are stored in ST files.
string | Name of residue receive an averaged pKA value. |
int | State of given residue to return an averaged pKA value. |
float PQR::getShift | ( | string | residueName, |
int | stateNr | ||
) | [inline] |
Returns the pKA shift from reference to given state.
Returns a pKA shift value from experimental values (defined in ST file) which is defined from reference residue to same residue to given state.
string | Name of the residue |
int | State of the residue to get it char identifier. |
float PQR::getShiftCycle0 | ( | string | residueName, |
int | stateNr | ||
) | [inline] |
Returns the averaged pKA value to skip second thermodynamic cycle.
Returns an averaged pKA value which mimics the electrostatics part of the energy shift in the thermodynamic cycle from reference to given state of every titratable group/residue. Values are given from Sakalli et al.
string | Name of the residue |
int | State of the residue to get it char identifier. |
char PQR::getState | ( | string | residueName, |
int | stateNr | ||
) | [inline] |
Every state has a char identifier which is returned from ST file.
Returns a char character which is stored in ST file for every titratable group and every state.
string | Name of the residue. |
int | State of the residue to get it char identifier. |
void PQR::neutralState | ( | Residue & | titGroup, |
int | stateNr | ||
) | [inline] |
Switches a given residue into neutral state.
A residue which has an arbitrary state is switched into neutral/ reference state using previous ST file information and atom list information from given residue.
Residue | Current resdiue which holds a list of atoms. |
int | State of residue to patch to neutral state. |
int PQR::parse | ( | ) | [inline] |
void PQR::parseSTFiles | ( | ) | [inline] |
void PQR::parseSTFolder | ( | ) | [inline] |
void PQR::patch | ( | vector< Atom > & | atomList, |
ST & | st | ||
) | [inline] |
Switches a given atom list (of a residue) to another state (using ST data structure which is already in a given state).
An atom list (normally from a residue) is patched. Atoms in the list are patched using ST which has charge information. ST is normally one state of a titratable group.
void PQR::patchNeutral | ( | vector< Atom > & | atomList, |
ST & | st | ||
) | [inline] |
void PQR::switchState | ( | Residue & | titGroup, |
int | stateNr | ||
) | [inline] |
Switches the state of a residue to a given state nr.
A residue which has an arbitrary state is switched into another state with this one using previous ST file information and atom list information from given residue.
Residue | Current resdiue which holds a list of atoms. |
int | State of residue to patch to. |
void PQR::writeOutPkint | ( | string | cycleName, |
string | fileName, | ||
INI & | ini | ||
) | [inline] |
Writes out PKINT files to use with Monte-Carlo method, Karlsberg2.
Depending on the current cycle a PKINT file is written out. Before, all pkint values where computed using POTAT files. A PKINT file contains all intrinsic pKA values for every titratable group from reference to its other states.
string | Current cycle name. |
string | Prefix of file name to write out PKINT file. |
INI | Config INI file. |
void PQR::writeOutW | ( | string | fileName | ) | [inline] |
Writing out W-matrix as flat G file.
A symmetric W-matrix which is computed before is written out.
string | Prefix of filename for W-matrix |
void PQR::writePDE | ( | INI & | ini, |
string | mode = "explicit" |
||
) | [inline] |
void PQR::writePQR | ( | vector< Atom > & | aList, |
string | fileName | ||
) | [inline] |
void PQR::writePQR | ( | Residue & | titGroup, |
int | stateNr | ||
) | [inline] |
vector<Atom> PQR::atomList [private] |
bool PQR::calcCTE = false [static] |
Do we have to compute the C-terminus.
bool PQR::calcNTE = false [static] |
Do we have to compute the N-terminus.
tCycle PQR::cycle [private] |
An abstraction of the thermodynamic cycle.
bool PQR::explicitModels = false [static] |
Are we using the two-cycle approach (compute models explicitly)
string PQR::fileName [private] |
File name of the PQR file which has to be parsed (protein).
Model PQR::molecule [private] |
Placeholder for molecular volume mesh computation.
vector<Residue> PQR::residueList [private] |
A list of all residues in the protein.
string PQR::stFilesFolder [private] |
Folder of ST files, which define charge pattern for different states of every titratable group in CHARMM format.
vector<ST> PQR::stList [private] |
A list of all states in every ST file for every titratable group.
bool PQR::STparsed = false [static] |
Are ST files already parsed.
vector<Residue> PQR::titGroupList [private] |
A list of all titratable groups in the protein (definition via framework of pKA computations from Knapp et al.).
vector< vector< vector< vector<double> > > > PQR::wmatrix [private] |
A multidensional W-matrix vector to store pairwise interaction energies of all titratable groups with each other.