plumed2
plumed2 copied to clipboard
Add Partitioned Families to PBMetaD
Hi all, I've been working with the Pfaendtner Research Group at the University of Washington on adding some new functionality.
Description
This implements a Partitioned Families option for PBMetaD, which is described by Prakash, et al. The code originally used in that publication was for release v2.4 and in a separate directive. I've cleaned it up for the current dev branch and merged it into the primary PBMetaD functionality.
Essentially, CVs are grouped together into "families" and all CVs in family contribute to the same bias potential. This is implemented by mapping all arguments to their family (vector pfs_
) and using the first argument in each family to be 'dummy', which all CVs in the family contribute to (vector phhold_
). The process for adding bias to an argument is then:
- What family is this argument a part of?
- What is the first argument of that family?
- Add bias to that first argument.
Inputs for this are described by adding PF0=arg1,arg2 PF1=arg3,arg4
etc. Once a PF*
flag is added, partitioned families turns on and every argument must be in family, with no families overlapping (if they overlap, they should just be merged into one full family). Additionally, the number of sigmas, hills files, etc (anything that would typically correspond to individual arguments) now correspond to partitioned families. In the example above, there should only be two sigmas, even though there are 4 CV arguments.
The standard case in which there are no partitioned families is now internally generalized quite nicely as every argument being in its own partitioned family. This keeps the majority of the code unchanged.
I believe @maxbonomi is most likely to be familiar with this.
Target release
I would like my code to appear in release v2.8
Type of contribution
- [X] changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
- [ ] changes to a module not authored by you
- [ ] new module contribution or edit of a module authored by you
Copyright
- [X] I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
- [ ] the module I added or modified contains a
COPYRIGHT
file with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulename
in order to make sure the headers of the module are correct.
Tests
- [X] I added a new regtest or modified an existing regtest to validate my changes.
- [X] I verified that all regtests are passed successfully on GitHub Actions.
There didn't seem to be a unified place for testing the bias
module, so I put two new regtests under basic/rt-pbmetapf*
. Since there weren't many independent tests for PBMetaD
originally, I wasn't too sure what all I should add, so I'm more than happy to write additional test cases or adjust as needed.
Hi, I just wanted to check if this was still under consideration? Cheers
Hi! I will check this shortly. Max
Sent from my iPhone
On 21 May 2021, at 22:34, Isaiah Lemmon @.***> wrote:
Hi, I just wanted to check if this was still under consideration? Cheers
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@maxbonomi I think this can be merged, do you agree?
I did not have time to check - I am currently busy until next week
On Nov 18, 2021, at 14:58, Carlo Camilloni @.***> wrote:
@maxbonomi I think this can be merged, do you agree?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@maxbonomi @carlocamilloni any thoughts about if we can merge this? I've had some requests to use PF recently
@pfaendtner I added a couple of comments, but it's better if @maxbonomi or @carlocamilloni check the code
@pfaendtner @lemmoi @GiovanniBussi @maxbonomi I am happy with it, if @lemmoi @pfaendtner can push an updated version with @GiovanniBussi changes then I think we can get it on master
Codecov Report
Base: 85.85% // Head: 85.68% // Decreases project coverage by -0.16%
:warning:
Coverage data is based on head (
cc75d4c
) compared to base (b190b0d
). Patch coverage: 89.32% of modified lines in pull request are covered.
:exclamation: Current head cc75d4c differs from pull request most recent head ac28170. Consider uploading reports for the commit ac28170 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #688 +/- ##
==========================================
- Coverage 85.85% 85.68% -0.17%
==========================================
Files 600 584 -16
Lines 49505 46318 -3187
==========================================
- Hits 42501 39688 -2813
+ Misses 7004 6630 -374
Impacted Files | Coverage Δ | |
---|---|---|
src/bias/PBMetaD.cpp | 88.70% <89.32%> (+0.96%) |
:arrow_up: |
src/tools/PlumedHandle.cpp | 15.09% <0.00%> (-42.98%) |
:arrow_down: |
src/core/MDAtoms.cpp | 79.43% <0.00%> (-10.49%) |
:arrow_down: |
src/tools/Exception.h | 90.47% <0.00%> (-9.53%) |
:arrow_down: |
src/tools/Keywords.cpp | 51.98% <0.00%> (-8.24%) |
:arrow_down: |
src/cltools/pesmd.cpp | 94.40% <0.00%> (-5.60%) |
:arrow_down: |
src/colvar/EEFSolv.cpp | 88.98% <0.00%> (-4.55%) |
:arrow_down: |
src/core/GenericMolInfo.cpp | 77.27% <0.00%> (-4.04%) |
:arrow_down: |
src/opes/ECVlinear.cpp | 92.45% <0.00%> (-3.92%) |
:arrow_down: |
src/core/PlumedMain.cpp | 86.24% <0.00%> (-3.36%) |
:arrow_down: |
... and 142 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I graduated and no longer work with @pfaendtner, but I'm happy to do the changes @GiovanniBussi requested.
I also rebased this onto the tip of master to avoid any conflicts, but I'm afraid that may have messed up some of github's workflows.. sorry if that happened, different conventions in different groups :slightly_smiling_face:
@lemmoi @pfaendtner thanks, I can merge it and fix the issue with the failing regtests