STORMM Source Documentation
Loading...
Searching...
No Matches
integration.h
1// -*-c++-*-
2#ifndef STORMM_INTEGRATION_H
3#define STORMM_INTEGRATION_H
4
5#include "copyright.h"
6#include "Constants/behavior.h"
7#include "Constants/fixed_precision.h"
8#include "DataTypes/common_types.h"
9#include "Potential/cellgrid.h"
10#include "Synthesis/atomgraph_synthesis.h"
11#include "Synthesis/phasespace_synthesis.h"
12#include "Synthesis/synthesis_abstracts.h"
13#include "Topology/atomgraph.h"
14#include "Topology/atomgraph_abstracts.h"
15#include "Trajectory/phasespace.h"
16#include "Trajectory/thermostat.h"
17#include "Trajectory/trajectory_enumerators.h"
18
19namespace stormm {
20namespace trajectory {
21
22using constants::PrecisionModel;
23using data_types::isSignedIntegralScalarType;
24using energy::CellGrid;
25using energy::CellGridReader;
26using numerics::force_scale_nonoverflow_bits;
27using numerics::velocity_scale_nonoverflow_bits;
28using numerics::globalpos_scale_nonoverflow_bits;
29using symbols::boltzmann_constant;
30using symbols::boltzmann_constant_f;
31using symbols::kcal_to_gafs;
32using symbols::kcal_to_gafs_f;
33using synthesis::AtomGraphSynthesis;
34using synthesis::SyAtomUpdateKit;
35using synthesis::PhaseSpaceSynthesis;
36using synthesis::PsSynthesisWriter;
37using topology::AtomGraph;
38using topology::ChemicalDetailsKit;
39
62template <typename Tcoord, typename Tcalc>
63void velocityVerletVelocityUpdate(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel,
64 const Tcoord* xfrc, const Tcoord* yfrc, const Tcoord* zfrc,
65 int natom, const Tcalc* masses, Tcoord* vxalt, Tcoord* vyalt,
66 Tcoord* vzalt, const ThermostatReader<Tcalc> &tstr,
67 const int* xvel_ovrf = nullptr, const int* yvel_ovrf = nullptr,
68 const int* zvel_ovrf = nullptr, const int* xfrc_ovrf = nullptr,
69 const int* yfrc_ovrf = nullptr, const int* zfrc_ovrf = nullptr,
70 int* vxalt_ovrf = nullptr, int* vyalt_ovrf = nullptr,
71 int* vzalt_ovrf = nullptr, int atom_offset = 0,
72 Tcalc vel_scale_factor = 1.0, Tcalc frc_scale_factor = 1.0);
73
74void velocityVerletVelocityUpdate(PhaseSpaceWriter *psw, const ChemicalDetailsKit &cdk,
75 const ThermostatReader<double> &tstr);
76
77void velocityVerletVelocityUpdate(PhaseSpace *ps, const AtomGraph *ag, const Thermostat *tst);
78
79void velocityVerletVelocityUpdate(PhaseSpace *ps, const AtomGraph &ag, const Thermostat &tst);
80
81template <typename T, typename T2, typename T4>
82void velocityVerletVelocityUpdate(PsSynthesisWriter *poly_psw,
83 const SyAtomUpdateKit<T, T2, T4> &poly_auk,
84 const ThermostatReader<T> &tstr);
85
86void velocityVerletVelocityUpdate(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag,
87 const Thermostat *tst,
88 PrecisionModel prec = PrecisionModel::SINGLE);
89
90void velocityVerletVelocityUpdate(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag,
91 const Thermostat &tst,
92 PrecisionModel prec = PrecisionModel::SINGLE);
93
94template <typename Tcoord, typename Tacc, typename Tcoord4>
95void velocityVerletVelocityUpdate(PhaseSpaceSynthesis *poly_ps,
97 const AtomGraphSynthesis &poly_ag, const Thermostat &tst,
98 PrecisionModel prec = PrecisionModel::SINGLE);
99
100template <typename Tcoord, typename Tacc, typename Tcoord4>
101void velocityVerletVelocityUpdate(PhaseSpaceSynthesis *poly_ps,
104 const AtomGraphSynthesis &poly_ag, const Thermostat &tst,
105 PrecisionModel prec = PrecisionModel::SINGLE);
107
125template <typename Tcoord, typename Tcalc>
126void velocityVerletCoordinateUpdate(const Tcoord* xcrd, const Tcoord* ycrd, const Tcoord* zcrd,
127 const Tcoord* xfrc, const Tcoord* yfrc, const Tcoord* zfrc,
128 int natom, const Tcalc* masses, Tcoord* xalt, Tcoord* yalt,
129 Tcoord* zalt, Tcoord* vxalt, Tcoord* vyalt, Tcoord* vzalt,
130 const ThermostatReader<Tcalc> &tstr,
131 const int* xcrd_ovrf = nullptr, const int* ycrd_ovrf = nullptr,
132 const int* zcrd_ovrf = nullptr, const int* xfrc_ovrf = nullptr,
133 const int* yfrc_ovrf = nullptr, const int* zfrc_ovrf = nullptr,
134 int* xalt_ovrf = nullptr, int* yalt_ovrf = nullptr,
135 int* zalt_ovrf = nullptr, int* vxalt_ovrf = nullptr,
136 int* vyalt_ovrf = nullptr, int* vzalt_ovrf = nullptr,
137 int atom_offset = 0, Tcalc gpos_scale_factor = 1.0,
138 Tcalc vel_scale_factor = 1.0, Tcalc frc_scale_factor = 1.0);
139
140void velocityVerletCoordinateUpdate(PhaseSpaceWriter *psw, const ChemicalDetailsKit &cdk,
141 const ThermostatReader<double> &tstr);
142
143void velocityVerletCoordinateUpdate(PhaseSpace *ps, const AtomGraph *ag, const Thermostat *tst);
144
145void velocityVerletCoordinateUpdate(PhaseSpace *ps, const AtomGraph &ag, const Thermostat &tst);
146
147template <typename T, typename T2, typename T4>
148void velocityVerletCoordinateUpdate(PsSynthesisWriter *poly_psw,
149 const SyAtomUpdateKit<T, T2, T4> &poly_auk,
150 const ThermostatReader<T> &tstr);
151
152void velocityVerletCoordinateUpdate(PhaseSpaceSynthesis *poly_ps,
153 const AtomGraphSynthesis *poly_ag, const Thermostat *tst);
154
155void velocityVerletCoordinateUpdate(PhaseSpaceSynthesis *poly_ps,
156 const AtomGraphSynthesis &poly_ag, const Thermostat &tst);
158
159} // namespace structure
160} // namespace stormm
161
162#include "integration.tpp"
163
164#endif
An object to manage the spatial decomposition of a system of particles. The general strategy is to ar...
Definition cellgrid.h:562
A collection of one or more AtomGraph objects, with similar components arranged in contiguous arrays ...
Definition atomgraph_synthesis.h:55
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
An object to complement a topology and hold positions, velocities, and forces of all particles in a s...
Definition phasespace.h:141
Store the parameters for a simulation thermostat. Includes Berendsen, Andersen, and Langevin methods....
Definition thermostat.h:221
The writer for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:87
Collect the virtual site details and constraint parameters of the topology synthesis into a single ab...
Definition synthesis_abstracts.h:257
Information on atoms and residues which may be useful for applying atom masks or identifying specific...
Definition atomgraph_abstracts.h:382
Collect constants and pointers to the components of a modifiable PhaseSpace object.
Definition phasespace.h:31
Read-only abstract for the Thermostat object.
Definition thermostat.h:135