Skip to content

Commit

Permalink
make max_rotation 50% of residual target
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Oct 26, 2023
1 parent 8f5c672 commit 0d69030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apps/molresponse/FrequencyResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void FrequencyResponse::iterate(World &world) {
auto bsh_x_ops = make_bsh_operators_response(world, x_shifts, omega);
std::vector<poperatorT> bsh_y_ops;
bsh_y_ops = (compute_y) ? make_bsh_operators_response(world, y_shifts, -omega) : bsh_x_ops;
auto max_rotation = .25 * x_residual_target + x_residual_target;
auto max_rotation = .5 * x_residual_target + x_residual_target;
PQ = generator(world, *this);
PQ.truncate();

Expand Down Expand Up @@ -275,7 +275,7 @@ auto FrequencyResponse::update_response(World &world, X_space &chi, XCOperator<d
kain_chi = kain_x_space_update(world, chi, new_res, kain_x_space, max_rotation);
}
// here only accept the kain updates if residual_norm is bigger than max_rotaion
for (const auto &b: new_chi.active) {
for (const auto &b: chi.active) {
if (bsh_norms[b] > max_rotation) {
new_chi.x[b] = kain_chi.x[b];
if (r_params.calc_type() == "full") { new_chi.y[b] = kain_chi.y[b]; }
Expand Down

0 comments on commit 0d69030

Please sign in to comment.