Added json to SimulationResults containing the internalPotentialEnergy value of the simulation

This commit is contained in:
iasonmanolas 2022-01-19 12:28:13 +02:00
parent 4650af984d
commit 6307e53809
1 changed files with 4 additions and 1 deletions

View File

@ -803,8 +803,11 @@ private:
std::ifstream ifs(jsonFilepath); std::ifstream ifs(jsonFilepath);
nlohmann::json json; nlohmann::json json;
ifs >> json; ifs >> json;
if (json.contains(GET_VARIABLE_NAME(internalPotentialEnergy))) {
internalPotentialEnergy = json.at(GET_VARIABLE_NAME(internalPotentialEnergy)); internalPotentialEnergy = json.at(GET_VARIABLE_NAME(internalPotentialEnergy));
} }
return true;
}
}; };
#endif // SIMULATIONHISTORY_HPP #endif // SIMULATIONHISTORY_HPP