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

AttributeError: 'module' object has no attribute 'WaterBridgeAnalysis' #2064

Closed
xdeupi opened this issue Sep 7, 2018 · 2 comments
Closed

Comments

@xdeupi
Copy link
Contributor

xdeupi commented Sep 7, 2018

Hi all,
I cannot use the WaterBridgeAnalysis class in the hydrogen bond analysis module. When I execute the following script

import MDAnalysis
import MDAnalysis.analysis.hbonds
u = MDAnalysis.Universe('step5_assembly.xplor_ext_JSR.psf', 'runMD500ns_stride50.dcd')
w = MDAnalysis.analysis.hbonds.WaterBridgeAnalysis(u, 'resname ARG', 'resname ASP')
w.run()

I get:

AttributeError: 'module' object has no attribute 'WaterBridgeAnalysis'

I can use other classes in the module (e.g. HydrogenBondAnalysis), and I do see all the necessary source files in my distribution (I installed MDAnalysis 0.18.0-py2.7 in Mac OS 10.13.6 using Conda).

Any ideas?

Thanks,

Xavier

@richardjgowers
Copy link
Member

Hey Xavier,

I think you'lll find that at MDAnalysis.analysis.hbonds.wbridge_analysis.WaterBridgeAnalysis, does that work for you?

@orbeckst
Copy link
Member

orbeckst commented Sep 7, 2018

Is MDAnalysis.analysis.hbonds.WaterBridgeAnalysis documented to work? Yes, at https://www.mdanalysis.org/mdanalysis/documentation_pages/analysis/wbridge_analysis.html#how-to-perform-waterbridgeanalysis and given that we also import into the hbonds namespace

__all__ = ['HydrogenBondAnalysis', 'HydrogenBondAutoCorrel']
we should also import the wbridge_analysis ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants