"wrappers/vscode:/vscode.git/clone" did not exist on "c07c5bd76aab897c5216bed89cd3ce9cc9a1cf9b"
Commit 19991c7e authored by peastman's avatar peastman
Browse files

Added openmmVersion attribute to serialized XML files

parent cef58048
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for * * Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. * * Medical Research, grant U54 GM072970. See https://simtk.org. *
* * * *
* Portions copyright (c) 2010 Stanford University and the Authors. * * Portions copyright (c) 2010-2015 Stanford University and the Authors. *
* Authors: Peter Eastman * * Authors: Peter Eastman *
* Contributors: * * Contributors: *
* * * *
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/serialization/StateProxy.h" #include "openmm/serialization/StateProxy.h"
#include <OpenMM.h> #include "openmm/Platform.h"
#include "openmm/State.h"
#include "openmm/Vec3.h"
#include <map> #include <map>
using namespace std; using namespace std;
...@@ -42,6 +44,7 @@ StateProxy::StateProxy() : SerializationProxy("State") { ...@@ -42,6 +44,7 @@ StateProxy::StateProxy() : SerializationProxy("State") {
void StateProxy::serialize(const void* object, SerializationNode& node) const { void StateProxy::serialize(const void* object, SerializationNode& node) const {
node.setIntProperty("version", 1); node.setIntProperty("version", 1);
node.setStringProperty("openmmVersion", Platform::getOpenMMVersion());
const State& s = *reinterpret_cast<const State*>(object); const State& s = *reinterpret_cast<const State*>(object);
node.setDoubleProperty("time", s.getTime()); node.setDoubleProperty("time", s.getTime());
Vec3 a,b,c; Vec3 a,b,c;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for * * Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. * * Medical Research, grant U54 GM072970. See https://simtk.org. *
* * * *
* Portions copyright (c) 2010 Stanford University and the Authors. * * Portions copyright (c) 2010-2015 Stanford University and the Authors. *
* Authors: Peter Eastman * * Authors: Peter Eastman *
* Contributors: * * Contributors: *
* * * *
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "openmm/serialization/SystemProxy.h" #include "openmm/serialization/SystemProxy.h"
#include "openmm/serialization/SerializationNode.h" #include "openmm/serialization/SerializationNode.h"
#include "openmm/Force.h" #include "openmm/Force.h"
#include "openmm/Platform.h"
#include "openmm/System.h" #include "openmm/System.h"
#include "openmm/VirtualSite.h" #include "openmm/VirtualSite.h"
#include <sstream> #include <sstream>
...@@ -44,6 +45,7 @@ SystemProxy::SystemProxy() : SerializationProxy("System") { ...@@ -44,6 +45,7 @@ SystemProxy::SystemProxy() : SerializationProxy("System") {
void SystemProxy::serialize(const void* object, SerializationNode& node) const { void SystemProxy::serialize(const void* object, SerializationNode& node) const {
node.setIntProperty("version", 1); node.setIntProperty("version", 1);
node.setStringProperty("openmmVersion", Platform::getOpenMMVersion());
const System& system = *reinterpret_cast<const System*>(object); const System& system = *reinterpret_cast<const System*>(object);
Vec3 a, b, c; Vec3 a, b, c;
system.getDefaultPeriodicBoxVectors(a, b, c); system.getDefaultPeriodicBoxVectors(a, b, c);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment