Changeset e59735


Ignore:
Timestamp:
May 9, 2017, 11:06:46 AM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_goodresults, ForceAnnealing_tocheck
Children:
d2a077a
Parents:
ba7a54
Message:

tempcommit: Fixing RandomPerturbationAction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/AtomAction/RandomPerturbationAction.cpp

    rba7a54 re59735  
    7878  const double rng_max = random.max();
    7979  const double range = (rng_max - rng_min);
    80   const double offset = (rng_max - rng_min);
     80  const double offset = rng_min;
    8181
    8282  std::vector<AtomicInfo> NewWalkers;
     
    8585    double noisecomponents[NDIM];
    8686    for (size_t i=0;i<NDIM;++i)
    87       noisecomponents[i] = params.noise.get()*(random()*2./range - offset);
     87      noisecomponents[i] = params.noise.get()*((random()-offset)*2./range - 1.);
    8888    const Vector noisevector(noisecomponents);
    8989    LOG(3, "DEBUG: Changing atom " << *first << "'s position by " << noisevector << ".");
Note: See TracChangeset for help on using the changeset viewer.