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

Turn waterdynamics.HydrogenBondLifetimes into function of HydrogenBondAnalysis #2547

Closed
lilyminium opened this issue Feb 23, 2020 · 1 comment · Fixed by #2791
Closed

Turn waterdynamics.HydrogenBondLifetimes into function of HydrogenBondAnalysis #2547

lilyminium opened this issue Feb 23, 2020 · 1 comment · Fixed by #2791

Comments

@lilyminium
Copy link
Member

Is your feature request related to a problem? Please describe.
Given that HydrogenBondLifetimes just runs (the now deprecated) hbonds.HydrogenBondAnalysis under the hood, it seems it could be easily turned into a post-run() function of HydrogenBondAnalysis.

Describe the solution you'd like

Turn it into a function of HydrogenBondAnalysis.

Describe alternatives you've considered
At least use the new class instead of the old one.

Additional context
This is the run() function:

def run(self, **kwargs):
        """Analyze trajectory and produce timeseries"""
        h_list = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(self.universe,
                                                                 self.selection1,
                                                                 self.selection2,
                                                                 distance=3.5,
                                                                 angle=120.0)
        h_list.run(**kwargs)
        self.timeseries = self._getGraphics(h_list.timeseries, self.t0,
                                            self.tf, self.dtmax)
@bieniekmateusz
Copy link
Member

Hi @lilyminium, we have extracted the standalone Autocorrelation function with @p-j-smith (#2256). Once that's merged, we can proceed with your suggestion and add a hydrogen bond lifetime function to HydrogenBondAnalysis that makes use of this discrete autocorrelation function.

The new functions will be available in MDAnalysis.analysis.utils.

bieniekmateusz added a commit to bieniekmateusz/mdanalysis that referenced this issue Jun 25, 2020
…ydrogen bond implementation. Fixes MDAnalysis#2547 and we depracate the waterdynamic.HydrogenBondLifetime because of MDAnalysis#2247.

co-authored-by: p-j-smith <paul.smith@kcl.ac.uk>
bieniekmateusz added a commit to bieniekmateusz/mdanalysis that referenced this issue Jun 25, 2020
…ydrogen bond implementation. Fixes MDAnalysis#2547 and we depracate the waterdynamic.HydrogenBondLifetime because of MDAnalysis#2247.

co-authored-by: p-j-smith <paul.smith@kcl.ac.uk>
orbeckst pushed a commit that referenced this issue Jul 12, 2020
* 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 <paul.smith@kcl.ac.uk>
orbeckst added a commit that referenced this issue Jul 12, 2020
- see #2547 and PR #2791
- will be replaced by MDAnalysis.analysis.hydrogenbonds.HydrogenBondAnalysis.lifetime (in 2.0.0)
- add test for deprecation warning
- update CHANGELOG
PicoCentauri pushed a commit to PicoCentauri/mdanalysis that referenced this issue Mar 30, 2021
* 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 <paul.smith@kcl.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants