STORMM Source Documentation
Loading...
Searching...
No Matches
user_settings.h
1// -*-c++-*-
2#ifndef STORMM_USER_SETTINGS_H
3#define STORMM_USER_SETTINGS_H
4
5#include <string>
6#include <vector>
7#include "copyright.h"
8#include "Constants/behavior.h"
9#include "FileManagement/file_enumerators.h"
10#include "Namelists/command_line_parser.h"
11#include "Namelists/nml_dynamics.h"
12#include "Namelists/nml_ffmorph.h"
13#include "Namelists/nml_files.h"
14#include "Namelists/nml_minimize.h"
15#include "Namelists/nml_pppm.h"
16#include "Namelists/nml_precision.h"
17#include "Namelists/nml_random.h"
18#include "Namelists/nml_receptor.h"
19#include "Namelists/nml_remd.h"
20#include "Namelists/nml_report.h"
21#include "Namelists/nml_restraint.h"
22#include "Namelists/nml_solvent.h"
23#include "Parsing/textfile.h"
24#include "Topology/atomgraph.h"
25#include "Topology/atomgraph_enumerators.h"
26#include "Trajectory/coordinateframe.h"
27#include "Trajectory/trajectory_enumerators.h"
28#include "nml_conformer.h"
29
30namespace stormm {
31namespace namelist {
32
33using constants::ExceptionResponse;
34using diskutil::PrintSituation;
35using parse::TextFile;
36using topology::AtomGraph;
37using topology::ImplicitSolventModel;
38using trajectory::CoordinateFrame;
39using trajectory::CoordinateFileKind;
40
43constexpr PrintSituation default_file_writing_directive = PrintSituation::OPEN_NEW;
45
48constexpr char default_conformer_input_file[] = "cgen.in";
49constexpr char default_ffrefine_input_file[] = "ffld.in";
51
56
68 const std::vector<std::string> &sys_reqs = { "-pe", "-ce" });
69
77 UserSettings(const UserSettings &original) = default;
78 UserSettings(UserSettings &&original) = default;
79 UserSettings& operator=(const UserSettings &original) = default;
80 UserSettings& operator=(UserSettings &&original) = default;
82
84 ExceptionResponse getExceptionBehavior() const;
85
87 const std::string& getInputFileName() const;
88
90 bool getFilesPresence() const;
91
93 bool getMinimizePresence() const;
94
96 bool getSolventPresence() const;
97
99 bool getRandomPresence() const;
100
102 bool getPrecisionPresence() const;
103
105 bool getConformerPresence() const;
106
108 bool getPPPMPresence() const;
109
111 bool getDynamicsPresence() const;
112
114 bool getRemdPresence() const;
115
117 bool getFFMorphPresence() const;
118
120 bool getReportPresence() const;
121
123 const FilesControls& getFilesNamelistInfo() const;
124
127
130
133
136
139
142
144 const PPPMControls& getPPPMNamelistInfo() const;
145
148
150 const RemdControls& getRemdNamelistInfo() const;
151
154
157
159 const std::vector<RestraintControls>& getRestraintNamelistInfo() const;
160
162 const RestraintControls& getRestraintNamelistInfo(int index) const;
163
165 PrintSituation getPrintingPolicy() const;
166
167private:
168
169 ExceptionResponse policy;
170 PrintSituation print_policy;
171 bool has_files_nml;
172 bool has_minimize_nml;
173 bool has_solvent_nml;
174 bool has_random_nml;
175 bool has_precision_nml;
176 bool has_conformer_nml;
177 bool has_receptor_nml;
178 bool has_pppm_nml;
179 bool has_dynamics_nml;
180 bool has_remd_nml;
181 bool has_ffmorph_nml;
182 bool has_report_nml;
183 int restraint_nml_count;
184
186 std::string input_file;
187
188 // Control parameters: these structs each encapsulate their own namelist from the input file.
189 FilesControls file_io_input;
190 MinimizeControls line_min_input;
191 SolventControls solvent_input;
192 RandomControls prng_input;
193 PrecisionControls prec_input;
195 ConformerControls conf_input;
196 ReceptorControls receptor_input;
197 PPPMControls pppm_input;
199 DynamicsControls dyna_input;
200 RemdControls remd_input;
201 FFMorphControls ffmod_input;
202 ReportControls diagnostic_input;
203
205 std::vector<RestraintControls> rstr_inputs;
206};
207
208} // namespace namelist
209} // namespace stormm
210
211#endif
A class for collecting command line information. The class object will function somewhat like a namel...
Definition command_line_parser.h:30
Class to encapsulate the data that can be extracted from the &conformer namelist.
Definition nml_conformer.h:56
Object to encapsulate molecular dynamics control information. Like other namelist encapsualtors,...
Definition nml_dynamics.h:123
Object to encapsulate force field morphing operations. Take information from an input file or a serie...
Definition nml_ffmorph.h:23
Distill the results of file identification, producing clean lists of free topologies,...
Definition nml_files.h:229
Object to encapsulate energy minimization control information. Like other namelist encapsualtors,...
Definition nml_minimize.h:38
Object to encapsulate electrostatic and Lennard-Jones particle-mesh interaction controls....
Definition nml_pppm.h:38
Object to encapsulate energy precision control information. Like other namelist encapsualtors,...
Definition nml_precision.h:40
Object to encapsulate random number generation controls. Like other namelist encapsualtors,...
Definition nml_random.h:32
Encapsulate the data extracted from a &receptor namelist to define a grid-mapped representation of a ...
Definition nml_receptor.h:35
Encapsulating the data extracted from the REMD namelist.
Definition nml_remd.h:37
Collect output directives relating to the diagnostics file. While the output frequency is controlled ...
Definition nml_report.h:46
Object to encapsulate and dispense restraint information collected from a single &restraint namelist.
Definition nml_restraint.h:42
Object to encapsulate the data that can be extracted from a &solvent namelist. Typical C++ constructi...
Definition nml_solvent.h:35
PrintSituation getPrintingPolicy() const
Produce the file overwriting policy.
Definition user_settings.cpp:322
const PPPMControls & getPPPMNamelistInfo() const
Get the block of information associated with the &pppm namelist.
Definition user_settings.cpp:282
const RandomControls & getRandomNamelistInfo() const
Get the block of information associated with the &random namelist.
Definition user_settings.cpp:262
const MinimizeControls & getMinimizeNamelistInfo() const
Get the block of information associated with the &minimize namelist.
Definition user_settings.cpp:252
bool getConformerPresence() const
Detect whether a &conformer namelist was present.
Definition user_settings.cpp:217
const ConformerControls & getConformerNamelistInfo() const
Get the block of information associated with the &conformer namelist.
Definition user_settings.cpp:272
const ReceptorControls & getReceptorNamelistInfo() const
Get the block of information associated with the &receptor namelist.
Definition user_settings.cpp:277
bool getDynamicsPresence() const
Detect whether a &dynamics namelist was present.
Definition user_settings.cpp:227
bool getFilesPresence() const
Detect whether a &files namelist was present.
Definition user_settings.cpp:192
const FilesControls & getFilesNamelistInfo() const
Get the block of information associated with the &files namelist.
Definition user_settings.cpp:247
bool getPrecisionPresence() const
Detect whether a &precision namelist was present.
Definition user_settings.cpp:212
const ReportControls & getReportNamelistInfo() const
Get the user-specified diagnostics report features.
Definition user_settings.cpp:302
ExceptionResponse getExceptionBehavior() const
Get the policy (for passing to other operations that may trigger an exception).
Definition user_settings.cpp:182
const PrecisionControls & getPrecisionNamelistInfo() const
Get the block of information associated with the &precision namelist.
Definition user_settings.cpp:267
bool getSolventPresence() const
Detect whether a &solvent namelist was present.
Definition user_settings.cpp:202
bool getFFMorphPresence() const
Detect whether an &ffmorph namelist was present.
Definition user_settings.cpp:237
const FFMorphControls & getFFMorphNamelistInfo() const
Get force field hyperparameter optimization controls through the &ffmorph namelist.
Definition user_settings.cpp:297
bool getMinimizePresence() const
Detect whether a &minimize namelist was present.
Definition user_settings.cpp:197
bool getRandomPresence() const
Detect whether a &random namelist was present.
Definition user_settings.cpp:207
UserSettings(const CommandLineParser &clip, const std::vector< std::string > &sys_reqs={ "-pe", "-ce" })
The constructor requires an input file, similar to mdin for the Amber sander program.
Definition user_settings.cpp:31
const SolventControls & getSolventNamelistInfo() const
Get the block of information associated with the &solvent namelist.
Definition user_settings.cpp:257
UserSettings(const UserSettings &original)=default
With no const members and Standard Template Library objects comprising the only complexity beyond sca...
const std::string & getInputFileName() const
Get the name of the input file.
Definition user_settings.cpp:187
const RemdControls & getRemdNamelistInfo() const
Get the block of information associated with the &conformer namelist.
Definition user_settings.cpp:292
const std::vector< RestraintControls > & getRestraintNamelistInfo() const
Get a const reference to the vector of &restraint namelist objects.
Definition user_settings.cpp:307
bool getPPPMPresence() const
Detect whether a &pppm namelist was present.
Definition user_settings.cpp:222
const DynamicsControls & getDynamicsNamelistInfo() const
Get the block of information associated with the &conformer namelist.
Definition user_settings.cpp:287
bool getRemdPresence() const
Detect whether a &rmed namelist was present.
Definition user_settings.cpp:232
bool getReportPresence() const
Detect whether a &report namelist was present.
Definition user_settings.cpp:242