mFES - molecular Finite Element Solver  0.4
Public Member Functions | Static Public Attributes | Private Attributes
PQR Class Reference

PQR class model to handle proteins (atoms and titratable groups). More...

#include <PQR.h>

List of all members.

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< AtomdeleteAtoms (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< AtomgetAtoms (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< AtomatomList
 Atom list of all atoms with all PQR information.
vector< ResidueresidueList
 A list of all residues in the protein.
vector< ResiduetitGroupList
vector< STstList
 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.

Detailed Description

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

Author:
Ilkay Sakalli

Constructor & Destructor Documentation

PQR::PQR ( string  _fileName) [inline]

Constructor.

Parsing the PQR file and adding atoms to atomList.

Parameters:
stringfileName of the PQR file

Member Function Documentation

void PQR::addInfo ( INI ini) [inline]

Setting up some options.

Here, some options are defined: ST files folder, calc termini?, use two-cycle approach?

Parameters:
INIOptions INI file.
Returns:
Void.
void PQR::calcDeltaG ( ) [inline]

Compute energy difference using NETGEN and nglib libraries.

An electrostatic solvation energy difference is computed. NETGEN and MUMPS is used.

Returns:
Void.
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.

Parameters:
INIConfiguration INI file.
Returns:
Void.
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.

Parameters:
INIConfiguration INI file.
Returns:
Void.

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.

Parameters:
stringName of current cycle.
stringA reference PQR definition is needed (written out before).
Returns:
Void.
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.

Parameters:
stringName of current cycle.
Returns:
Void.
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.

Parameters:
INIConfiguration INI file.
Returns:
Void.
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.

Parameters:
stringName of current cycle.
Returns:
Void.
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.

Parameters:
intCurrent state number.
ResidueResidue in reference state (protein environment).
ResidueResidue in reference state (water environment).
ResidueResidue in current state (water environment).
stringName of current cycle.
Returns:
double W-matrix element.
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".

Parameters:
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.
Returns:
vector<Atom> Returns an atom list where same atoms with compareAtomList are erased from 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.

Parameters:
ResidueA titratable group which will be patched.
intState number to patch given residue.
Returns:
vector<Atom> Returns an atom list where given residue currentTitGroup is patched to state stateNr.
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.

Parameters:
stringName of residue receive an averaged pKA value.
intState of given residue to return an averaged pKA value.
Returns:
float Averaged pKA value to skip second thermodynamic cycle computation.
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.

Parameters:
stringName of the residue
intState of the residue to get it char identifier.
Returns:
float Returns the pKA shift from reference to given state.
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.

Parameters:
stringName of the residue
intState of the residue to get it char identifier.
Returns:
float Returns the average pKA value for a given residue in a given state
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.

Parameters:
stringName of the residue.
intState of the residue to get it char identifier.
Returns:
char Char identifier of residue in given state.
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.

Parameters:
ResidueCurrent resdiue which holds a list of atoms.
intState of residue to patch to neutral state.
Returns:
Void.
int PQR::parse ( ) [inline]

Parsing the PQR file.

Adding all atoms of PQR file to atomList.

Returns:
int 1 if parsing was successful.
void PQR::parseSTFiles ( ) [inline]

Parsing ST files folder wrapper.

ST files given in CHARMM format are parsed to know charges of different titration states of residues. Afterwards static variable STparsed is set to true.

Returns:
Void.
void PQR::parseSTFolder ( ) [inline]

Parsing ST files folder.

ST files given in CHARMM format are parsed to know charges of different titration states of residues.

Returns:
Void.

For every file in the ST files folder defined in INI config file If the file has extension "st"

Parse current ST file

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.

Parameters:
vector<Atom>An atom list.
STST structure with information about charges.
Returns:
Void.
void PQR::patchNeutral ( vector< Atom > &  atomList,
ST st 
) [inline]

Switches a given atom list (of a residue) to neutral state (using ST data structure).

An atom list (normally from a residue) is patched. Atoms in the list are patched using ST which has charge information.

Parameters:
vector<Atom>An atom list.
STST structure with information about charges.
Returns:
Void.
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.

Parameters:
ResidueCurrent resdiue which holds a list of atoms.
intState of residue to patch to.
Returns:
Void.
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.

Parameters:
stringCurrent cycle name.
stringPrefix of file name to write out PKINT file.
INIConfig INI file.
Returns:
Void.
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.

Parameters:
stringPrefix of filename for W-matrix
Returns:
Void.
void PQR::writePDE ( INI ini,
string  mode = "explicit" 
) [inline]

Writes out PDE files to compute POTAT files with NGSolve.

A PDE file is written out to control NGSolve which is a module of NETGEN.

Parameters:
INIConfig INI file.
stringApproach used to compute pKA values (two-cycle approach: implicit; one-cycle approach: explicit).
Returns:
Void.
void PQR::writePQR ( vector< Atom > &  aList,
string  fileName 
) [inline]

Write out a PQR file using a given atom list.

A PQR file is written out using a given atom list to a file as fileName.

Parameters:
vector<Atom>Atom List to write out to PQR file.
stringFile name of the resulting PQR file.
Returns:
Void.
void PQR::writePQR ( Residue titGroup,
int  stateNr 
) [inline]

Overloading method to write out a given residue with a given state to a PQR file.

A PQR file is written out using a given residue with state.

Parameters:
ResidueCurrent resdiue which holds a list of atoms.
intState of residue to patch to.
Returns:
Void.

Member Data Documentation

vector<Atom> PQR::atomList [private]

Atom list of all atoms with all PQR information.

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.


The documentation for this class was generated from the following file: