Skip to content

Commit

Permalink
Clean up printing
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Jul 1, 2024
1 parent 65d717d commit 48be2c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/apps/molresponse/FrequencyResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,11 @@ std::pair<Tensor<double>, std::vector<std::string>> QuadraticResponse::compute_b

world.gop.fence();
beta[i] = one.trace() + two.trace() + three.trace() + four.trace() + five.trace() + six.trace();
beta_indices[i] = bc_directions[bc] + xyz[a];
beta_indices[i] = xyz[a] + bc_directions[bc];
if (world.rank() == 0)
{
print("beta[", beta_indices[i], "] = ", beta[i]);
}
}
world.gop.fence();

Expand Down
10 changes: 0 additions & 10 deletions src/apps/molresponse/maddft/response_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,19 +1135,12 @@ class ResponseCalcManager
{
::print("Restart file for omega_a = ", omega_a, " exists");
}

std::array<double, 3> omegas{omega_a, omega_b, omega_c};

// remove .00000 from restartA.first

std::array<path, 3> restarts{restartA.first.replace_extension(""), restartB.first.replace_extension(""), restartC.first.replace_extension("")};

quad_calculation.set_x_data(world, omegas, restarts);
auto [beta, beta_directions] = quad_calculation.compute_beta_v2(world, omega_b, omega_c);

// Make a table printing the beta value for each direction
//[XXX,XYY,XZZ,YXX,YYY,YZZ,ZXX,ZYY,ZZZ,XYZ]

if (world.rank() == 0)
{
::print("Beta values for omega_a = ", omega_a, " omega_b = ", omega_b, " omega_c = ", omega_c);
Expand All @@ -1160,11 +1153,8 @@ class ResponseCalcManager
}
}


nlohmann::ordered_json beta_entry;

append_to_beta_json({-1.0 * omega_a, omega_b, omega_c}, beta_directions, beta, beta_json);

std::ofstream outfile("beta.json");
if (outfile.is_open())
{
Expand Down

0 comments on commit 48be2c2

Please sign in to comment.