STORMM Source Documentation
Loading...
Searching...
No Matches
hub_and_spoke.h
1// -*-c++-*-
2#ifndef STORMM_RATTLE_H
3#define STORMM_RATTLE_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 "Namelists/nml_dynamics.h"
10#include "Numerics/split_fixed_precision.h"
11#include "Synthesis/atomgraph_synthesis.h"
12#include "Synthesis/phasespace_synthesis.h"
13#include "Synthesis/synthesis_abstracts.h"
14#include "Synthesis/synthesis_enumerators.h"
15#include "Topology/atomgraph.h"
16#include "Topology/atomgraph_abstracts.h"
17#include "Trajectory/phasespace.h"
18#include "Trajectory/trajectory_enumerators.h"
19#include "structure_enumerators.h"
20
21namespace stormm {
22namespace structure {
23
24using constants::PrecisionModel;
25using data_types::isSignedIntegralScalarType;
26using namelist::default_rattle_max_iter;
27using synthesis::AtomGraphSynthesis;
28using synthesis::maximum_valence_work_unit_atoms;
29using synthesis::PhaseSpaceSynthesis;
30using synthesis::PsSynthesisWriter;
31using synthesis::SyAtomUpdateKit;
32using synthesis::SyValenceKit;
33using synthesis::VwuAbstractMap;
34using synthesis::vwu_abstract_length;
35using topology::AtomGraph;
36using topology::ConstraintKit;
37using trajectory::CoordinateCycle;
38using trajectory::PhaseSpace;
39using trajectory::PhaseSpaceWriter;
40
69template <typename Tcoord, typename Tcalc>
70void shakePositions(Tcoord* xdev, Tcoord* ydev, Tcoord* zdev, Tcoord* xvel_dev, Tcoord* yvel_dev,
71 Tcoord* zvel_dev, const Tcoord* xref, const Tcoord* yref, const Tcoord* zref,
72 const ConstraintKit<Tcalc> &cnk, Tcalc dt, Tcalc tol, int max_iter,
73 RattleMethod style, Tcalc gpos_scale_factor = 1.0,
74 Tcalc vel_scale_factor = 1.0);
75
76template <typename T>
77void shakePositions(PhaseSpaceWriter *psw, const ConstraintKit<T> &cnk, T dt, T tol,
78 int max_iter = default_rattle_max_iter,
79 RattleMethod style = RattleMethod::SEQUENTIAL);
80
81void shakePositions(PhaseSpace *ps, const AtomGraph *ag, PrecisionModel prec, double dt,
82 double tol, int max_iter = default_rattle_max_iter,
83 RattleMethod style = RattleMethod::SEQUENTIAL);
84
85void shakePositions(PhaseSpace *ps, const AtomGraph &ag, PrecisionModel prec, double dt,
86 double tol, int max_iter = default_rattle_max_iter,
87 RattleMethod style = RattleMethod::SEQUENTIAL);
88
89template <typename T, typename T2, typename T4>
90void shakePositions(PsSynthesisWriter *poly_psw, const SyValenceKit<T> &poly_vk,
91 const SyAtomUpdateKit<T, T2, T4> &poly_auk, T dt, T tol,
92 int max_iter = default_rattle_max_iter);
93
94void shakePositions(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag,
95 PrecisionModel prec, double dt, double tol,
96 int max_iter = default_rattle_max_iter);
97
98void shakePositions(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag,
99 PrecisionModel prec, double dt, double tol,
100 int max_iter = default_rattle_max_iter);
102
111template <typename Tcoord, typename Tcalc>
112void rattleVelocities(Tcoord* xvel_dev, Tcoord* yvel_dev, Tcoord *zvel_dev, const Tcoord* xcrd_ref,
113 const Tcoord* ycrd_ref, const Tcoord* zcrd_ref,
114 const ConstraintKit<Tcalc> &cnk, Tcalc dt, Tcalc tol,
115 int max_iter = default_rattle_max_iter,
116 RattleMethod style = RattleMethod::SEQUENTIAL, Tcalc gpos_scale_factor = 1.0,
117 Tcalc vel_scale_factor = 1.0);
118
119template <typename Tcalc>
120void rattleVelocities(PhaseSpaceWriter *psw, const ConstraintKit<Tcalc> &cnk, Tcalc dt, Tcalc tol,
121 int max_iter = default_rattle_max_iter,
122 RattleMethod style = RattleMethod::SEQUENTIAL);
123
124void rattleVelocities(PhaseSpace *ps, const AtomGraph *ag, PrecisionModel prec, double dt,
125 double tol, int max_iter = default_rattle_max_iter,
126 RattleMethod style = RattleMethod::SEQUENTIAL);
127
128void rattleVelocities(PhaseSpace *ps, const AtomGraph &ag, PrecisionModel prec, double dt,
129 double tol, int max_iter = default_rattle_max_iter,
130 RattleMethod style = RattleMethod::SEQUENTIAL);
131
132template <typename T, typename T2, typename T4>
133void rattleVelocities(PsSynthesisWriter *poly_psw, const SyValenceKit<T> &poly_vk,
134 const SyAtomUpdateKit<T, T2, T4> &poly_auk, T dt, T tol,
135 int max_iter = default_rattle_max_iter);
136
137void rattleVelocities(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag,
138 PrecisionModel prec, double dt, double tol,
139 int max_iter = default_rattle_max_iter);
140
141void rattleVelocities(PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag,
142 PrecisionModel prec, double dt, double tol,
143 int max_iter = default_rattle_max_iter);
145
146} // namespace structure
147} // namespace stormm
148
149#include "hub_and_spoke.tpp"
150
151#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