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

From: Gustavo Seabra <gustavo.seabra.gmail.com>
Date: Fri, 5 Jun 2009 16:16:00 +0100

Hi Bob,

I totally agree with you here. Better safe than sorry :-)

Gustavo Seabra
Postdoctoral Associate
Quantum Theory Project - University of Florida
Gainesville - Florida - USA
-------------------------------------------------------------------------------------------
Q: Why do mountain climbers rope themselves together?
A: To prevent the sensible ones from going home.




On Fri, Jun 5, 2009 at 10:37 AM, Robert Duke<rduke.email.unc.edu> wrote:
> Hi Gustavo,
> Well, I have not wanted to track through the code to figure out what would
> really happen, though it would be simple enough to sample.  BUT if it does
> what you say here, that is potentially bad.  The generator we use is pretty
> much "stock" ranmar(), which is a pretty well-described and respected
> generator with a very long period (one of several popularized by Marsaglia -
> probably not the best available in its current incarnation, but not bad). It
> is really two lagged fibonacci generators (with addition as the operation on
> the fibonacci generator I believe), and these two generators are seeded by
> another generator (a congruential generator of some sort).  Various
> additional monkey motion is applied to the two outputs of the LFG's to get
> the final value in any one call.  I WOULD stick to the recommended
> constraints (seed > 0) unless the results of doing otherwise are tested (fed
> through the diehard tests or some such - but that is work); my basic
> philosophy on prng's is that taking liberties with them may produce
> incorrect results which are hard to detect, so why risk increasing the
> probability that you are generating junk if you don't have to.  A dictum in
> the MC physics community these days seems to be that it is a good idea to
> run your experiments with two different prng's before you start to believe
> the results.
> 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
>

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