-
Notifications
You must be signed in to change notification settings - Fork 189
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
Monte Carlo prototype #4765
base: python
Are you sure you want to change the base?
Monte Carlo prototype #4765
Conversation
Provide an alternative implementation of SingleReaction, ReactionAlgorithm and ConstantpHEnsemble in pure Python for rapid prototyping of new Monte Carlo methods. Co-authored-by: Pablo Miguel Blanco Andrés <[email protected]>
If the exclusion radius of one particle type is not defined, the value of the parameter provided in ``exclusion_range`` is used by default. | ||
If the value in ``exclusion_radius_per_type`` is equal to 0, then the exclusion range of that particle type with any other particle is 0. | ||
This integration instabilities can be avoided by defining a distance around | ||
the particles which already exist in the system where new particles will not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you improve this sentence here please:
"... where new particles will not be inserted and old particles will not be removed (to maintain detailed balance)."
acceptance_rate = reaction.get_acceptance_rate() | ||
print(f"acceptance rate = {100. * acceptance_rate:.0f}%") | ||
print(f"alpha = {alpha_avg:.2f} +/- {alpha_err:.2f}") | ||
print(f"runtime = {tock - tick:.2f}s") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about splitting this file into yet another python module to separate the example and the mc functionality?
Did you already consider using just in time compilation in some of the functions to cut down the factor 4 difference?
Fixes #4617