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
d50f794f
Commit
d50f794f
authored
May 28, 2014
by
Lee-Ping
Browse files
Merge branch 'master' of github.com:SimTk/openmm
parents
d7520868
1833142c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
138 additions
and
22 deletions
+138
-22
CMakeLists.txt
CMakeLists.txt
+2
-1
openmmapi/include/openmm/Context.h
openmmapi/include/openmm/Context.h
+2
-2
openmmapi/include/openmm/internal/OSRngSeed.h
openmmapi/include/openmm/internal/OSRngSeed.h
+47
-0
openmmapi/src/AndersenThermostat.cpp
openmmapi/src/AndersenThermostat.cpp
+2
-2
openmmapi/src/BrownianIntegrator.cpp
openmmapi/src/BrownianIntegrator.cpp
+2
-2
openmmapi/src/CustomIntegrator.cpp
openmmapi/src/CustomIntegrator.cpp
+2
-2
openmmapi/src/LangevinIntegrator.cpp
openmmapi/src/LangevinIntegrator.cpp
+2
-2
openmmapi/src/MonteCarloAnisotropicBarostat.cpp
openmmapi/src/MonteCarloAnisotropicBarostat.cpp
+2
-2
openmmapi/src/MonteCarloBarostat.cpp
openmmapi/src/MonteCarloBarostat.cpp
+2
-2
openmmapi/src/OSRngSeed.cpp
openmmapi/src/OSRngSeed.cpp
+67
-0
openmmapi/src/VariableLangevinIntegrator.cpp
openmmapi/src/VariableLangevinIntegrator.cpp
+3
-2
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
+2
-2
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
+3
-3
No files found.
CMakeLists.txt
View file @
d50f794f
...
@@ -273,7 +273,8 @@ ENDIF(WIN32)
...
@@ -273,7 +273,8 @@ ENDIF(WIN32)
SET
(
OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL
"Whether to build static OpenMM libraries"
)
SET
(
OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL
"Whether to build static OpenMM libraries"
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
ADD_LIBRARY
(
${
STATIC_TARGET
}
STATIC
${
SOURCE_FILES
}
${
SOURCE_INCLUDE_FILES
}
${
API_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
STATIC_TARGET
}
STATIC
${
SOURCE_FILES
}
${
SOURCE_INCLUDE_FILES
}
${
API_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
STATIC_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY -DOPENMMM_VALIDATE_BUILDING_STATIC_LIBRARY -DOPENMM_VALIDATE_BUILDING_STATIC_LIBRARY"
)
SET
(
EXTRA_COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_USE_STATIC_LIBRARIES -DLEPTON_USE_STATIC_LIBRARIES -DPTW32_STATIC_LIB"
)
SET_TARGET_PROPERTIES
(
${
STATIC_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DOPENMMM_VALIDATE_BUILDING_STATIC_LIBRARY -DOPENMM_VALIDATE_BUILDING_STATIC_LIBRARY"
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
IF
(
OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS
)
IF
(
OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS
)
...
...
openmmapi/include/openmm/Context.h
View file @
d50f794f
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
#include "Integrator.h"
#include "Integrator.h"
#include "State.h"
#include "State.h"
#include "System.h"
#include "System.h"
#include <ctime>
#include <iosfwd>
#include <iosfwd>
#include <map>
#include <map>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include "internal/windowsExport.h"
#include "internal/windowsExport.h"
#include "internal/OSRngSeed.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -164,7 +164,7 @@ public:
...
@@ -164,7 +164,7 @@ public:
* @param temperature the temperature for which to select the velocities (measured in Kelvin)
* @param temperature the temperature for which to select the velocities (measured in Kelvin)
* @param randomSeed the random number seed to use when selecting velocities
* @param randomSeed the random number seed to use when selecting velocities
*/
*/
void
setVelocitiesToTemperature
(
double
temperature
,
int
randomSeed
=
time
(
NULL
));
void
setVelocitiesToTemperature
(
double
temperature
,
int
randomSeed
=
osrngseed
(
));
/**
/**
* Get the value of an adjustable parameter defined by a Force object in the System.
* Get the value of an adjustable parameter defined by a Force object in the System.
*
*
...
...
openmmapi/include/openmm/internal/OSRngSeed.h
0 → 100644
View file @
d50f794f
#ifndef OPENMM_OSRNGSEED_H_
#define OPENMM_OSRNGSEED_H_
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2013 Stanford University and the Authors. *
* Authors: Robert T. McGibbon *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
/**
* Return an integer int for use as a seed for a random number generator.
*
* The behavior of this function is platform dependent. On Windows machines,
* this uses CryptGenRandom from the CryptoAPI to get a single int. On other
* platforms (*nix, apple), we read from /dev/urandom
*/
int
osrngseed
(
void
);
#endif
/* OPENMM_OSRNGSEED_H_ */
\ No newline at end of file
openmmapi/src/AndersenThermostat.cpp
View file @
d50f794f
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
#include "openmm/AndersenThermostat.h"
#include "openmm/AndersenThermostat.h"
#include "openmm/internal/AndersenThermostatImpl.h"
#include "openmm/internal/AndersenThermostatImpl.h"
#include
<ctime>
#include
"openmm/internal/OSRngSeed.h"
using
namespace
OpenMM
;
using
namespace
OpenMM
;
AndersenThermostat
::
AndersenThermostat
(
double
defaultTemperature
,
double
defaultCollisionFrequency
)
:
AndersenThermostat
::
AndersenThermostat
(
double
defaultTemperature
,
double
defaultCollisionFrequency
)
:
defaultTemp
(
defaultTemperature
),
defaultFreq
(
defaultCollisionFrequency
)
{
defaultTemp
(
defaultTemperature
),
defaultFreq
(
defaultCollisionFrequency
)
{
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
ForceImpl
*
AndersenThermostat
::
createImpl
()
const
{
ForceImpl
*
AndersenThermostat
::
createImpl
()
const
{
...
...
openmmapi/src/BrownianIntegrator.cpp
View file @
d50f794f
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
#include "openmm/Context.h"
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <ctime>
#include <string>
#include <string>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
@@ -46,7 +46,7 @@ BrownianIntegrator::BrownianIntegrator(double temperature, double frictionCoeff,
...
@@ -46,7 +46,7 @@ BrownianIntegrator::BrownianIntegrator(double temperature, double frictionCoeff,
setFriction
(
frictionCoeff
);
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
void
BrownianIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
void
BrownianIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
openmmapi/src/CustomIntegrator.cpp
View file @
d50f794f
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/AssertionUtilities.h"
#include "openmm/internal/AssertionUtilities.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <ctime>
#include <string>
#include <string>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
@@ -45,7 +45,7 @@ using std::vector;
...
@@ -45,7 +45,7 @@ using std::vector;
CustomIntegrator
::
CustomIntegrator
(
double
stepSize
)
:
globalsAreCurrent
(
true
),
forcesAreValid
(
false
)
{
CustomIntegrator
::
CustomIntegrator
(
double
stepSize
)
:
globalsAreCurrent
(
true
),
forcesAreValid
(
false
)
{
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
kineticEnergy
=
"m*v*v/2"
;
kineticEnergy
=
"m*v*v/2"
;
}
}
...
...
openmmapi/src/LangevinIntegrator.cpp
View file @
d50f794f
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
#include "openmm/Context.h"
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <ctime>
#include <string>
#include <string>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
@@ -46,7 +46,7 @@ LangevinIntegrator::LangevinIntegrator(double temperature, double frictionCoeff,
...
@@ -46,7 +46,7 @@ LangevinIntegrator::LangevinIntegrator(double temperature, double frictionCoeff,
setFriction
(
frictionCoeff
);
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
void
LangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
void
LangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
openmmapi/src/MonteCarloAnisotropicBarostat.cpp
View file @
d50f794f
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
#include "openmm/MonteCarloAnisotropicBarostat.h"
#include "openmm/MonteCarloAnisotropicBarostat.h"
#include "openmm/internal/MonteCarloAnisotropicBarostatImpl.h"
#include "openmm/internal/MonteCarloAnisotropicBarostatImpl.h"
#include
<ctime>
#include
"openmm/internal/OSRngSeed.h"
using
namespace
OpenMM
;
using
namespace
OpenMM
;
MonteCarloAnisotropicBarostat
::
MonteCarloAnisotropicBarostat
(
const
Vec3
&
defaultPressure
,
double
temperature
,
bool
scaleX
,
bool
scaleY
,
bool
scaleZ
,
int
frequency
)
:
MonteCarloAnisotropicBarostat
::
MonteCarloAnisotropicBarostat
(
const
Vec3
&
defaultPressure
,
double
temperature
,
bool
scaleX
,
bool
scaleY
,
bool
scaleZ
,
int
frequency
)
:
defaultPressure
(
defaultPressure
),
temperature
(
temperature
),
scaleX
(
scaleX
),
scaleY
(
scaleY
),
scaleZ
(
scaleZ
),
frequency
(
frequency
)
{
defaultPressure
(
defaultPressure
),
temperature
(
temperature
),
scaleX
(
scaleX
),
scaleY
(
scaleY
),
scaleZ
(
scaleZ
),
frequency
(
frequency
)
{
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
ForceImpl
*
MonteCarloAnisotropicBarostat
::
createImpl
()
const
{
ForceImpl
*
MonteCarloAnisotropicBarostat
::
createImpl
()
const
{
...
...
openmmapi/src/MonteCarloBarostat.cpp
View file @
d50f794f
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
#include "openmm/MonteCarloBarostat.h"
#include "openmm/MonteCarloBarostat.h"
#include "openmm/internal/MonteCarloBarostatImpl.h"
#include "openmm/internal/MonteCarloBarostatImpl.h"
#include
<ctime>
#include
"openmm/internal/OSRngSeed.h"
using
namespace
OpenMM
;
using
namespace
OpenMM
;
MonteCarloBarostat
::
MonteCarloBarostat
(
double
defaultPressure
,
double
temperature
,
int
frequency
)
:
MonteCarloBarostat
::
MonteCarloBarostat
(
double
defaultPressure
,
double
temperature
,
int
frequency
)
:
defaultPressure
(
defaultPressure
),
temperature
(
temperature
),
frequency
(
frequency
)
{
defaultPressure
(
defaultPressure
),
temperature
(
temperature
),
frequency
(
frequency
)
{
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
ForceImpl
*
MonteCarloBarostat
::
createImpl
()
const
{
ForceImpl
*
MonteCarloBarostat
::
createImpl
()
const
{
...
...
openmmapi/src/OSRngSeed.cpp
0 → 100644
View file @
d50f794f
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2013 Stanford University and the Authors. *
* Authors: Robert T. McGibbon *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include <stdexcept>
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
static
HCRYPTPROV
hCryptProv
=
0
;
#pragma comment(lib, "advapi32.lib")
#else
#include <fcntl.h>
#include <unistd.h>
#endif
#include "openmm/internal/OSRngSeed.h"
int
osrngseed
(
void
)
{
int
value
;
#if defined(_WIN32) || defined(__CYGWIN__)
if
(
!::
CryptAcquireContextW
(
&
hCryptProv
,
0
,
0
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
|
CRYPT_SILENT
))
{
throw
std
::
runtime_error
(
"Failed to initialize Windows random API (CryptoGen)"
);
}
if
(
!
CryptGenRandom
(
hCryptProv
,
sizeof
(
int
),
(
BYTE
*
)
&
value
))
{
::
CryptReleaseContext
(
hCryptProv
,
0
);
throw
std
::
runtime_error
(
"Failed to get random numbers"
);
}
if
(
!::
CryptReleaseContext
(
hCryptProv
,
0
))
{
throw
std
::
runtime_error
(
"Failed to release Windows random API context"
);
}
#else
int
m_fd
=
open
(
"/dev/urandom"
,
O_RDONLY
);
if
(
m_fd
==
-
1
)
{
throw
std
::
runtime_error
(
"Failed to open /dev/urandom"
);
}
if
(
read
(
m_fd
,
&
value
,
sizeof
(
int
))
!=
sizeof
(
int
))
{
throw
std
::
runtime_error
(
"Failed to read bytes from /dev/urandom"
);
}
close
(
m_fd
);
#endif
return
value
;
}
\ No newline at end of file
openmmapi/src/VariableLangevinIntegrator.cpp
View file @
d50f794f
...
@@ -33,10 +33,11 @@
...
@@ -33,10 +33,11 @@
#include "openmm/Context.h"
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <limits>
#include <limits>
#include <string>
#include <string>
#include <ctime>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
using
std
::
string
;
using
std
::
string
;
...
@@ -47,7 +48,7 @@ VariableLangevinIntegrator::VariableLangevinIntegrator(double temperature, doubl
...
@@ -47,7 +48,7 @@ VariableLangevinIntegrator::VariableLangevinIntegrator(double temperature, doubl
setFriction
(
frictionCoeff
);
setFriction
(
frictionCoeff
);
setErrorTolerance
(
errorTol
);
setErrorTolerance
(
errorTol
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
void
VariableLangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
void
VariableLangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
View file @
d50f794f
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
#include "openmm/Context.h"
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/DrudeKernels.h"
#include "openmm/DrudeKernels.h"
#include <cmath>
#include <ctime>
#include <ctime>
#include <string>
#include <string>
...
@@ -49,7 +49,7 @@ DrudeLangevinIntegrator::DrudeLangevinIntegrator(double temperature, double fric
...
@@ -49,7 +49,7 @@ DrudeLangevinIntegrator::DrudeLangevinIntegrator(double temperature, double fric
setDrudeFriction
(
drudeFrictionCoeff
);
setDrudeFriction
(
drudeFrictionCoeff
);
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
void
DrudeLangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
void
DrudeLangevinIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
...
...
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
View file @
d50f794f
...
@@ -33,10 +33,10 @@
...
@@ -33,10 +33,10 @@
#include "openmm/Context.h"
#include "openmm/Context.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/OSRngSeed.h"
#include "openmm/RpmdKernels.h"
#include "openmm/RpmdKernels.h"
#include "SimTKOpenMMRealType.h"
#include "SimTKOpenMMRealType.h"
#include <cmath>
#include <cmath>
#include <ctime>
#include <string>
#include <string>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
@@ -48,7 +48,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
...
@@ -48,7 +48,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
setFriction
(
frictionCoeff
);
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
RPMDIntegrator
::
RPMDIntegrator
(
int
numCopies
,
double
temperature
,
double
frictionCoeff
,
double
stepSize
)
:
RPMDIntegrator
::
RPMDIntegrator
(
int
numCopies
,
double
temperature
,
double
frictionCoeff
,
double
stepSize
)
:
...
@@ -57,7 +57,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
...
@@ -57,7 +57,7 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
setFriction
(
frictionCoeff
);
setFriction
(
frictionCoeff
);
setStepSize
(
stepSize
);
setStepSize
(
stepSize
);
setConstraintTolerance
(
1e-5
);
setConstraintTolerance
(
1e-5
);
setRandomNumberSeed
(
(
int
)
time
(
NULL
));
setRandomNumberSeed
(
osrngseed
(
));
}
}
void
RPMDIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
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