STORMM Source Documentation
Loading...
Searching...
No Matches
settle.h
1// -*-c++-*-
2#ifndef STORMM_SETTLE_H
3#define STORMM_SETTLE_H
4
5#include <typeinfo>
6#include <typeindex>
7#include <unistd.h>
8#include "copyright.h"
9#include "Constants/behavior.h"
10#include "Constants/fixed_precision.h"
11#include "DataTypes/common_types.h"
12#include "DataTypes/stormm_vector_types.h"
13#include "Math/vector_ops.h"
14#include "Synthesis/atomgraph_synthesis.h"
15#include "Synthesis/phasespace_synthesis.h"
16#include "Synthesis/synthesis_abstracts.h"
17#include "Synthesis/synthesis_enumerators.h"
18#include "Topology/atomgraph.h"
19#include "Topology/atomgraph_abstracts.h"
20#include "Trajectory/phasespace.h"
21#include "global_manipulation.h"
22
23namespace stormm {
24namespace structure {
25
26using constants::PrecisionModel;
27using data_types::isSignedIntegralScalarType;
28using numerics::globalpos_scale_nonoverflow_bits;
29using numerics::velocity_scale_nonoverflow_bits;
30using stmath::crossProduct;
31using stmath::normalize;
32using synthesis::AtomGraphSynthesis;
33using synthesis::maximum_valence_work_unit_atoms;
34using synthesis::PhaseSpaceSynthesis;
35using synthesis::SyValenceKit;
36using synthesis::SyAtomUpdateKit;
37using synthesis::vwu_abstract_length;
38using synthesis::VwuAbstractMap;
39using topology::AtomGraph;
40using topology::ConstraintKit;
41using trajectory::PhaseSpace;
42using trajectory::PhaseSpaceWriter;
43
66template <typename Tcoord, typename Tcalc>
67void settleGroupVelocity(int oxy_idx, int hd1_idx, int hd2_idx, Tcalc m_o, Tcalc m_h, Tcalc m_oh,
68 const Tcoord* xcrd, const Tcoord* ycrd, const Tcoord* zcrd, Tcoord* xvel,
69 Tcoord* yvel, Tcoord* zvel, const int* xcrd_ovrf = nullptr,
70 const int* ycrd_ovrf = nullptr, const int* zcrd_ovrf = nullptr,
71 int* xvel_ovrf = nullptr, int* yvel_ovrf = nullptr,
72 int* zvel_ovrf = nullptr, Tcalc gpos_scale = 1.0, Tcalc vel_scale = 1.0);
73
90template <typename Tcoord, typename Tcalc>
91void settleVelocities(const Tcoord* xcrd, const Tcoord* ycrd, const Tcoord* zcrd, Tcoord* xvel,
92 Tcoord* yvel, Tcoord* zvel, const ConstraintKit<Tcalc> &cnst,
93 const int* xcrd_ovrf = nullptr, const int* ycrd_ovrf = nullptr,
94 const int* zcrd_ovrf = nullptr, int* xvel_ovrf = nullptr,
95 int* yvel_ovrf = nullptr, int* zvel_ovrf = nullptr, Tcalc gpos_scale = 1.0,
96 Tcalc vel_scale = 1.0);
97
98template <typename Tcalc>
99void settleVelocities(PhaseSpaceWriter *psw, const ConstraintKit<Tcalc> &cnst);
100
101template <typename Tcalc, typename Tcalc2, typename Tcalc4>
102void settleVelocities(PsSynthesisWriter *poly_psw, const SyValenceKit<Tcalc> &poly_vk,
104
105void settleVelocities(PhaseSpace *ps, const AtomGraph *ag, PrecisionModel prec);
106
107void settleVelocities(PhaseSpace *ps, const AtomGraph &ag, PrecisionModel prec);
108
109void settleVelocities(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag,
110 PrecisionModel prec = PrecisionModel::SINGLE);
111
112void settleVelocities(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag,
113 PrecisionModel prec = PrecisionModel::SINGLE);
115
138template <typename Tcoord, typename Tcalc>
139void updateSettlePVC(int atm_idx, Tcalc p_to_v_factor, Tcalc r_adj, Tcoord r_ref, int r_ref_ovrf,
140 Tcoord* r_dev, int* r_dev_ovrf, Tcoord* v_dev, int* v_dev_ovrf);
141
162template <typename Tcoord, typename Tcalc, typename Tcalc3>
163void settleGroupPosition(int oxy_idx, int hd1_idx, int hd2_idx, Tcalc frac_heavy, Tcalc frac_light,
164 Tcalc ra, Tcalc rb, Tcalc rc, const Tcoord* xcrd, const Tcoord* ycrd,
165 const Tcoord* zcrd, Tcoord* xalt, Tcoord* yalt, Tcoord* zalt,
166 Tcoord* vxalt, Tcoord* vyalt, Tcoord* vzalt, Tcalc dt,
167 const int* xcrd_ovrf = nullptr, const int* ycrd_ovrf = nullptr,
168 const int* zcrd_ovrf = nullptr, int* xalt_ovrf = nullptr,
169 int* yalt_ovrf = nullptr, int* zalt_ovrf = nullptr,
170 int* vxalt_ovrf = nullptr, int* vyalt_ovrf = nullptr,
171 int* vzalt_ovrf = nullptr, Tcalc gpos_scale = 1.0, Tcalc vel_scale = 1.0);
172
177template <typename Tcoord, typename Tcalc, typename Tcalc3>
178void settlePositions(const Tcoord* xcrd, const Tcoord* ycrd, const Tcoord* zcrd, Tcoord* xalt,
179 Tcoord* yalt, Tcoord* zalt, Tcoord* vxalt, Tcoord* vyalt, Tcoord* vzalt,
180 const ConstraintKit<Tcalc> &cnst, Tcalc dt, const int* xcrd_ovrf = nullptr,
181 const int* ycrd_ovrf = nullptr, const int* zcrd_ovrf = nullptr,
182 int* xalt_ovrf = nullptr, int* yalt_ovrf = nullptr, int* zalt_ovrf = nullptr,
183 int* vxalt_ovrf = nullptr, int* vyalt_ovrf = nullptr,
184 int* vzalt_ovrf = nullptr, Tcalc gpos_scale = 1.0, Tcalc vel_scale = 1.0);
185
186template <typename Tcalc, typename Tcalc3>
187void settlePositions(PhaseSpaceWriter *psw, const ConstraintKit<Tcalc> &cnst, Tcalc dt);
188
189void settlePositions(PhaseSpace *ps, const AtomGraph *ag, double dt,
190 PrecisionModel prec = PrecisionModel::DOUBLE);
191
192void settlePositions(PhaseSpace *ps, const AtomGraph &ag, double dt,
193 PrecisionModel prec = PrecisionModel::DOUBLE);
194
195template <typename Tcalc, typename Tcalc2, typename Tcalc3, typename Tcalc4>
196void settlePositions(PsSynthesisWriter *poly_psw, const SyValenceKit<Tcalc> &poly_vk,
197 const SyAtomUpdateKit<Tcalc, Tcalc2, Tcalc4> &poly_auk, Tcalc dt);
198
199void settlePositions(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag, double dt,
200 const PrecisionModel prec = PrecisionModel::SINGLE);
201
202void settlePositions(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag, double dt,
203 const PrecisionModel prec = PrecisionModel::SINGLE);
205
222template <typename T>
223void idealizeSettleReference(PhaseSpaceWriter *psw, const ConstraintKit<T> &cnst);
224
225void idealizeSettleReference(PhaseSpace *ps, const AtomGraph *ag,
226 PrecisionModel prec = PrecisionModel::DOUBLE);
227
228void idealizeSettleReference(PhaseSpace *ps, const AtomGraph &ag,
229 PrecisionModel prec = PrecisionModel::DOUBLE);
231
232} // namespace structure
233} // namespace stormm
234
235#include "settle.tpp"
236
237#endif
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
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
Collect the critical valence parameters and indexing information for work unit-based evaluation of th...
Definition synthesis_abstracts.h:19
Information needed to manage constraint groups. This additional abstract is needed due to the way tha...
Definition atomgraph_abstracts.h:466
Collect constants and pointers to the components of a modifiable PhaseSpace object.
Definition phasespace.h:31