STORMM Source Documentation
Loading...
Searching...
No Matches
phasespace_synthesis.h
1// -*-c++-*-
2#ifndef STORMM_PHASESPACE_SYNTHESIS_H
3#define STORMM_PHASESPACE_SYNTHESIS_H
4
5#include <typeinfo>
6#include <typeindex>
7#include <sys/types.h>
8#include "copyright.h"
9#include "Accelerator/gpu_details.h"
10#include "Accelerator/hybrid.h"
11#include "Accelerator/hybrid_util.h"
12#include "Constants/behavior.h"
13#include "Constants/fixed_precision.h"
14#include "DataTypes/common_types.h"
15#include "DataTypes/stormm_vector_types.h"
16#include "FileManagement/file_util.h"
17#include "Math/rounding.h"
18#include "Numerics/split_fixed_precision.h"
19#include "Topology/atomgraph.h"
20#include "Trajectory/coordinateframe.h"
21#include "Trajectory/coordinate_series.h"
22#include "Trajectory/phasespace.h"
23#include "Trajectory/trajectory_enumerators.h"
24
25namespace stormm {
26namespace synthesis {
27
28using card::default_hpc_format;
29using card::GpuDetails;
30using card::Hybrid;
31using card::HybridFormat;
32using card::HybridTargetLevel;
33using constants::CartesianDimension;
34using diskutil::PrintSituation;
35using stmath::roundUp;
36using numerics::default_globalpos_scale_bits;
37using numerics::default_localpos_scale_bits;
38using numerics::default_velocity_scale_bits;
39using numerics::default_force_scale_bits;
40using numerics::force_scale_nonoverflow_bits;
41using numerics::globalpos_scale_nonoverflow_bits;
42using numerics::velocity_scale_nonoverflow_bits;
43using topology::AtomGraph;
44using topology::UnitCellType;
45using trajectory::CoordinateCycle;
46using trajectory::CoordinateFileKind;
47using trajectory::CoordinateFrame;
48using trajectory::CoordinateFrameReader;
49using trajectory::CoordinateFrameWriter;
50using trajectory::CoordinateSeries;
51using trajectory::CoordinateSeriesReader;
52using trajectory::CoordinateSeriesWriter;
53using trajectory::PhaseSpace;
54using trajectory::PhaseSpaceReader;
55using trajectory::PhaseSpaceWriter;
56using trajectory::TrajectoryKind;
57
62
65 PsSynthesisBorders(int system_count_in, const int* atom_starts_in, const int* atom_counts_in,
66 const double* umat_in, const double* invu_in);
67
71 PsSynthesisBorders(const PsSynthesisBorders &original) = default;
72 PsSynthesisBorders(PsSynthesisBorders &&other) = default;
74
75 const int system_count;
77 const int* atom_starts;
78 const int* atom_counts;
79 const double* umat;
81 const double* invu;
83};
84
88
91 PsSynthesisWriter(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in,
92 const int* atom_starts_in, const int* atom_counts_in,
93 const int* common_ag_list_in, const int* common_ag_bounds_in,
94 const int* unique_ag_idx_in, const int* replica_idx_in, float gpos_scale_in,
95 float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in,
96 int frc_bits_in, llint* boxvecs_in, int* boxvec_ovrf_in, double* umat_in,
97 double* invu_in, double* boxdims_in, llint* alt_boxvecs_in,
98 int* alt_boxvec_ovrf_in, double* umat_alt_in, double* invu_alt_in,
99 double* alt_boxdims_in, llint* xcrd_in, llint* ycrd_in, llint* zcrd_in,
100 int* xcrd_ovrf_in, int* ycrd_ovrf_in, int* zcrd_ovrf_in, llint* xvel_in,
101 llint* yvel_in, llint* zvel_in, int* xvel_ovrf_in, int* yvel_ovrf_in,
102 int* zvel_ovrf_in, llint* xfrc_in, llint* yfrc_in, llint* zfrc_in,
103 int* xfrc_ovrf_in, int* yfrc_ovrf_in, int* zfrc_ovrf_in, llint* xalt_in,
104 llint* yalt_in, llint* zalt_in, int* xalt_ovrf_in, int* yalt_ovrf_in,
105 int* zalt_ovrf_in, llint* vxalt_in, llint* vyalt_in, llint* vzalt_in,
106 int* vxalt_ovrf_in, int* vyalt_ovrf_in, int* vzalt_ovrf_in, llint* fxalt_in,
107 llint* fyalt_in, llint* fzalt_in, int* fxalt_ovrf_in, int* fyalt_ovrf_in,
108 int* fzalt_ovrf_in);
109
113 PsSynthesisWriter(const PsSynthesisWriter &original) = default;
114 PsSynthesisWriter(PsSynthesisWriter &&other) = default;
116
117 // Even in the writer, some information may not be altered. This includes the simulation
118 // conditions, the number of systems, and the number of atoms in each system. The layout
119 // of the data must not be corrupted.
120 const int system_count;
122 const UnitCellType unit_cell;
123 const int* atom_starts;
124 const int* atom_counts;
125 const int* common_ag_list;
127 const int* common_ag_bounds;
128 const int* unique_ag_idx;
130 const int* replica_idx;
132
133 // Scaling factors: the PhaseSpaceSynthesis permits a customizable discretization of fixed-point
134 // arithmetic.
135 const float gpos_scale;
136 const float vel_scale;
137 const float frc_scale;
138 const float inv_gpos_scale;
139 const float inv_vel_scale;
140 const float inv_frc_scale;
141 const int gpos_bits;
142 const int vel_bits;
143 const int frc_bits;
144
145 // Pointers to the transformations and box vectors are mutable if the systems change volume.
146 llint* boxvecs;
148 double* umat;
149 double* invu;
150 double* boxdims;
151 llint* alt_boxvecs;
153 double* umat_alt;
154 double* invu_alt;
155 double* alt_boxdims;
156
157 // Pointers to the coordinate, velocity, and force data--these are mutable for accumulating
158 // forces and letting a trajectory evolve.
159 llint* xcrd;
160 llint* ycrd;
161 llint* zcrd;
165 llint* xvel;
166 llint* yvel;
167 llint* zvel;
171 llint* xfrc;
172 llint* yfrc;
173 llint* zfrc;
177 llint* xalt;
178 llint* yalt;
179 llint* zalt;
183 llint* vxalt;
184 llint* vyalt;
185 llint* vzalt;
189 llint* fxalt;
190 llint* fyalt;
191 llint* fzalt;
195};
196
200
206 PsSynthesisReader(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in,
207 const int* atom_starts_in, const int* atom_counts_in,
208 const int* common_ag_list_in, const int* common_ag_bounds_in,
209 const int* unique_ag_idx_in, const int* replica_idx_in, float gpos_scale_in,
210 float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in,
211 int frc_bits_in, const llint* boxvecs_in, const int* boxvec_ovrf_in,
212 const double* umat_in, const double* invu_in, const double* boxdims_in,
213 const llint* alt_boxvecs_in, const int* alt_boxvec_ovrf_in,
214 const double* umat_alt_in, const double* invu_alt_in,
215 const double* alt_boxdims_in, const llint* xcrd_in, const llint* ycrd_in,
216 const llint* zcrd_in, const int* xcrd_ovrf_in, const int* ycrd_ovrf_in,
217 const int* zcrd_ovrf_in, const llint* xvel_in, const llint* yvel_in,
218 const llint* zvel_in, const int* xvel_ovrf_in, const int* yvel_ovrf_in,
219 const int* zvel_ovrf_in, const llint* xfrc_in, const llint* yfrc_in,
220 const llint* zfrc_in, const int* xfrc_ovrf_in, const int* yfrc_ovrf_in,
221 const int* zfrc_ovrf_in, const llint* xalt_in, const llint* yalt_in,
222 const llint* zalt_in, const int* xalt_ovrf_in, const int* yalt_ovrf_in,
223 const int* zalt_ovrf_in, const llint* vxalt_in, const llint* vyalt_in,
224 const llint* vzalt_in, const int* vxalt_ovrf_in, const int* vyalt_ovrf_in,
225 const int* vzalt_ovrf_in, const llint* fxalt_in, const llint* fyalt_in,
226 const llint* fzalt_in, const int* fxalt_ovrf_in, const int* fyalt_ovrf_in,
227 const int* fzalt_ovrf_in);
228
229 PsSynthesisReader(const PsSynthesisWriter *psyw);
230
231 PsSynthesisReader(const PsSynthesisWriter &psyw);
233
237 PsSynthesisReader(const PsSynthesisReader &original) = default;
238 PsSynthesisReader(PsSynthesisReader &&other) = default;
240
241 // System sizing information
242 const int system_count;
244 const UnitCellType unit_cell;
245 const int* atom_starts;
246 const int* atom_counts;
247 const int* common_ag_list;
249 const int* common_ag_bounds;
250 const int* unique_ag_idx;
252 const int* replica_idx;
254
255 // Scaling factors: the PhaseSpaceSynthesis permits a customizable discretization of fixed-point
256 // arithmetic.
257 const float gpos_scale;
258 const float vel_scale;
259 const float frc_scale;
260 const float inv_gpos_scale;
261 const float inv_vel_scale;
262 const float inv_frc_scale;
263 const int gpos_bits;
264 const int vel_bits;
265 const int frc_bits;
266
267 // Pointers to the transformations and box vectors are likewise const--once created, this
268 // object is valid for a system held in constant volume.
269 const llint* boxvecs;
270 const int* boxvec_ovrf;
271 const double* umat;
272 const double* invu;
273 const double* boxdims;
274 const llint* alt_boxvecs;
275 const int* alt_boxvec_ovrf;
276 const double* umat_alt;
277 const double* invu_alt;
278 const double* alt_boxdims;
279
280 // Pointers to the coordinate, velocity, and force data--these are mutable for accumulating
281 // forces and letting a trajectory evolve.
282 const llint* xcrd;
283 const llint* ycrd;
284 const llint* zcrd;
285 const int* xcrd_ovrf;
286 const int* ycrd_ovrf;
287 const int* zcrd_ovrf;
288 const llint* xvel;
289 const llint* yvel;
290 const llint* zvel;
291 const int* xvel_ovrf;
292 const int* yvel_ovrf;
293 const int* zvel_ovrf;
294 const llint* xfrc;
295 const llint* yfrc;
296 const llint* zfrc;
297 const int* xfrc_ovrf;
298 const int* yfrc_ovrf;
299 const int* zfrc_ovrf;
300 const llint* xalt;
301 const llint* yalt;
302 const llint* zalt;
303 const int* xalt_ovrf;
304 const int* yalt_ovrf;
305 const int* zalt_ovrf;
306 const llint* vxalt;
307 const llint* vyalt;
308 const llint* vzalt;
309 const int* vxalt_ovrf;
310 const int* vyalt_ovrf;
311 const int* vzalt_ovrf;
312 const llint* fxalt;
313 const llint* fyalt;
314 const llint* fzalt;
315 const int* fxalt_ovrf;
316 const int* fyalt_ovrf;
317 const int* fzalt_ovrf;
318};
319
326public:
327
348 PhaseSpaceSynthesis(const std::vector<PhaseSpace> &ps_list,
349 const std::vector<AtomGraph*> &ag_list,
350 int globalpos_scale_bits_in = default_globalpos_scale_bits,
351 int localpos_scale_bits_in = default_localpos_scale_bits,
352 int velocity_scale_bits_in = default_velocity_scale_bits,
353 int force_scale_bits_in = default_force_scale_bits,
354 HybridFormat format_in = default_hpc_format,
355 const GpuDetails &gpu = null_gpu);
356
357 PhaseSpaceSynthesis(const std::vector<PhaseSpace> &ps_list,
358 const std::vector<AtomGraph*> &ag_list,
359 const std::vector<int> &index_key,
360 int globalpos_scale_bits_in = default_globalpos_scale_bits,
361 int localpos_scale_bits_in = default_localpos_scale_bits,
362 int velocity_scale_bits_in = default_velocity_scale_bits,
363 int force_scale_bits_in = default_force_scale_bits,
364 HybridFormat format_in = default_hpc_format,
365 const GpuDetails &gpu = null_gpu);
366
367 PhaseSpaceSynthesis(const std::vector<PhaseSpace> &ps_list, const std::vector<int> &ps_index_key,
368 const std::vector<AtomGraph*> &ag_list, const std::vector<int> &ag_index_key,
369 int globalpos_scale_bits_in = default_globalpos_scale_bits,
370 int localpos_scale_bits_in = default_localpos_scale_bits,
371 int velocity_scale_bits_in = default_velocity_scale_bits,
372 int force_scale_bits_in = default_force_scale_bits,
373 HybridFormat format_in = default_hpc_format,
374 const GpuDetails &gpu = null_gpu);
376
385 PhaseSpaceSynthesis(const PhaseSpaceSynthesis &original, HybridFormat format_in);
388
396
398 HybridFormat getFormat() const;
399
401 int getSystemCount() const;
402
404 int getUniqueTopologyCount() const;
405
407 UnitCellType getUnitCellType() const;
408
410 CoordinateCycle getCyclePosition() const;
411
413 int getGlobalPositionBits() const;
414
416 int getLocalPositionBits() const;
417
419 int getVelocityBits() const;
420
422 int getForceAccumulationBits() const;
423
425 float getForceScalingFactor() const;
426
428 float getInverseForceScalingFactor() const;
429
438 const AtomGraph* getSystemTopologyPointer(int system_index) const;
439 const std::vector<AtomGraph*>& getSystemTopologyPointer() const;
441
444 const std::vector<AtomGraph*>& getUniqueTopologies() const;
445
449 int getAtomOffset(int system_index) const;
450
454 int getAtomCount(int system_index) const;
455
458 int getPaddedAtomCount() const;
459
463 int getUniqueTopologyIndex(int system_index) const;
464
466 std::vector<int> getUniqueTopologyIndices() const;
467
471 std::vector<int> getUniqueTopologyExampleIndices() const;
472
476 int getTopologyInstanceCount(int topology_index) const;
477
483 std::vector<int> getSystemIndicesByTopology(int topology_index) const;
484
498 const Hybrid<llint>* getCoordinateHandle(CartesianDimension dim, TrajectoryKind kind,
499 CoordinateCycle orientation) const;
500
501 const Hybrid<llint>* getCoordinateHandle(CartesianDimension dim,
502 TrajectoryKind kind = TrajectoryKind::POSITIONS) const;
503
504 Hybrid<llint>* getCoordinateHandle(CartesianDimension dim, TrajectoryKind kind,
505 CoordinateCycle orientation);
506
507 Hybrid<llint>* getCoordinateHandle(CartesianDimension dim,
508 TrajectoryKind kind = TrajectoryKind::POSITIONS);
510
515 const Hybrid<int>* getCoordinateOverflowHandle(CartesianDimension dim, TrajectoryKind kind,
516 CoordinateCycle orientation) const;
517
518 const Hybrid<int>*
519 getCoordinateOverflowHandle(CartesianDimension dim,
520 TrajectoryKind kind = TrajectoryKind::POSITIONS) const;
521
522 Hybrid<int>* getCoordinateOverflowHandle(CartesianDimension dim, TrajectoryKind kind,
523 CoordinateCycle orientation);
524
525 Hybrid<int>* getCoordinateOverflowHandle(CartesianDimension dim,
526 TrajectoryKind kind = TrajectoryKind::POSITIONS);
528
532 const Hybrid<double>* getBoxTransformsHandle(CoordinateCycle orientation) const;
534 Hybrid<double>* getBoxTransformsHandle(CoordinateCycle orientation);
537
542 const Hybrid<double>* getInverseTransformsHandle(CoordinateCycle orientation) const;
544 Hybrid<double>* getInverseTransformsHandle(CoordinateCycle orientation);
547
552 const Hybrid<double>* getBoxDimensionsHandle(CoordinateCycle orientation) const;
554 Hybrid<double>* getBoxDimensionsHandle(CoordinateCycle orientation);
557
561 const Hybrid<llint>* getBoxVectorsHandle(CoordinateCycle orientation) const;
562 const Hybrid<llint>* getBoxVectorsHandle() const;
563 Hybrid<llint>* getBoxVectorsHandle(CoordinateCycle orientation);
566
570 const Hybrid<int>* getBoxVectorsOverflowHandle(CoordinateCycle orientation) const;
572 Hybrid<int>* getBoxVectorsOverflowHandle(CoordinateCycle orientation);
575
577 const PhaseSpaceSynthesis* getSelfPointer() const;
578
589 const PsSynthesisReader data(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
590 const PsSynthesisReader data(CoordinateCycle orientation,
591 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
592 PsSynthesisWriter data(HybridTargetLevel tier = HybridTargetLevel::HOST);
593 PsSynthesisWriter data(CoordinateCycle orientation,
594 HybridTargetLevel tier = HybridTargetLevel::HOST);
596
607 const PsSynthesisBorders borders(CoordinateCycle orientation,
608 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
609 const PsSynthesisBorders borders(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
611
612#ifdef STORMM_USE_HPC
630 const PsSynthesisReader deviceViewToHostData(CoordinateCycle orientation) const;
631 const PsSynthesisReader deviceViewToHostData() const;
632 PsSynthesisWriter deviceViewToHostData(CoordinateCycle orientation);
633 PsSynthesisWriter deviceViewToHostData();
635
649 void upload();
650 void upload(TrajectoryKind kind);
651 void upload(TrajectoryKind kind, int system_index, const GpuDetails &gpu);
652 void upload(TrajectoryKind kind, int system_lower_bound, int system_upper_bound,
653 const GpuDetails &gpu);
655
669 void download();
670 void download(TrajectoryKind kind);
671 void download(TrajectoryKind kind, int system_index, const GpuDetails &gpu);
672 void download(TrajectoryKind kind, int system_lower_bound, int system_upper_bound,
673 const GpuDetails &gpu);
675#endif
676
688 void extractSystem(PhaseSpace *ps, int index,
689 HybridTargetLevel origin = HybridTargetLevel::HOST,
690 HybridTargetLevel destination = HybridTargetLevel::HOST,
691 const GpuDetails &gpu = null_gpu) const;
693
698 PhaseSpace exportSystem(int index, HybridTargetLevel tier = HybridTargetLevel::HOST) const;
699
716 CoordinateFrame exportCoordinates(int index, CoordinateCycle orientation,
717 HybridFormat format_out,
718 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
719 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
720
721 CoordinateFrame exportCoordinates(int index, CoordinateCycle orientation,
722 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
723 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
724
725 CoordinateFrame exportCoordinates(int index, HybridFormat format_out,
726 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
727 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
728
729 CoordinateFrame exportCoordinates(int index, TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
730 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
732
747 std::vector<double>
748 getInterlacedCoordinates(int index, CoordinateCycle orientation,
749 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
750 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
751
752 std::vector<double>
753 getInterlacedCoordinates(int index, TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
754 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
756
767 void updateCyclePosition();
768 void updateCyclePosition(CoordinateCycle time_point);
770
786#ifdef STORMM_USE_HPC
787 void initializeForces(CoordinateCycle orientation, const GpuDetails &gpu = null_gpu,
788 HybridTargetLevel tier = HybridTargetLevel::HOST, int index = -1);
789 void initializeForces(const GpuDetails &gpu = null_gpu,
790 HybridTargetLevel tier = HybridTargetLevel::HOST, int index = -1);
791#else
792 void initializeForces(CoordinateCycle orientation, int index = -1);
793 void initializeForces(int index = -1);
794#endif
796
804#ifdef STORMM_USE_HPC
805 void primeConjugateGradientCalculation(const GpuDetails &gpu,
806 HybridTargetLevel tier = HybridTargetLevel::HOST);
807#else
809#endif
810
819 void printTrajectory(const std::vector<int> &system_indices, const std::string &file_name,
820 double current_time, CoordinateFileKind output_kind,
821 PrintSituation expectation) const;
822
874 void importSystem(const PhaseSpaceReader &psr, int system_index, CoordinateCycle orientation,
875 HybridTargetLevel tier = HybridTargetLevel::HOST);
876
877 void importSystem(const PhaseSpaceReader &psr, int system_index,
878 HybridTargetLevel tier = HybridTargetLevel::HOST);
879
880 void importSystem(const PhaseSpaceWriter &psw, int system_index, CoordinateCycle orientation,
881 HybridTargetLevel tier = HybridTargetLevel::HOST);
882
883 void importSystem(const PhaseSpaceWriter &psw, int system_index,
884 HybridTargetLevel tier = HybridTargetLevel::HOST);
885
886 void importSystem(const PhaseSpace &ps, int system_index, CoordinateCycle orientation,
887 HybridTargetLevel tier = HybridTargetLevel::HOST);
888
889 void importSystem(const PhaseSpace &ps, int system_index,
890 HybridTargetLevel tier = HybridTargetLevel::HOST);
891
892 void importSystem(const CoordinateFrameReader &cfr, int system_index,
893 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
894 HybridTargetLevel tier = HybridTargetLevel::HOST);
895
896 void importSystem(const CoordinateFrameReader &cfr, int system_index,
897 TrajectoryKind kind = TrajectoryKind::POSITIONS,
898 HybridTargetLevel tier = HybridTargetLevel::HOST);
899
900 void importSystem(const CoordinateFrameWriter &cfw, int system_index,
901 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
902 HybridTargetLevel tier = HybridTargetLevel::HOST);
903
904 void importSystem(const CoordinateFrameWriter &cfw, int system_index,
905 TrajectoryKind kind = TrajectoryKind::POSITIONS,
906 HybridTargetLevel tier = HybridTargetLevel::HOST);
907
908 void importSystem(const CoordinateFrame &cf, int system_index, CoordinateCycle orientation,
909 TrajectoryKind kind = TrajectoryKind::POSITIONS,
910 HybridTargetLevel tier = HybridTargetLevel::HOST);
911
912 void importSystem(const CoordinateFrame &cf, int system_index,
913 TrajectoryKind kind = TrajectoryKind::POSITIONS,
914 HybridTargetLevel tier = HybridTargetLevel::HOST);
915
916 template <typename T>
917 void importSystem(const T* x_import, const T* y_import, const T* z_import,
918 const double* box_xform_in, const double* inverse_xform_in,
919 const double* box_dimensions_in, int system_index,
920 CoordinateCycle orientation, double inverse_scaling_factor = 1.0,
921 TrajectoryKind kind = TrajectoryKind::POSITIONS,
922 HybridTargetLevel tier = HybridTargetLevel::HOST);
923
924 template <typename T>
925 void importSystem(const CoordinateSeriesReader<T> &csr, int frame_index, int system_index,
926 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
927 HybridTargetLevel tier = HybridTargetLevel::HOST);
928
929 template <typename T>
930 void importSystem(const CoordinateSeriesReader<T> &csr, int frame_index, int system_index,
931 TrajectoryKind kind = TrajectoryKind::POSITIONS,
932 HybridTargetLevel tier = HybridTargetLevel::HOST);
933
934 template <typename T>
935 void importSystem(const CoordinateSeriesWriter<T> &csw, int frame_index, int system_index,
936 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
937 HybridTargetLevel tier = HybridTargetLevel::HOST);
938
939 template <typename T>
940 void importSystem(const CoordinateSeriesWriter<T> &csw, int frame_index, int system_index,
941 TrajectoryKind kind = TrajectoryKind::POSITIONS,
942 HybridTargetLevel tier = HybridTargetLevel::HOST);
943
944 template <typename T>
945 void importSystem(const CoordinateSeries<T> &cs, int frame_index, int system_index,
946 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
947 HybridTargetLevel tier = HybridTargetLevel::HOST);
948
949 template <typename T>
950 void importSystem(const CoordinateSeries<T> &cs, int frame_index, int system_index,
951 TrajectoryKind kind = TrajectoryKind::POSITIONS,
952 HybridTargetLevel tier = HybridTargetLevel::HOST);
954
955private:
956 HybridFormat format;
958 int system_count;
959 int unique_topology_count;
960 UnitCellType unit_cell;
964 CoordinateCycle cycle_position;
966
967 // Scaling constants for fixed-precision coordinates (position, velocity) and also forces
968 // in this PhaseSpaceSynthesis apply identically to all systems
969 double globalpos_scale;
970 double localpos_scale;
971 double velocity_scale;
972 double force_scale;
973 double inverse_globalpos_scale;
974 double inverse_localpos_scale;
975 double inverse_velocity_scale;
976 double inverse_force_scale;
977 int globalpos_scale_bits;
978 int localpos_scale_bits;
979 int velocity_scale_bits;
980 int force_scale_bits;
981
985 Hybrid<int> atom_starts;
986
988 Hybrid<int> atom_counts;
989
993 Hybrid<int> shared_topology_instances;
994
996 Hybrid<int> shared_topology_instance_bounds;
997
1000 Hybrid<int> unique_topology_reference;
1001
1005 Hybrid<int> shared_topology_instance_index;
1006
1007 // These variables are POINTER-kind Hybrid objects targeting the llint_data and int_data arrays
1008 Hybrid<llint> x_coordinates;
1009 Hybrid<llint> y_coordinates;
1010 Hybrid<llint> z_coordinates;
1011 Hybrid<int> x_coordinate_overflow;
1012 Hybrid<int> y_coordinate_overflow;
1013 Hybrid<int> z_coordinate_overflow;
1014 Hybrid<llint> x_alt_coordinates;
1015 Hybrid<llint> y_alt_coordinates;
1016 Hybrid<llint> z_alt_coordinates;
1017 Hybrid<int> x_alt_coord_overflow;
1018 Hybrid<int> y_alt_coord_overflow;
1019 Hybrid<int> z_alt_coord_overflow;
1020 Hybrid<llint> x_velocities;
1021 Hybrid<llint> y_velocities;
1022 Hybrid<llint> z_velocities;
1023 Hybrid<int> x_velocity_overflow;
1024 Hybrid<int> y_velocity_overflow;
1025 Hybrid<int> z_velocity_overflow;
1026 Hybrid<llint> x_alt_velocities;
1027 Hybrid<llint> y_alt_velocities;
1028 Hybrid<llint> z_alt_velocities;
1029 Hybrid<int> x_alt_velocity_overflow;
1030 Hybrid<int> y_alt_velocity_overflow;
1031 Hybrid<int> z_alt_velocity_overflow;
1032 Hybrid<llint> x_forces;
1033 Hybrid<llint> y_forces;
1034 Hybrid<llint> z_forces;
1035 Hybrid<int> x_force_overflow;
1036 Hybrid<int> y_force_overflow;
1037 Hybrid<int> z_force_overflow;
1038 Hybrid<llint> x_alt_forces;
1040 Hybrid<llint> y_alt_forces;
1041 Hybrid<llint> z_alt_forces;
1042 Hybrid<int> x_alt_force_overflow;
1043 Hybrid<int> y_alt_force_overflow;
1044 Hybrid<int> z_alt_force_overflow;
1045 Hybrid<llint> box_vectors;
1050 Hybrid<int> box_vector_overflow;
1054 Hybrid<llint> alt_box_vectors;
1056 Hybrid<int> alt_box_vector_overflow;
1057
1058 // The following are POINTER-kind Hybrid objects targeting the floating point data arrays
1059 Hybrid<double> box_space_transforms;
1061 Hybrid<double> inverse_transforms;
1062 Hybrid<double> box_dimensions;
1067 Hybrid<double> alt_box_transforms;
1070 Hybrid<double> alt_inverse_transforms;
1072 Hybrid<double> alt_box_dimensions;
1074
1075 // Data arrays
1076 Hybrid<int> int_data;
1078 Hybrid<llint> llint_data;
1079 Hybrid<double> double_data;
1089
1091 std::vector<AtomGraph*> topologies;
1092
1094 std::vector<AtomGraph*> unique_topologies;
1095
1100 void allocate(size_t atom_stride);
1101
1106 void loadHostCoordinates(const PhaseSpace &input_ps, int sysno);
1107
1108#ifdef STORMM_USE_HPC
1118 void loadXPciCoordinates(PsSynthesisWriter *poly_psw, int sys_idx, const PhaseSpaceReader &psr,
1119 const GpuDetails &gpu);
1120
1130 void extractSystem(PhaseSpaceWriter *psw, int index, const GpuDetails &gpu,
1131 HybridTargetLevel origin = HybridTargetLevel::DEVICE) const;
1132#endif
1133
1138 void validateSystemIndex(int index, const char* caller = nullptr) const;
1139};
1140
1142static const size_t phasespace_synthesis_type_index =
1143 std::type_index(typeid(PhaseSpaceSynthesis)).hash_code();
1144
1145} // namespace trajectory
1146} // namespace stormm
1147
1148#include "phasespace_synthesis.tpp"
1149
1150// As with common types and STORMM vector types, define the type indices for general use in the
1151// STORMM namespace.
1152namespace stormm {
1153using synthesis::phasespace_synthesis_type_index;
1154} // namespace stormm
1155
1156#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
const Hybrid< int > * getBoxVectorsOverflowHandle(CoordinateCycle orientation) const
Get a pointer to the box space transforms. Overloading and description of the optional input paramete...
Definition phasespace_synthesis.cpp:1827
const Hybrid< double > * getBoxTransformsHandle(CoordinateCycle orientation) const
Get a pointer to the box space transforms. Overloading and description of the optional input paramete...
Definition phasespace_synthesis.cpp:1694
const Hybrid< llint > * getBoxVectorsHandle(CoordinateCycle orientation) const
Get a pointer to the box space transforms. Overloading and description of the optional input paramete...
Definition phasespace_synthesis.cpp:1794
const Hybrid< double > * getInverseTransformsHandle(CoordinateCycle orientation) const
Get a pointer to the inverse transform that takes coordinates back into real space....
Definition phasespace_synthesis.cpp:1727
PhaseSpaceSynthesis(const std::vector< PhaseSpace > &ps_list, const std::vector< AtomGraph * > &ag_list, int globalpos_scale_bits_in=default_globalpos_scale_bits, int localpos_scale_bits_in=default_localpos_scale_bits, int velocity_scale_bits_in=default_velocity_scale_bits, int force_scale_bits_in=default_force_scale_bits, HybridFormat format_in=default_hpc_format, const GpuDetails &gpu=null_gpu)
The constructor works from a series PhaseSpace object, importing The LabFrame is not a POINTER-kind o...
Definition phasespace_synthesis.cpp:249
const Hybrid< double > * getBoxDimensionsHandle(CoordinateCycle orientation) const
Get a pointer to the transform that takes coordinates back into real space. Overloading and descripti...
Definition phasespace_synthesis.cpp:1761
const AtomGraph * getSystemTopologyPointer(int system_index) const
Get the topology pointer for a particular system within the synthesis.
Definition phasespace_synthesis.cpp:1212
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
void importSystem(const PhaseSpaceReader &psr, int system_index, CoordinateCycle orientation, HybridTargetLevel tier=HybridTargetLevel::HOST)
Import a system from one of the other coordinate objects, or from a series of C-style arrays with tru...
Definition phasespace_synthesis.cpp:3410
PhaseSpace exportSystem(int index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Export a system's coordinates, velocities, and forces to a PhaseSpace object.
Definition phasespace_synthesis.cpp:2472
float getForceScalingFactor() const
Get the force scaling factor used in fixed-precision accumulation.
Definition phasespace_synthesis.cpp:1202
CoordinateFrame exportCoordinates(int index, CoordinateCycle orientation, HybridFormat format_out, TrajectoryKind trajkind=TrajectoryKind::POSITIONS, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Export a system's coordinates, velocities, or forces to a compact CoordinateFrame object.
Definition phasespace_synthesis.cpp:2483
int getAtomCount(int system_index) const
Get the number of atoms in one of the systems, using its index.
Definition phasespace_synthesis.cpp:1233
void primeConjugateGradientCalculation()
Set the alternate positions to the current forces, and initialize velocities to zero,...
Definition phasespace_synthesis.cpp:3139
PhaseSpaceSynthesis & operator=(const PhaseSpaceSynthesis &other)
Copy and move assignment operators must also be explicitly written out.
Definition phasespace_synthesis.cpp:976
std::vector< int > getUniqueTopologyIndices() const
Get the unique topology index of all systems in the synthesis.
Definition phasespace_synthesis.cpp:1250
int getForceAccumulationBits() const
Get the force accumulation bit count.
Definition phasespace_synthesis.cpp:1197
float getInverseForceScalingFactor() const
Get the inverse of the force scaling factor used in fixed-precision accumulation.
Definition phasespace_synthesis.cpp:1207
HybridFormat getFormat() const
Get the memory format of the object.
Definition phasespace_synthesis.cpp:1157
CoordinateCycle getCyclePosition() const
Get the current position in the coordinate cycle.
Definition phasespace_synthesis.cpp:1177
const std::vector< AtomGraph * > & getUniqueTopologies() const
Get a list of unique topology pointers from this coordinate synthesis, const-casted for accessibility...
Definition phasespace_synthesis.cpp:1223
int getSystemCount() const
Get the number of systems in the object.
Definition phasespace_synthesis.cpp:1162
const Hybrid< llint > * getCoordinateHandle(CartesianDimension dim, TrajectoryKind kind, CoordinateCycle orientation) const
Get a pointer to one of the Hybrid objects holding system coordinates. If the synthesis uses extended...
Definition phasespace_synthesis.cpp:1294
int getGlobalPositionBits() const
Get the global position scaling bit count.
Definition phasespace_synthesis.cpp:1182
UnitCellType getUnitCellType() const
Get the unit cell type.
Definition phasespace_synthesis.cpp:1172
const PsSynthesisBorders borders(CoordinateCycle orientation, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the read-only summary of the system sizes. The data is never needed in as a collection of device ...
Definition phasespace_synthesis.cpp:2022
std::vector< int > getSystemIndicesByTopology(int topology_index) const
Get a list of system indices which all reference the same unique topology (the unique topology index ...
Definition phasespace_synthesis.cpp:1276
int getAtomOffset(int system_index) const
Get the starting index of atoms for one of the systems, using its index.
Definition phasespace_synthesis.cpp:1228
int getPaddedAtomCount() const
Get the total number of atoms across all systems in the synthesis, including padding between systems ...
Definition phasespace_synthesis.cpp:1238
void updateCyclePosition()
Modify the object's cycle position, as in the course of propagating dynamics.
Definition phasespace_synthesis.cpp:3020
std::vector< double > getInterlacedCoordinates(int index, CoordinateCycle orientation, TrajectoryKind trajkind=TrajectoryKind::POSITIONS, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the interlaced X, Y, and Z coordinates of one system in particular. The result is comparable to t...
Definition phasespace_synthesis.cpp:2786
int getTopologyInstanceCount(int topology_index) const
Get the number of systems that make use of a particular topology.
Definition phasespace_synthesis.cpp:1265
const PsSynthesisReader data(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the reader or writer, as appropriate based on the const-ness of this object.
Definition phasespace_synthesis.cpp:1864
void initializeForces(CoordinateCycle orientation, int index=-1)
Initialize the forces within a PhaseSpaceSynthesis object. This is the analog of the eponymous functi...
Definition phasespace_synthesis.cpp:3042
const Hybrid< int > * getCoordinateOverflowHandle(CartesianDimension dim, TrajectoryKind kind, CoordinateCycle orientation) const
Get a pointer to one of the Hybrid objects holding system coordinates. Overloading and descriptions o...
Definition phasespace_synthesis.cpp:1494
PhaseSpaceSynthesis(const std::vector< PhaseSpace > &ps_list, const std::vector< AtomGraph * > &ag_list, int globalpos_scale_bits_in=default_globalpos_scale_bits, int localpos_scale_bits_in=default_localpos_scale_bits, int velocity_scale_bits_in=default_velocity_scale_bits, int force_scale_bits_in=default_force_scale_bits, HybridFormat format_in=default_hpc_format, const GpuDetails &gpu=null_gpu)
The constructor works from a series PhaseSpace object, importing The LabFrame is not a POINTER-kind o...
Definition phasespace_synthesis.cpp:249
std::vector< int > getUniqueTopologyExampleIndices() const
Get a list of system indices from within this coordinate synthesis, providing examples of each unique...
Definition phasespace_synthesis.cpp:1255
int getUniqueTopologyIndex(int system_index) const
Get the index of the unique topology used by a particular system in the synthesis.
Definition phasespace_synthesis.cpp:1245
int getVelocityBits() const
Get the velocity scaling bit count.
Definition phasespace_synthesis.cpp:1192
void extractSystem(PhaseSpace *ps, int index, HybridTargetLevel origin=HybridTargetLevel::HOST, HybridTargetLevel destination=HybridTargetLevel::HOST, const GpuDetails &gpu=null_gpu) const
Extract the phase space (plus forces) of a specific system within the synthesis.
Definition phasespace_synthesis.cpp:2388
int getLocalPositionBits() const
Get the local position scaling bit count.
Definition phasespace_synthesis.cpp:1187
void printTrajectory(const std::vector< int > &system_indices, const std::string &file_name, double current_time, CoordinateFileKind output_kind, PrintSituation expectation) const
Print a list of structures to a trajectory file. Download will be performed when calling this functio...
Definition phasespace_synthesis.cpp:3201
const PhaseSpaceSynthesis * getSelfPointer() const
Get a const pointer to the object itself.
Definition phasespace_synthesis.cpp:1859
int getUniqueTopologyCount() const
Get the number of unique topologies in the object.
Definition phasespace_synthesis.cpp:1167
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
PsSynthesisReader(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in, const int *atom_starts_in, const int *atom_counts_in, const int *common_ag_list_in, const int *common_ag_bounds_in, const int *unique_ag_idx_in, const int *replica_idx_in, float gpos_scale_in, float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in, int frc_bits_in, const llint *boxvecs_in, const int *boxvec_ovrf_in, const double *umat_in, const double *invu_in, const double *boxdims_in, const llint *alt_boxvecs_in, const int *alt_boxvec_ovrf_in, const double *umat_alt_in, const double *invu_alt_in, const double *alt_boxdims_in, const llint *xcrd_in, const llint *ycrd_in, const llint *zcrd_in, const int *xcrd_ovrf_in, const int *ycrd_ovrf_in, const int *zcrd_ovrf_in, const llint *xvel_in, const llint *yvel_in, const llint *zvel_in, const int *xvel_ovrf_in, const int *yvel_ovrf_in, const int *zvel_ovrf_in, const llint *xfrc_in, const llint *yfrc_in, const llint *zfrc_in, const int *xfrc_ovrf_in, const int *yfrc_ovrf_in, const int *zfrc_ovrf_in, const llint *xalt_in, const llint *yalt_in, const llint *zalt_in, const int *xalt_ovrf_in, const int *yalt_ovrf_in, const int *zalt_ovrf_in, const llint *vxalt_in, const llint *vyalt_in, const llint *vzalt_in, const int *vxalt_ovrf_in, const int *vyalt_ovrf_in, const int *vzalt_ovrf_in, const llint *fxalt_in, const llint *fyalt_in, const llint *fzalt_in, const int *fxalt_ovrf_in, const int *fyalt_ovrf_in, const int *fzalt_ovrf_in)
The constructor can take lists of pointers and constants from the parent object (in this case,...
Definition phasespace_synthesis.cpp:107
PsSynthesisBorders(int system_count_in, const int *atom_starts_in, const int *atom_counts_in, const double *umat_in, const double *invu_in)
The constructor accepts the total number of systems as well as pointers to the number of atoms and st...
Definition phasespace_synthesis.cpp:52
PsSynthesisWriter(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in, const int *atom_starts_in, const int *atom_counts_in, const int *common_ag_list_in, const int *common_ag_bounds_in, const int *unique_ag_idx_in, const int *replica_idx_in, float gpos_scale_in, float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in, int frc_bits_in, llint *boxvecs_in, int *boxvec_ovrf_in, double *umat_in, double *invu_in, double *boxdims_in, llint *alt_boxvecs_in, int *alt_boxvec_ovrf_in, double *umat_alt_in, double *invu_alt_in, double *alt_boxdims_in, llint *xcrd_in, llint *ycrd_in, llint *zcrd_in, int *xcrd_ovrf_in, int *ycrd_ovrf_in, int *zcrd_ovrf_in, llint *xvel_in, llint *yvel_in, llint *zvel_in, int *xvel_ovrf_in, int *yvel_ovrf_in, int *zvel_ovrf_in, llint *xfrc_in, llint *yfrc_in, llint *zfrc_in, int *xfrc_ovrf_in, int *yfrc_ovrf_in, int *zfrc_ovrf_in, llint *xalt_in, llint *yalt_in, llint *zalt_in, int *xalt_ovrf_in, int *yalt_ovrf_in, int *zalt_ovrf_in, llint *vxalt_in, llint *vyalt_in, llint *vzalt_in, int *vxalt_ovrf_in, int *vyalt_ovrf_in, int *vzalt_ovrf_in, llint *fxalt_in, llint *fyalt_in, llint *fzalt_in, int *fxalt_ovrf_in, int *fyalt_ovrf_in, int *fzalt_ovrf_in)
Constructor takes a straight list of pointers and constants from the parent object (in this case,...
Definition phasespace_synthesis.cpp:60
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
const double * invu
Definition phasespace_synthesis.h:81
const int system_count
Definition phasespace_synthesis.h:75
const double * umat
Definition phasespace_synthesis.h:79
PsSynthesisBorders(const PsSynthesisBorders &original)=default
Copy and move constructors–as with any object containing const members, the move assignment operator ...
const int * atom_counts
Atom counts for each system.
Definition phasespace_synthesis.h:78
PsSynthesisBorders(int system_count_in, const int *atom_starts_in, const int *atom_counts_in, const double *umat_in, const double *invu_in)
The constructor accepts the total number of systems as well as pointers to the number of atoms and st...
Definition phasespace_synthesis.cpp:52
const int * atom_starts
Starting indices for the atoms of each system.
Definition phasespace_synthesis.h:77
The reader for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:199
const int * yalt_ovrf
Overflow buffers for particles' alternate Cartesian Y locations.
Definition phasespace_synthesis.h:304
const float vel_scale
Velocity coordinate scaling factor.
Definition phasespace_synthesis.h:258
const int * alt_boxvec_ovrf
Overflow arrays for the discretized box vectors.
Definition phasespace_synthesis.h:275
const int * replica_idx
Definition phasespace_synthesis.h:252
const int * fyalt_ovrf
Overflow buffers for particles' alternate Cartesian Y forces.
Definition phasespace_synthesis.h:316
const int * zfrc_ovrf
Discretized Cartesian Z force overflow buffers.
Definition phasespace_synthesis.h:299
const float frc_scale
Scaling factor for fixed-precision force accumulation.
Definition phasespace_synthesis.h:259
const float gpos_scale
Global position coordinate scaling factor.
Definition phasespace_synthesis.h:257
const llint * zfrc
Discretized Cartesian Z forces.
Definition phasespace_synthesis.h:296
const llint * vyalt
Alternate Cartesian Y velocities of particles.
Definition phasespace_synthesis.h:307
const llint * fzalt
Alternate Cartesian Z forces acting on all particles.
Definition phasespace_synthesis.h:314
const llint * xvel
Cartesian X velocities.
Definition phasespace_synthesis.h:288
const llint * fyalt
Alternate Cartesian Y forces acting on all particles.
Definition phasespace_synthesis.h:313
PsSynthesisReader(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in, const int *atom_starts_in, const int *atom_counts_in, const int *common_ag_list_in, const int *common_ag_bounds_in, const int *unique_ag_idx_in, const int *replica_idx_in, float gpos_scale_in, float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in, int frc_bits_in, const llint *boxvecs_in, const int *boxvec_ovrf_in, const double *umat_in, const double *invu_in, const double *boxdims_in, const llint *alt_boxvecs_in, const int *alt_boxvec_ovrf_in, const double *umat_alt_in, const double *invu_alt_in, const double *alt_boxdims_in, const llint *xcrd_in, const llint *ycrd_in, const llint *zcrd_in, const int *xcrd_ovrf_in, const int *ycrd_ovrf_in, const int *zcrd_ovrf_in, const llint *xvel_in, const llint *yvel_in, const llint *zvel_in, const int *xvel_ovrf_in, const int *yvel_ovrf_in, const int *zvel_ovrf_in, const llint *xfrc_in, const llint *yfrc_in, const llint *zfrc_in, const int *xfrc_ovrf_in, const int *yfrc_ovrf_in, const int *zfrc_ovrf_in, const llint *xalt_in, const llint *yalt_in, const llint *zalt_in, const int *xalt_ovrf_in, const int *yalt_ovrf_in, const int *zalt_ovrf_in, const llint *vxalt_in, const llint *vyalt_in, const llint *vzalt_in, const int *vxalt_ovrf_in, const int *vyalt_ovrf_in, const int *vzalt_ovrf_in, const llint *fxalt_in, const llint *fyalt_in, const llint *fzalt_in, const int *fxalt_ovrf_in, const int *fyalt_ovrf_in, const int *fzalt_ovrf_in)
The constructor can take lists of pointers and constants from the parent object (in this case,...
Definition phasespace_synthesis.cpp:107
const int gpos_bits
Global position coordinate bits after the decimal.
Definition phasespace_synthesis.h:263
const int * yfrc_ovrf
Discretized Cartesian Y force overflow buffers.
Definition phasespace_synthesis.h:298
const double * umat_alt
Box (fractional) space transformation matrices, one per warp.
Definition phasespace_synthesis.h:276
const int * vxalt_ovrf
Overflow buffers for particles' alternate Cartesian X velocities.
Definition phasespace_synthesis.h:309
const int * fzalt_ovrf
Overflow buffers for particles' alternate Cartesian Z forces.
Definition phasespace_synthesis.h:317
const int * boxvec_ovrf
Overflow arrays for the discretized box vectors.
Definition phasespace_synthesis.h:270
const int * vyalt_ovrf
Overflow buffers for particles' alternate Cartesian Y velocities.
Definition phasespace_synthesis.h:310
const double * invu
Inverse transformation matrices, one per warp.
Definition phasespace_synthesis.h:272
const int * xfrc_ovrf
Discretized Cartesian X force overflow buffers.
Definition phasespace_synthesis.h:297
const int * xvel_ovrf
Cartesian X velocity overflow buffers.
Definition phasespace_synthesis.h:291
const llint * yalt
Alternate Cartesian Y positions of particles.
Definition phasespace_synthesis.h:301
const llint * xalt
Alternate Cartesian X positions of particles.
Definition phasespace_synthesis.h:300
const llint * ycrd
Non-wrapped Cartesian Y coordinates of all particles.
Definition phasespace_synthesis.h:283
const llint * zalt
Alternate Cartesian Z positions of particles.
Definition phasespace_synthesis.h:302
const llint * fxalt
Alternate Cartesian X forces acting on all particles.
Definition phasespace_synthesis.h:312
const int * zvel_ovrf
Cartesian Z velocity overflow buffers.
Definition phasespace_synthesis.h:293
const int * xalt_ovrf
Overflow buffers for particles' alternate Cartesian X locations.
Definition phasespace_synthesis.h:303
const float inv_gpos_scale
Inverse global coordinate scaling factor.
Definition phasespace_synthesis.h:260
const int * common_ag_list
Definition phasespace_synthesis.h:247
const int frc_bits
Force component bits after the decimal.
Definition phasespace_synthesis.h:265
const int unique_topology_count
The number of unique topologies.
Definition phasespace_synthesis.h:243
const int * ycrd_ovrf
Non-wrapped Cartesian Y coordinate overflow buffers.
Definition phasespace_synthesis.h:286
const int system_count
The number of independent systems.
Definition phasespace_synthesis.h:242
const llint * xcrd
Non-wrapped Cartesian X coordinates of all particles.
Definition phasespace_synthesis.h:282
const double * invu_alt
Inverse transformation matrices, one per warp.
Definition phasespace_synthesis.h:277
const int * zcrd_ovrf
Non-wrapped Cartesian Z coordinate overflow buffers.
Definition phasespace_synthesis.h:287
const float inv_frc_scale
Inverse force scaling factor.
Definition phasespace_synthesis.h:262
const int * yvel_ovrf
Cartesian Y velocity overflow buffers.
Definition phasespace_synthesis.h:292
const llint * vzalt
Alternate Cartesian Z velocities of particles.
Definition phasespace_synthesis.h:308
const int * common_ag_bounds
Bounds array for common_ag_list.
Definition phasespace_synthesis.h:249
const double * boxdims
Box dimensions (a, b, c, alpha, beta, gamma)
Definition phasespace_synthesis.h:273
const llint * zvel
Cartesian Z velocities.
Definition phasespace_synthesis.h:290
const llint * zcrd
Non-wrapped Cartesian Z coordinates of all particles.
Definition phasespace_synthesis.h:284
const llint * boxvecs
Discretized box vectors.
Definition phasespace_synthesis.h:269
const int * atom_starts
Points at which each system starts in the atom list.
Definition phasespace_synthesis.h:245
const llint * yfrc
Discretized Cartesian Y forces.
Definition phasespace_synthesis.h:295
const int * unique_ag_idx
Definition phasespace_synthesis.h:250
const int * vzalt_ovrf
Overflow buffers for particles' alternate Cartesian Z velocities.
Definition phasespace_synthesis.h:311
const int * xcrd_ovrf
Non-wrapped Cartesian X coordinate overflow buffers.
Definition phasespace_synthesis.h:285
const llint * alt_boxvecs
Discretized box vectors.
Definition phasespace_synthesis.h:274
const int * zalt_ovrf
Overflow buffers for particles' alternate Cartesian Z locations.
Definition phasespace_synthesis.h:305
const double * umat
Box (fractional) space transformation matrices, one per warp.
Definition phasespace_synthesis.h:271
const float inv_vel_scale
Inverse velocity scaling factor.
Definition phasespace_synthesis.h:261
const double * alt_boxdims
Box dimensions (a, b, c, alpha, beta, gamma)
Definition phasespace_synthesis.h:278
const int vel_bits
Velocity coordinate bits after the decimal.
Definition phasespace_synthesis.h:264
PsSynthesisReader(const PsSynthesisReader &original)=default
Copy and move constructors–as with any object containing const members, the move assignment operator ...
const llint * xfrc
Discretized Cartesian X forces.
Definition phasespace_synthesis.h:294
const llint * yvel
Cartesian Y velocities.
Definition phasespace_synthesis.h:289
const int * atom_counts
Atom counts for all systems.
Definition phasespace_synthesis.h:246
const llint * vxalt
Alternate Cartesian X velocities of particles.
Definition phasespace_synthesis.h:306
const int * fxalt_ovrf
Overflow buffers for particles' alternate Cartesian X forces.
Definition phasespace_synthesis.h:315
const UnitCellType unit_cell
Type of unit cells (or none) each system resides in.
Definition phasespace_synthesis.h:244
int * fzalt_ovrf
Overflow buffers for particles' alternate Cartesian Z force.
Definition phasespace_synthesis.h:194
llint * fxalt
Alternate Cartesian X forces acting on particles.
Definition phasespace_synthesis.h:189
const float inv_vel_scale
Inverse velocity scaling factor.
Definition phasespace_synthesis.h:139
llint * vxalt
Alternate Cartesian X velocities of particles.
Definition phasespace_synthesis.h:183
double * umat
Box (fractional) space transformation matrices, one per warp.
Definition phasespace_synthesis.h:148
llint * xcrd
Non-wrapped Cartesian X coordinates of all particles.
Definition phasespace_synthesis.h:159
llint * vyalt
Alternate Cartesian Y velocities of particles.
Definition phasespace_synthesis.h:184
int * alt_boxvec_ovrf
Overflow arrays for the discretized box vectors.
Definition phasespace_synthesis.h:152
PsSynthesisWriter(int system_count_in, int unique_topology_count_in, UnitCellType unit_cell_in, const int *atom_starts_in, const int *atom_counts_in, const int *common_ag_list_in, const int *common_ag_bounds_in, const int *unique_ag_idx_in, const int *replica_idx_in, float gpos_scale_in, float vel_scale_in, float frc_scale_in, int gpos_bits_in, int vel_bits_in, int frc_bits_in, llint *boxvecs_in, int *boxvec_ovrf_in, double *umat_in, double *invu_in, double *boxdims_in, llint *alt_boxvecs_in, int *alt_boxvec_ovrf_in, double *umat_alt_in, double *invu_alt_in, double *alt_boxdims_in, llint *xcrd_in, llint *ycrd_in, llint *zcrd_in, int *xcrd_ovrf_in, int *ycrd_ovrf_in, int *zcrd_ovrf_in, llint *xvel_in, llint *yvel_in, llint *zvel_in, int *xvel_ovrf_in, int *yvel_ovrf_in, int *zvel_ovrf_in, llint *xfrc_in, llint *yfrc_in, llint *zfrc_in, int *xfrc_ovrf_in, int *yfrc_ovrf_in, int *zfrc_ovrf_in, llint *xalt_in, llint *yalt_in, llint *zalt_in, int *xalt_ovrf_in, int *yalt_ovrf_in, int *zalt_ovrf_in, llint *vxalt_in, llint *vyalt_in, llint *vzalt_in, int *vxalt_ovrf_in, int *vyalt_ovrf_in, int *vzalt_ovrf_in, llint *fxalt_in, llint *fyalt_in, llint *fzalt_in, int *fxalt_ovrf_in, int *fyalt_ovrf_in, int *fzalt_ovrf_in)
Constructor takes a straight list of pointers and constants from the parent object (in this case,...
Definition phasespace_synthesis.cpp:60
int * xalt_ovrf
Overflow buffers for particles' alternate Cartesian X locations.
Definition phasespace_synthesis.h:180
int * xvel_ovrf
Cartesian X velocity overflow buffers.
Definition phasespace_synthesis.h:168
const int frc_bits
Force component bits after the decimal.
Definition phasespace_synthesis.h:143
const int * atom_starts
Points at which each system starts in the atom list.
Definition phasespace_synthesis.h:123
llint * ycrd
Non-wrapped Cartesian Y coordinates of all particles.
Definition phasespace_synthesis.h:160
double * alt_boxdims
Box dimensions (a, b, c, alpha, beta, gamma)
Definition phasespace_synthesis.h:155
int * boxvec_ovrf
Overflow arrays for the discretized box vectors.
Definition phasespace_synthesis.h:147
llint * zvel
Cartesian Z velocities.
Definition phasespace_synthesis.h:167
const float frc_scale
Scaling factor for fixed-precision force accumulation.
Definition phasespace_synthesis.h:137
const int * unique_ag_idx
Definition phasespace_synthesis.h:128
const float gpos_scale
Global position coordinate scaling factor.
Definition phasespace_synthesis.h:135
const float inv_gpos_scale
Inverse global coordinate scaling factor.
Definition phasespace_synthesis.h:138
llint * xfrc
Discretized Cartesian X forces.
Definition phasespace_synthesis.h:171
double * umat_alt
Box (fractional) space transformation matrices, one per warp.
Definition phasespace_synthesis.h:153
const int gpos_bits
Global position coordinate bits after the decimal.
Definition phasespace_synthesis.h:141
int * yvel_ovrf
Cartesian Y velocity overflow buffers.
Definition phasespace_synthesis.h:169
PsSynthesisWriter(const PsSynthesisWriter &original)=default
Copy and move constructors–as with any object containing const members, the move assignment operator ...
int * vxalt_ovrf
Overflow buffers for particles' alternate Cartesian X velocities.
Definition phasespace_synthesis.h:186
const float inv_frc_scale
Inverse force scaling factor.
Definition phasespace_synthesis.h:140
int * ycrd_ovrf
Non-wrapped Cartesian Y coordinate overflow buffers.
Definition phasespace_synthesis.h:163
const int * common_ag_list
Definition phasespace_synthesis.h:125
llint * fzalt
Alternate Cartesian Z forces acting on particles.
Definition phasespace_synthesis.h:191
llint * xalt
Alternate Cartesian X positions of particles.
Definition phasespace_synthesis.h:177
int * zvel_ovrf
Cartesian Z velocity overflow buffers.
Definition phasespace_synthesis.h:170
llint * zalt
Alternate Cartesian Z positions of particles.
Definition phasespace_synthesis.h:179
const int vel_bits
Velocity coordinate bits after the decimal.
Definition phasespace_synthesis.h:142
llint * xvel
Cartesian X velocities.
Definition phasespace_synthesis.h:165
const int system_count
The number of independent systems.
Definition phasespace_synthesis.h:120
int * zfrc_ovrf
Discretized Cartesian Z force overflow buffers.
Definition phasespace_synthesis.h:176
llint * yvel
Cartesian Y velocities.
Definition phasespace_synthesis.h:166
const int * common_ag_bounds
Bounds array for common_ag_list.
Definition phasespace_synthesis.h:127
llint * zcrd
Non-wrapped Cartesian Z coordinates of all particles.
Definition phasespace_synthesis.h:161
int * yalt_ovrf
Overflow buffers for particles' alternate Cartesian Y locations.
Definition phasespace_synthesis.h:181
llint * zfrc
Discretized Cartesian Z forces.
Definition phasespace_synthesis.h:173
const int unique_topology_count
The number of unique topologies.
Definition phasespace_synthesis.h:121
llint * alt_boxvecs
Discretized box vectors.
Definition phasespace_synthesis.h:151
double * invu
Inverse transformation matrices, one per warp.
Definition phasespace_synthesis.h:149
llint * yfrc
Discretized Cartesian Y forces.
Definition phasespace_synthesis.h:172
int * vzalt_ovrf
Overflow buffers for particles' alternate Cartesian Z velocities.
Definition phasespace_synthesis.h:188
double * invu_alt
Inverse transformation matrices, one per warp.
Definition phasespace_synthesis.h:154
int * vyalt_ovrf
Overflow buffers for particles' alternate Cartesian Y velocities.
Definition phasespace_synthesis.h:187
const float vel_scale
Velocity coordinate scaling factor.
Definition phasespace_synthesis.h:136
int * fyalt_ovrf
Overflow buffers for particles' alternate Cartesian Y forces.
Definition phasespace_synthesis.h:193
llint * fyalt
Alternate Cartesian Y forces acting on particles.
Definition phasespace_synthesis.h:190
llint * vzalt
Alternate Cartesian Z velocities of particles.
Definition phasespace_synthesis.h:185
int * fxalt_ovrf
Overflow buffers for particles' alternate Cartesian X forces.
Definition phasespace_synthesis.h:192
int * zcrd_ovrf
Non-wrapped Cartesian Z coordinate overflow buffers.
Definition phasespace_synthesis.h:164
llint * boxvecs
Discretized box vectors.
Definition phasespace_synthesis.h:146
const UnitCellType unit_cell
Type of unit cells (or none) each system resides in.
Definition phasespace_synthesis.h:122
llint * yalt
Alternate Cartesian Y positions of particles.
Definition phasespace_synthesis.h:178
int * xcrd_ovrf
Non-wrapped Cartesian X coordinate overflow buffers.
Definition phasespace_synthesis.h:162
const int * atom_counts
Atom counts for all systems.
Definition phasespace_synthesis.h:124
int * zalt_ovrf
Overflow buffers for particles' alternate Cartesian Z locations.
Definition phasespace_synthesis.h:182
int * yfrc_ovrf
Discretized Cartesian Y force overflow buffers.
Definition phasespace_synthesis.h:175
int * xfrc_ovrf
Discretized Cartesian X force overflow buffers.
Definition phasespace_synthesis.h:174
const int * replica_idx
Definition phasespace_synthesis.h:130
double * boxdims
Box dimensions (a, b, c, alpha, beta, gamma)
Definition phasespace_synthesis.h:150
Collect C-style pointers for the elements of a read-only CoordinateFrame object.
Definition coordinateframe.h:65
Collect C-style pointers and critical constants for a read-only CoordinateSeries object.
Definition coordinate_series.h:96
Collect constants and pointers to the components of a read-only PhaseSpace object.
Definition phasespace.h:81