-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reaction_methods: new optional keyword exclusion_radius_per_type (#4469)
Fixes #4437 Description of changes: - The keyword `exclusion_radius` has been renamed to `exclusion_range`. - If the keyword `exclusion_radius` is provided, a keyerror warns the user that `exclusion_radius` is obsolete and the current equivalent keyword is `exclusion_range` - The reaction methods now take `exclusion_radius_per_type` as an optional argument. - The exclusion range between two particles is calculated as their sum of their radii in `exclusion_radius_per_type`, following the Lorentz-Berthelot combining rule. - 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. - A new section have been added in `doc/sphinx/advanced_methods.rst` to explain how to couple the reaction methods to molecular dynamics, including the new features of this PR. - New unit tests have been included in `src/core/reaction_methods/tests/ReactionAlgorithm_test.cpp` to check the behavior of `exclusion_radius_per_type` - The loop over all particles in `ReactionAlgorithm::check_exclusion_range` now breaks if one particle is found within the exclusion range of the inserted particle. - All benchmarks, samples, tests and tutorials have been changed accordingly. I checked the computational efficiency using the benchmark in `maintainer/benchmarks/mc_acid_base_reservoir.py` and this PR improves the MC computational by a 15% compared to the current python branch (MC timing: 1.268e-04 vs 1.395e-04, this PR vs current python, respectively). Probably the gain could be even higher for dense systems.
- Loading branch information
Showing
23 changed files
with
290 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.