Skip to content

Commit

Permalink
Fix hbonds path (#4286)
Browse files Browse the repository at this point in the history
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
  • Loading branch information
lilyminium and RMeli authored Sep 12, 2023
1 parent c289b7f commit 16647cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 3 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ The rules for this file:
* release numbers follow "Semantic Versioning" http://semver.org

------------------------------------------------------------------------------
??/??/?? IAlibay, ianmkenney, PicoCentauri, pgbarletta, p-j-smith, richardjgowers
??/??/?? IAlibay, ianmkenney, PicoCentauri, pgbarletta, p-j-smith, richardjgowers,
lilyminium

* 2.7.0

Expand All @@ -24,6 +25,7 @@ Fixes
their original type value (np.float64 and np.nan) (PR #4272)
* Fixes a case where qcprot.CalcRMSDRotationalMatrix would return a
RMSD of None
* Fixes hydrogenbonds tutorial path to point to hbonds (Issue #4285, PR #4286)

Enhancements
* Updated lib.qcprot.CalcRMSDRotationalMatrix to accept either float32 or float64
Expand Down
14 changes: 7 additions & 7 deletions package/MDAnalysis/analysis/hydrogenbonds/hbond_autocorrel.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
::
import MDAnalysis as mda
from MDAnalysis.analysis import hbonds
from MDAnalysis.analysis import hydrogenbonds
from MDAnalysis.tests.datafiles import waterPSF, waterDCD
u = mda.Universe(waterPSF, waterDCD)
hydrogens = u.select_atoms('name H*')
donors = hbonds.find_hydrogen_donors(hydrogens)
donors = hydrogenbonds.find_hydrogen_donors(hydrogens)
Note that this requires the Universe to have bond information. If this isn't
Expand All @@ -101,7 +101,7 @@
::
import MDAnalysis as mda
from MDAnalysis.analysis import hbonds
from MDAnalysis.analysis import hydrogenbonds
from MDAnalysis.tests.datafiles import GRO
# we could load the Universe with guess_bonds=True
# but this would guess **all** bonds
Expand All @@ -112,7 +112,7 @@
water.guess_bonds()
hydrogens = water.select_atoms('type H')
# this is now possible as we guessed the bonds
donors = hbonds.find_hydrogen_donors(hydrogens)
donors = hydrogenbonds.find_hydrogen_donors(hydrogens)
The keyword **exclusions** allows a tuple of array addresses to be provided,
Expand Down Expand Up @@ -166,7 +166,7 @@
::
import MDAnalysis as mda
from MDAnalysis.analysis import hbonds
from MDAnalysis.analysis import hydrogenbonds
from MDAnalysis.tests.datafiles import TRZ_psf, TRZ
import matplotlib.pyplot as plt
# load system
Expand All @@ -176,7 +176,7 @@
N = u.select_atoms('name N')
O = u.select_atoms('name O')
# create analysis object
hb_ac = hbonds.HydrogenBondAutoCorrel(u,
hb_ac = hydrogenbonds.HydrogenBondAutoCorrel(u,
acceptors=O, hydrogens=H, donors=N,
bond_type='continuous',
sample_time=2.0, nsamples=1000, nruns=20)
Expand Down Expand Up @@ -216,7 +216,7 @@
from MDAnalysis.due import due, Doi
due.cite(Doi("10.1063/1.4922445"),
description="Hydrogen bonding autocorrelation time",
path='MDAnalysis.analysis.hbonds.hbond_autocorrel',
path='MDAnalysis.analysis.hydrogenbonds.hbond_autocorrel',
)
del Doi

Expand Down
8 changes: 3 additions & 5 deletions package/MDAnalysis/analysis/hydrogenbonds/wbridge_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,18 +271,16 @@ class WaterBridgeAnalysis_OtherFF(WaterBridgeAnalysis):
All water bridges between arginine and aspartic acid can be analysed with ::
import MDAnalysis
import MDAnalysis.analysis.hbonds
from MDAnalysis.analysis.hydrogenbonds import WaterBridgeAnalysis
u = MDAnalysis.Universe('topology', 'trajectory')
w = MDAnalysis.analysis.hbonds.WaterBridgeAnalysis(u, 'resname ARG',
'resname ASP')
w = WaterBridgeAnalysis(u, 'resname ARG', 'resname ASP')
w.run()
The maximum number of bridging waters detected can be changed using the order
keyword. ::
w = MDAnalysis.analysis.hbonds.WaterBridgeAnalysis(u, 'resname ARG',
'resname ASP', order=3)
w = WaterBridgeAnalysis(u, 'resname ARG', 'resname ASP', order=3)
Thus, a maximum of three bridging waters will be detected.
Expand Down
4 changes: 2 additions & 2 deletions testsuite/MDAnalysisTests/utils/test_duecredit.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_duecredit_collector_primary(self, module, path, citekey):
("MDAnalysis.analysis.psa",
"MDAnalysis.analysis.psa",
"10.1371/journal.pcbi.1004568"),
("MDAnalysis.analysis.hbonds.hbond_autocorrel",
"MDAnalysis.analysis.hbonds.hbond_autocorrel",
("MDAnalysis.analysis.hydrogenbonds.hbond_autocorrel",
"MDAnalysis.analysis.hydrogenbonds.hbond_autocorrel",
"10.1063/1.4922445"),
("MDAnalysis.analysis.leaflet",
"MDAnalysis.analysis.leaflet",
Expand Down

0 comments on commit 16647cb

Please sign in to comment.