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
55678aa1
Commit
55678aa1
authored
Oct 19, 2011
by
Mark Friedrichs
Browse files
Removed unused parameters
parent
906a0473
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
plugins/freeEnergy/serialization/src/FreeEnergyGBVISoftcoreProxy.cpp
...eEnergy/serialization/src/FreeEnergyGBVISoftcoreProxy.cpp
+4
-0
plugins/freeEnergy/serialization/src/FreeEnergyNonbondedSoftcoreForceProxy.cpp
...rialization/src/FreeEnergyNonbondedSoftcoreForceProxy.cpp
+3
-3
plugins/freeEnergy/serialization/tests/TestSerializeFreeEnergyGBVISoftcoreForce.cpp
...zation/tests/TestSerializeFreeEnergyGBVISoftcoreForce.cpp
+3
-1
plugins/freeEnergy/serialization/tests/TestSerializeFreeEnergyNonbondedSoftcoreForce.cpp
...n/tests/TestSerializeFreeEnergyNonbondedSoftcoreForce.cpp
+2
-2
No files found.
plugins/freeEnergy/serialization/src/FreeEnergyGBVISoftcoreProxy.cpp
View file @
55678aa1
...
...
@@ -50,11 +50,13 @@ void GBVISoftcoreForceProxy::serialize(const void* object, SerializationNode& no
node
.
setDoubleProperty
(
"solventDielectric"
,
force
.
getSolventDielectric
());
node
.
setDoubleProperty
(
"quinticLwrLmtFctr"
,
force
.
getQuinticLowerLimitFactor
());
node
.
setDoubleProperty
(
"quinticUpprBrLmt"
,
force
.
getQuinticUpperBornRadiusLimit
());
/*
double alpha, beta, gamma;
force.getTanhParameters( alpha, beta, gamma );
node.setDoubleProperty("alphaT", alpha);
node.setDoubleProperty("betaT", beta);
node.setDoubleProperty("gammaT", gamma);
*/
SerializationNode
&
particles
=
node
.
createChildNode
(
"Particles"
);
for
(
int
i
=
0
;
i
<
force
.
getNumParticles
();
i
++
)
{
double
charge
,
radius
,
gamma
,
bornRadiusScaleFactor
;
...
...
@@ -82,11 +84,13 @@ void* GBVISoftcoreForceProxy::deserialize(const SerializationNode& node) const {
force
->
setSolventDielectric
(
node
.
getDoubleProperty
(
"solventDielectric"
));
force
->
setQuinticLowerLimitFactor
(
node
.
getDoubleProperty
(
"quinticLwrLmtFctr"
));
force
->
setQuinticUpperBornRadiusLimit
(
node
.
getDoubleProperty
(
"quinticUpprBrLmt"
));
/*
double alpha, beta, gamma;
alpha = node.getDoubleProperty("alphaT");
beta = node.getDoubleProperty("betaT");
gamma = node.getDoubleProperty("gammaT");
force->setTanhParameters( alpha, beta, gamma );
*/
const
SerializationNode
&
particles
=
node
.
getChildNode
(
"Particles"
);
for
(
int
i
=
0
;
i
<
(
int
)
particles
.
getChildren
().
size
();
i
++
)
{
const
SerializationNode
&
particle
=
particles
.
getChildren
()[
i
];
...
...
plugins/freeEnergy/serialization/src/FreeEnergyNonbondedSoftcoreForceProxy.cpp
View file @
55678aa1
...
...
@@ -45,7 +45,7 @@ void NonbondedSoftcoreForceProxy::serialize(const void* object, SerializationNod
const
NonbondedSoftcoreForce
&
force
=
*
reinterpret_cast
<
const
NonbondedSoftcoreForce
*>
(
object
);
node
.
setIntProperty
(
"method"
,
(
int
)
force
.
getNonbondedMethod
());
node
.
setDoubleProperty
(
"cutoff"
,
force
.
getCutoffDistance
());
node
.
setDoubleProperty
(
"ewaldTolerance"
,
force
.
getEwaldErrorTolerance
());
//
node.setDoubleProperty("ewaldTolerance", force.getEwaldErrorTolerance());
node
.
setDoubleProperty
(
"rfDielectric"
,
force
.
getReactionFieldDielectric
());
//node.setIntProperty("dispersionCorrection", force.getUseDispersionCorrection());
SerializationNode
&
particles
=
node
.
createChildNode
(
"Particles"
);
...
...
@@ -64,13 +64,13 @@ void NonbondedSoftcoreForceProxy::serialize(const void* object, SerializationNod
}
void
*
NonbondedSoftcoreForceProxy
::
deserialize
(
const
SerializationNode
&
node
)
const
{
if
(
node
.
getIntProperty
(
"version"
)
!=
1
)
if
(
node
.
getIntProperty
(
"version"
)
!=
1
)
throw
OpenMMException
(
"Unsupported version number"
);
NonbondedSoftcoreForce
*
force
=
new
NonbondedSoftcoreForce
();
try
{
force
->
setNonbondedMethod
((
NonbondedSoftcoreForce
::
NonbondedSoftcoreMethod
)
node
.
getIntProperty
(
"method"
));
force
->
setCutoffDistance
(
node
.
getDoubleProperty
(
"cutoff"
));
force
->
setEwaldErrorTolerance
(
node
.
getDoubleProperty
(
"ewaldTolerance"
));
//
force->setEwaldErrorTolerance(node.getDoubleProperty("ewaldTolerance"));
force
->
setReactionFieldDielectric
(
node
.
getDoubleProperty
(
"rfDielectric"
));
//force->setUseDispersionCorrection(node.getIntProperty("dispersionCorrection"));
const
SerializationNode
&
particles
=
node
.
getChildNode
(
"Particles"
);
...
...
plugins/freeEnergy/serialization/tests/TestSerializeFreeEnergyGBVISoftcoreForce.cpp
View file @
55678aa1
...
...
@@ -49,7 +49,7 @@ void testSerialization() {
force
.
setSolventDielectric
(
50.0
);
force
.
setQuinticLowerLimitFactor
(
0.1
);
force
.
setQuinticUpperBornRadiusLimit
(
5.1
);
force
.
setTanhParameters
(
5.1
,
4.2
,
1.3
);
//
force.setTanhParameters(5.1, 4.2, 1.3);
force
.
addParticle
(
1
,
0.1
,
0.01
,
0.1
);
force
.
addParticle
(
0.5
,
0.2
,
0.02
,
0.2
);
...
...
@@ -73,6 +73,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force
.
getQuinticLowerLimitFactor
(),
force2
.
getQuinticLowerLimitFactor
());
ASSERT_EQUAL
(
force
.
getQuinticUpperBornRadiusLimit
(),
force2
.
getQuinticUpperBornRadiusLimit
());
ASSERT_EQUAL
(
force
.
getBornRadiusScalingMethod
(),
force2
.
getBornRadiusScalingMethod
());
/*
double alpha1, beta1, gamma1;
double alpha2, beta2, gamma2;
force.getTanhParameters( alpha1, beta1, gamma1 );
...
...
@@ -80,6 +81,7 @@ void testSerialization() {
ASSERT_EQUAL(alpha1, alpha2);
ASSERT_EQUAL(beta1, beta2);
ASSERT_EQUAL(gamma1, gamma2);
*/
ASSERT_EQUAL
(
force
.
getNumParticles
(),
force2
.
getNumParticles
());
for
(
int
i
=
0
;
i
<
force
.
getNumParticles
();
i
++
)
{
double
charge1
,
radius1
,
scale1
,
bornRadiusScaleFactor1
;
...
...
plugins/freeEnergy/serialization/tests/TestSerializeFreeEnergyNonbondedSoftcoreForce.cpp
View file @
55678aa1
...
...
@@ -45,7 +45,7 @@ void testSerialization() {
NonbondedSoftcoreForce
force
;
force
.
setNonbondedMethod
(
NonbondedSoftcoreForce
::
CutoffPeriodic
);
force
.
setCutoffDistance
(
2.0
);
force
.
setEwaldErrorTolerance
(
1e-3
);
//
force.setEwaldErrorTolerance(1e-3);
force
.
setReactionFieldDielectric
(
50.0
);
//force.setUseDispersionCorrection(false);
force
.
addParticle
(
1
,
0.1
,
0.01
);
...
...
@@ -65,7 +65,7 @@ void testSerialization() {
NonbondedSoftcoreForce
&
force2
=
*
copy
;
ASSERT_EQUAL
(
force
.
getNonbondedMethod
(),
force2
.
getNonbondedMethod
());
ASSERT_EQUAL
(
force
.
getCutoffDistance
(),
force2
.
getCutoffDistance
());
ASSERT_EQUAL
(
force
.
getEwaldErrorTolerance
(),
force2
.
getEwaldErrorTolerance
());
//
ASSERT_EQUAL(force.getEwaldErrorTolerance(), force2.getEwaldErrorTolerance());
ASSERT_EQUAL
(
force
.
getReactionFieldDielectric
(),
force2
.
getReactionFieldDielectric
());
//ASSERT_EQUAL(force.getUseDispersionCorrection(), force2.getUseDispersionCorrection());
ASSERT_EQUAL
(
force
.
getNumParticles
(),
force2
.
getNumParticles
());
...
...
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