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
65ee8fd7
Commit
65ee8fd7
authored
Feb 14, 2020
by
Peter Eastman
Browse files
Renamed BAOABLangevinIntegrator to LangevinMiddleIntegrator
parent
ba9f6b0a
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
serialization/src/SerializationProxyRegistration.cpp
serialization/src/SerializationProxyRegistration.cpp
+3
-3
serialization/tests/TestSerializeIntegrator.cpp
serialization/tests/TestSerializeIntegrator.cpp
+6
-6
tests/TestLangevinMiddleIntegrator.h
tests/TestLangevinMiddleIntegrator.h
+6
-6
No files found.
serialization/src/SerializationProxyRegistration.cpp
View file @
65ee8fd7
...
...
@@ -30,7 +30,6 @@
* -------------------------------------------------------------------------- */
#include "openmm/AndersenThermostat.h"
#include "openmm/BAOABLangevinIntegrator.h"
#include "openmm/BrownianIntegrator.h"
#include "openmm/CMAPTorsionForce.h"
#include "openmm/CMMotionRemover.h"
...
...
@@ -52,6 +51,7 @@
#include "openmm/HarmonicAngleForce.h"
#include "openmm/HarmonicBondForce.h"
#include "openmm/LangevinIntegrator.h"
#include "openmm/LangevinMiddleIntegrator.h"
#include "openmm/MonteCarloAnisotropicBarostat.h"
#include "openmm/MonteCarloBarostat.h"
#include "openmm/MonteCarloMembraneBarostat.h"
...
...
@@ -67,7 +67,6 @@
#include "openmm/VerletIntegrator.h"
#include "openmm/serialization/SerializationProxy.h"
#include "openmm/serialization/BAOABLangevinIntegratorProxy.h"
#include "openmm/serialization/BrownianIntegratorProxy.h"
#include "openmm/serialization/AndersenThermostatProxy.h"
#include "openmm/serialization/CMAPTorsionForceProxy.h"
...
...
@@ -90,6 +89,7 @@
#include "openmm/serialization/HarmonicAngleForceProxy.h"
#include "openmm/serialization/HarmonicBondForceProxy.h"
#include "openmm/serialization/LangevinIntegratorProxy.h"
#include "openmm/serialization/LangevinMiddleIntegratorProxy.h"
#include "openmm/serialization/MonteCarloAnisotropicBarostatProxy.h"
#include "openmm/serialization/MonteCarloBarostatProxy.h"
#include "openmm/serialization/MonteCarloMembraneBarostatProxy.h"
...
...
@@ -121,7 +121,6 @@ using namespace OpenMM;
extern
"C"
void
registerSerializationProxies
()
{
SerializationProxy
::
registerProxy
(
typeid
(
AndersenThermostat
),
new
AndersenThermostatProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
BAOABLangevinIntegrator
),
new
BAOABLangevinIntegratorProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
BrownianIntegrator
),
new
BrownianIntegratorProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
CMAPTorsionForce
),
new
CMAPTorsionForceProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
CMMotionRemover
),
new
CMMotionRemoverProxy
());
...
...
@@ -149,6 +148,7 @@ extern "C" void registerSerializationProxies() {
SerializationProxy
::
registerProxy
(
typeid
(
HarmonicAngleForce
),
new
HarmonicAngleForceProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
HarmonicBondForce
),
new
HarmonicBondForceProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
LangevinIntegrator
),
new
LangevinIntegratorProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
LangevinMiddleIntegrator
),
new
LangevinMiddleIntegratorProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
MonteCarloAnisotropicBarostat
),
new
MonteCarloAnisotropicBarostatProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
MonteCarloBarostat
),
new
MonteCarloBarostatProxy
());
SerializationProxy
::
registerProxy
(
typeid
(
MonteCarloMembraneBarostat
),
new
MonteCarloMembraneBarostatProxy
());
...
...
serialization/tests/TestSerializeIntegrator.cpp
View file @
65ee8fd7
...
...
@@ -31,11 +31,11 @@
#include "openmm/internal/AssertionUtilities.h"
#include "openmm/BAOABLangevinIntegrator.h"
#include "openmm/BrownianIntegrator.h"
#include "openmm/CompoundIntegrator.h"
#include "openmm/CustomIntegrator.h"
#include "openmm/LangevinIntegrator.h"
#include "openmm/LangevinMiddleIntegrator.h"
#include "openmm/VariableLangevinIntegrator.h"
#include "openmm/VariableVerletIntegrator.h"
#include "openmm/VerletIntegrator.h"
...
...
@@ -75,11 +75,11 @@ void testSerializeLangevinIntegrator() {
delete
intg2
;
}
void
testSerialize
BAOAB
LangevinIntegrator
()
{
BAOAB
LangevinIntegrator
*
intg
=
new
BAOAB
LangevinIntegrator
(
372.4
,
1.234
,
0.0018
);
void
testSerializeLangevin
Middle
Integrator
()
{
Langevin
Middle
Integrator
*
intg
=
new
Langevin
Middle
Integrator
(
372.4
,
1.234
,
0.0018
);
stringstream
ss
;
XmlSerializer
::
serialize
<
Integrator
>
(
intg
,
"
BAOAB
LangevinIntegrator"
,
ss
);
BAOAB
LangevinIntegrator
*
intg2
=
dynamic_cast
<
BAOAB
LangevinIntegrator
*>
(
XmlSerializer
::
deserialize
<
Integrator
>
(
ss
));
XmlSerializer
::
serialize
<
Integrator
>
(
intg
,
"Langevin
Middle
Integrator"
,
ss
);
Langevin
Middle
Integrator
*
intg2
=
dynamic_cast
<
Langevin
Middle
Integrator
*>
(
XmlSerializer
::
deserialize
<
Integrator
>
(
ss
));
ASSERT_EQUAL
(
intg
->
getConstraintTolerance
(),
intg2
->
getConstraintTolerance
());
ASSERT_EQUAL
(
intg
->
getStepSize
(),
intg2
->
getStepSize
());
ASSERT_EQUAL
(
intg
->
getTemperature
(),
intg2
->
getTemperature
());
...
...
@@ -259,7 +259,7 @@ int main() {
testSerializeVariableLangevinIntegrator
();
testSerializeVariableVerletIntegrator
();
testSerializeLangevinIntegrator
();
testSerialize
BAOAB
LangevinIntegrator
();
testSerializeLangevin
Middle
Integrator
();
testSerializeCompoundIntegrator
();
}
catch
(
const
exception
&
e
)
{
...
...
tests/Test
BAOAB
LangevinIntegrator.h
→
tests/TestLangevin
Middle
Integrator.h
View file @
65ee8fd7
...
...
@@ -34,7 +34,7 @@
#include "openmm/HarmonicBondForce.h"
#include "openmm/NonbondedForce.h"
#include "openmm/System.h"
#include "openmm/
BAOAB
LangevinIntegrator.h"
#include "openmm/Langevin
Middle
Integrator.h"
#include "SimTKOpenMMRealType.h"
#include "sfmt/SFMT.h"
#include <iostream>
...
...
@@ -49,7 +49,7 @@ void testSingleBond() {
System
system
;
system
.
addParticle
(
2.0
);
system
.
addParticle
(
2.0
);
BAOAB
LangevinIntegrator
integrator
(
0
,
0.1
,
0.01
);
Langevin
Middle
Integrator
integrator
(
0
,
0.1
,
0.01
);
HarmonicBondForce
*
forceField
=
new
HarmonicBondForce
();
forceField
->
addBond
(
0
,
1
,
1.5
,
1
);
system
.
addForce
(
forceField
);
...
...
@@ -93,7 +93,7 @@ void testTemperature() {
const
double
temp
=
100.0
;
System
system
;
system
.
setDefaultPeriodicBoxVectors
(
Vec3
(
5
,
0
,
0
),
Vec3
(
0
,
5
,
0
),
Vec3
(
0
,
0
,
5
));
BAOAB
LangevinIntegrator
integrator
(
temp
,
3.0
,
0.01
);
Langevin
Middle
Integrator
integrator
(
temp
,
3.0
,
0.01
);
NonbondedForce
*
forceField
=
new
NonbondedForce
();
forceField
->
setNonbondedMethod
(
NonbondedForce
::
CutoffPeriodic
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
...
@@ -130,7 +130,7 @@ void testConstraints() {
const
int
numConstraints
=
5
;
const
double
temp
=
100.0
;
System
system
;
BAOAB
LangevinIntegrator
integrator
(
temp
,
2.0
,
0.01
);
Langevin
Middle
Integrator
integrator
(
temp
,
2.0
,
0.01
);
integrator
.
setConstraintTolerance
(
1e-5
);
NonbondedForce
*
forceField
=
new
NonbondedForce
();
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
...
@@ -181,7 +181,7 @@ void testConstrainedMasslessParticles() {
vector
<
Vec3
>
positions
(
2
);
positions
[
0
]
=
Vec3
(
-
1
,
0
,
0
);
positions
[
1
]
=
Vec3
(
1
,
0
,
0
);
BAOAB
LangevinIntegrator
integrator
(
300.0
,
2.0
,
0.01
);
Langevin
Middle
Integrator
integrator
(
300.0
,
2.0
,
0.01
);
bool
failed
=
false
;
try
{
// This should throw an exception.
...
...
@@ -208,7 +208,7 @@ void testRandomSeed() {
const
int
numParticles
=
8
;
const
double
temp
=
100.0
;
System
system
;
BAOAB
LangevinIntegrator
integrator
(
temp
,
2.0
,
0.01
);
Langevin
Middle
Integrator
integrator
(
temp
,
2.0
,
0.01
);
NonbondedForce
*
forceField
=
new
NonbondedForce
();
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
system
.
addParticle
(
2.0
);
...
...
Prev
1
2
3
Next
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