-
Notifications
You must be signed in to change notification settings - Fork 667
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
HydrogenBondLifetimes (Autocorrelation) has an increasing value #2247
Comments
Are you saying that the calculated ACF must be monotonically decreasing? Not even a little bit of noise allowed? |
In the actual experiments I imagine the noise could create this kind of data. However, in the case of continuous ACF this cannot happen. This is because at each point t0, we take our bonds and check if they survive at every step up until a given tau, say tau=t4. If they leave at t3, we do not allow it to return, and so t4 is thrown away (we say it has left). So, by definition, the continuous ACF will be monotonically decreasing. Now, some implementations of the intermittent ACF could lead to the noise you suggest. In our case, it is not possible: we say that if the molecule leaves only at t3 and returns at t4, with the intermittency=1, then we treat this bond as if it was there at every step from t0 to t4, including at t3. So again, it is not possible for the ACF to increase. Paul & Mat |
Yeah this is slightly worrying. I’ve not looked in too much detail at this yet, is there anything this class does that the hbond autocorrel doesn’t do? And how hard would it be to merge the two?
…
On Apr 18, 2019 at 09:27, <Mateusz Bieniek ***@***.***)> wrote:
In the actual experiments I imagine the noise could create this kind of data. However, in the case of continuous ACF this cannot happen. This is because at each point t0, we take our bonds and check if they survive at every step up until a given tau, say tau=t4. If they leave at t3, we do not allow it to return, and so t4 is thrown away (we say it has left). So, by definition, the continuous ACF will be monotonically decreasing.
Now, some implementations of the intermittent ACF could lead to the noise you suggest. In our case, it is not possible: we say that if the molecule leaves only at t3 and returns at t4, with the intermittency=1, then we treat this bond as if it was there at every step from t0 to t4, including at t3. So again, it is not possible for the ACF to increase.
Paul & Mat
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (#2247 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACGSGB6OQQFY2I52GJGZ3M3PRAWIDANCNFSM4HF2T5VQ).
|
@richardjgowers The HydrogenBondLifetimes does not do anything extra. We're hoping to finish soon submit the next PR. We're going to add a function to the Richard's HydrogenBond finder to get the autocorrelation directly. Mat |
#2256) * Summary of changes The main issue with HydrogenBondLifetimes (besides the bug #2247) is that it defined its own definition of a hydrogen bond, without allowing the user to change it. It should be clear that the hydrogen bonds first have to be computed by the user, and then the autocorrelation for the bonds can be found. This is achieved with the autocorrelation() function, which is now made available in a separate module, `MDAnalysis.lib.correlations` so that it can be used by any code. * Provides well defined autocorrelation which can be used for both, SurvivalProbability and HydrogenLifetimes (and more?) in new module MDAnalysis/lib/correlations.py * Autocorrelation function and intermittency function are now independant with their own test cases * Removed the class HydrogenBondLifetimes and moved the autocorrelation functionality into the hbond_analysis class as a .autocorrelation method. This method should replace also hbond_autocorrel.py file in the future. * New test cases for the method .autocorrelation (HydrogenBondAnalysis) were added * Added a test cases that, with our definition of intermittency, would fail in the case of the hbond_autocorrel.py. * Fixes the issue #2247 * Detailed code comments * new module MDAnalysis/lib/correlations.py * Extracting the autocorrelation and intermittency from SP into their own functions with their own test cases. * A more general documentation in the autocorrelation. * The documentation updated with the code. The HydrogenBondAnalysis should ideally be extracted from the HydrogenBondLifetime and fed into it in the constructor. * Removed the class HydrogenBondLifetimes and moved the autocorrelation functionality into the hbond_analysis class as a .autocorrelation method. This method should replace also hbond_autocorrel.py file. Test cases for the new method .autocorrelation are added. * Updated logging. * Added __future__ imports. * Remove deprecation warning for HydrogenBondLifetime. This function will be removed in a future PR once a replacement that uses the new hydrogen bond class is in place. * Added checks for parameters types and dimensions. * reST citations * Detailed test comments * Updated test cases to illuminate the bug in #2247. * Correction for the test to make it consistent with the previous author's test. Our end index is inclusive (5th frame, giving 6 frames). But the other author's analysis was done on 0-4 frames (5 frames). * Exhaustive testing for autocorrelation. It will now return 1 at tau=0. Now the function can be embedded into HydrogenBondLifetime. * Exceptions marked as not covered Co-authored-by: Paul Smith <[email protected]> Co-authored-by: Oliver Beckstein <[email protected]>
…ydrogen bond implementation. Fixes MDAnalysis#2547 and we depracate the waterdynamic.HydrogenBondLifetime because of MDAnalysis#2247. co-authored-by: p-j-smith <[email protected]>
…ydrogen bond implementation. Fixes MDAnalysis#2547 and we depracate the waterdynamic.HydrogenBondLifetime because of MDAnalysis#2247. co-authored-by: p-j-smith <[email protected]>
* Fixes #2547 * The standalone autocorrelation function is now used to calculate the hydrogen bond lifetime in the new implementation of the hydrogen bond analysis class. * Added ability to select groups between which to find hydrogen bonds.: new parameter "between" for hydrogen binding (backwards compatible): The `between` keyword can be used to specify pairs of groups between which hydrogen bonds will be calculated. Hydrogen bonds found other pairs of atom groups will be discarded. * We deprecate the waterdynamics.HydrogenBondLifetime class because of #2247. * Basic unit tests added to check the integration of the separate components * add docs with example * update CHANGELOG co-authored-by: p-j-smith <[email protected]>
* Fixes MDAnalysis#2547 * The standalone autocorrelation function is now used to calculate the hydrogen bond lifetime in the new implementation of the hydrogen bond analysis class. * Added ability to select groups between which to find hydrogen bonds.: new parameter "between" for hydrogen binding (backwards compatible): The `between` keyword can be used to specify pairs of groups between which hydrogen bonds will be calculated. Hydrogen bonds found other pairs of atom groups will be discarded. * We deprecate the waterdynamics.HydrogenBondLifetime class because of MDAnalysis#2247. * Basic unit tests added to check the integration of the separate components * add docs with example * update CHANGELOG co-authored-by: p-j-smith <[email protected]>
The autocorrelation has to be decreasing.
Adjusted test case from the test_waterdynamics.py file:
The current autocorrelation code in HydrogenBondLifetimes returns lifetimes that increase over time. We are planning to address this in the next Pull Request with @p-j-smith where we add the test case and use our standalone autocorrelation function.
The text was updated successfully, but these errors were encountered: