From 82537ede62941e51ffa4b60ab543c233618baaf9 Mon Sep 17 00:00:00 2001 From: YuLiu98 Date: Fri, 13 Dec 2024 16:21:35 +0800 Subject: [PATCH 1/2] Fix: update kinetic energy when all atoms are fixed --- source/module_md/md_func.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/module_md/md_func.cpp b/source/module_md/md_func.cpp index 3d40ca3f7e..068e1f2eaa 100644 --- a/source/module_md/md_func.cpp +++ b/source/module_md/md_func.cpp @@ -454,6 +454,7 @@ double current_temp(double& kinetic, if (3 * natom == frozen_freedom) { return 0.0; + kinetic = 0.0; } else { From 07e15d67cb946505b75dcbf804c93160e5886e54 Mon Sep 17 00:00:00 2001 From: YuLiu98 Date: Fri, 13 Dec 2024 16:42:37 +0800 Subject: [PATCH 2/2] fix wrong order --- source/module_md/md_func.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/module_md/md_func.cpp b/source/module_md/md_func.cpp index 068e1f2eaa..07bc1f03f2 100644 --- a/source/module_md/md_func.cpp +++ b/source/module_md/md_func.cpp @@ -453,8 +453,8 @@ double current_temp(double& kinetic, { if (3 * natom == frozen_freedom) { - return 0.0; kinetic = 0.0; + return 0.0; } else {