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,7 +803,10 @@ private:
std::ifstream ifs(jsonFilepath);
nlohmann::json json;
ifs >> json;
internalPotentialEnergy = json.at(GET_VARIABLE_NAME(internalPotentialEnergy));
if (json.contains(GET_VARIABLE_NAME(internalPotentialEnergy))) {
internalPotentialEnergy = json.at(GET_VARIABLE_NAME(internalPotentialEnergy));
}
return true;
}
};