Commit 8c0b4073 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

RNG seed mods for LangevinIntegrator

parent 73f248e7
......@@ -414,6 +414,15 @@ CudaIntegrateLangevinStepKernel::~CudaIntegrateLangevinStepKernel() {
void CudaIntegrateLangevinStepKernel::initialize(const System& system, const LangevinIntegrator& integrator) {
initializeIntegration(system, data, integrator);
// if LangevinIntegrator seed does not equal default value or is less than/equal to 0, then
// set gpu seed and redo random values
if( integrator.getRandomNumberSeed() < 1 ){
_gpuContext* gpu = data.gpu;
gpu->seed = static_cast<unsigned long>( integrator.getRandomNumberSeed() );
gpuInitializeRandoms( gpu );
}
prevStepSize = -1.0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment