Skip to content

HydrogenBondLifetimes (Autocorrelation) has an increasing value #2247

@bieniekmateusz

Description

@bieniekmateusz

The autocorrelation has to be decreasing.

Adjusted test case from the test_waterdynamics.py file:

def test_HydrogenBondLifetimes_growing_continuous(universe):
    # The autocorrelation cannot grow
    hbl = waterdynamics.HydrogenBondLifetimes(
        universe, SELECTION1, SELECTION1, t0=0, tf=9, dtmax=5)
    hbl.run()
    print("results", hbl.timeseries)
    # Index 0 in frameX[0] refers to the continuous, 1 to intermittent
    assert all([frameX[0] > frameXplus1[0] for frameX, frameXplus1 in zip(hbl.timeseries, hbl.timeseries[1:])])

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.

  • Which version are you using? developing branch
  • Python 2.7
  • Linux Arch

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions