RE: amber-developers: weirdnesses in Langevin dynamics code

From: Mathews, David <>
Date: Mon, 23 May 2005 23:25:31 -0700

Hi All,

For "2. Does anyone understand how amrset() is called in sander? Why was
    argument to amrset() changed from ig to ig+1. It looks to me like the
    current code does the initialization twice (once at about linke 747,
    later at about line 1013). Does anyone understand why we changed from
    the behavior that was present in Amber 8?"

I made the change. Here was my reasoning at the time (from an email):"I
wanted to be able to verify that the parallelization was correct for NEB
therefore needed to be able to get the same results for parallel and
runs. MPI was resetting the parallel number generator after randomizing
velocities. So, I chose to reset the random number generator in non-MPI
well. However, I was concerned that the random numbers generated in the
first step of dynamics would correlate with the randomized velocities, so
reset both to ig+1 instead of ig to break at least some of the

I also wrote:
        "A better fix that would solve the broken test case (for non-MPI)
and the correlation problem would be to not reset the random number
generator in either MPI or non-MPI. Instead, I could have the non-master
processors cycle through random numbers to synchronize with the
(which would otherwise be ahead because it randomized the velocities).
is probably a more elegant solution to the problem."

I did not program that solution, but could do so.

Hope this is helpful.

Received on Wed Apr 05 2006 - 23:49:56 PDT
Custom Search