From 741324cf956c7164f66e4580584000d707d793cf Mon Sep 17 00:00:00 2001 From: ahurta92 Date: Mon, 22 Apr 2024 10:31:01 -0400 Subject: [PATCH] Fix the path names --- .../molresponse/response_coordinator2/coordinator.hpp | 9 +++++---- src/apps/molresponse/response_coordinator2/mad-freq2.cpp | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/apps/molresponse/response_coordinator2/coordinator.hpp b/src/apps/molresponse/response_coordinator2/coordinator.hpp index b777e39f37f..7599197ef18 100644 --- a/src/apps/molresponse/response_coordinator2/coordinator.hpp +++ b/src/apps/molresponse/response_coordinator2/coordinator.hpp @@ -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); @@ -759,7 +759,7 @@ class ResponseCalcManager { quad_parameters.set_derived_value("states", 3); } - auto final_protocol = *molresponse_params.protocol().end(); + auto final_protocol = molresponse_params.protocol().back(); quad_parameters.set_user_defined_value>("protocol", {final_protocol}); return quad_parameters; @@ -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; @@ -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}, diff --git a/src/apps/molresponse/response_coordinator2/mad-freq2.cpp b/src/apps/molresponse/response_coordinator2/mad-freq2.cpp index 0ce52816748..5b27b7ac3db 100644 --- a/src/apps/molresponse/response_coordinator2/mad-freq2.cpp +++ b/src/apps/molresponse/response_coordinator2/mad-freq2.cpp @@ -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); @@ -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");