Skip to content

Commit

Permalink
Fix the path names
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Jul 1, 2024
1 parent b817acb commit 741324c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/apps/molresponse/response_coordinator2/coordinator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ class ResponseCalcManager {
}
world.gop.fence();

moldft_restart = addPath(moldft_path, "/mad.restartdata.00000");
calc_info_json_path = addPath(moldft_path, "/mad.calc_info.json");
moldft_restart = addPath(moldft_path, "/moldft.restartdata.00000");
calc_info_json_path = addPath(moldft_path, "/moldft.calc_info.json");
if (std::filesystem::exists(moldft_restart) && std::filesystem::exists(calc_info_json_path)) {
// if both exist, read the calc_info json
std::ifstream ifs(calc_info_json_path);
Expand Down Expand Up @@ -759,7 +759,7 @@ class ResponseCalcManager {
quad_parameters.set_derived_value<size_t>("states", 3);
}

auto final_protocol = *molresponse_params.protocol().end();
auto final_protocol = molresponse_params.protocol().back();
quad_parameters.set_user_defined_value<vector<double>>("protocol", {final_protocol});

return quad_parameters;
Expand All @@ -768,7 +768,6 @@ class ResponseCalcManager {

auto quad_parameters = set_hyperpolarizability_parameters();

if (world.rank() == 0) { molresponse::write_response_input(quad_parameters, "quad.in"); }

//auto calc_params = initialize_calc_params(world, std::string("quad.in"));
commandlineparser parser;
Expand All @@ -784,6 +783,8 @@ class ResponseCalcManager {

nlohmann::ordered_json beta_json = create_beta_json();

if (world.rank() == 0) { molresponse::write_response_input(quad_parameters, "quad.in"); }

QuadraticResponse quad_calculation{
world,
{ground_calculation, molecule, quad_parameters},
Expand Down
5 changes: 3 additions & 2 deletions src/apps/molresponse/response_coordinator2/mad-freq2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ auto main(int argc, char *argv[]) -> int {
std::filesystem::exists(response_manager.moldft_path)) {
response_manager.run_molresponse(world);
} else {
if(world.rank() == 0) {
print("Running MOLDFT since no previous calculation was found");
}
response_manager.run_moldft(world,true);
world.gop.fence();
response_manager.run_molresponse(world);
Expand All @@ -87,8 +90,6 @@ auto main(int argc, char *argv[]) -> int {
response_manager.run_quadratic_response(world);
}



} catch (const SafeMPI::Exception &e) {
print(e.what());
error("caught an MPI exception");
Expand Down

0 comments on commit 741324c

Please sign in to comment.