Barostat fix - see lammps PR 879 and 942

This commit is contained in:
Maria-Lesniewski
2023-10-18 13:13:37 -04:00
parent f0801338f3
commit 45d2a91c62

View File

@ -1024,7 +1024,10 @@ void FixBocs::final_integrate()
if (pstat_flag) {
if (pstyle == ISO) pressure->compute_scalar();
else pressure->compute_vector();
else {
temperature->compute_vector();
pressure->compute_vector();
}
couple();
pressure->addstep(update->ntimestep+1);
}
@ -1961,7 +1964,7 @@ void FixBocs::nhc_press_integrate()
int ich,i,pdof;
double expfac,factor_etap,kecurrent;
double kt = boltz * t_target;
double lkt_press;
// Update masses, to preserve initial freq, if flag set
if (omega_mass_flag) {
@ -2006,7 +2009,8 @@ void FixBocs::nhc_press_integrate()
}
}
double lkt_press = pdof * kt;
if (pstyle == ISO) lkt_press = kt;
else lkt_press = pdof * kt;
etap_dotdot[0] = (kecurrent - lkt_press)/etap_mass[0];
double ncfac = 1.0/nc_pchain;