port thread-safe temperature biasing from LAMMPS-ICMS
This commit is contained in:
@ -170,6 +170,17 @@ void ComputeTempCOM::remove_bias(int i, double *v)
|
||||
v[2] -= vbias[2];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
remove velocity bias from atom I to leave thermal velocity
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ComputeTempCOM::remove_bias_thr(int, double *v, double *)
|
||||
{
|
||||
v[0] -= vbias[0];
|
||||
v[1] -= vbias[1];
|
||||
v[2] -= vbias[2];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
remove velocity bias from all atoms to leave thermal velocity
|
||||
------------------------------------------------------------------------- */
|
||||
@ -200,6 +211,18 @@ void ComputeTempCOM::restore_bias(int i, double *v)
|
||||
v[2] += vbias[2];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
add back in velocity bias to atom I removed by remove_bias_thr()
|
||||
assume remove_bias_thr() was previously called
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ComputeTempCOM::restore_bias_thr(int, double *v, double *)
|
||||
{
|
||||
v[0] += vbias[0];
|
||||
v[1] += vbias[1];
|
||||
v[2] += vbias[2];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
add back in velocity bias to all atoms removed by remove_bias_all()
|
||||
assume remove_bias_all() was previously called
|
||||
|
||||
Reference in New Issue
Block a user