Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new random number generators #882

Merged
merged 98 commits into from
Feb 27, 2021
Merged

Add new random number generators #882

merged 98 commits into from
Feb 27, 2021

Conversation

drroe
Copy link
Contributor

@drroe drroe commented Feb 26, 2021

The current Marsaglia generator that cpptraj uses (the Amber default one) is known to have issues. This PR is the first step to adding better random number generators. See devtools/rngtest/README.md and devtools/testu01/README.md for test results using the Dieharder and TestU01 RNG test suites respectively.

The RNGs added are:

  1. The C-standard library RNG.
  2. The Mersenne Twister (via C++11 library)
  3. Permuted Congruential Generator 32 (https://www.pcg-random.org/)
  4. Xoshiro128++ (http://prng.di.unimi.it/)

Numbers 2, 3, and 4 are the best so far, and I think eventually 4 may be made the default based on initial test results.

@hainm This also adds ExternalFxn.h ; the idea is eventually to get everything that packages like pytraj need (but not necessarily cpptraj itself) in there, and hopefully I will be less likely to break interfaces to those packages. I will be making a PR to pytraj soon that will make use of this and will protect the pytraj tests when the default RNG is changed.

This PR also adds the manual entry for evalplateau (since it is now published, https://aip.scitation.org/doi/abs/10.1063/5.0013849), and some missing citations. Also, the Travis badge is swapped for GitHub Actions.

@hainm
Copy link
Contributor

hainm commented Feb 26, 2021

@hainm This also adds ExternalFxn.h ; the idea is eventually to get everything that packages like pytraj need (but not necessarily cpptraj itself) in there, and hopefully I will be less likely to break interfaces to those packages. I will be making a PR to pytraj soon that will make use of this and will protect the pytraj tests when the default RNG is changed.

image

@drroe
Copy link
Contributor Author

drroe commented Feb 27, 2021

@swails Thanks for the help squashing that tzdata issue!

@drroe drroe merged commit 196783e into Amber-MD:master Feb 27, 2021
@drroe drroe deleted the rng branch February 27, 2021 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants