|
|
|
@ -75,8 +75,8 @@ void Dihedral14LJEnergy(const int dihedral_14_numbers, const int atom_numbers, c
|
|
|
|
|
const float *charge, float *uint_crd_with_LJ_f, const float *boxlength_f, const int *a_14,
|
|
|
|
|
const int *b_14, const float *lj_scale_factor, const float *LJ_type_A, const float *LJ_type_B,
|
|
|
|
|
float *ene, cudaStream_t stream) {
|
|
|
|
|
size_t thread_per_block = 128;
|
|
|
|
|
size_t block_per_grid = ceilf(static_cast<float>(atom_numbers) / 128);
|
|
|
|
|
size_t thread_per_block = 32;
|
|
|
|
|
size_t block_per_grid = ceilf(static_cast<float>(dihedral_14_numbers) / 32);
|
|
|
|
|
UNSIGNED_INT_VECTOR *uint_crd =
|
|
|
|
|
const_cast<UNSIGNED_INT_VECTOR *>(reinterpret_cast<const UNSIGNED_INT_VECTOR *>(uint_crd_f));
|
|
|
|
|
|
|
|
|
@ -84,14 +84,11 @@ void Dihedral14LJEnergy(const int dihedral_14_numbers, const int atom_numbers, c
|
|
|
|
|
|
|
|
|
|
Copy_Crd_To_New_Crd_Start<<<ceilf(static_cast<float>(atom_numbers) / 32), 32, 0, stream>>>(
|
|
|
|
|
atom_numbers, uint_crd, uint_crd_with_LJ, LJtype, charge);
|
|
|
|
|
Reset_List<<<ceilf(static_cast<float>(3. * atom_numbers) / 128), 128, 0, stream>>>(dihedral_14_numbers, ene, 0.);
|
|
|
|
|
VECTOR *boxlength = const_cast<VECTOR *>(reinterpret_cast<const VECTOR *>(boxlength_f));
|
|
|
|
|
|
|
|
|
|
Dihedral14LJEnergyKernel<<<block_per_grid, thread_per_block, 0, stream>>>(
|
|
|
|
|
dihedral_14_numbers, uint_crd_with_LJ, boxlength, a_14, b_14, lj_scale_factor, LJ_type_A, LJ_type_B, ene);
|
|
|
|
|
|
|
|
|
|
cudaStreamSynchronize(stream);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|