HBAT 2: A Python Package to Analyse Hydrogen Bonds and Other Non-covalent Interactions in Macromolecular Structures
Hydrogen bonds and other non-covalent interactions play a crucial role in maintaining the structural integrity and functionality of biological macromolecules such as proteins and nucleic acids. Accurate identification and analysis of these interactions are essential for understanding molecular recognition, protein folding, and drug design. HBAT (Hydrogen Bond Analysis Tool) is software for analysing hydrogen bonds and other weak interactions in macromolecular structures. This paper presents HBAT 2, an updated Python reimplementation of the original HBAT tool published in 2007. HBAT 2 is a Python package for automated analysis of hydrogen bonds and other non-covalent interactions in macromolecular structures available in Protein Data Bank (PDB) file format. The software identifies and analyses traditional hydrogen bonds, weak hydrogen bonds, halogen bonds, X-H$\cdots$$π$, $π$-$π$ stacking, and n$\rightarrow$$π$* interactions using geometric criteria. It also detects cooperativity and anticooperativity chains and renders them as 2D visualisations. The latest version offers improved cross-platform tkinter-based graphical user interface (GUI), a web-based interface, a simple command-line interface (CLI), and a developer-friendly API, making it accessible to users with different computational backgrounds.
💡 Research Summary
HBAT 2 is a modern, Python‑based reimplementation of the original HBAT tool first released in 2007. Designed for the analysis of hydrogen bonds and a broad spectrum of weak non‑covalent interactions in macromolecular structures, the package accepts Protein Data Bank (PDB) files and automatically detects traditional hydrogen bonds (O‑H···O, N‑H···O, N‑H···N, C‑H···O), weak hydrogen bonds, halogen bonds (C‑X···Y, X = F, Cl, Br, I), X‑H···π interactions, π‑π stacking, and n → π* interactions. The detection algorithm relies on configurable geometric criteria (distance and angle cut‑offs) and employs efficient nearest‑neighbor searching (KD‑tree) to handle large structures with acceptable performance.
A key strength of HBAT 2 is its modular architecture. The workflow is divided into distinct stages: (1) structure preparation using PDBFixer and OpenBabel to add missing hydrogens, convert non‑standard residues, and clean contaminants; (2) interaction detection with a unified geometric engine; (3) statistical summarisation; and (4) visualisation. The package supports multiple output formats (plain text, CSV, JSON) and can be integrated into downstream pipelines or statistical software.
HBAT 2 offers four user‑oriented interfaces: a cross‑platform Tkinter graphical user interface, a web‑based interface (hosted at https://hbat‑web.abhishek‑tiwari.com), a simple command‑line interface, and a developer‑friendly Python API. This design ensures accessibility for experimental structural biologists who prefer point‑and‑click tools, as well as computational scientists who need scriptable access. The GUI includes built‑in parameter presets optimised for high‑resolution X‑ray, NMR, membrane proteins, and drug‑design scenarios, reducing the barrier for non‑expert users while preserving flexibility for advanced customisation.
Beyond simple bond lists, HBAT 2 analyses cooperativity and anticooperativity chains by constructing interaction networks with NetworkX. Two visualisation back‑ends are provided: Matplotlib‑based 2D network diagrams and GraphViz‑generated high‑resolution SVG/PDF files. The software highlights potential cooperative pathways, which can be crucial for understanding allosteric regulation or stabilising networks in protein engineering. For three‑dimensional inspection, HBAT 2 integrates 3Dmol.js, offering an interactive WebGL viewer that can be embedded in Jupyter notebooks or accessed via the web portal. Users can toggle interaction types, colour‑code bonds, and rotate structures without installing external molecular graphics programs.
The authors demonstrate HBAT 2’s applicability across several domains. In structure‑based drug design, the tool has been used to map protein‑ligand hydrogen‑bond and halogen‑bond patterns for kinase inhibitors, cardiovascular targets, and EGFR resistance studies. In protein engineering, weak C‑H···π and C‑H···O contacts identified by HBAT 2 guided mutagenesis of thermostable α‑amylase variants. The package also supports analysis of molecular dynamics trajectories, enabling statistical evaluation of interaction persistence over time, and has been employed in crystallographic validation, comparative structural analyses of protein families, and SNP impact assessments in disease‑related genes.
Limitations are acknowledged: HBAT 2 analyses static structures only, ignoring solvent dynamics and entropic contributions; it relies solely on geometric criteria without energetic scoring, which may generate false‑positive interactions; visualisation performance degrades for networks exceeding ~5 000 interactions; preset parameters are primarily tuned for proteins, requiring adaptation for nucleic‑acid complexes; and cooperativity analysis identifies topological chains without quantifying energetic cooperativity. Planned future work includes integration with MD analysis pipelines, machine‑learning‑based interaction scoring, support for very large biomolecular assemblies, and expanded presets for nucleic acids and carbohydrate‑protein interfaces.
In summary, HBAT 2 delivers a comprehensive, user‑friendly, and extensible platform for the detection, quantification, and visualisation of hydrogen bonds and a wide array of weak non‑covalent interactions. By combining a modern Python codebase, cross‑platform GUIs, web services, and a well‑documented API, it bridges the gap between legacy tools and contemporary structural‑bioinformatics workflows, facilitating both routine analysis and advanced research in structural biology, drug discovery, and protein engineering.
Comments & Academic Discussion
Loading comments...
Leave a Comment