Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion source/source_relax/ions_move_bfgs2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ void Ions_Move_BFGS2::Update(std::vector<double>& pos,
}
}
double threshold=1e-7;
if(*max_element(dpos.begin(), dpos.end()) < threshold)
double max_abs_dpos = 0.0;
for (const double value : dpos)
{
max_abs_dpos = std::max(max_abs_dpos, std::abs(value));
}
if (max_abs_dpos < threshold)
Comment thread
mohanchen marked this conversation as resolved.
{
return;
}
Expand Down
Loading