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
6bd73375
Commit
6bd73375
authored
Apr 12, 2014
by
John Chodera (MSKCC)
Browse files
Added missing serialization for some other properties of CustomNonbondedForce.
parent
57d3e0fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
serialization/src/CustomNonbondedForceProxy.cpp
serialization/src/CustomNonbondedForceProxy.cpp
+6
-0
No files found.
serialization/src/CustomNonbondedForceProxy.cpp
View file @
6bd73375
...
...
@@ -47,6 +47,9 @@ void CustomNonbondedForceProxy::serialize(const void* object, SerializationNode&
node
.
setStringProperty
(
"energy"
,
force
.
getEnergyFunction
());
node
.
setIntProperty
(
"method"
,
(
int
)
force
.
getNonbondedMethod
());
node
.
setDoubleProperty
(
"cutoff"
,
force
.
getCutoffDistance
());
node
.
setBoolProperty
(
"useSwitchingFunction"
,
force
.
getUseSwitchingFunction
());
node
.
setDoubleProperty
(
"switchingDistance"
,
force
.
getSwitchingDistance
());
node
.
setBoolProperty
(
"useLongRangeCorrection"
,
force
.
getUseLongRangeCorrection
());
SerializationNode
&
perParticleParams
=
node
.
createChildNode
(
"PerParticleParameters"
);
for
(
int
i
=
0
;
i
<
force
.
getNumPerParticleParameters
();
i
++
)
{
perParticleParams
.
createChildNode
(
"Parameter"
).
setStringProperty
(
"name"
,
force
.
getPerParticleParameterName
(
i
));
...
...
@@ -100,6 +103,9 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons
CustomNonbondedForce
*
force
=
new
CustomNonbondedForce
(
node
.
getStringProperty
(
"energy"
));
force
->
setNonbondedMethod
((
CustomNonbondedForce
::
NonbondedMethod
)
node
.
getIntProperty
(
"method"
));
force
->
setCutoffDistance
(
node
.
getDoubleProperty
(
"cutoff"
));
force
->
setUseSwitchingFunction
(
node
.
getBoolProperty
(
"useSwitchingFunction"
));
force
->
setSwitchingDistance
(
node
.
getDoubleProperty
(
"switchingDistance"
));
force
->
setUseLongRangeCorrection
(
node
.
getBoolProperty
(
"useLongRangeCorrection"
));
const
SerializationNode
&
perParticleParams
=
node
.
getChildNode
(
"PerParticleParameters"
);
for
(
int
i
=
0
;
i
<
(
int
)
perParticleParams
.
getChildren
().
size
();
i
++
)
{
const
SerializationNode
&
parameter
=
perParticleParams
.
getChildren
()[
i
];
...
...
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