Scine::Swoose  2.1.0
This is the SCINE module Swoose.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
StructureProcessor.h
Go to the documentation of this file.
1 
8 #ifndef PDBPREPARATION_PDBPROCESSOR_H
9 #define PDBPREPARATION_PDBPROCESSOR_H
10 
12 #include <Core/Log.h>
13 #include <string>
14 
15 namespace Scine {
16 
17 namespace Core {
18 struct Log;
19 }
20 namespace Utils {
21 class Settings;
22 }
23 
24 namespace StructurePreparation {
25 class ProtonationHandler;
26 
28  public:
29  static constexpr const char* model = "PDB_Processor";
39  void prepare(const std::string& structureFile, const std::string& mode);
47  const Utils::Settings& settings() const;
51  std::string name() const;
55  void analyzeStructure(const std::string& structureFile);
59  void protonate();
64  void finalize();
65  // Sets the logger.
66  void setLog(Core::Log& log);
67  // Sets the corresponding files.
68  void setFiles(StructurePreparationFiles files);
69 
70  private:
71  /*
72  * @brief Reads in the structure from either a PDB file or an XYZ file.
73  *
74  * @param includeH Also parse hydrogen atoms.
75  * @return Utils::AtomCollection The AtomCollection of the parsed structure.
76  */
77  Utils::AtomCollection getAtomCollectionFromInput(const std::string& structureFile, bool includeH) const;
78  /*
79  * @brief This function sets the paths to the working directory and all files that are needed in each mode.
80  */
81  void performInitialSetup(const std::string& structureFile);
82  /*
83  * @brief Checks if nonRegContainer is present. If no, directly proceeds to protonation and finalization. If yes,
84  * writes the nonRegContainer substructure to an XYZ file and stops.
85  */
86  void processNonRegContainerSubstructure();
87  // The logger.
88  Core::Log log_;
89  // This object holds all the data used in the structure preparation algorithm.
91  // This object holds all the files needed for the structure Preparation.
93  // The settings
94  std::shared_ptr<Utils::Settings> settings_;
95  //
96  bool protonationDone_ = false;
97  bool finalizationDone_ = false;
98 };
99 
100 } // namespace StructurePreparation
101 } // namespace Scine
102 
103 #endif // PDBPREPARATION_PdbProcessor_H
void prepare(const std::string &structureFile, const std::string &mode)
Main function of this class. It prepares the protein input structure.
Definition: StructureProcessor.cpp:32
Utils::Settings & settings()
Accessor for the settings.
Definition: StructureProcessor.cpp:257
void analyzeStructure(const std::string &structureFile)
Analyzes the input structure.
Definition: StructureProcessor.cpp:70
This struct holds all objects used inside the MM parametrization algorithm.
Definition: StructurePreparationData.h:25
void protonate()
Protonates protein and nonRegContainer separately.
Definition: StructureProcessor.cpp:87
Definition: StructureProcessor.h:27
StructureProcessor()
Constructor.
Definition: StructureProcessor.cpp:27
void finalize()
This function merges protein and nonRegContainer, corrects the boundaries, adds optional solvation an...
Definition: StructureProcessor.cpp:106
std::string name() const
Getter for the name of the Parametrizer.
Definition: StructureProcessor.cpp:265
Definition: StructurePreparationData.h:90