1 #ifndef COMPUTE_GROUP_RESTRAINTS_H 2 #define COMPUTE_GROUP_RESTRAINTS_H 16 #if defined NAMD_CUDA || defined NAMD_HIP 18 #ifdef NODEGROUP_FORCE_REGISTER 22 class GroupRestraintsCUDA {
26 ~GroupRestraintsCUDA();
29 void updateAtoms(std::vector<AtomMap*> &atomMapsList,
30 std::vector<CudaLocalRecord> &localRecords,
31 const int *h_globalToLocalID);
40 const char3* d_transform,
42 const double* d_pos_x,
43 const double* d_pos_y,
44 const double* d_pos_z,
56 bool useDistMagnitude;
57 const char *groupName;
60 double inv_group1_mass;
61 double inv_group2_mass;
74 std::vector<HomePatch*> *patchList;
75 std::vector<int> groupAtomsSOAIndex;
76 int* d_groupAtomsSOAIndex;
77 int numRestrainedGroup1;
78 int numRestrainedGroup2;
79 int totalNumRestrained;
82 unsigned int* d_tbcatomic;
88 class ComputeGroupRestraintsCUDA {
91 ComputeGroupRestraintsCUDA(
const int ouputFreq,
94 ~ComputeGroupRestraintsCUDA();
97 void updateAtoms(std::vector<AtomMap*> &atomMapsList,
98 std::vector<CudaLocalRecord> &localRecords,
99 const int *h_globalToLocalID);
107 const char3* d_transform,
109 const double* d_pos_x,
110 const double* d_pos_y,
111 const double* d_pos_z,
112 double* d_f_normal_x,
113 double* d_f_normal_y,
114 double* d_f_normal_z,
119 cudaStream_t stream);
124 std::vector<GroupRestraintsCUDA*> restraintsCUDAList;
127 #endif // NODEGROUP_FORCE_REGISTER 131 #endif // COMPUTE_GROUP_RESTRAINTS_H