2#ifndef STORMM_LOCAL_ARRANGEMENT_H
3#define STORMM_LOCAL_ARRANGEMENT_H
7#include "Accelerator/hybrid.h"
8#include "Constants/behavior.h"
9#include "Constants/fixed_precision.h"
10#include "Constants/symbol_values.h"
11#include "DataTypes/common_types.h"
12#include "DataTypes/stormm_vector_types.h"
13#include "Math/rounding.h"
14#include "Math/vector_ops.h"
15#include "Numerics/split_fixed_precision.h"
16#include "Reporting/error_format.h"
17#include "Synthesis/condensate.h"
18#include "Synthesis/phasespace_synthesis.h"
19#include "Topology/atomgraph_enumerators.h"
20#include "Trajectory/coordinateframe.h"
21#include "Trajectory/coordinateframe.h"
22#include "Trajectory/coordinate_series.h"
23#include "Trajectory/phasespace.h"
24#include "structure_enumerators.h"
30using constants::PrecisionModel;
31using data_types::isSignedIntegralScalarType;
32using numerics::globalpos_scale_nonoverflow_bits;
33using numerics::hostInt95ToDouble;
34using numerics::hostInt95Subtract;
35using numerics::hostInt95Sum;
36using stmath::angleVerification;
37using stmath::crossProduct;
39using synthesis::Condensate;
40using synthesis::CondensateReader;
41using synthesis::CondensateWriter;
42using synthesis::PhaseSpaceSynthesis;
43using synthesis::PsSynthesisReader;
44using synthesis::PsSynthesisWriter;
45using topology::UnitCellType;
46using trajectory::CoordinateFrame;
47using trajectory::CoordinateFrameReader;
48using trajectory::CoordinateFrameWriter;
49using trajectory::CoordinateSeries;
50using trajectory::CoordinateSeriesReader;
51using trajectory::CoordinateSeriesWriter;
52using trajectory::PhaseSpace;
53using trajectory::PhaseSpaceReader;
54using trajectory::PhaseSpaceWriter;
63template <
typename Tcoord,
typename Tcalc>
64Tcoord imageValue(Tcoord x, Tcalc range, ImagingMethod style, Tcalc gpos_scale_factor = 1.0);
87template <
typename Tcoord,
typename Tcalc>
88void imageCoordinates(Tcoord *x, Tcoord *y, Tcoord *z,
const double* umat,
const double* invu,
89 UnitCellType unit_cell, ImagingMethod style, Tcalc gpos_scale_factor = 1.0);
91template <
typename Tcoord,
typename Tcalc>
92void imageCoordinates(Tcoord* x, Tcoord* y, Tcoord* z,
const int length,
const double* umat,
93 const double* invu, UnitCellType unit_cell, ImagingMethod style,
94 Tcalc gpos_scale_factor = 1.0,
int* xcrd_ovrf =
nullptr,
95 int* ycrd_ovrf =
nullptr,
int* zcrd_ovrf =
nullptr);
97template <
typename Tcoord,
typename Tcalc>
98void imageCoordinates(std::vector<Tcoord> *x, std::vector<Tcoord> *y, std::vector<Tcoord> *z,
99 const double* umat,
const double* invu, UnitCellType unit_cell,
100 ImagingMethod style, Tcalc gpos_scale_factor = 1.0);
102template <
typename Tcoord,
typename Tcalc>
104 const double* umat,
const double* invu, UnitCellType unit_cell,
105 ImagingMethod style, Tcalc gpos_scale_factor = 1.0);
113void imageCoordinates(
PhaseSpace *ps, ImagingMethod style);
115template <
typename Tcoord,
typename Tcalc>
118template <
typename Tcoord,
typename Tcalc>
121template <
typename Tcalc>
122void imageCoordinates(
CondensateWriter cdnsw,
int system_index, ImagingMethod style);
124template <
typename Tcalc>
125void imageCoordinates(
Condensate *cdns,
int system_index, ImagingMethod style);
127template <
typename Tcalc>
128void imageCoordinates(
PsSynthesisWriter poly_psw,
int system_index, ImagingMethod style);
130template <
typename Tcalc>
146template <
typename Tcoord>
147double displacement(
int atom_i,
int atom_j,
const Tcoord* crd,
const int* crd_ovrf,
148 double inv_gpos_factor);
180template <
typename Tcalc4,
typename Tcalc>
181Tcalc4 distance(
const int95_t pti_x,
const int95_t pti_y,
const int95_t pti_z,
const int95_t ptj_x,
182 const int95_t ptj_y,
const int95_t ptj_z,
const double* umat,
const double* invu,
183 UnitCellType unit_cell, Tcalc gpos_scale_factor);
185template <
typename Tcoord,
typename Tcalc>
186Tcalc distance(
int atom_i,
int atom_j,
const Tcoord* xcrd,
const Tcoord* ycrd,
const Tcoord* zcrd,
187 const double* umat,
const double* invu, UnitCellType unit_cell,
188 Tcalc gpos_scale_factor = 1.0,
const int* xcrd_ovrf =
nullptr,
189 const int* ycrd_ovrf =
nullptr,
const int* zcrd_ovrf =
nullptr);
199double distance(
int atom_i,
int atom_j,
const PhaseSpace *ps);
201double distance(
int atom_i,
int atom_j,
const PhaseSpace &ps);
203template <
typename Tcoord,
typename Tcalc>
207template <
typename Tcoord,
typename Tcalc>
210template <
typename Tcoord,
typename Tcalc>
213template <
typename Tcalc>
214Tcalc distance(
int atom_i,
int atom_j,
const CondensateReader &cdnsr,
int system_index);
216template <
typename Tcalc>
217Tcalc distance(
int atom_i,
int atom_j,
const Condensate *cdns,
int system_index);
219template <
typename Tcalc>
220Tcalc distance(
int atom_i,
int atom_j,
const Condensate &cdns,
int system_index);
222template <
typename Tcalc>
223Tcalc distance(
int atom_i,
int atom_j,
const PsSynthesisReader &poly_psr,
int system_index);
225template <
typename Tcalc>
226Tcalc distance(
int atom_i,
int atom_j,
const PhaseSpaceSynthesis *poly_ps,
int system_index);
228template <
typename Tcalc>
229Tcalc distance(
int atom_i,
int atom_j,
const PhaseSpaceSynthesis &poly_ps,
int system_index);
244template <
typename Tcoord,
typename Tcalc>
245Tcalc angle(
int atom_i,
int atom_j,
int atom_k,
const Tcoord* xcrd,
const Tcoord* ycrd,
246 const Tcoord* zcrd,
const double* umat,
const double* invu, UnitCellType unit_cell,
247 Tcalc gpos_scale_factor = 1.0,
const int* xcrd_ovrf =
nullptr,
248 const int* ycrd_ovrf =
nullptr,
const int* zcrd_ovrf =
nullptr);
252double angle(
int atom_i,
int atom_j,
int atom_k,
const CoordinateFrame *cf);
254double angle(
int atom_i,
int atom_j,
int atom_k,
const CoordinateFrame &cf);
256double angle(
int atom_i,
int atom_j,
int atom_k,
const PhaseSpaceReader &psr);
258double angle(
int atom_i,
int atom_j,
int atom_k,
const PhaseSpace *ps);
260double angle(
int atom_i,
int atom_j,
int atom_k,
const PhaseSpace &ps);
262template <
typename Tcoord,
typename Tcalc>
266template <
typename Tcoord,
typename Tcalc>
270template <
typename Tcoord,
typename Tcalc>
274template <
typename Tcalc>
275Tcalc angle(
int atom_i,
int atom_j,
int atom_k,
const CondensateReader &cdnsr,
int system_index);
277template <
typename Tcalc>
278Tcalc angle(
int atom_i,
int atom_j,
int atom_k,
const Condensate *cdns,
int system_index);
280template <
typename Tcalc>
281Tcalc angle(
int atom_i,
int atom_j,
int atom_k,
const Condensate &cdns,
int system_index);
283template <
typename Tcalc>
284Tcalc angle(
int atom_i,
int atom_j,
int atom_k,
const PsSynthesisReader &poly_psr,
287template <
typename Tcalc>
291template <
typename Tcalc>
308template <
typename Tcoord,
typename Tcalc>
309Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const Tcoord* xcrd,
310 const Tcoord* ycrd,
const Tcoord* zcrd,
const double* umat,
311 const double* invu, UnitCellType unit_cell, Tcalc gpos_scale_factor = 1.0,
312 const int* xcrd_ovrf =
nullptr,
const int* ycrd_ovrf =
nullptr,
313 const int* zcrd_ovrf =
nullptr);
315double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
318double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const CoordinateFrame *cf);
320double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const CoordinateFrame &cf);
322double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const PhaseSpaceReader &cfr);
324double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const PhaseSpace *ps);
326double dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const PhaseSpace &ps);
328template <
typename Tcoord,
typename Tcalc>
329Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
332template <
typename Tcoord,
typename Tcalc>
333Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
336template <
typename Tcoord,
typename Tcalc>
337Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
340template <
typename Tcalc>
341Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const CondensateReader &cdnsr,
344template <
typename Tcalc>
345Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const Condensate *cdns,
348template <
typename Tcalc>
349Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
const Condensate &cdns,
352template <
typename Tcalc>
353Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
356template <
typename Tcalc>
357Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
360template <
typename Tcalc>
361Tcalc dihedralAngle(
int atom_i,
int atom_j,
int atom_k,
int atom_l,
368#include "local_arrangement.tpp"
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
Condense the data format, and possibly offer a reduced representation of coordinates,...
Definition condensate.h:146
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
Store the coordinates and box information for a frame, only. This abridged struct can serve when the ...
Definition coordinateframe.h:111
Store the coordinates and box information for a series of frames, in one of several levels of precisi...
Definition coordinate_series.h:137
An object to complement a topology and hold positions, velocities, and forces of all particles in a s...
Definition phasespace.h:141
Read-only abstract for the Condensate class. In most cases, the read-only abstract will be preferred ...
Definition condensate.h:102
Writeable abstract for the Condensate class, wherein coordinates (only) can be modified as a conseque...
Definition condensate.h:64
The reader for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:199
The writer for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:87
Collect C-style pointers for the elements of a read-only CoordinateFrame object.
Definition coordinateframe.h:65
Collect C-style pointers for the elements of a writable CoordinateFrame object.
Definition coordinateframe.h:30
Collect C-style pointers and critical constants for a read-only CoordinateSeries object.
Definition coordinate_series.h:96
Collect C-style pointers and critical constants for a writeable CoordinateSeries object.
Definition coordinate_series.h:66
Collect constants and pointers to the components of a read-only PhaseSpace object.
Definition phasespace.h:81
Collect constants and pointers to the components of a modifiable PhaseSpace object.
Definition phasespace.h:31