diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 6fb2bd7a94..4dec04370e 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -234,8 +234,6 @@ void FixRigidNH::init() } g_f = nf_t + nf_r; - onednft = 1.0 + (double)(dimension) / (double)g_f; - onednfr = (double) (dimension) / (double)g_f; // see Table 1 in Kamberaj et al @@ -719,6 +717,8 @@ void FixRigidNH::final_integrate() void FixRigidNH::nhc_temp_integrate() { + if (g_f == 0) return; + int i,j,k; double kt,gfkt_t,gfkt_r,tmp,ms,s,s2; @@ -1063,6 +1063,8 @@ void FixRigidNH::compute_press_target() void FixRigidNH::nh_epsilon_dot() { + if (g_f == 0) return; + int i; double volume,scale,f_epsilon; diff --git a/src/RIGID/fix_rigid_nh.h b/src/RIGID/fix_rigid_nh.h index a8850413eb..10ad9b24fb 100644 --- a/src/RIGID/fix_rigid_nh.h +++ b/src/RIGID/fix_rigid_nh.h @@ -38,8 +38,6 @@ class FixRigidNH : public FixRigid { double boltz,nktv2p,mvv2e; // boltzman constant, conversion factors int nf_t,nf_r; // trans/rot degrees of freedom - double onednft,onednfr; // factors 1 + dimension/trans(rot) - // degrees of freedom double *w,*wdti1,*wdti2,*wdti4; // Yoshida-Suzuki coefficients double *q_t,*q_r; // trans/rot thermostat masses double *eta_t,*eta_r; // trans/rot thermostat positions