Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: scholar.google -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords
Repository
HBAT: Hydrogen Bond Analysis Tool (v2)
Basic Info
- Host: GitHub
- Owner: abhishektiwari
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://hbat.abhishek-tiwari.com
- Size: 1.99 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
- Releases: 64
Topics
Metadata Files
README.md
Hydrogen Bond Analysis Tool (HBAT) v2
A Python package to automate the analysis of potential hydrogen bonds and similar type of weak interactions like halogen bonds and non-canonical interactions in macromolecular structures, available in Brookhaven Protein Database (PDB) file format. HBAT uses a geometric approach to identify potential hydrogen bonds by analyzing distance and angular criteria between donor-hydrogen-acceptor triplets.
Background
HBAT v2 is a modern Python re-implementation of the original Perl-based tool developed by Abhishek Tiwari and Sunil Kumar Panigrahi.

Features
- Comprehensive Analysis: Detect and analyze potential hydrogen bonds, halogen bonds, and X-H...π interactions
- Dual Interface: Both graphical (tkinter) and command-line interfaces
- Advanced Visualization: Choice between NetworkX/matplotlib and GraphViz renderers for cooperativity chain visualization
- High-Quality Graphics: Export visualizations to PNG, SVG, PDF with configurable resolution
- Interactive GUI: Scrollable visualizations with dynamic layout switching and engine selection
- Parameter Presets: Built-in presets for different structure types (high-resolution, NMR, membrane proteins, etc.)
- Flexible Parameters: Customizable distance cutoffs, angle thresholds, and analysis modes.
- Multiple Output Formats: Text, CSV, and JSON export options
- Fast Processing: Optimized algorithms for efficient analysis of large structures
- Cross-Platform: Works on Windows, macOS, and Linux.
Please review HBAT documentation for more details.

