2#ifndef STORMM_VIRTUAL_SITE_PLACEMENT_H
3#define STORMM_VIRTUAL_SITE_PLACEMENT_H
7#include "Constants/fixed_precision.h"
8#include "DataTypes/stormm_vector_types.h"
9#include "Math/vector_ops.h"
10#include "Numerics/split_fixed_precision.h"
11#include "Structure/local_arrangement.h"
12#include "Synthesis/atomgraph_synthesis.h"
13#include "Synthesis/phasespace_synthesis.h"
14#include "Synthesis/synthesis_abstracts.h"
15#include "Synthesis/synthesis_enumerators.h"
16#include "Synthesis/valence_workunit.h"
17#include "Topology/atomgraph.h"
18#include "Topology/atomgraph_abstracts.h"
19#include "Topology/atomgraph_enumerators.h"
20#include "Trajectory/coordinateframe.h"
21#include "Trajectory/phasespace.h"
22#include "Trajectory/trajectory_enumerators.h"
23#include "local_arrangement.h"
28using numerics::force_scale_nonoverflow_bits;
29using numerics::globalpos_scale_nonoverflow_bits;
30using numerics::operator+;
33using stmath::crossProduct;
34using synthesis::AtomGraphSynthesis;
35using synthesis::maximum_valence_work_unit_atoms;
36using synthesis::SyAtomUpdateKit;
37using synthesis::SyValenceKit;
38using synthesis::vwu_abstract_length;
39using synthesis::VwuAbstractMap;
40using topology::AtomGraph;
41using topology::UnitCellType;
42using topology::VirtualSiteKind;
43using topology::VirtualSiteKit;
44using trajectory::CoordinateCycle;
45using trajectory::CoordinateFrame;
46using trajectory::CoordinateFrameWriter;
47using trajectory::PhaseSpace;
48using trajectory::PhaseSpaceWriter;
70template <
typename Tcoord>
71void drawVirtualSite(
const int vsite_atom,
const int parent_atom,
const int95_t xdisp,
72 const int95_t ydisp,
const int95_t zdisp, Tcoord *xcrd, Tcoord *ycrd,
73 Tcoord *zcrd,
int* xcrd_ovrf,
int* ycrd_ovrf,
int* zcrd_ovrf);
104template <
typename Tcoord,
typename Tcalc>
105void placeVirtualSite(Tcoord* xcrd, Tcoord* ycrd, Tcoord* zcrd,
const double* umat,
106 const double* invu, UnitCellType unit_cell,
int vsite_atom,
int parent_atom,
107 int frame2_atom,
int frame3_atom,
int frame4_atom,
108 VirtualSiteKind frame_type, Tcalc frame_d1, Tcalc frame_d2, Tcalc frame_d3,
109 Tcalc gpos_scale_factor = 1.0,
int* xcrd_ovrf =
nullptr,
110 int* ycrd_ovrf =
nullptr,
int* zcrd_ovrf =
nullptr);
136template <
typename Tcoord,
typename Tcalc>
137void placeVirtualSites(Tcoord* xcrd, Tcoord* ycrd, Tcoord* zcrd,
const double* umat,
138 const double* invu,
const UnitCellType unit_cell,
142 PrecisionModel prec = PrecisionModel::DOUBLE);
145 PrecisionModel prec = PrecisionModel::DOUBLE);
148 PrecisionModel prec = PrecisionModel::DOUBLE);
151 PrecisionModel prec = PrecisionModel::DOUBLE);
154 PrecisionModel prec = PrecisionModel::DOUBLE);
157 PrecisionModel prec = PrecisionModel::DOUBLE);
159template <
typename Tcalc>
161 bool edit_alternate_image =
true);
163template <
typename Tcalc>
166template <
typename Tcalc,
typename Tcalc2,
typename Tcalc4>
171 CoordinateCycle affix, PrecisionModel prec = PrecisionModel::DOUBLE);
174 CoordinateCycle affix, PrecisionModel prec = PrecisionModel::DOUBLE);
177 PrecisionModel prec = PrecisionModel::DOUBLE);
180 PrecisionModel prec = PrecisionModel::DOUBLE);
213template <
typename Tcoord,
typename Tforce,
typename Tcalc>
214void transmitVirtualSiteForces(
const Tcoord* xcrd,
const Tcoord* ycrd,
const Tcoord* zcrd,
215 Tforce* xfrc, Tforce* yfrc, Tforce* zfrc,
const double* umat,
216 const double* invu, UnitCellType unit_cell,
int vsite_atom,
217 int parent_atom,
int frame2_atom,
int frame3_atom,
int frame4_atom,
218 VirtualSiteKind frame_type, Tcalc frame_d1, Tcalc frame_d2,
219 Tcalc frame_d3, Tcalc gpos_scale_factor = 1.0,
220 Tcalc force_scale_factor = 1.0,
const int* xcrd_ovrf =
nullptr,
221 const int* ycrd_ovrf =
nullptr,
const int* zcrd_ovrf =
nullptr,
222 int* xfrc_ovrf =
nullptr,
int* yfrc_ovrf =
nullptr,
223 int* zfrc_ovrf =
nullptr);
225template <
typename Tcoord,
typename Tforce,
typename Tcalc>
226void transmitVirtualSiteForces(
const Tcoord* xcrd,
const Tcoord* ycrd,
const Tcoord* zcrd,
227 Tforce* xfrc, Tforce* yfrc, Tforce* zfrc,
const double* umat,
228 const double* invu,
const UnitCellType unit_cell,
230 Tcalc force_scale_factor = 1.0);
233 PrecisionModel prec = PrecisionModel::DOUBLE);
236 PrecisionModel prec = PrecisionModel::DOUBLE);
238template <
typename Tcalc>
241template <
typename Tcalc,
typename Tcalc2,
typename Tcalc4>
246 PrecisionModel prec = PrecisionModel::DOUBLE);
249 PrecisionModel prec = PrecisionModel::DOUBLE);
256#include "virtual_site_handling.tpp"
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
Store the coordinates and box information for a frame, only. This abridged struct can serve when the ...
Definition coordinateframe.h:111
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 for the placement of virtual sites and transmission of forces on these sites to th...
Definition atomgraph_abstracts.h:430
Collect C-style pointers for the elements of a writable CoordinateFrame object.
Definition coordinateframe.h:30
Collect constants and pointers to the components of a modifiable PhaseSpace object.
Definition phasespace.h:31