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
be8bd376
Commit
be8bd376
authored
Jan 10, 2015
by
Jason Swails
Browse files
The Drude and RPMD plugins both also use random numbers -- change default seed
to 0 here as well.
parent
d422c306
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
plugins/drude/openmmapi/include/openmm/DrudeLangevinIntegrator.h
.../drude/openmmapi/include/openmm/DrudeLangevinIntegrator.h
+4
-0
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
+1
-2
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
+4
-0
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
+2
-3
No files found.
plugins/drude/openmmapi/include/openmm/DrudeLangevinIntegrator.h
View file @
be8bd376
...
...
@@ -142,6 +142,10 @@ public:
* the other hand, no guarantees are made about the behavior of simulations that use the same seed.
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void
setRandomNumberSeed
(
int
seed
)
{
randomNumberSeed
=
seed
;
...
...
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
View file @
be8bd376
...
...
@@ -33,7 +33,6 @@
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/DrudeKernels.h"
#include <ctime>
#include <string>
...
...
@@ -49,7 +48,7 @@ DrudeLangevinIntegrator::DrudeLangevinIntegrator(double temperature, double fric
setDrudeFriction
(
drudeFrictionCoeff
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
osrngseed
()
);
setRandomNumberSeed
(
0
);
}
void
DrudeLangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
View file @
be8bd376
...
...
@@ -155,6 +155,10 @@ public:
* the other hand, no guarantees are made about the behavior of simulations that use the same seed.
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void
setRandomNumberSeed
(
int
seed
)
{
randomNumberSeed
=
seed
;
...
...
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
View file @
be8bd376
...
...
@@ -33,7 +33,6 @@
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/RpmdKernels.h"
#include "SimTKOpenMMRealType.h"
#include <cmath>
...
...
@@ -48,7 +47,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
osrngseed
()
);
setRandomNumberSeed
(
0
);
}
RPMDIntegrator
::
RPMDIntegrator
(
int
numCopies
,
double
temperature
,
double
frictionCoeff
,
double
stepSize
)
:
...
...
@@ -57,7 +56,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
osrngseed
()
);
setRandomNumberSeed
(
0
);
}
void
RPMDIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
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