STORMM Source Documentation
Loading...
Searching...
No Matches
kinetic.h
1// -*-c++-*-
2#ifndef STORMM_KINETIC_H
3#define STORMM_KINETIC_H
4
5#include "copyright.h"
6#include "Constants/behavior.h"
7#include "Constants/fixed_precision.h"
8#include "Constants/symbol_values.h"
9#include "DataTypes/common_types.h"
10#include "Potential/energy_enumerators.h"
11#include "Potential/scorecard.h"
12#include "Structure/structure_enumerators.h"
13#include "Synthesis/atomgraph_synthesis.h"
14#include "Synthesis/phasespace_synthesis.h"
15#include "Topology/atomgraph.h"
16#include "Topology/atomgraph_abstracts.h"
17#include "Trajectory/phasespace.h"
18#include "Trajectory/thermostat.h"
19#include "Trajectory/trajectory_enumerators.h"
20
21namespace stormm {
22namespace mm {
23
24using constants::PrecisionModel;
25using data_types::isSignedIntegralScalarType;
26using energy::ScoreCard;
27using energy::StateVariable;
28using numerics::velocity_scale_nonoverflow_bits;
29using structure::ApplyConstraints;
30using symbols::boltzmann_constant;
31using symbols::boltzmann_constant_f;
32using symbols::gafs_to_kcal;
33using synthesis::AtomGraphSynthesis;
34using synthesis::PhaseSpaceSynthesis;
35using synthesis::PsSynthesisReader;
36using synthesis::PsSynthesisWriter;
37using synthesis::SyAtomUpdateKit;
38using synthesis::SyNonbondedKit;
39using topology::AtomGraph;
40using topology::ChemicalDetailsKit;
41using trajectory::CoordinateCycle;
42using trajectory::PhaseSpace;
43using trajectory::PhaseSpaceReader;
44using trajectory::PhaseSpaceWriter;
45using trajectory::Thermostat;
46using trajectory::ThermostatReader;
47
82template <typename Tcoord, typename Tmass, typename Tcalc>
83llint evalKineticEnergy(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel,
84 const int* xvel_ovrf, const int* yvel_ovrf, const int* zvel_ovrf,
85 const Tmass* masses, const int natom, const Tcalc nrg_scale_factor,
86 Tcalc inv_vel_scale = 1.0);
87
88template <typename Tcoord, typename Tcalc>
89void evalKineticEnergy(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel, ScoreCard *sc,
90 const int* xvel_ovrf, const int* yvel_ovrf, const int* zvel_ovrf,
91 const ChemicalDetailsKit &cdk, int system_index = 0,
92 Tcalc inv_vel_scale = 1.0);
93
94void evalKineticEnergy(const PhaseSpaceWriter *psw, ScoreCard *sc, const ChemicalDetailsKit &cdk,
95 int system_index);
96
97void evalKineticEnergy(const PhaseSpaceWriter &psw, ScoreCard *sc, const ChemicalDetailsKit &cdk,
98 int system_index);
99
100void evalKineticEnergy(const PhaseSpace *ps, CoordinateCycle orientation, ScoreCard *sc,
101 const AtomGraph *ag, int system_index = 0);
102
103void evalKineticEnergy(const PhaseSpace &ps, CoordinateCycle orientation, ScoreCard *sc,
104 const AtomGraph &ag, int system_index = 0);
105
106void evalKineticEnergy(const PhaseSpace *ps, ScoreCard *sc, const AtomGraph *ag,
107 int system_index = 0);
108
109void evalKineticEnergy(const PhaseSpace &ps, ScoreCard *sc, const AtomGraph &ag,
110 int system_index = 0);
111
112template <typename Tmass, typename Tmass2, typename Tmass4, typename Tcalc>
113void evalKineticEnergy(const PsSynthesisReader &poly_psr, ScoreCard *sc,
116
137template <typename Tcoord, typename Tmass, typename Tcalc>
138llint evalRescaledKineticEnergy(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel,
139 const int* xvel_ovrf, const int* yvel_ovrf, const int* zvel_ovrf,
140 const Tmass* masses, const int natom, const Tcalc nrg_scale_factor,
141 const Tcalc inv_vel_scale);
143
163template <typename Tcoord, typename Tmass, typename Tcalc>
164llint evalMomenta(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel,
165 const int* xvel_ovrf, const int* yvel_ovrf, const int* zvel_ovrf,
166 const Tmass* masses, const int natom, const Tcalc inv_vel_scale);
168
189template <typename Tcoord, typename Tmass, typename Tcalc>
190Tcalc computeTemperature(const Tcoord* xvel, const Tcoord* yvel, const Tcoord* zvel,
191 const int* xvel_ovrf, const int* yvel_ovrf, const int* zvel_ovrf,
192 const Tmass* masses, int natom, int ndof, Tcalc nrg_scale_factor,
193 Tcalc inv_vel_scale);
194
195template <typename Tcalc>
196Tcalc computeTemperature(const PhaseSpace *ps, const AtomGraph *ag, ApplyConstraints use_cnst);
197
198template <typename Tcalc>
199Tcalc computeTemperature(const PhaseSpace &ps, const AtomGraph &ag, ApplyConstraints use_cnst);
200
201template <typename Tmass, typename Tmass2, typename Tmass4, typename Tcalc>
202void computeTemperature(const PsSynthesisReader &poly_psr, ScoreCard *sc,
204 const ThermostatReader<Tcalc> &tstr, bool ke_computed = false);
205
206double computeTemperature(const PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis *poly_ag,
207 ApplyConstraints use_cnst, int system_index,
208 PrecisionModel prec = PrecisionModel::SINGLE);
209
210double computeTemperature(const PhaseSpaceSynthesis &ps, const AtomGraphSynthesis &ag,
211 ApplyConstraints use_cnst, int system_index,
212 PrecisionModel prec = PrecisionModel::SINGLE);
213
214void computeTemperature(ScoreCard *sc, const ChemicalDetailsKit &cdk, bool cnst, int index = 0);
215
216void computeTemperature(ScoreCard *sc, const AtomGraph &ag, bool cnst, int index = 0);
217
218void computeTemperature(ScoreCard *sc, const AtomGraph *ag, bool cnst, int index = 0);
220
229template <typename Tcalc>
230std::vector<llint> initiateMomentaRescale(const PhaseSpaceSynthesis *PsSynthesis,
231 const AtomGraphSynthesis *AgSynthesis,
232 const ScoreCard *sc, std::vector<int> swap_indices,
233 std::vector<double> temp);
234
240template <typename Tcalc>
241std::vector<llint> initiateKineticEnergyRescale(const PhaseSpaceSynthesis *PsSynthesis,
242 const AtomGraphSynthesis *AgSynthesis,
243 const ScoreCard *sc);
244
245} // namespace mm
246} // namespace stormm
247
248#include "kinetic.tpp"
249
250#endif
Track the energy components of a collection of systems in an HPC-capable array. This object uses the ...
Definition scorecard.h:101
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 reader for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:199
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