0604 sponge case pme fix r1.2

This commit is contained in:
zhangxinfeng3 2021-06-03 11:44:03 +08:00
parent 35e95b7d19
commit 83021cd31c
2 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ __device__ __host__ float fc(float Rij) {
__global__ void Record_Box_Map_Times(int atom_numbers, const float *crd, const float *old_crd, float *box,
int *box_map_times) {
float half_box[3] = {0.5 * box[0], 0.5 * box[1], 0.5 * box[2]};
float half_box[3] = {0.5F * box[0], 0.5F * box[1], 0.5F * box[2]};
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < atom_numbers) {
if (crd[3 * i + 0] - old_crd[3 * i + 0] > half_box[0]) {

View File

@ -63,28 +63,28 @@ class Particle_Mesh_Ewald():
while number > 0:
if number == 1:
return 1
tempn = number / 2
tempn = int(number / 2)
if tempn * 2 != number:
break
number = tempn
while number > 0:
if number == 1:
return 1
tempn = number / 3
tempn = int(number / 3)
if tempn * 3 != number:
break
number = tempn
while number > 0:
if number == 1:
return 1
tempn = number / 5
tempn = int(number / 5)
if tempn * 5 != number:
break
number = tempn
while number > 0:
if number == 1:
return 1
tempn = number / 7
tempn = int(number / 7)
if tempn * 7 != number:
break
number = tempn