Skip to content

Commit

Permalink
Fix to RNG
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandronascimento committed Sep 12, 2022
1 parent 5ff2648 commit f103fb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trunk/src/LiBELa/SA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ vector<vector<double> > SA::optimize(Mol2* Lig, PARSER* Input, Grid* Grids, gsl_
}
else{
p = this->Boltzmman(ene, new_ene, t);
rnumber = gsl_rng_uniform(r) / (gsl_rng_max(r) + 1.0);
rnumber = gsl_rng_uniform(r);
if (p > rnumber){
ene = new_ene;
xyz = new_xyz;
Expand Down Expand Up @@ -145,7 +145,7 @@ vector<vector<double> > SA::optimize(Mol2* Lig, PARSER* Input, Mol2* Rec, gsl_rn
}
else{
p = this->Boltzmman(ene, new_ene, t);
rnumber = gsl_rng_uniform(r) / (gsl_rng_max(r) + 1.0);
rnumber = gsl_rng_uniform(r);
if (p > rnumber){
ene = new_ene;
xyz = new_xyz;
Expand Down

0 comments on commit f103fb7

Please sign in to comment.