Hi,
I am trying to calculate the lifetime of the hydrogen bonds in my simulation, but I am annoyingly not able to use the lifetime function (I get an Attribute error). I've checked & re-checked that I am importing the modules correctly, so I have no idea why this should be coming up.
Example code:
from MDAnalysis.analysis.hydrogenbonds.hbond_analysis import HydrogenBondAnalysis as HBA
hbonds = HBA(
universe=u,
donors_sel=None,
hydrogens_sel="name HT1",
acceptors_sel="name OT1 OT2",
d_a_cutoff=3.0,
d_h_a_angle_cutoff=150,
update_selections=False
)
hbonds.run(
start=None,
stop=None,
step=None,
verbose=True
)
tau_timeseries, timeseries = hbonds.lifetime()
Then I get the following Attribute Error:
AttributeError Traceback (most recent call last)
<ipython-input-18-f0f90b59372c> in <module>
----> 1 tau_timeseries, timeseries = hbonds.lifetime()
AttributeError: 'HydrogenBondAnalysis' object has no attribute 'lifetime'
I've updated MDAnalysis & still get the same error! Any ideas?
Best wishes,
Angela