Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
4d83ca8c
Commit
4d83ca8c
authored
Sep 03, 2015
by
peastman
Browse files
Merge pull request #1122 from peastman/xmlversion
Added openmmVersion attribute to serialized XML files
parents
a440d0cf
19991c7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
serialization/src/StateProxy.cpp
serialization/src/StateProxy.cpp
+5
-2
serialization/src/SystemProxy.cpp
serialization/src/SystemProxy.cpp
+3
-1
No files found.
serialization/src/StateProxy.cpp
View file @
4d83ca8c
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -30,7 +30,9 @@
* -------------------------------------------------------------------------- */
#include "openmm/serialization/StateProxy.h"
#include <OpenMM.h>
#include "openmm/Platform.h"
#include "openmm/State.h"
#include "openmm/Vec3.h"
#include <map>
using
namespace
std
;
...
...
@@ -42,6 +44,7 @@ StateProxy::StateProxy() : SerializationProxy("State") {
void
StateProxy
::
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
{
node
.
setIntProperty
(
"version"
,
1
);
node
.
setStringProperty
(
"openmmVersion"
,
Platform
::
getOpenMMVersion
());
const
State
&
s
=
*
reinterpret_cast
<
const
State
*>
(
object
);
node
.
setDoubleProperty
(
"time"
,
s
.
getTime
());
Vec3
a
,
b
,
c
;
...
...
serialization/src/SystemProxy.cpp
View file @
4d83ca8c
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -32,6 +32,7 @@
#include "openmm/serialization/SystemProxy.h"
#include "openmm/serialization/SerializationNode.h"
#include "openmm/Force.h"
#include "openmm/Platform.h"
#include "openmm/System.h"
#include "openmm/VirtualSite.h"
#include <sstream>
...
...
@@ -44,6 +45,7 @@ SystemProxy::SystemProxy() : SerializationProxy("System") {
void
SystemProxy
::
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
{
node
.
setIntProperty
(
"version"
,
1
);
node
.
setStringProperty
(
"openmmVersion"
,
Platform
::
getOpenMMVersion
());
const
System
&
system
=
*
reinterpret_cast
<
const
System
*>
(
object
);
Vec3
a
,
b
,
c
;
system
.
getDefaultPeriodicBoxVectors
(
a
,
b
,
c
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment