Skip to content

Conversation

@tani-dubey
Copy link
Contributor

Summary

This addresses the confusion discussed in #299, where users were concerned about duplicated water residues affecting WaterBridge detection. The underlying behavior was confirmed to be correct, but the assumption was undocumented.

By clarifying this in the module docstring, users can better understand:

  • why duplicated resid values may appear in raw PDB files
  • how MDAnalysis resolves this internally
  • and why WaterBridge remains correct without manual deduplication.

Changes

Added description in water_bridge.py

Water-mediated interactions --- :mod:`prolif.interactions.water_bridge`
=======================================================================
.
.
.. versionadded:: 2.1.0

Notes
-----
WaterBridge relies on MDAnalysis residue handling to uniquely identify
individual water molecules.

Due to the 4-digit limitation of residue numbering in the PDB format,
multiple water molecules may appear to share the same residue number
(e.g., ``resid 1917``). MDAnalysis internally guarantees unique residue
identities when parsing PDB files (e.g., by offsetting residue indices).

As a result, WaterBridge correctly treats each water molecule as a
distinct residue, and users do not need to manually deduplicate water
residues when using MDAnalysis-supported formats.

happy to modify pr if required

@github-actions
Copy link

github-actions bot commented Dec 26, 2025

Type-checking report

No changes in type-hints coverage 🎉

Overview
.
├── prolif
│   ├── [x] __init__.py
│   ├── [x] _version.py
│   ├── [x] datafiles.py
│   ├── [x] exceptions.py
│   ├── [x] fingerprint.py
│   ├── [x] ifp.py
│   ├── interactions
│   │   ├── [x] __init__.py
│   │   ├── [x] base.py
│   │   ├── [x] constants.py
│   │   ├── [x] interactions.py
│   │   ├── [x] utils.py
│   │   └── [x] water_bridge.py
│   ├── [x] molecule.py
│   ├── [x] parallel.py
│   ├── [x] pickling.py
│   ├── plotting
│   │   ├── [x] __init__.py
│   │   ├── [x] barcode.py
│   │   ├── [x] complex3d.py
│   │   ├── network
│   │   │   ├── [x] __init__.py
│   │   │   └── [x] lignetwork.py
│   │   ├── [x] residues.py
│   │   └── [x] utils.py
│   ├── [x] rdkitmol.py
│   ├── [x] residue.py
│   ├── [x] typeshed.py
│   └── [x] utils.py
├── scripts
│   ├── [x] check_types.py
│   └── [x] test_build.py
└── tests
    ├── [x] __init__.py
    ├── [x] conftest.py
    ├── plotting
    │   ├── [x] __init__.py
    │   ├── [x] test_barcode.py
    │   ├── [x] test_complex3d.py
    │   ├── [x] test_network.py
    │   └── [x] test_residues.py
    ├── [x] test_fingerprint.py
    ├── [x] test_ifp.py
    ├── [x] test_interactions.py
    ├── [x] test_molecule.py
    ├── [x] test_parallel.py
    ├── [x] test_pickling.py
    ├── [x] test_residues.py
    └── [x] test_utils.py

Summary: 43/43 files have complete type hints (100.0%)
Remaining errors
Poe => mypy .
Success: no issues found in 43 source files

@cbouy cbouy force-pushed the docs-waterbridge-duplication branch from 7c9bf04 to 6a99853 Compare January 19, 2026 23:49
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.07%. Comparing base (095ca70) to head (6a99853).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #320   +/-   ##
=======================================
  Coverage   95.07%   95.07%           
=======================================
  Files          23       23           
  Lines        1950     1950           
=======================================
  Hits         1854     1854           
  Misses         96       96           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@cbouy cbouy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good, thanks @tanii1125 !

@cbouy cbouy merged commit 3900496 into chemosim-lab:master Jan 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants