Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
ProtonationHandler.h
Go to the documentation of this file.
1 
8 #ifndef STRUCTUREPREPARATION_PROTONATIONHANDLER_H
9 #define STRUCTUREPREPARATION_PROTONATIONHANDLER_H
10 
11 #include "../ProteinStructures.h"
12 #include "../StructurePreparationData.h"
13 #include "TitrationData.h"
14 #include <Core/Log.h>
16 #include <list>
17 #include <memory>
18 
19 namespace Scine {
20 namespace Utils {
21 class Atom;
22 class Settings;
23 } // namespace Utils
24 
25 namespace StructurePreparation {
26 struct StructurePreparationFiles;
27 
29  public:
33  ProtonationHandler(StructurePreparationData& data, StructurePreparationFiles& files, std::shared_ptr<Utils::Settings> settings);
48  void reprotonateCriticalAtom(Utils::AtomCollection& structure, int indexOfCriticalAtom, const std::string& residueName);
49  /*
50  * @brief generate Hydrogen Atoms at the peptid chain
51  */
52  static Utils::Atom generatePeptidHydrogen(const Utils::AtomCollection& structure, int indexN, int indexC, int indexO);
57 
58  private:
59  void setup(const Utils::AtomCollection& structure, bool performGraphAnalysis = true);
60  // Sort each atom in its correct ProtonationTypes structure
61  void sortAtomTypesByProtonationCriteria();
62  // Find all Peptid bonds in the structure
63  void getPeptidBonds(int indexN, int& indexC, int& indexCA, int& indexO, bool& isValidPeptid);
64  /*
65  * @brief Protonates all sp3 hybridised groups
66  */
67  void protonateTetrahedralGroups(const Utils::AtomCollection& structure);
68  /*
69  * @brief Protonates all sp2 hybridised groups
70  */
71  void protonateTrigonalPlanarGroups(const Utils::AtomCollection& structure);
72  /*
73  * @brief Protonates all O-H and S-H groups
74  */
75  void protonateTerminalSAndO(const Utils::AtomCollection& structure);
76  /*
77  * @brief protonates the peptid bonds.
78  */
79  void protonatePeptidBonds(const Utils::AtomCollection& structure);
84  void detectCTerminus(const ProteinAtom& proteinAtom);
85 
89  void checkObabelVersion();
90 
93  std::shared_ptr<Utils::Settings> settings_;
94  int nAtoms_;
95  ProtonationTypes protonationTypes_;
96  Utils::AtomCollection hydrogenAtoms_;
97  Utils::AtomCollection protein_;
98  Utils::AtomCollection protonatedProtein_;
99 
100  std::vector<std::list<int>> listsOfNeighbors_;
101  std::vector<int> nNeighbors_;
102  std::vector<PeptidBond> peptidBonds_;
103 
104  static constexpr double minimalBondOrderToConsider_ = 0.4;
105  const std::array<const char*, 5> listOfsp3AtomTypes_ = {"CB", "CG2", "CG1", "CE", "CA"};
106  const std::array<const char*, 13> listOfsp2AtomTypes_ = {"CZ", "CE1", "CE2", "CZ2", "CZ3", "CE3", "CH2",
107  "NE1", "NE", "NH1", "NH2", "ND1", "ND2"};
108  static constexpr std::array<const char*, 1> listOfPseudoTetrahedrals_ = {"NZ"};
109  static constexpr std::array<const char*, 3> terminalOhSh_ = {"OG1", "OG", "OH"};
110  static constexpr std::array<const char*, 7> AAwithsp3CG_ = {"ARG", "GLN", "GLU", "MET", "PRO", "LEU", "LYS"};
111  static constexpr std::array<const char*, 4> AAwithsp3CD_ = {"ARG", "LYS", "PRO", "PYL"};
112 };
113 
114 } // namespace StructurePreparation
115 } // namespace Scine
116 
117 #endif // STRUCTUREPREPARATION_PROTONATIONHANDLER_H
void protonateNonRegContainerWithExternalSoftware()
Protonates the nonRegContainer using the obabel binary.
Definition: ProtonationHandler.cpp:90
void protonateAllAminoAcids()
Protonates all amino acids.
Definition: ProtonationHandler.cpp:72
Definition: ProteinStructures.h:38
void setProteinStructure(Utils::AtomCollection &structure)
Set the Protein Structure object.
Definition: ProtonationHandler.cpp:440
Definition: ProteinStructures.h:23
void reprotonateCriticalAtom(Utils::AtomCollection &structure, int indexOfCriticalAtom, const std::string &residueName)
Changes protonation state of a pH sensitive atom.
Definition: ProtonationHandler.cpp:252
This struct holds all objects used inside the MM parametrization algorithm.
Definition: StructurePreparationData.h:25
Definition: ProtonationHandler.h:28
Definition: StructurePreparationData.h:90