2#ifndef STORMM_PME_POTENTIAL_H
3#define STORMM_PME_POTENTIAL_H
6#include "Constants/symbol_values.h"
7#include "Math/series_ops.h"
8#include "Math/vector_ops.h"
9#include "Structure/local_arrangement.h"
10#include "Synthesis/atomgraph_synthesis.h"
11#include "Synthesis/phasespace_synthesis.h"
12#include "Topology/atomgraph.h"
13#include "Topology/atomgraph_abstracts.h"
14#include "Trajectory/phasespace.h"
15#include "local_exclusionmask.h"
17#include "energy_enumerators.h"
25using stmath::indexingArray;
26using symbols::amber_ancient_bioq;
27using synthesis::AtomGraphSynthesis;
28using synthesis::SyNonbondedKit;
29using topology::AtomGraph;
30using topology::NonbondedKit;
31using trajectory::PhaseSpace;
32using trajectory::PhaseSpaceWriter;
44constexpr uint no_stagger = (0x20 << 24);
45constexpr uint half_stagger = ((0x10 << 24) | (0x10 << 16) | (0x10 << 8));
46constexpr uint quarter_stagger = ((0x8 << 24) | (0x18 << 16) | (0x10 << 8) | 0x8);
78template <
typename Tcalc>
79double2 cellToCellInteractions(
PhaseSpaceWriter *psw,
const std::vector<int> &cell_list,
80 const std::vector<int> &cell_bounds,
int ncell_a,
int ncell_b,
81 int ncell_c,
int cell_idx_a,
int cell_idx_b,
int cell_idx_c,
82 int i_pair,
int j_pair,
int k_pair,
85 Tcalc vdw_cutoff, Tcalc qqew_coeff, Tcalc ljew_coeff,
86 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
87 EvaluateForce eval_frc = EvaluateForce::YES,
88 NonbondedTheme theme = NonbondedTheme::ALL);
113template <
typename Tcalc>
116 Tcalc elec_cutoff =
static_cast<Tcalc
>(default_pme_cutoff),
117 Tcalc vdw_cutoff =
static_cast<Tcalc
>(default_pme_cutoff),
118 Tcalc qqew_coeff =
static_cast<Tcalc
>(0.0),
119 Tcalc ljew_coeff =
static_cast<Tcalc
>(0.0),
120 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
121 EvaluateForce eval_frc = EvaluateForce::YES,
122 NonbondedTheme theme = NonbondedTheme::ALL);
126 const PrecisionModel prec = PrecisionModel::SINGLE,
127 double elec_cutoff = default_pme_cutoff,
128 double vdw_cutoff = default_pme_cutoff,
129 double qqew_coeff = 0.0,
double ljew_coeff = 0.0,
130 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
131 EvaluateForce eval_frc = EvaluateForce::YES,
132 NonbondedTheme theme = NonbondedTheme::ALL);
136 const PrecisionModel prec = PrecisionModel::SINGLE,
137 double elec_cutoff = default_pme_cutoff,
138 double vdw_cutoff = default_pme_cutoff,
139 double qqew_coeff = 0.0,
double ljew_coeff = 0.0,
140 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
141 EvaluateForce eval_frc = EvaluateForce::YES,
142 NonbondedTheme theme = NonbondedTheme::ALL);
144template <
typename Tcoord,
typename Tacc,
typename Tcalc,
typename Tcalc2,
typename Tcoord4>
149 Tcalc cutoff =
static_cast<Tcalc
>(default_pme_cutoff),
150 Tcalc ew_coeff =
static_cast<Tcalc
>(0.0),
151 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
152 EvaluateForce eval_frc = EvaluateForce::YES,
153 NonbondedTheme theme = NonbondedTheme::ALL);
155template <
typename Tcoord,
typename Tacc,
typename Tcalc,
typename Tcoord4>
158 Tcalc cutoff =
static_cast<Tcalc
>(default_pme_cutoff),
159 Tcalc ew_coeff =
static_cast<Tcalc
>(0.0),
160 VdwSumMethod vdw_sum = VdwSumMethod::CUTOFF,
161 EvaluateForce eval_frc = EvaluateForce::YES,
162 NonbondedTheme theme = NonbondedTheme::ALL);
196template <
typename Tcoord,
typename Tacc,
typename Tcalc,
typename Tcalc2,
typename Tcalc4>
197double2 basicTileInteractions(
const std::vector<Tcalc> &a_xpos,
const std::vector<Tcalc> &a_ypos,
198 const std::vector<Tcalc> &a_zpos,
const std::vector<Tcalc> &b_xpos,
199 const std::vector<Tcalc> &b_ypos,
const std::vector<Tcalc> &b_zpos,
200 const std::vector<Tcalc> &scl_aq,
const std::vector<Tcalc> &bq,
201 const std::vector<int> &ofs_aljidx,
const std::vector<int> &bljidx,
202 const std::vector<int> &top_aidx,
const std::vector<int> &top_bidx,
203 const std::vector<uint> &img_aidx,
const std::vector<uint> &img_bidx,
204 int system_index,
int na,
int nb,
bool self_interaction,
209 Tcalc vdw_cutsq, Tcalc qqew_coeff, Tcalc ljew_coeff,
210 VdwSumMethod vdw_sum, EvaluateForce eval_frc, NonbondedTheme theme);
222template <
typename Tcoord,
typename Tacc,
typename Tcalc,
typename Tcalc2,
typename Tcoord4>
227 Tcalc vdw_cutoff, Tcalc qqew_coeff, Tcalc ljew_coeff,
228 VdwSumMethod vdw_sum, EvaluateForce eval_frc,
229 NonbondedTheme theme);
234#include "pme_potential.tpp"
An object to manage the spatial decomposition of a system of particles. The general strategy is to ar...
Definition cellgrid.h:562
The local exclusion mask is an generalized form of the ForwardExclusionMask, listing all exclusions i...
Definition local_exclusionmask.h:208
Track the energy components of a collection of systems in an HPC-capable array. This object uses the ...
Definition scorecard.h:101
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
Writeable abstract for the CellGrid object, able to receive new coordinates or accumulate forces.
Definition cellgrid.h:137
A lean, read-only abstract for the LocalExclusionMask class.
Definition local_exclusionmask.h:100
Writeable abstract for the ScoreCard object, useful for accumulating energies in many kernels.
Definition scorecard.h:64
The reader for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:199
Collect the critical non-bonded parameters and masking information for work unit-based evaluation of ...
Definition synthesis_abstracts.h:181
Information needed for non-bonded real-space calculations. Templating is used as above,...
Definition atomgraph_abstracts.h:287
Collect constants and pointers to the components of a modifiable PhaseSpace object.
Definition phasespace.h:31