STORMM Source Documentation
Loading...
Searching...
No Matches
global_manipulation.h
1// -*-c++-*-
2#ifndef STORMM_GLOBAL_MANIPULATION_H
3#define STORMM_GLOBAL_MANIPULATION_H
4
5#include <vector>
6#include "copyright.h"
7#include "Constants/behavior.h"
8#include "DataTypes/common_types.h"
9#include "Reporting/error_format.h"
10#include "Synthesis/condensate.h"
11#include "Synthesis/phasespace_synthesis.h"
12#include "Topology/atomgraph.h"
13#include "Topology/atomgraph_abstracts.h"
14#include "Trajectory/coordinateframe.h"
15#include "Trajectory/coordinate_series.h"
16#include "Trajectory/phasespace.h"
17#include "Trajectory/trajectory_enumerators.h"
18#include "virtual_site_handling.h"
19
20namespace stormm {
21namespace structure {
22
23using constants::PrecisionModel;
24using data_types::isSignedIntegralScalarType;
25using data_types::isSignedIntegralHpcVectorType;
26using synthesis::Condensate;
27using synthesis::CondensateWriter;
28using synthesis::PhaseSpaceSynthesis;
29using synthesis::PsSynthesisWriter;
30using topology::AtomGraph;
31using topology::VirtualSiteKit;
32using trajectory::CoordinateFrame;
33using trajectory::CoordinateFrameWriter;
34using trajectory::CoordinateSeries;
35using trajectory::CoordinateSeriesWriter;
36using trajectory::PhaseSpace;
37using trajectory::PhaseSpaceWriter;
38using trajectory::TrajectoryKind;
39
53template <typename T>
54std::vector<T> beardRotationMatrix(const T om_x, const T om_y, const T om_z);
55
97
98template <typename T, typename Tcalc>
99void rotateCoordinates(T *x, T *y, T *z, const Tcalc* axis_a, const Tcalc* axis_b,
100 const Tcalc* axis_c, Tcalc globalpos_scale_factor = 1.0);
101
102template <typename T, typename Tcalc>
103void rotateCoordinates(T *x, T *y, T *z, const Tcalc* umat, Tcalc globalpos_scale_factor = 1.0);
104
105template <typename T, typename Tcalc>
106void rotateCoordinates(T* x, T* y, T* z, size_t n, const Tcalc* axis_a, const Tcalc* axis_b,
107 const Tcalc* axis_c, Tcalc globalpos_scale_factor = 1.0);
108
109template <typename T, typename Tcalc>
110void rotateCoordinates(T* x, T* y, T* z, size_t n, const Tcalc* umat,
111 Tcalc globalpos_scale_factor = 1.0);
112
113template <typename T, typename Tcalc>
114void rotateCoordinates(std::vector<T> *x, std::vector<T> *y, std::vector<T> *z,
115 const std::vector<Tcalc> &axis_a, const std::vector<Tcalc> &axis_b,
116 const std::vector<Tcalc> &axis_c, Tcalc globalpos_scale_factor = 1.0);
117
118template <typename T, typename Tcalc>
119void rotateCoordinates(std::vector<T> *x, std::vector<T> *y, std::vector<T> *z,
120 const std::vector<Tcalc> &umat, Tcalc globalpos_scale_factor = 1.0);
121
122template <typename T, typename Tcalc>
123void rotateCoordinates(Hybrid<T> *x, Hybrid<T> *y, Hybrid<T> *z,
124 const Hybrid<Tcalc> &axis_a, const Hybrid<Tcalc> &axis_b,
125 const Hybrid<Tcalc> &axis_c, Tcalc globalpos_scale_factor = 1.0);
126
127template <typename T, typename Tcalc>
128void rotateCoordinates(Hybrid<T> *x, Hybrid<T> *y, Hybrid<T> *z, const Hybrid<Tcalc> &umat,
129 Tcalc globalpos_scale_factor = 1.0);
130
131template <typename T3, typename Tcalc>
132void rotateCoordinates(T3 *c, const T3 axis_a, const T3 axis_b, const T3 axis_c,
133 Tcalc globalpos_scale_factor = 1.0);
134
135template <typename Tcoord, typename Tcalc>
136void rotateCoordinates(Tcoord* xcrd, Tcoord* ycrd, Tcoord* zcrd, Tcalc alpha, Tcalc beta,
137 Tcalc gamma, int lower_limit, int upper_limit,
138 const VirtualSiteKit<Tcalc> *vsk = nullptr,
139 Tcalc globalpos_scale_factor = 1.0);
140
141void rotateCoordinates(CoordinateFrameWriter *cfw, const VirtualSiteKit<double> &vsk, double alpha,
142 double beta, double gamma, int lower_limit = 0, int upper_limit = 0);
143
144void rotateCoordinates(CoordinateFrame *cf, const AtomGraph &ag, double alpha, double beta,
145 double gamma, int lower_limit = 0, int upper_limit = 0);
146
147void rotateCoordinates(PhaseSpaceWriter *psw, const VirtualSiteKit<double> &vsk, double alpha,
148 double beta, double gamma, int lower_limit = 0, int upper_limit = 0);
149
150void rotateCoordinates(PhaseSpace *ps, const AtomGraph &ag, double alpha, double beta,
151 double gamma, int lower_limit = 0, int upper_limit = 0);
152
153template <typename Tcoord, typename Tcalc>
154void rotateCoordinates(CoordinateSeriesWriter<Tcoord> *csw, size_t frame_index,
155 const VirtualSiteKit<Tcalc> &vsk, Tcalc alpha, Tcalc beta, Tcalc gamma,
156 int lower_limit = 0, int upper_limit = 0);
157
158template <typename Tcoord, typename Tcalc>
159void rotateCoordinates(CoordinateSeries<Tcoord> *cs, size_t frame_index, const AtomGraph &ag,
160 Tcalc alpha, Tcalc beta, Tcalc gamma, int lower_limit = 0,
161 int upper_limit = 0);
162
163template <typename Tcalc>
164void rotateCoordinates(PhaseSpaceSynthesis *poly_ps, int system_index, Tcalc alpha, Tcalc beta,
165 Tcalc gamma, int lower_limit = 0, int upper_limit = 0);
166
167template <typename Tcalc>
168void rotateCoordinates(CondensateWriter *cdnsw, int system_index, const VirtualSiteKit<Tcalc> &vsk,
169 Tcalc alpha, Tcalc beta, Tcalc gamma, int lower_limit = 0,
170 int upper_limit = 0);
171
172void rotateCoordinates(Condensate *cdns, int system_index, double alpha, double beta,
173 double gamma, int lower_limit = 0, int upper_limit = 0);
174
175void rotateCoordinates(Condensate *cdns, int system_index, const AtomGraph &ag, double alpha,
176 double beta, double gamma, int lower_limit = 0, int upper_limit = 0);
178
202template <typename Tcoord, typename Tcalc>
203void translateCoordinates(Tcoord* xcrd, Tcoord* ycrd, Tcoord* zcrd, Tcalc xmove, Tcalc ymove,
204 Tcalc zmove, int lower_limit, int upper_limit,
205 const VirtualSiteKit<Tcalc> *vsk = nullptr,
206 Tcalc globalpos_scale_factor = 1.0);
207
208void translateCoordinates(CoordinateFrameWriter *cfw, const VirtualSiteKit<double> &vsk,
209 double xmove, double ymove, double zmove, int lower_limit = 0,
210 int upper_limit = 0);
211
212void translateCoordinates(CoordinateFrame *cf, const AtomGraph &ag, double xmove, double ymove,
213 double zmove, int lower_limit = 0, int upper_limit = 0);
214
215void translateCoordinates(PhaseSpaceWriter *psw, const VirtualSiteKit<double> &vsk, double xmove,
216 double ymove, double zmove, int lower_limit = 0, int upper_limit = 0);
217
218void translateCoordinates(PhaseSpace *ps, const AtomGraph &ag, double xmove, double ymove,
219 double zmove, int lower_limit = 0, int upper_limit = 0);
220
221template <typename Tcoord, typename Tcalc>
222void translateCoordinates(CoordinateSeriesWriter<Tcoord> *csw, Tcalc xmove, Tcalc ymove,
223 Tcalc zmove, int lower_limit = 0, int upper_limit = 0,
224 const VirtualSiteKit<Tcalc> *vsk = nullptr);
225
226template <typename Tcoord, typename Tcalc>
227void translateCoordinates(CoordinateSeries<Tcoord> *cs, const AtomGraph &ag, Tcalc xmove,
228 Tcalc ymove, Tcalc zmove, int lower_limit = 0, int upper_limit = 0);
229
230template <typename Tcalc>
231void translateCoordinates(PsSynthesisWriter *poly_psw, int system_index,
232 const VirtualSiteKit<Tcalc> &vsk, Tcalc xmove, Tcalc ymove,
233 Tcalc zmove, int lower_limit = 0, int upper_limit = 0);
234
235template <typename Tcalc>
236void translateCoordinates(PhaseSpaceSynthesis *poly_ps, int system_index, const AtomGraph &ag,
237 Tcalc xmove, Tcalc ymove, Tcalc zmove, int lower_limit = 0,
238 int upper_limit = 0);
239
240template <typename Tcalc>
241void translateCoordinates(CondensateWriter *cdnsw, int system_index,
242 const VirtualSiteKit<Tcalc> &vsk, Tcalc xmove, Tcalc ymove,
243 Tcalc zmove, int lower_limit = 0, int upper_limit = 0);
244
245void translateCoordinates(Condensate *cdns, int system_index, double xmove, double ymove,
246 double zmove, int lower_limit = 0, int upper_limit = 0);
247
248void translateCoordinates(Condensate *cdns, int system_index, const AtomGraph &ag,
249 double xmove, double ymove, double zmove, int lower_limit = 0,
250 int upper_limit = 0);
252
253} // namespace structure
254} // namespace stormm
255
256#include "global_manipulation.tpp"
257
258#endif
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
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
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
Writeable abstract for the Condensate class, wherein coordinates (only) can be modified as a conseque...
Definition condensate.h:64
The writer for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:87
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 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 modifiable PhaseSpace object.
Definition phasespace.h:31