scale*=2.0;
else
if(moldyn->pt_scale&T_SCALE_BERENDSEN)
- scale=1.0+(scale-1.0)/moldyn->t_tc;
+ scale=1.0+(scale-1.0)*moldyn->timestep/moldyn->t_tc;
scale=sqrt(scale);
/* velocity scaling */
/* scaling factor */
if(moldyn->pt_scale&P_SCALE_BERENDSEN) {
- scale=1.0-(moldyn->p_ref-moldyn->p)*moldyn->p_tc;
- scale=pow(scale,ONE_THIRD);
+ scale=(moldyn->p_ref-moldyn->p)*moldyn->p_tc*moldyn->timestep;
+ scale=pow(1.0-scale,ONE_THIRD);
}
else {
scale=pow(moldyn->p/moldyn->p_ref,ONE_THIRD);