Skip to content

Commit

Permalink
Merge pull request #6 from SimonBoothroyd/improve-xml
Browse files Browse the repository at this point in the history
Improve ATMMetaForce XML field names
  • Loading branch information
egallicc authored Apr 1, 2023
2 parents f41d9bf + 3a57e7d commit 5a9df13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serialization/src/ATMMetaForceProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void ATMMetaForceProxy::serialize(const void* object, OpenMM::SerializationNode&
node.setDoubleProperty("aCore", force.getDefaultAcore());
node.setDoubleProperty("direction", force.getDefaultDirection());

OpenMM::SerializationNode& variableForceGroups = node.createChildNode("GlobalParameters");
OpenMM::SerializationNode& variableForceGroups = node.createChildNode("VariableForceGroups");
for (const auto i : force.getVariableForceGroups()) {
variableForceGroups.createChildNode("Parameter").setIntProperty("group", i);
}
Expand All @@ -47,7 +47,7 @@ void* ATMMetaForceProxy::deserialize(const OpenMM::SerializationNode& node) cons
try {
std::vector<int> variableForceGroups;

const OpenMM::SerializationNode& globalParams = node.getChildNode("GlobalParameters");
const OpenMM::SerializationNode& globalParams = node.getChildNode("VariableForceGroups");
for (auto& parameter : globalParams.getChildren())
variableForceGroups.push_back(parameter.getIntProperty("group"));

Expand Down

0 comments on commit 5a9df13

Please # to comment.