From d3feb18a83b5efc1821cf1648f028386f51a69e9 Mon Sep 17 00:00:00 2001 From: Tomas Jira <tom.jira@gmail.com> Date: Fri, 3 May 2024 15:19:30 +0200 Subject: [PATCH] remove redundant code in LZSH --- src/modelsolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modelsolver.cpp b/src/modelsolver.cpp index 23f9c46..a1f9e1a 100644 --- a/src/modelsolver.cpp +++ b/src/modelsolver.cpp @@ -420,7 +420,6 @@ Result ModelSolver::runcd(const ModelSystem& system, Result res, bool print) { // change the state if the jump is accepted if (Ediff.at(j) * Ediff.at(j + 1) < 0 && dist(mt) < P) { - if (Ekin < std::abs(Ediff.at(j + 1))) throw std::runtime_error("The kinetic energy is not enough to overcome the energy barrier."); state(j + 1) = state(j + 1) == 1 ? 0 : 1; v(0) = std::sqrt(v(0)*v(0) - (state(j + 1) - state(j)) * 2 * Ediff.at(j + 1) / system.mass()); }