From 348040fcfb46b7cf7ec9d25e285a467b2e8e6482 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Nov 2021 12:45:47 -0800 Subject: [PATCH] stop when velocities=0 to avoid 1/(E_kin=0) --- src/qmd/qmd_fix_momentum.F | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qmd/qmd_fix_momentum.F b/src/qmd/qmd_fix_momentum.F index 5950227fff..198381029f 100644 --- a/src/qmd/qmd_fix_momentum.F +++ b/src/qmd/qmd_fix_momentum.F @@ -142,6 +142,12 @@ c make sure center-of-mass velocity is still zero end if c calculate current kinetic energy call qmd_kinetic(n,m,v,KE_after) + if(KE_after.lt.1d-12) then + if(ga_nodeid().eq.0) + C write(luout,*) + C ' zero velocities after removal of roto-translations' + call errquit(' zero Kinetic Energy',0,GEOM_ERR) + endif c rescale velocities to match kinetic energy on entry call qmd_rescale(n,m,v,KE_after,KE_in) c