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