Supported Interactions
- Hydrogen Bonds: O-H...O, N-H...O, N-H...N, and other X-H...Y interactions
- Halogen Bonds: C-X...Y interactions (X = F, Cl, Br, I; Y = N, O, S)
- X-H...π Interactions: Hydrogen bonds to aromatic ring systems
Please review HBAT documentation for more details.
Installation
Option 1: Install from PyPI (Recommended)
bash
pip install hbat
Run HBAT Command-Line Interface (CLI) using hbat or launch HBAT GUI using hbat-gui.
Option 2: Install from Source
bash
git clone https://github.com/abhishektiwari/hbat.git
cd hbat
pip install -e .
Alternatively,
bash
pip install git+https://github.com/abhishektiwari/hbat.git
Run HBAT Command-Line Interface (CLI) using hbat or launch HBAT GUI using hbat-gui.
Option 3: Install from Conda
conda install -c hbat hbat
Requirements
System Requirements
- Python: 3.9 or higher
- tkinter: tkinter is included with Python standard library on most systems. However, on Mac install Python and tkinter using
brew.
brew install python python3-tk
- GraphViz (Optional): Required for advanced cooperativity chain visualization with high-quality graph rendering. HBAT will automatically fall back to NetworkX/matplotlib visualization if GraphViz is not available.
Install GraphViz:
On Ubuntu/Debian:
bash
sudo apt-get update
sudo apt-get install graphviz
On macOS (using Homebrew):
bash
brew install graphviz
On Windows:
- Download and install from GraphViz official website
- Or using Chocolatey: choco install graphviz
- Or using conda: conda install -c conda-forge graphviz
Note: After installing GraphViz, restart your terminal/command prompt before running HBAT to ensure the GraphViz executables are available in your PATH.
Usage
Graphical Interface
Launch the GUI application:
bash
hbat-gui
The GUI provides, - File browser for loading PDB files - Parameter configuration panels - Tabbed results display - Export and visualization options
Command-Line Interface
Basic usage:
bash
hbat input.pdb
Output Format Options
HBAT supports multiple output formats with automatic detection based on file extension:
```bash
Single file outputs (format auto-detected from extension)
hbat input.pdb -o results.txt # Text format hbat input.pdb -o results.csv # CSV format (single file with all data) hbat input.pdb -o results.json # JSON format (single file with all data)
Multiple file outputs (separate files per interaction type)
hbat input.pdb --csv results # Creates resultshbonds.csv, resultsxbonds.csv, etc. hbat input.pdb --json results # Creates resultshbonds.json, resultsxbonds.json, etc. ```
With custom parameters:
bash
hbat input.pdb -o results.csv --hb-distance 3.0 --mode local
List Available Presets
bash
hbat --list-presets
Use a specific preset
bash
hbat protein.pdb --preset high_resolution
hbat membrane_protein.pdb --preset membrane_proteins
Use preset with custom overrides
bash
hbat protein.pdb --preset drug_design_strict --hb-distance 3.0 --verbose
CLI Options
``` positional arguments: input Input PDB file
optional arguments: -h, --help show this help message and exit -o OUTPUT, --output OUTPUT Output file (format auto-detected from extension: .txt, .csv, .json) --json JSON Export to multiple JSON files (base name for files) --csv CSV Export to multiple CSV files (base name for files)
Preset Options: --preset PRESET Load parameters from preset file (.hbat or .json) --list-presets List available example presets and exit
Analysis Parameters: --hb-distance HBDISTANCE Hydrogen bond H...A distance cutoff in Å (default: 3.5) --hb-angle HBANGLE Hydrogen bond D-H...A angle cutoff in degrees (default: 120) --da-distance DADISTANCE Donor-acceptor distance cutoff in Å (default: 4.0) --xb-distance XBDISTANCE Halogen bond X...A distance cutoff in Å (default: 4.0) --xb-angle XBANGLE Halogen bond C-X...A angle cutoff in degrees (default: 120) --pi-distance PIDISTANCE π interaction H...π distance cutoff in Å (default: 4.5) --pi-angle PIANGLE π interaction D-H...π angle cutoff in degrees (default: 90) --covalent-factor COVALENTFACTOR Covalent bond detection factor (default: 1.2) --mode {complete,local} Analysis mode: complete (all interactions) or local (intra-residue only)
Output Control: --verbose, -v Verbose output with detailed progress --quiet, -q Quiet mode with minimal output --summary-only Output summary statistics only
Analysis Filters: --no-hydrogen-bonds Skip hydrogen bond analysis --no-halogen-bonds Skip halogen bond analysis --no-pi-interactions Skip π interaction analysis ```
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use HBAT in your research, please cite:
@software{tiwari2025hbat,
author = {Tiwari, Abhishek},
title = {HBAT: Hydrogen Bond Analysis Tool},
version = {v2},
year = {2025},
url = {https://github.com/abhishektiwari/hbat}
}
@article{tiwari2007hbat,
author = {Tiwari, Abhishek and Panigrahi, Sunil Kumar},
doi = {10.3233/ISI-2007-00337},
journal = {In Silico Biology},
month = dec,
number = {6},
title = {{HBAT: A Complete Package for Analysing Strong and Weak Hydrogen Bonds in Macromolecular Crystal Structures}},
volume = {7},
year = {2007}
}
Contributing
See our contributing guide and development guide. At a high-level,
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Owner
- Name: Abhishek Tiwari
- Login: abhishektiwari
- Kind: user
- Location: NY
- Company: Amazon
- Website: https://www.abhishek-tiwari.com/
- Twitter: abhishektiwari
- Repositories: 35
- Profile: https://github.com/abhishektiwari
Tech Savant, Servant Leade.
GitHub Events
Total
- Create event: 68
- Issues event: 1
- Release event: 50
- Watch event: 4
- Delete event: 46
- Issue comment event: 55
- Push event: 54
- Pull request event: 44
- Fork event: 1
Last Year
- Create event: 68
- Issues event: 1
- Release event: 50
- Watch event: 4
- Delete event: 46
- Issue comment event: 55
- Push event: 54
- Pull request event: 44
- Fork event: 1
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 9.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 9.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- abhishektiwari (28)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 2,108 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 35
- Total maintainers: 1
pypi.org: hbat
Hydrogen Bond Analysis Tool for PDB structures
- Homepage: https://github.com/abhishektiwari/hbat
- Documentation: https://hbat.readthedocs.io/
- License: mit
-
Latest release: 2.2.14
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v4 composite
- actions/upload-artifact v4 composite
- softprops/action-gh-release v2 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- matplotlib >=3.3.0
- networkx >=2.5.0
- pdbreader >=0.1.0
- sphinx >=3.0.0
- sphinx-autodoc-typehints *
- sphinx-rtd-theme >=0.5.0
- matplotlib >=3.3.0
- networkx >=2.5.0
- pdbreader >=0.1.0
- black >=21.0.0 development
- build >=0.8.0 development
- coverage >=5.0.0 development
- flake8 >=3.8.0 development
- isort >=5.0.0 development
- mypy >=0.800 development
- pandas-stubs * development
- pre-commit >=2.10.0 development
- pyinstaller >=5.0.0 development
- pytest >=6.0.0 development
- pytest-cov >=2.8.0 development
- pytest-mock >=3.0.0 development
- setuptools-scm >=6.2.0 development
- sphinx >=3.0.0 development
- sphinx-rtd-theme >=0.5.0 development
- twine >=4.0.0 development
- types-Pillow * development
- types-requests * development
- types-setuptools * development
- matplotlib >=3.3.0
- networkx >=2.5.0
- pdbreader >=0.1.0