2#ifndef STORMM_NML_MESH_H
3#define STORMM_NML_MESH_H
8#include "Constants/behavior.h"
9#include "Constants/symbol_values.h"
10#include "Parsing/textfile.h"
11#include "Potential/energy_enumerators.h"
12#include "Structure/structure_enumerators.h"
13#include "namelist_element.h"
14#include "namelist_emulator.h"
19using constants::CartesianDimension;
20using constants::ExceptionResponse;
21using constants::UnitCellAxis;
22using energy::NonbondedPotential;
24using parse::WrapTextSearch;
25using structure::BoundaryCondition;
26using structure::GridDetail;
27using structure::MeshPosition;
28using structure::RMSDMethod;
31constexpr int default_mesh_grid_dim = -1;
32constexpr int default_mesh_density_averaging_order = 8;
33constexpr double default_mesh_grid_angle = 0.5 * symbols::pi;
34constexpr double default_mesh_grid_origin = 0.0;
35constexpr double default_mesh_grid_spacing = 1.0;
36constexpr double default_mesh_elec_damping_range = 0.5;
37constexpr double default_mesh_vdw_damping_ratio = 0.8;
38constexpr char default_mesh_grid_detail[] =
"occlusion";
39constexpr char default_mesh_grid_potential[] =
"clash";
40constexpr char default_mesh_grid_boundary[] =
"isolated";
59 MeshControls(ExceptionResponse policy_in = ExceptionResponse::DIE);
62 ExceptionResponse policy_in = ExceptionResponse::DIE,
63 WrapTextSearch wrap = WrapTextSearch::NO);
93 double getSpacing(CartesianDimension dim)
const;
107 double getOrigin(CartesianDimension dim)
const;
178 void setSpacing(
double mesh_spacing_in, UnitCellAxis dim);
179 void setSpacing(
double mesh_spacing_in, CartesianDimension dim);
201 void setOrigin(
double mesh_origin_in, CartesianDimension dim);
215 void setBufferWidth(
double buffer_width_in, CartesianDimension dim);
226 void setDetail(
const std::string &kind_in);
270 ExceptionResponse policy;
274 double mesh_spacing_a;
275 double mesh_spacing_b;
276 double mesh_spacing_c;
283 double mesh_origin_x;
284 double mesh_origin_y;
285 double mesh_origin_z;
286 double buffer_width_a;
291 double buffer_width_b;
293 double buffer_width_c;
296 std::string potential;
297 std::string boundaries;
298 int mesh_scaling_bits;
300 double clash_distance;
311 void validateMeshElement();
324 ExceptionResponse policy = ExceptionResponse::DIE,
325 WrapTextSearch wrap = WrapTextSearch::NO);
void setBoundaries(const std::string &boundaries_in)
Set the boundary conditions for the mesh. Overloading in this function follows from setPotential() ab...
Definition nml_mesh.cpp:360
void setScalingBits(int mesh_scaling_bits_in)
Set the number of bits after the decimal to be used in mesh calculations.
Definition nml_mesh.cpp:388
double getSpacing(UnitCellAxis dim) const
Get the mesh spacing along a particular axis. Overloads and input parameters to this function follow ...
Definition nml_mesh.cpp:103
void setElecClashDistance(double clash_distance_in)
Set the electrostatic clash distance.
Definition nml_mesh.cpp:393
void setPotential(const std::string &potential_in)
Set the potential energy field that the mesh will represent.
Definition nml_mesh.cpp:332
double getBeta() const
Get the mesh beta angle, between the a and c unit cell axes, in units of radians.
Definition nml_mesh.cpp:126
int getAxisElementCount(UnitCellAxis dim) const
Get the number of grid points in a particular dimension. This can serve to query a particular piece o...
Definition nml_mesh.cpp:85
void setElementCount(int mesh_points_in, UnitCellAxis dim)
Set the number of mesh points along a particular axis.
Definition nml_mesh.cpp:202
void setOrigin(double mesh_origin_in, CartesianDimension dim)
Set the mesh origin along one Cartesian axis.
Definition nml_mesh.cpp:266
double getVdwClashRatio() const
Get the switching ratio for softcore van-der Waals potentials. This will only apply to meshes represe...
Definition nml_mesh.cpp:192
double getAlpha() const
Get the mesh alpha angle, between the b and c unit cell axes. The value is returned in units of radia...
Definition nml_mesh.cpp:121
double getBufferWidth(UnitCellAxis dim) const
Get buffer widths between mesh boundaries and the receptor structure or structures.
Definition nml_mesh.cpp:149
void setSpacing(double mesh_spacing_in, UnitCellAxis dim)
Set the mesh spacing along a particular axis. Overloading of this function follows from setElementCou...
Definition nml_mesh.cpp:227
double getOrigin(CartesianDimension dim) const
Get the origin of the mesh in one Cartesian dimension.
Definition nml_mesh.cpp:136
double getElecClashDistance() const
Get the switching range for softcore electrostatic potentials. This will only apply to meshes represe...
Definition nml_mesh.cpp:187
void setBufferWidth(double buffer_width_in)
Set the buffer distance between the mesh boundary and the nearest van-der Waals sphere.
Definition nml_mesh.cpp:281
MeshPosition getPosition() const
Get the manner in which the mesh is aligned to the rigid molecule it represents.
NonbondedPotential getPotential() const
Get the type of potential to be expressed on the mesh. This complements the getContent() function and...
Definition nml_mesh.cpp:172
void setGammaAngle(double gamma_in)
Set the mesh gamma angle.
Definition nml_mesh.cpp:261
const NamelistEmulator & getTranscript() const
Get the original namelist emulator object as a transcript of the user input.
Definition nml_mesh.cpp:197
MeshControls(ExceptionResponse policy_in=ExceptionResponse::DIE)
The constructor can prepare an object with default settings or read the corresponding namelist to acc...
Definition nml_mesh.cpp:28
double getGamma() const
Get the mesh gamma angle, between the a and b unit cell axes, in units of radians.
Definition nml_mesh.cpp:131
void setAlphaAngle(double alpha_in)
Set the mesh alpha angle.
Definition nml_mesh.cpp:251
void setVdwClashRatio(double clash_ratio_in)
Set the van-der Waals clash ratio.
Definition nml_mesh.cpp:398
BoundaryCondition getBoundaries() const
Get the boundary conditions of the mesh.
Definition nml_mesh.cpp:177
int getScalingBits() const
Get the number of bits after the decimal to be used in composing the mesh-based field as well as the ...
Definition nml_mesh.cpp:182
void setDetail(const std::string &kind_in)
Set the type of mesh that this namelist will be assumed to describe.
Definition nml_mesh.cpp:305
GridDetail getDetail() const
Get the type of content (potential energy field) that the mesh will represent. In general,...
Definition nml_mesh.cpp:167
void setBetaAngle(double beta_in)
Set the mesh beta angle.
Definition nml_mesh.cpp:256
MeshControls(const MeshControls &original)=default
As with other control objects, copy and move constructors, plus copy and move assignment operators,...
Collection of variables to transcribe information contained within a namelist.
Definition namelist_emulator.h:30
Structure for translating a text file into a compact, rapidly parsable vector of characters in CPU RA...
Definition textfile.h:45