Hydrogen Bond Analysis of water; error

56 views
Skip to first unread message

aj...@nyu.edu

unread,
Feb 27, 2024, 10:19:21 PMFeb 27
to MDnalysis Discussion (ARCHIVED)
Hi, I would like to count the number of hydrogen bonds in a trajectory (it is a dcd trajectory with pdb topology)

Using

from MDAnalysis.analysis.hydrogenbonds import HydrogenBondAnalysis as HBA
hbonds = HBA(universe=u)
hbonds.run() 

gives the error 

NoDataError: This Universe does not contain charge information

Same happens if I try to guess the hydrogens and acceptors.

If I specify the hydrogens and acceptors manually by

hbonds = HBA(universe=u,hydrogens_sel="name H1 H2",acceptors_sel="name O")

I get the error

NoDataError: Cannot assign donor-hydrogen pairs via topology as no bond information is present. Please either: load a topology file with bond information; use the guess_bonds() topology guesser; or set HydrogenBondAnalysis.donors_sel so that a distance cutoff can be used.

Would be grateful for any hints
Thank you
Alexej

aj...@nyu.edu

unread,
Feb 28, 2024, 7:21:13 AMFeb 28
to MDnalysis Discussion (ARCHIVED)
forgot to add that it's MDAnalysis version 2.5.0

aj...@nyu.edu

unread,
Feb 28, 2024, 7:52:52 AMFeb 28
to MDnalysis Discussion (ARCHIVED)
Ah, I should have read the error message in detail. Indeed, if I just guess_bonds() on the water residues it runs without error. 

Project Manager MDAnalysis

unread,
Feb 28, 2024, 12:15:43 PMFeb 28
to MDnalysis Discussion (ARCHIVED)
Hi Alexej,

I'm glad that you were able to figure out the issue. In future, please also note that we have transitioned from this mailing list to GitHub Discussions for user questions. You can read more about this change on our blog: https://www.mdanalysis.org/2023/12/21/github-discussions/.

Thanks,
Jenna
--

Project, Community and Outreach Manager
MDAnalysis * https://www.mdanalysis.org/
a fiscally sponsored project of NumFOCUS
Twitter: @mdanalysis

Reply all
Reply to author
Forward
0 new messages