File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -619,6 +619,7 @@ static void cpu_pressure_orthogonal(
619619 } else {
620620 scale_factor[2 ] = 1.0 ;
621621 }
622+ box.get_inverse ();
622623}
623624
624625static void cpu_pressure_isotropic (
@@ -635,17 +636,11 @@ static void cpu_pressure_isotropic(
635636 const double pressure_instant = (p[0 ] + p[1 ] + p[2 ]) * 0.3333333333333333 ;
636637 const double scale_factor_Berendsen =
637638 1.0 - p_coupling[0 ] * (target_pressure[0 ] - pressure_instant);
638- // The factor 0.666666666666667 is 2/3, where 3 means the number of directions that are coupled
639- const double scale_factor_stochastic =
640- sqrt (0.666666666666667 * p_coupling[0 ] * K_B * target_temperature / box.get_volume ()) *
641- gasdev (rng);
642- scale_factor = scale_factor_Berendsen + 0.0 * scale_factor_stochastic;
639+ scale_factor = scale_factor_Berendsen;
643640 box.cpu_h [0 ] *= scale_factor;
644- box.cpu_h [1 ] *= scale_factor;
645- box.cpu_h [2 ] *= scale_factor;
646- box.cpu_h [3 ] = box.cpu_h [0 ] * 0.5 ;
647- box.cpu_h [4 ] = box.cpu_h [1 ] * 0.5 ;
648- box.cpu_h [5 ] = box.cpu_h [2 ] * 0.5 ;
641+ box.cpu_h [4 ] *= scale_factor;
642+ box.cpu_h [8 ] *= scale_factor;
643+ box.get_inverse ();
649644}
650645
651646static void cpu_pressure_triclinic (
You can’t perform that action at this time.
0 commit comments