diff --git a/hoomd/md/TwoStepBD.cc b/hoomd/md/TwoStepBD.cc index 4154576a76..c3ba7cc71e 100644 --- a/hoomd/md/TwoStepBD.cc +++ b/hoomd/md/TwoStepBD.cc @@ -182,11 +182,20 @@ void TwoStepBD::integrateStepOne(uint64_t timestep) bf_torque.z = NormalDistribution(sigma_r.z)(rng); if (x_zero) + { bf_torque.x = 0; + t.x = 0; + } if (y_zero) + { bf_torque.y = 0; + t.y = 0; + } if (z_zero) + { bf_torque.z = 0; + t.z = 0; + } // use the damping by gamma_r and rotate back to lab frame // Notes For the Future: take special care when have anisotropic gamma_r diff --git a/hoomd/md/TwoStepBDGPU.cu b/hoomd/md/TwoStepBDGPU.cu index 43aea29bff..56cc5f69c1 100644 --- a/hoomd/md/TwoStepBDGPU.cu +++ b/hoomd/md/TwoStepBDGPU.cu @@ -233,11 +233,20 @@ __global__ void gpu_brownian_step_one_kernel(Scalar4* d_pos, bf_torque.z = NormalDistribution(sigma_r.z)(rng); if (x_zero) + { bf_torque.x = 0; + t.x = 0; + } if (y_zero) + { bf_torque.y = 0; + t.y = 0; + } if (z_zero) + { bf_torque.z = 0; + t.z = 0; + } // use the damping by gamma_r and rotate back to lab frame // For Future Updates: take special care when have anisotropic gamma_r diff --git a/hoomd/md/TwoStepRATTLEBD.h b/hoomd/md/TwoStepRATTLEBD.h index 45765d546c..7f1a7e10a4 100644 --- a/hoomd/md/TwoStepRATTLEBD.h +++ b/hoomd/md/TwoStepRATTLEBD.h @@ -331,11 +331,20 @@ template void TwoStepRATTLEBD::integrateStepOne(uint64 bf_torque.z = NormalDistribution(sigma_r.z)(rng); if (x_zero) + { bf_torque.x = 0; + t.x = 0; + } if (y_zero) + { bf_torque.y = 0; + t.y = 0; + } if (z_zero) + { bf_torque.z = 0; + t.z = 0; + } // use the d_invamping by gamma_r and rotate back to lab frame // Notes For the Future: take special care when have anisotropic gamma_r diff --git a/hoomd/md/TwoStepRATTLEBDGPU.cuh b/hoomd/md/TwoStepRATTLEBDGPU.cuh index d1e4af65c4..4ae295a21d 100644 --- a/hoomd/md/TwoStepRATTLEBDGPU.cuh +++ b/hoomd/md/TwoStepRATTLEBDGPU.cuh @@ -291,11 +291,20 @@ __global__ void gpu_rattle_brownian_step_one_kernel(Scalar4* d_pos, bf_torque.z = NormalDistribution(sigma_r.z)(rng); if (x_zero) + { bf_torque.x = 0; + t.x = 0; + } if (y_zero) + { bf_torque.y = 0; + t.y = 0; + } if (z_zero) + { bf_torque.z = 0; + t.z = 0; + } // use the damping by gamma_r and rotate back to lab frame // For Future Updates: take special care when have anisotropic gamma_r