Re: [AMBER] use of random seed in multiple runs

From: Robert Duke <rduke.email.unc.edu>
Date: Fri, 5 Jun 2009 15:45:32 +0100

Hi Gustavo,
Oh, and if you say, even if the random number distribution generated with
a -1 seed is statistically good, there remains the problem that with pmemd,
if you stick in -1 as ig each run, you are correlating the heck out of your
runs, which we know is very bad. SO folks absolutely should NOT use ig = -1
with pmemd through amber 10 unless they apply the informal patch I put up on
the amber reflector yesterday. Everyone should note that random number
generation in sander and pmemd is intended to be, and is identical, aside
from this -1 seeding thing that was a new feature added to sander 10 that I
unfortunately missed when working on pmemd 10. Also note, if you use -1 for
earlier versions of sander (<10), you are asking for trouble also. We
should really have implemented this very differently, with a different flag
for time-based generation of the seed, and should have been checking for
out-of-range values of ig...
Regards - Bob
----- Original Message -----
From: "Gustavo Seabra" <gustavo.seabra.gmail.com>
To: "AMBER Mailing List" <amber.ambermd.org>
Sent: Friday, June 05, 2009 9:28 AM
Subject: Re: [AMBER] use of random seed in multiple runs


On Thu, Jun 4, 2009 at 10:31 AM, Robert Duke<rduke.email.unc.edu> wrote:
> Well, I would not recommend doing that. It looks to me like there is
> nothing to stop one from doing this in the code, but the random number
> initialization code clearly states the seed should be > 0. I would have to
> dink with it to see what really happens when you do this.
> [...]

Bob, please correct me if I'm wrong here but, looking at the
random.fpp file in pmemd/src dir, it lloks like the seed provided by
the amber input is used to generate two internal seeds, is1 and is2:

=======================================================
  data is1max, is2max /31328, 30081/

! Construct two internal seeds from single unbound Amber seed:
!
! is1 and is2 are quotient and remainder of iseed/IS2MAX. We add
! one to keep zero and one results from both mapping to one.
! max and min functions keep is1 and is2 in required bounds.

  is1 = max((iseed / is2max) + 1, 1)
  is1 = min(is1, is1max)

  is2 = max(1, mod(iseed, is2max) + 1)
  is2 = min(is2, is2max)
========================================================

So, if you enter a seed of "-1", both is1 and is2 will end up being 1.
There's nothing "illegal" about that, but then you are again always
running your calculation with the same seeds.

Gustavo.

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Jun 06 2009 - 01:08:26 PDT
Custom Search