Do not initialized random number generator when there is no thermostat

This commit is contained in:
Yifan Li
2023-03-15 14:51:04 -04:00
parent 77b9fe37ba
commit f7bc270c00

View File

@ -250,9 +250,11 @@ FixPIMDLangevin::FixPIMDLangevin(LAMMPS *lmp, int narg, char **arg) :
// initialize Marsaglia RNG with processor-unique seed
if (integrator == BAOAB || integrator == OBABO) {
Lan_temp = temp;
random = new RanMars(lmp, seed + universe->me);
if (tstat_flag) {
if (integrator == BAOAB || integrator == OBABO) {
Lan_temp = temp;
random = new RanMars(lmp, seed + universe->me);
}
}
me = comm->me;