STORMM Source Documentation
Loading...
Searching...
No Matches
hpc_valence_potential.h
1// -*-c++-*-
2#ifndef STORMM_VALENCE_POTENTIAL_CUH
3#define STORMM_VALENCE_POTENTIAL_CUH
4
5#ifdef STORMM_USE_CUDA
6# include <cuda_runtime.h>
7#endif
8#include "copyright.h"
9#include "Accelerator/core_kernel_manager.h"
10#include "Accelerator/gpu_details.h"
11#include "Constants/behavior.h"
12#include "Constants/fixed_precision.h"
13#include "DataTypes/stormm_vector_types.h"
14#include "MolecularMechanics/mm_controls.h"
15#include "Potential/energy_enumerators.h"
16#include "Synthesis/atomgraph_synthesis.h"
17#include "Synthesis/phasespace_synthesis.h"
18#include "Synthesis/synthesis_abstracts.h"
19#include "Synthesis/synthesis_enumerators.h"
20#include "Trajectory/thermostat.h"
21#include "cacheresource.h"
22#include "energy_enumerators.h"
23#include "scorecard.h"
24
25namespace stormm {
26namespace energy {
27
28using card::GpuDetails;
29using card::CoreKlManager;
30using constants::PrecisionModel;
31using mm::MMControlKit;
32using mm::MolecularMechanicsControls;
33using numerics::AccumulationMethod;
34using synthesis::AtomGraphSynthesis;
35using synthesis::PhaseSpaceSynthesis;
36using synthesis::PsSynthesisWriter;
37using synthesis::SyAtomUpdateKit;
38using synthesis::SyRestraintKit;
39using synthesis::SyValenceKit;
40using synthesis::VwuGoal;
41using trajectory::Thermostat;
42using trajectory::ThermostatWriter;
43
57int2 testValenceKernelSubdivision(const int max_threads, const int smp_count, const int vwu_size,
58 const int vwu_count);
59
72#ifdef STORMM_USE_CUDA
73cudaFuncAttributes
74queryValenceKernelRequirementsXL(EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
75 AccumulationMethod acc_meth, VwuGoal purpose,
76 ClashResponse collision_handling);
77
78cudaFuncAttributes
79queryValenceKernelRequirementsLG(EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
80 AccumulationMethod acc_meth, VwuGoal purpose,
81 ClashResponse collision_handling);
82
83cudaFuncAttributes
84queryValenceKernelRequirementsMD(EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
85 AccumulationMethod acc_meth, VwuGoal purpose,
86 ClashResponse collision_handling);
87
88cudaFuncAttributes
89queryValenceKernelRequirementsSM(EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
90 AccumulationMethod acc_meth, VwuGoal purpose,
91 ClashResponse collision_handling);
92
93cudaFuncAttributes
94queryValenceKernelRequirementsD(EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
95 VwuGoal purpose, ClashResponse collision_handling);
96
97cudaFuncAttributes
98queryValenceKernelRequirementsFPME(EvaluateEnergy eval_nrg, AccumulationMethod acc_meth,
99 ClashResponse collision_handling, PrecisionModel neighbor_prec);
100
101cudaFuncAttributes
102queryValenceKernelRequirementsFPMEDual(EvaluateEnergy eval_nrg, AccumulationMethod acc_meth,
103 ClashResponse collision_handling,
104 PrecisionModel neighbor_prec);
105
106cudaFuncAttributes
107queryValenceKernelRequirementsDPME(EvaluateEnergy eval_nrg, ClashResponse collision_handling,
108 PrecisionModel neighbor_prec);
109
110cudaFuncAttributes
111queryValenceKernelRequirementsDPMEDual(EvaluateEnergy eval_nrg, ClashResponse collision_handling,
112 PrecisionModel neighbor_prec);
113
114cudaFuncAttributes
115queryValenceKernelRequirements(PrecisionModel prec, EvaluateForce eval_frc,
116 EvaluateEnergy eval_nrg, AccumulationMethod acc_meth,
117 VwuGoal purpose, ClashResponse collision_handling,
118 ValenceKernelSize kwidth, bool pme_compatible = false,
119 PrecisionModel neighbor_prec = PrecisionModel::SINGLE,
120 NeighborListKind neighbor_layout = NeighborListKind::MONO);
121
122cudaFuncAttributes
123queryPmeValenceKernelRequirements(PrecisionModel prec, PrecisionModel neighbor_prec,
124 EvaluateForce eval_frc, EvaluateEnergy eval_nrg,
125 AccumulationMethod acc_meth, ClashResponse clash_handling);
126#endif
128
167void launchValence(const SyValenceKit<double> &poly_vk,
172 CacheResourceKit<double> *gmem_r, EvaluateForce eval_force,
173 EvaluateEnergy eval_energy, VwuGoal purpose, const int2 bt,
174 double clash_distance = 0.0, double clash_ratio = 0.0);
175
176void launchValenceXL(const SyValenceKit<float> &poly_vk,
178 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
181 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
182 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
183 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
184
185void launchValenceLG(const SyValenceKit<float> &poly_vk,
187 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
190 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
191 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
192 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
193
194void launchValenceMD(const SyValenceKit<float> &poly_vk,
196 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
199 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
200 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
201 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
202
203void launchValenceSM(const SyValenceKit<float> &poly_vk,
205 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
208 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
209 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
210 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
211
212void launchValence(const SyValenceKit<float> &poly_vk,
214 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
217 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
218 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
219 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
220
221void launchValence(const SyValenceKit<double> &poly_vk,
227 CacheResourceKit<double> *gmem_r, EvaluateForce eval_force,
228 EvaluateEnergy eval_energy, VwuGoal purpose, const int2 bt,
229 double clash_distance = 0.0, double clash_ratio = 0.0);
230
231void launchValence(const SyValenceKit<double> &poly_vk,
237 CacheResourceKit<double> *gmem_r, EvaluateForce eval_force,
238 EvaluateEnergy eval_energy, VwuGoal purpose, const int2 bt,
239 double clash_distance = 0.0, double clash_ratio = 0.0);
240
241void launchValence(const SyValenceKit<float> &poly_vk,
244 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
247 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
248 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
249 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
250
251void launchValence(const SyValenceKit<float> &poly_vk,
254 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
257 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
258 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
259 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
260
261void launchValence(const SyValenceKit<double> &poly_vk,
268 CacheResourceKit<double> *gmem_r, EvaluateForce eval_force,
269 EvaluateEnergy eval_energy, VwuGoal purpose, const int2 bt,
270 double clash_distance = 0.0, double clash_ratio = 0.0);
271
272void launchValence(const SyValenceKit<double> &poly_vk,
279 CacheResourceKit<double> *gmem_r, EvaluateForce eval_force,
280 EvaluateEnergy eval_energy, VwuGoal purpose, const int2 bt,
281 double clash_distance = 0.0, double clash_ratio = 0.0);
282
283void launchValence(const SyValenceKit<float> &poly_vk,
287 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
290 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
291 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
292 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
293
294void launchValence(const SyValenceKit<float> &poly_vk,
298 MMControlKit<float> *ctrl, PsSynthesisWriter *poly_psw,
301 CacheResourceKit<float> *gmem_r, EvaluateForce eval_force,
302 EvaluateEnergy eval_energy, VwuGoal purpose, AccumulationMethod force_sum,
303 const int2 bt, float clash_distance = 0.0, float clash_ratio = 0.0);
304
305void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
307 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
308 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
309 AccumulationMethod force_sum, const CoreKlManager &launcher,
310 double clash_distance = 0.0, double clash_ratio = 0.0);
311
312void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
314 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
315 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
316 const CoreKlManager &launcher, double clash_distance = 0.0,
317 double clash_ratio = 0.0);
318
319void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
322 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
323 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
324 AccumulationMethod force_sum, const CoreKlManager &launcher,
325 double clash_distance = 0.0, double clash_ratio = 0.0);
326
327void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
330 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
331 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
332 const CoreKlManager &launcher, double clash_distance = 0.0,
333 double clash_ratio = 0.0);
334
335void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
339 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
340 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
341 AccumulationMethod force_sum, const CoreKlManager &launcher,
342 double clash_distance = 0.0, double clash_ratio = 0.0);
343
344void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
348 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
349 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
350 const CoreKlManager &launcher, double clash_distance = 0.0,
351 double clash_ratio = 0.0);
352
353void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
356 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
357 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
358 AccumulationMethod force_sum, const CoreKlManager &launcher,
359 double clash_distance = 0.0, double clash_ratio = 0.0);
360
361void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
364 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
365 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
366 const CoreKlManager &launcher, double clash_distance = 0.0,
367 double clash_ratio = 0.0);
368
369void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
373 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
374 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
375 AccumulationMethod force_sum, const CoreKlManager &launcher,
376 double clash_distance = 0.0, double clash_ratio = 0.0);
377
378void launchValence(PrecisionModel prec, const AtomGraphSynthesis &poly_ag,
382 Thermostat *heat_bath, ScoreCard *sc, CacheResource *tb_space,
383 EvaluateForce eval_force, EvaluateEnergy eval_energy, VwuGoal purpose,
384 const CoreKlManager &launcher, double clash_distance = 0.0,
385 double clash_ratio = 0.0);
387
388} // namespace energy
389} // namespace stormm
390
391#endif
A class to guide the implementation of GPU kernels, with selected thread counts per block and block c...
Definition core_kernel_manager.h:56
An object to hold temporary data for a particular work unit (whether bonded or non-bonded),...
Definition cacheresource.h:63
An object to manage the spatial decomposition of a system of particles. The general strategy is to ar...
Definition cellgrid.h:562
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 contol data for molecular mechanics simulations, conveying the current step number,...
Definition mm_controls.h:100
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
Store the parameters for a simulation thermostat. Includes Berendsen, Andersen, and Langevin methods....
Definition thermostat.h:221
Abstract for the CacheResource object, accessible as a C-style struct and suitable for passing to GPU...
Definition cacheresource.h:17
Read-only abstract for the CellGrid object. This is unused in typical MD applications,...
Definition cellgrid.h:296
Writeable abstract for the ScoreCard object, useful for accumulating energies in many kernels.
Definition scorecard.h:64
The C-style, always writeable abstract for the MolecularMechanicsControls object. To not be able to m...
Definition mm_controls.h:52
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 restraint parameters and masking information for work unit-based evaluation of t...
Definition synthesis_abstracts.h:100
Collect the critical valence parameters and indexing information for work unit-based evaluation of th...
Definition synthesis_abstracts.h:19
Partially writeable abstract for the Thermostat object. As with the MMControlKit struct (see the libr...
Definition thermostat.h:58