Skip to content

Commit

Permalink
remove redundant code in LZSH
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed May 3, 2024
1 parent 48c4261 commit d3feb18
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/modelsolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit d3feb18

Please sign in to comment.