diff --git a/src/apps/molresponse/FrequencyResponse.cpp b/src/apps/molresponse/FrequencyResponse.cpp index 44710da8be8..97490425f7c 100644 --- a/src/apps/molresponse/FrequencyResponse.cpp +++ b/src/apps/molresponse/FrequencyResponse.cpp @@ -191,11 +191,7 @@ void FrequencyResponse::iterate(World &world) { iter_function_data["r_d"] = old_density_residual; - if (compute_y) { - Chi = new_chi.copy(); - } else { - Chi.x = new_chi.x.copy(); - } + Chi= new_chi.copy(); if (r_params.print_level() >= 1) { molresponse::start_timer(world); } x_residual = copy(new_res.residual_norms); @@ -220,8 +216,6 @@ void FrequencyResponse::iterate(World &world) { printf("\n--------Response Properties after %d-------------\n", static_cast(iter)); print("<> at omega =", omega); print(polar); - print("res r<> at omega =", omega); - print(res_polar); } } if (r_params.print_level() >= 1) { diff --git a/src/apps/molresponse/x_space.h b/src/apps/molresponse/x_space.h index 3948cb45d95..3e045527033 100644 --- a/src/apps/molresponse/x_space.h +++ b/src/apps/molresponse/x_space.h @@ -57,7 +57,7 @@ namespace madness { [[nodiscard]] X_space copy() const { auto &world = x[0][0].world(); auto new_x = X_space(*this);// copy - for (int i = 0; i < new_x.num_states(); i++) { + for (const auto &i: new_x.active) { new_x.x[i] = madness::copy(world, x[i], false); new_x.y[i] = madness::copy(world, y[i], false); }