Skip to content

Commit

Permalink
use mrchems print library for convergence warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzgubler committed Oct 24, 2023
1 parent b1b9a71 commit b1714f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vc_sqnm/periodic_optimizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <Eigen/Dense>
#include <iostream>
#include "sqnm.hpp"
#include "MRCPP/Printer"


namespace PES_optimizer{
Expand Down Expand Up @@ -199,7 +200,8 @@ namespace PES_optimizer{
this->f_std_deviation = .8 * this->f_std_deviation + .2 * fnoise;

Check warning on line 200 in src/vc_sqnm/periodic_optimizer.hpp

View check run for this annotation

Codecov / codecov/patch

src/vc_sqnm/periodic_optimizer.hpp#L200

Added line #L200 was not covered by tests
}
if (this->f_std_deviation > 0.2 * forces.cwiseAbs().maxCoeff()) {
std::cerr << "Noise in force is larger than 0.2 times the larges force component. Convergence cannot be guaranteed.\n";
println(0, "WARNING: Noise in force is larger than 0.2 times the larges force component!!!");
println(0, "Geometry optimization onvergence cannot be guaranteed!!!");

Check warning on line 204 in src/vc_sqnm/periodic_optimizer.hpp

View check run for this annotation

Codecov / codecov/patch

src/vc_sqnm/periodic_optimizer.hpp#L202-L204

Added lines #L202 - L204 were not covered by tests
}
}

Expand Down

0 comments on commit b1714f1

Please sign in to comment.