Made ndof dynamic for temperature fixes and computes

This commit is contained in:
Aidan Thompson
2018-04-03 15:07:04 -06:00
parent 0bfb6f0c2a
commit d1356c1d76
3 changed files with 23 additions and 7 deletions

View File

@ -1253,6 +1253,10 @@ void FixGCMC::attempt_molecule_deletion()
if (ngas == 0) return;
// work-around to avoid n=0 problem with fix rigid/nvt/small
if (ngas == natoms_per_molecule) return;
tagint deletion_molecule = pick_random_gas_molecule();
if (deletion_molecule == -1) return;
@ -1910,6 +1914,10 @@ void FixGCMC::attempt_molecule_deletion_full()
if (ngas == 0) return;
// work-around to avoid n=0 problem with fix rigid/nvt/small
if (ngas == natoms_per_molecule) return;
tagint deletion_molecule = pick_random_gas_molecule();
if (deletion_molecule == -1) return;