2#ifndef STORMM_PHASESPACE_SYNTHESIS_H
3#define STORMM_PHASESPACE_SYNTHESIS_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"
28using card::default_hpc_format;
29using card::GpuDetails;
31using card::HybridFormat;
32using card::HybridTargetLevel;
33using constants::CartesianDimension;
34using diskutil::PrintSituation;
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;
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);
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,
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);
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);
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);
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);
499 CoordinateCycle orientation)
const;
502 TrajectoryKind kind = TrajectoryKind::POSITIONS)
const;
505 CoordinateCycle orientation);
508 TrajectoryKind kind = TrajectoryKind::POSITIONS);
516 CoordinateCycle orientation)
const;
520 TrajectoryKind kind = TrajectoryKind::POSITIONS)
const;
523 CoordinateCycle orientation);
526 TrajectoryKind kind = TrajectoryKind::POSITIONS);
591 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
592 PsSynthesisWriter
data(HybridTargetLevel tier = HybridTargetLevel::HOST);
593 PsSynthesisWriter
data(CoordinateCycle orientation,
594 HybridTargetLevel tier = HybridTargetLevel::HOST);
607 const PsSynthesisBorders
borders(CoordinateCycle orientation,
608 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
609 const PsSynthesisBorders
borders(HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
632 PsSynthesisWriter deviceViewToHostData(CoordinateCycle orientation);
633 PsSynthesisWriter deviceViewToHostData();
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);
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);
689 HybridTargetLevel origin = HybridTargetLevel::HOST,
690 HybridTargetLevel destination = HybridTargetLevel::HOST,
691 const GpuDetails &gpu = null_gpu)
const;
717 HybridFormat format_out,
718 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
719 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
722 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
723 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
726 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
727 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
730 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
749 TrajectoryKind trajkind = TrajectoryKind::POSITIONS,
750 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
754 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
787 void initializeForces(CoordinateCycle orientation,
const GpuDetails &gpu = null_gpu,
788 HybridTargetLevel tier = HybridTargetLevel::HOST,
int index = -1);
790 HybridTargetLevel tier = HybridTargetLevel::HOST,
int index = -1);
806 HybridTargetLevel tier = HybridTargetLevel::HOST);
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;
875 HybridTargetLevel tier = HybridTargetLevel::HOST);
878 HybridTargetLevel tier = HybridTargetLevel::HOST);
880 void importSystem(
const PhaseSpaceWriter &psw,
int system_index, CoordinateCycle orientation,
881 HybridTargetLevel tier = HybridTargetLevel::HOST);
883 void importSystem(
const PhaseSpaceWriter &psw,
int system_index,
884 HybridTargetLevel tier = HybridTargetLevel::HOST);
887 HybridTargetLevel tier = HybridTargetLevel::HOST);
890 HybridTargetLevel tier = HybridTargetLevel::HOST);
893 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
894 HybridTargetLevel tier = HybridTargetLevel::HOST);
897 TrajectoryKind kind = TrajectoryKind::POSITIONS,
898 HybridTargetLevel tier = HybridTargetLevel::HOST);
901 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
902 HybridTargetLevel tier = HybridTargetLevel::HOST);
905 TrajectoryKind kind = TrajectoryKind::POSITIONS,
906 HybridTargetLevel tier = HybridTargetLevel::HOST);
909 TrajectoryKind kind = TrajectoryKind::POSITIONS,
910 HybridTargetLevel tier = HybridTargetLevel::HOST);
913 TrajectoryKind kind = TrajectoryKind::POSITIONS,
914 HybridTargetLevel tier = HybridTargetLevel::HOST);
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);
924 template <
typename T>
926 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
927 HybridTargetLevel tier = HybridTargetLevel::HOST);
929 template <
typename T>
931 TrajectoryKind kind = TrajectoryKind::POSITIONS,
932 HybridTargetLevel tier = HybridTargetLevel::HOST);
934 template <
typename T>
936 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
937 HybridTargetLevel tier = HybridTargetLevel::HOST);
939 template <
typename T>
941 TrajectoryKind kind = TrajectoryKind::POSITIONS,
942 HybridTargetLevel tier = HybridTargetLevel::HOST);
944 template <
typename T>
946 CoordinateCycle orientation, TrajectoryKind kind = TrajectoryKind::POSITIONS,
947 HybridTargetLevel tier = HybridTargetLevel::HOST);
949 template <
typename T>
951 TrajectoryKind kind = TrajectoryKind::POSITIONS,
952 HybridTargetLevel tier = HybridTargetLevel::HOST);
959 int unique_topology_count;
960 UnitCellType unit_cell;
964 CoordinateCycle cycle_position;
969 double globalpos_scale;
970 double localpos_scale;
971 double velocity_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;
1091 std::vector<AtomGraph*> topologies;
1094 std::vector<AtomGraph*> unique_topologies;
1100 void allocate(
size_t atom_stride);
1106 void loadHostCoordinates(
const PhaseSpace &input_ps,
int sysno);
1108#ifdef STORMM_USE_HPC
1118 void loadXPciCoordinates(PsSynthesisWriter *poly_psw,
int sys_idx,
const PhaseSpaceReader &psr,
1119 const GpuDetails &gpu);
1130 void extractSystem(PhaseSpaceWriter *psw,
int index,
const GpuDetails &gpu,
1131 HybridTargetLevel origin = HybridTargetLevel::DEVICE)
const;
1138 void validateSystemIndex(
int index,
const char* caller =
nullptr)
const;
1142static const size_t phasespace_synthesis_type_index =
1148#include "phasespace_synthesis.tpp"
1153using synthesis::phasespace_synthesis_type_index;
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