diff --git a/src/apps/molresponse/testing/runners.hpp b/src/apps/molresponse/testing/runners.hpp index ad0b82a4754..f3bd29c6ea7 100644 --- a/src/apps/molresponse/testing/runners.hpp +++ b/src/apps/molresponse/testing/runners.hpp @@ -824,6 +824,10 @@ void runFrequencyTests(World &world, const frequencySchema &schema, const std::s // a vector of values. nlohmann::ordered_json create_beta_json() { + // i need A B C to hold char values and A-freq, B-freq, C-freq to hold double values + + + nlohmann::ordered_json beta_json = {{"A-freq", json::array()}, {"B-freq", json::array()}, {"C-freq", json::array()}, {"A", json::array()}, {"B", json ::array()}, {"C", json::array()}, {"Beta", json::array()}}; @@ -857,9 +861,9 @@ void append_to_beta_json(const std::array &freq, const std::array beta_vector{18, 0.0}; + std::array beta_vector; std::copy(beta_abc.ptr(), beta_abc.ptr() + 3 * 6, beta_vector.begin()); append_to_beta_json({omega_a, omega_b, omega_c}, beta_vector, beta_json); + + std::ofstream outfile("beta.json"); + if (outfile.is_open()) { + outfile << beta_json.dump(4); + outfile.close(); + } else { + std::cerr << "Failed to open file for writing: " + << "beta.json" << std::endl; + } }