STORMM Source Documentation
Loading...
Searching...
No Matches
coordinate_util.h
1// -*-c++-*-
2#ifndef STORMM_COORDINATE_UTIL_H
3#define STORMM_COORDINATE_UTIL_H
4
5#include <string>
6#include <typeinfo>
7#include <typeindex>
8#include <sys/types.h>
9#include "copyright.h"
10#include "coordinateframe.h"
11#include "coordinate_series.h"
12#include "phasespace.h"
13#include "Synthesis/condensate.h"
14#include "Synthesis/phasespace_synthesis.h"
15#include "Topology/atomgraph_enumerators.h"
16
17namespace stormm {
18namespace trajectory {
19
20using synthesis::Condensate;
21using synthesis::PhaseSpaceSynthesis;
22
25static const size_t cf_type_index = std::type_index(typeid(CoordinateFrame)).hash_code();
26static const size_t ps_type_index = std::type_index(typeid(PhaseSpace)).hash_code();
27static const size_t cs_dtype_index = std::type_index(typeid(CoordinateSeries<double>)).hash_code();
28static const size_t cs_ftype_index = std::type_index(typeid(CoordinateSeries<float>)).hash_code();
29static const size_t cs_stype_index = std::type_index(typeid(CoordinateSeries<short>)).hash_code();
30static const size_t cs_itype_index = std::type_index(typeid(CoordinateSeries<int>)).hash_code();
31static const size_t cs_ltype_index = std::type_index(typeid(CoordinateSeries<llint>)).hash_code();
32static const size_t poly_ps_type_index = std::type_index(typeid(PhaseSpaceSynthesis)).hash_code();
33static const size_t cdns_type_index = std::type_index(typeid(Condensate)).hash_code();
35
38std::string nameCoordinateType(size_t ct_coords);
39
50template <typename Tdest, typename Torig>
51void checkCopyValidity(const Tdest *destination, const Torig &origin,
52 HybridTargetLevel destination_tier, HybridTargetLevel origin_tier);
53
64bool overflowRequired(TrajectoryKind kind, int scaling_bits, const int* x_ovrf, const int* y_ovrf,
65 const int* z_ovrf);
66
81template <typename T> UnitCellType determineUnitCellType(const T* dims);
82
83template <typename T>
84UnitCellType determineUnitCellType(const std::vector<T> &dims, int offset = 0);
85
86template <typename T>
87UnitCellType determineUnitCellType(const Hybrid<T> &dims, int offset = 0);
89
90} // namespace trajectory
91} // namespace stormm
92
93// This library provides automatic inclusion of the coordinate objects' type indices.
94namespace stormm {
95
96using trajectory::cf_type_index;
97using trajectory::ps_type_index;
98using trajectory::cs_dtype_index;
99using trajectory::cs_ftype_index;
100using trajectory::cs_stype_index;
101using trajectory::cs_itype_index;
102using trajectory::cs_ltype_index;
103using trajectory::poly_ps_type_index;
104using trajectory::cdns_type_index;
105
106} // namespace stormm
107
108#include "coordinate_util.tpp"
109
110#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
Condense the data format, and possibly offer a reduced representation of coordinates,...
Definition condensate.h:146
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
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