2#ifndef STORMM_NML_PPPM_H
3#define STORMM_NML_PPPM_H
6#include "Constants/behavior.h"
7#include "Parsing/parsing_enumerators.h"
8#include "Parsing/textfile.h"
9#include "Potential/cellgrid.h"
10#include "Potential/energy_enumerators.h"
12#include "namelist_emulator.h"
17using constants::ExceptionResponse;
18using energy::default_mesh_ticks;
19using energy::maximum_cell_width;
20using energy::NonbondedTheme;
21using energy::VdwSumMethod;
22using energy::PMIStrategy;
24using parse::WrapTextSearch;
28constexpr double max_pp_cutoff = 2.0 * maximum_cell_width;
29constexpr NonbondedTheme default_pppm_theme = NonbondedTheme::ELECTROSTATIC;
30constexpr PMIStrategy default_pppm_accuracy = PMIStrategy::NO_AUTOMATION;
52 PPPMControls(ExceptionResponse policy_in = ExceptionResponse::DIE,
53 WrapTextSearch wrap = WrapTextSearch::NO);
55 ExceptionResponse policy_in = ExceptionResponse::DIE,
56 WrapTextSearch wrap = WrapTextSearch::NO);
106 void setTheme(NonbondedTheme theme_in);
107 void setTheme(
const std::string &theme_in);
159 ExceptionResponse policy;
163 NonbondedTheme theme;
171 double ewald_coefficient;
197 VdwSumMethod vdw_method;
209 bool validateOrder(
const int order_in)
const;
215 bool validateEwaldCoefficient(
double ewald_coefficient_in)
const;
220 bool validateCutoff(
double cutoff_in)
const;
225 bool validateDirectSumTolerance(
double tol_in)
const;
231 bool validateMeshSubdivisions(
int mesh_ticks_in)
const;
254 ExceptionResponse policy = ExceptionResponse::DIE,
255 WrapTextSearch wrap = WrapTextSearch::NO);
PPPMControls(ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
The constructor can prepare an object with default settings or read the corresponding namelist to acc...
Definition nml_pppm.cpp:27
Collection of variables to transcribe information contained within a namelist.
Definition namelist_emulator.h:30
void setTheme(NonbondedTheme theme_in)
Set the non-bonded potential type.
Definition nml_pppm.cpp:100
int getMeshSubdivisions() const
Get the number of particle-mesh interaction grid ticks per spatial decomposition cell.
Definition nml_pppm.cpp:90
void applyStrategy()
Apply the current strategy, to the extent possible, for filling in missing parameters from the &pppm ...
Definition nml_pppm.cpp:194
void setGaussianWidth(double spread_in)
Set the Gaussian particle density spreading sigma.
double getGaussianWidth() const
Get the Gaussian particle density spreading sigma.
Definition nml_pppm.cpp:75
int getInterpolationOrder() const
Get the interpolation order.
Definition nml_pppm.cpp:65
double getDirectSumTolerance() const
Get the direct sum tolerance.
Definition nml_pppm.cpp:85
void setDirectSumTolerance(double dsum_tol_in)
Set the direct sum tolerance.
Definition nml_pppm.cpp:145
void setVdwSummation(const std::string &vdw_method_in)
Set the strategy for evaluating the tails of van-der Waals (Lennard-Jones) interactions.
Definition nml_pppm.cpp:184
void setStrategy(PMIStrategy strat_in)
Set the strategy for determining various parameters of the particle-mesh interaction grid....
Definition nml_pppm.cpp:159
VdwSumMethod getVdwSummation() const
Get the method for computing van-der Waals interactions between particles.
void setCutoff(double cutoff_in)
Set the particle-particle interaction cutoff.
Definition nml_pppm.cpp:138
void setMeshSubdivisions(int mesh_ticks_in)
Set the number of particle-interaction grid elements per spatial decomposition cell.
Definition nml_pppm.cpp:152
double getCutoff() const
Get the particle-particle interaction cutoff.
Definition nml_pppm.cpp:80
PPPMControls(ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
The constructor can prepare an object with default settings or read the corresponding namelist to acc...
Definition nml_pppm.cpp:27
void setEwaldCoefficient(double ewald_coefficient_in)
Set the Ewald coefficient.
Definition nml_pppm.cpp:131
PPPMControls(const PPPMControls &original)=default
As with other control objects, copy and move constructors, plus copy and move assignment operators,...
PMIStrategy getStrategy() const
Get the strategy for choosing particle-mesh interaction grid parameters. This is not passed along to ...
Definition nml_pppm.cpp:95
NonbondedTheme getTheme() const
Get the non-bonded potential theme.
Definition nml_pppm.cpp:60
void setInterpolationOrder(int order_in)
Set the interpolation order.
Definition nml_pppm.cpp:124
double getEwaldCoefficient() const
Get the Ewald coefficient.
Definition nml_pppm.cpp:70
Structure for translating a text file into a compact, rapidly parsable vector of characters in CPU RA...
Definition textfile.h:45