git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1034 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2007-10-12 17:34:53 +00:00
parent 913dca7a2d
commit a1b082b37d
4 changed files with 60 additions and 0 deletions

View File

@ -85,6 +85,15 @@ double RanPark::gaussian()
return first;
}
/* ---------------------------------------------------------------------- */
void RanPark::reset(int seed_init)
{
if (seed_init <= 0) error->all("Invalid seed for Park random # generator");
seed = seed_init;
save = 0;
}
/* ----------------------------------------------------------------------
reset the seed based on atom position within box and ibase = caller seed
combine 3 RNGs based on fractional position in box into one new seed
@ -135,3 +144,10 @@ void RanPark::reset(int ibase, double *coord)
uniform();
uniform();
}
/* ---------------------------------------------------------------------- */
int RanPark::state()
{
return seed;
}