hbat 2.2.0__tar.gz → 2.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. {hbat-2.2.0 → hbat-2.2.3}/.github/workflows/test.yml +1 -1
  2. {hbat-2.2.0 → hbat-2.2.3}/Makefile +92 -0
  3. {hbat-2.2.0 → hbat-2.2.3}/PKG-INFO +38 -8
  4. {hbat-2.2.0 → hbat-2.2.3}/README.md +12 -0
  5. hbat-2.2.3/build_standalone_linux.py +384 -0
  6. hbat-2.2.3/build_standalone_windows.py +253 -0
  7. {hbat-2.2.0 → hbat-2.2.3}/conda/meta.yaml +11 -8
  8. {hbat-2.2.0 → hbat-2.2.3}/docs/source/index.rst +6 -0
  9. {hbat-2.2.0 → hbat-2.2.3}/docs/source/installation.rst +14 -0
  10. {hbat-2.2.0 → hbat-2.2.3}/hbat/_version.py +2 -2
  11. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/pdb_parser.py +4 -2
  12. {hbat-2.2.0 → hbat-2.2.3}/hbat.egg-info/SOURCES.txt +2 -0
  13. {hbat-2.2.0 → hbat-2.2.3}/pyproject.toml +27 -8
  14. {hbat-2.2.0 → hbat-2.2.3}/.github/workflows/conda-release.yml +0 -0
  15. {hbat-2.2.0 → hbat-2.2.3}/.github/workflows/release.yml +0 -0
  16. {hbat-2.2.0 → hbat-2.2.3}/CITATION.cff +0 -0
  17. {hbat-2.2.0 → hbat-2.2.3}/CLAUDE.md +0 -0
  18. {hbat-2.2.0 → hbat-2.2.3}/CODE_OF_CONDUCT.md +0 -0
  19. {hbat-2.2.0 → hbat-2.2.3}/CONTRIBUTING.md +0 -0
  20. {hbat-2.2.0 → hbat-2.2.3}/LICENSE +0 -0
  21. {hbat-2.2.0 → hbat-2.2.3}/MANIFEST.in +0 -0
  22. {hbat-2.2.0 → hbat-2.2.3}/build_standalone.py +0 -0
  23. {hbat-2.2.0 → hbat-2.2.3}/docs/Makefile +0 -0
  24. {hbat-2.2.0 → hbat-2.2.3}/docs/requirements.txt +0 -0
  25. {hbat-2.2.0 → hbat-2.2.3}/docs/source/_static/custom.css +0 -0
  26. {hbat-2.2.0 → hbat-2.2.3}/docs/source/_static/light-theme.css +0 -0
  27. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/ccd/ccd_analyzer.rst +0 -0
  28. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/ccd/constants_generator.rst +0 -0
  29. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/ccd/generate_ccd_constants.rst +0 -0
  30. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/ccd/index.rst +0 -0
  31. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/cli/index.rst +0 -0
  32. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/app.rst +0 -0
  33. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/atomic_data.rst +0 -0
  34. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/index.rst +0 -0
  35. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/misc.rst +0 -0
  36. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/parameters.rst +0 -0
  37. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/constants/pdb_constants.rst +0 -0
  38. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/index.rst +0 -0
  39. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/interactions.rst +0 -0
  40. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/np_analyzer.rst +0 -0
  41. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/np_vector.rst +0 -0
  42. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/pdb_fixer.rst +0 -0
  43. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/pdb_parser.rst +0 -0
  44. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/core/structure.rst +0 -0
  45. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/examples/index.rst +0 -0
  46. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/gui/index.rst +0 -0
  47. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/index.rst +0 -0
  48. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/utilities/atom_utils.rst +0 -0
  49. {hbat-2.2.0 → hbat-2.2.3}/docs/source/api/utilities/index.rst +0 -0
  50. {hbat-2.2.0 → hbat-2.2.3}/docs/source/cli.rst +0 -0
  51. {hbat-2.2.0 → hbat-2.2.3}/docs/source/conf.py +0 -0
  52. {hbat-2.2.0 → hbat-2.2.3}/docs/source/development.rst +0 -0
  53. {hbat-2.2.0 → hbat-2.2.3}/docs/source/license.rst +0 -0
  54. {hbat-2.2.0 → hbat-2.2.3}/docs/source/logic.rst +0 -0
  55. {hbat-2.2.0 → hbat-2.2.3}/docs/source/parameters.rst +0 -0
  56. {hbat-2.2.0 → hbat-2.2.3}/docs/source/pdbfixing.rst +0 -0
  57. {hbat-2.2.0 → hbat-2.2.3}/docs/source/quickstart.rst +0 -0
  58. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/1bhl.pdb +0 -0
  59. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/1gai.pdb +0 -0
  60. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/1ubi.pdb +0 -0
  61. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/2izf.pdb +0 -0
  62. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/4jsv.pdb +0 -0
  63. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/4laz.pdb +0 -0
  64. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/4ub7.pdb +0 -0
  65. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/4x21.pdb +0 -0
  66. {hbat-2.2.0 → hbat-2.2.3}/example_pdb_files/6rsa.pdb +0 -0
  67. {hbat-2.2.0 → hbat-2.2.3}/example_presets/drug_design_strict.hbat +0 -0
  68. {hbat-2.2.0 → hbat-2.2.3}/example_presets/high_resolution.hbat +0 -0
  69. {hbat-2.2.0 → hbat-2.2.3}/example_presets/low_resolution.hbat +0 -0
  70. {hbat-2.2.0 → hbat-2.2.3}/example_presets/membrane_proteins.hbat +0 -0
  71. {hbat-2.2.0 → hbat-2.2.3}/example_presets/nmr_structures.hbat +0 -0
  72. {hbat-2.2.0 → hbat-2.2.3}/example_presets/standard_resolution.hbat +0 -0
  73. {hbat-2.2.0 → hbat-2.2.3}/example_presets/strong_interactions_only.hbat +0 -0
  74. {hbat-2.2.0 → hbat-2.2.3}/example_presets/weak_interactions_permissive.hbat +0 -0
  75. {hbat-2.2.0 → hbat-2.2.3}/hbat/__init__.py +0 -0
  76. {hbat-2.2.0 → hbat-2.2.3}/hbat/ccd/__init__.py +0 -0
  77. {hbat-2.2.0 → hbat-2.2.3}/hbat/ccd/ccd_analyzer.py +0 -0
  78. {hbat-2.2.0 → hbat-2.2.3}/hbat/ccd/constants_generator.py +0 -0
  79. {hbat-2.2.0 → hbat-2.2.3}/hbat/ccd/generate_ccd_constants.py +0 -0
  80. {hbat-2.2.0 → hbat-2.2.3}/hbat/cli/__init__.py +0 -0
  81. {hbat-2.2.0 → hbat-2.2.3}/hbat/cli/main.py +0 -0
  82. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/__init__.py +0 -0
  83. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/app.py +0 -0
  84. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/atomic_data.py +0 -0
  85. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/misc.py +0 -0
  86. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/parameters.py +0 -0
  87. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/pdb_constants.py +0 -0
  88. {hbat-2.2.0 → hbat-2.2.3}/hbat/constants/residue_bonds.py +0 -0
  89. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/__init__.py +0 -0
  90. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/analysis.py +0 -0
  91. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/analyzer.py +0 -0
  92. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/app_config.py +0 -0
  93. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/interactions.py +0 -0
  94. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/np_analyzer.py +0 -0
  95. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/np_vector.py +0 -0
  96. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/pdb_fixer.py +0 -0
  97. {hbat-2.2.0 → hbat-2.2.3}/hbat/core/structure.py +0 -0
  98. {hbat-2.2.0 → hbat-2.2.3}/hbat/gui/__init__.py +0 -0
  99. {hbat-2.2.0 → hbat-2.2.3}/hbat/gui/chain_visualization.py +0 -0
  100. {hbat-2.2.0 → hbat-2.2.3}/hbat/gui/main_window.py +0 -0
  101. {hbat-2.2.0 → hbat-2.2.3}/hbat/gui/parameter_panel.py +0 -0
  102. {hbat-2.2.0 → hbat-2.2.3}/hbat/gui/results_panel.py +0 -0
  103. {hbat-2.2.0 → hbat-2.2.3}/hbat/utilities/__init__.py +0 -0
  104. {hbat-2.2.0 → hbat-2.2.3}/hbat/utilities/atom_utils.py +0 -0
  105. {hbat-2.2.0 → hbat-2.2.3}/hbat.icns +0 -0
  106. {hbat-2.2.0 → hbat-2.2.3}/hbat.ico +0 -0
  107. {hbat-2.2.0 → hbat-2.2.3}/hbat.png +0 -0
  108. {hbat-2.2.0 → hbat-2.2.3}/hbat.svg +0 -0
  109. {hbat-2.2.0 → hbat-2.2.3}/hbat_cli.py +0 -0
  110. {hbat-2.2.0 → hbat-2.2.3}/hbat_gui.py +0 -0
  111. {hbat-2.2.0 → hbat-2.2.3}/pytest.ini +0 -0
  112. {hbat-2.2.0 → hbat-2.2.3}/requirements-dev.txt +0 -0
  113. {hbat-2.2.0 → hbat-2.2.3}/requirements.txt +0 -0
  114. {hbat-2.2.0 → hbat-2.2.3}/setup.cfg +0 -0
  115. {hbat-2.2.0 → hbat-2.2.3}/tests/README.md +0 -0
  116. {hbat-2.2.0 → hbat-2.2.3}/tests/__init__.py +0 -0
  117. {hbat-2.2.0 → hbat-2.2.3}/tests/cli/__init__.py +0 -0
  118. {hbat-2.2.0 → hbat-2.2.3}/tests/cli/test_cli_main.py +0 -0
  119. {hbat-2.2.0 → hbat-2.2.3}/tests/conftest.py +0 -0
  120. {hbat-2.2.0 → hbat-2.2.3}/tests/core/__init__.py +0 -0
  121. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_analyzer.py +0 -0
  122. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_ccd_performance.py +0 -0
  123. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_interactions.py +0 -0
  124. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_np_vector.py +0 -0
  125. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_pdb_fixer.py +0 -0
  126. {hbat-2.2.0 → hbat-2.2.3}/tests/core/test_pdb_parser.py +0 -0
  127. {hbat-2.2.0 → hbat-2.2.3}/tests/gui/__init__.py +0 -0
  128. {hbat-2.2.0 → hbat-2.2.3}/tests/gui/test_gui_components.py +0 -0
  129. {hbat-2.2.0 → hbat-2.2.3}/tests/gui/test_numpy_integration.py +0 -0
  130. {hbat-2.2.0 → hbat-2.2.3}/tests/run_tests.py +0 -0
  131. {hbat-2.2.0 → hbat-2.2.3}/tests/test_np_analyzer.py +0 -0
  132. {hbat-2.2.0 → hbat-2.2.3}/tests/test_np_vector.py +0 -0
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- python-version: ["3.10", "3.11"]
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v4
@@ -186,6 +186,17 @@ build-standalone:
186
186
  @echo "Building standalone executables with PyInstaller..."
187
187
  python build_standalone.py
188
188
 
189
+ build-standalone-windows:
190
+ @echo "Building Windows standalone executables..."
191
+ python build_standalone_windows.py
192
+
193
+ build-standalone-linux:
194
+ @echo "Building Linux standalone executables..."
195
+ python build_standalone_linux.py
196
+
197
+ build-standalone-all: build-standalone build-standalone-windows build-standalone-linux
198
+ @echo "All standalone builds completed"
199
+
189
200
  # Package validation
190
201
  check:
191
202
  @echo "Checking package..."
@@ -193,6 +204,87 @@ check:
193
204
  @echo "Package structure:"
194
205
  @find dist/ -name "*.whl" -exec unzip -l {} \; 2>/dev/null | head -20
195
206
 
207
+ # Test built package
208
+ test-build:
209
+ @echo "Building and testing package in isolated environment..."
210
+ @# Clean up any existing environments
211
+ @if [ -d "hbat-build" ]; then rm -rf hbat-build; fi
212
+ @if [ -d "hbat-test-build" ]; then rm -rf hbat-test-build; fi
213
+
214
+ @# Create fresh build environment
215
+ @echo "Creating build environment..."
216
+ @python -m venv hbat-build
217
+ @echo "Host Python: $$(which python)"
218
+ @echo "Build environment: ./hbat-build"
219
+
220
+ @# Install build dependencies
221
+ @echo "Installing build dependencies..."
222
+ @if [ -f "./hbat-build/bin/pip" ]; then \
223
+ ./hbat-build/bin/pip install --upgrade pip && \
224
+ ./hbat-build/bin/pip install build setuptools wheel setuptools-scm; \
225
+ else \
226
+ ./hbat-build/Scripts/pip.exe install --upgrade pip && \
227
+ ./hbat-build/Scripts/pip.exe install build setuptools wheel setuptools-scm; \
228
+ fi
229
+
230
+ @# Build the package
231
+ @echo "Building package..."
232
+ @if [ -f "./hbat-build/bin/python" ]; then \
233
+ ./hbat-build/bin/python -m build; \
234
+ else \
235
+ ./hbat-build/Scripts/python.exe -m build; \
236
+ fi
237
+ @echo "✓ Package built successfully!"
238
+
239
+ @# Clean up build environment
240
+ @rm -rf hbat-build
241
+
242
+ @# Create fresh test environment
243
+ @echo "\nCreating test environment..."
244
+ @python -m venv hbat-test-build
245
+ @echo "Test environment: ./hbat-test-build"
246
+
247
+ @# Install the built package
248
+ @echo "Installing built package..."
249
+ @WHEEL_FILE=$$(ls -t dist/*.whl 2>/dev/null | head -1); \
250
+ if [ -z "$$WHEEL_FILE" ]; then \
251
+ echo "Error: No wheel file found in dist/."; \
252
+ exit 1; \
253
+ fi; \
254
+ echo "Installing $$WHEEL_FILE..."; \
255
+ if [ -f "./hbat-test-build/bin/pip" ]; then \
256
+ ./hbat-test-build/bin/pip install --upgrade pip && \
257
+ ./hbat-test-build/bin/pip install "$$WHEEL_FILE" && \
258
+ echo "Installing pdbfixer from Git..." && \
259
+ ./hbat-test-build/bin/pip install git+https://github.com/openmm/pdbfixer.git && \
260
+ HBAT_CMD="./hbat-test-build/bin/hbat"; \
261
+ else \
262
+ ./hbat-test-build/Scripts/pip.exe install --upgrade pip && \
263
+ ./hbat-test-build/Scripts/pip.exe install "$$WHEEL_FILE" && \
264
+ echo "Installing pdbfixer from Git..." && \
265
+ ./hbat-test-build/Scripts/pip.exe install git+https://github.com/openmm/pdbfixer.git && \
266
+ HBAT_CMD="./hbat-test-build/Scripts/hbat.exe"; \
267
+ fi; \
268
+ echo "\nTesting package imports..."; \
269
+ if [ -f "./hbat-test-build/bin/python" ]; then \
270
+ PYTHON_CMD="./hbat-test-build/bin/python"; \
271
+ else \
272
+ PYTHON_CMD="./hbat-test-build/Scripts/python.exe"; \
273
+ fi; \
274
+ $$PYTHON_CMD -c "import pdbreader; print('✓ pdbreader:', pdbreader)" && \
275
+ $$PYTHON_CMD -c "import openbabel; print('✓ openbabel:', openbabel)" && \
276
+ $$PYTHON_CMD -c "import pdbfixer; print('✓ pdbfixer:', pdbfixer)" && \
277
+ $$PYTHON_CMD -c "import mmcif; print('✓ mmcif:', mmcif)" && \
278
+ $$PYTHON_CMD -c "import mmcif; print(' mmcif version:', mmcif.__version__)" && \
279
+ $$PYTHON_CMD -c "import hbat; print('✓ hbat version:', hbat.__version__)" && \
280
+ echo "\nTesting hbat CLI with 6RSA.pdb..."; \
281
+ $$HBAT_CMD example_pdb_files/6RSA.pdb --summary-only
282
+
283
+ @echo "\n✓ Package build and installation test passed!"
284
+ @echo "Cleaning up test environment..."
285
+ @rm -rf hbat-test-build
286
+ @echo "Test completed successfully!"
287
+
196
288
  # Upload to test PyPI
197
289
  upload-test:
198
290
  @echo "Uploading to Test PyPI..."
@@ -1,55 +1,73 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hbat
3
- Version: 2.2.0
3
+ Version: 2.2.3
4
4
  Summary: Hydrogen Bond Analysis Tool for PDB structures
5
5
  Author-email: Abhishek Tiwari <abhishek_twr@yahoo.com>
6
- License: MIT
6
+ License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/abhishektiwari/hbat
8
8
  Project-URL: Bug Reports, https://github.com/abhishektiwari/hbat/issues
9
9
  Project-URL: Source, https://github.com/abhishektiwari/hbat
10
- Keywords: bioinformatics,chemistry,hydrogen bonds,protein structure
10
+ Keywords: bioinformatics,chemistry,hydrogen bonds,halogen bonds,protein structure,PDB,mmCIF
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Intended Audience :: Science/Research
13
13
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
14
14
  Classifier: Topic :: Scientific/Engineering :: Chemistry
15
- Classifier: License :: OSI Approved :: MIT License
16
15
  Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
17
  Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
20
22
  Classifier: Operating System :: OS Independent
21
- Requires-Python: >=3.7
23
+ Requires-Python: >=3.8
22
24
  Description-Content-Type: text/markdown
23
25
  License-File: LICENSE
24
26
  Requires-Dist: pdbreader>=0.1.0
27
+ Requires-Dist: numpy>=1.20.0
25
28
  Requires-Dist: networkx>=2.5.0
26
29
  Requires-Dist: matplotlib>=3.3.0
30
+ Requires-Dist: openbabel-wheel>=3.1.1.22
31
+ Requires-Dist: pybel>=0.15.5
32
+ Requires-Dist: mmcif-pdbx>=2.0.1
33
+ Requires-Dist: mmcif>=0.92.0
27
34
  Provides-Extra: dev
28
35
  Requires-Dist: pytest>=6.0.0; extra == "dev"
29
36
  Requires-Dist: pytest-cov>=2.8.0; extra == "dev"
30
37
  Requires-Dist: pytest-mock>=3.0.0; extra == "dev"
31
38
  Requires-Dist: black>=21.0.0; extra == "dev"
32
39
  Requires-Dist: flake8>=3.8.0; extra == "dev"
40
+ Requires-Dist: isort>=5.0.0; extra == "dev"
33
41
  Requires-Dist: mypy>=0.800; extra == "dev"
34
42
  Requires-Dist: pre-commit>=2.10.0; extra == "dev"
35
43
  Requires-Dist: coverage>=5.0.0; extra == "dev"
44
+ Requires-Dist: types-setuptools>=57.0.0; extra == "dev"
45
+ Requires-Dist: types-requests>=2.0.0; extra == "dev"
46
+ Requires-Dist: types-Pillow>=8.0.0; extra == "dev"
47
+ Requires-Dist: pandas-stubs>=1.0.0; extra == "dev"
36
48
  Provides-Extra: build
37
49
  Requires-Dist: build>=0.8.0; extra == "build"
38
50
  Requires-Dist: twine>=4.0.0; extra == "build"
39
51
  Requires-Dist: pyinstaller>=5.0.0; extra == "build"
40
52
  Requires-Dist: setuptools-scm>=6.2.0; extra == "build"
53
+ Provides-Extra: docs
54
+ Requires-Dist: sphinx>=3.0.0; extra == "docs"
55
+ Requires-Dist: sphinx-rtd-theme>=0.5.0; extra == "docs"
56
+ Requires-Dist: sphinx-toolbox>=4.0.0; extra == "docs"
57
+ Requires-Dist: sphinxcontrib-bibtex>=2.0.0; extra == "docs"
58
+ Requires-Dist: sphinx-sitemap>=2.7.2; extra == "docs"
59
+ Requires-Dist: sphinx-autodoc-typehints>=1.10.0; extra == "docs"
41
60
  Provides-Extra: gui
42
- Requires-Dist: tkinter; python_version >= "3.7" and extra == "gui"
61
+ Requires-Dist: tkinter; python_version >= "3.8" and extra == "gui"
43
62
  Provides-Extra: advanced-viz
44
63
  Requires-Dist: seaborn>=0.11.0; extra == "advanced-viz"
45
- Requires-Dist: numpy>=1.19.0; extra == "advanced-viz"
46
64
  Requires-Dist: plotly>=5.0.0; extra == "advanced-viz"
47
65
  Provides-Extra: export
48
66
  Requires-Dist: pandas>=1.1.0; extra == "export"
49
67
  Requires-Dist: openpyxl>=3.0.0; extra == "export"
50
68
  Requires-Dist: xlwt>=1.3.0; extra == "export"
51
69
  Provides-Extra: all
52
- Requires-Dist: hbat[advanced-viz,export,gui]; extra == "all"
70
+ Requires-Dist: hbat[advanced-viz,docs,export,gui]; extra == "all"
53
71
  Dynamic: license-file
54
72
 
55
73
  ![HBAT](https://github.com/abhishektiwari/hbat/raw/main/hbat.svg)
@@ -106,6 +124,12 @@ pip install hbat
106
124
 
107
125
  Run HBAT Command-Line Interface (CLI) using `hbat` or launch HBAT GUI using `hbat-gui`.
108
126
 
127
+ **Recommended**: For [fixing missing Hydrogen Atoms](https://hbat.abhishek-tiwari.com/pdbfixing), install PDBFixer (preferred over OpenBabel).
128
+
129
+ ```bash
130
+ pip install git+https://github.com/openmm/pdbfixer.git
131
+ ```
132
+
109
133
  ### Option 2: Install from Source
110
134
 
111
135
  ```bash
@@ -114,6 +138,12 @@ cd hbat
114
138
  pip install -e .
115
139
  ```
116
140
 
141
+ Alternatively,
142
+
143
+ ```bash
144
+ pip install git+https://github.com/abhishektiwari/hbat.git
145
+ ```
146
+
117
147
  Run HBAT Command-Line Interface (CLI) using `hbat` or launch HBAT GUI using `hbat-gui`.
118
148
 
119
149
  ### Option 3: Install from Conda
@@ -52,6 +52,12 @@ pip install hbat
52
52
 
53
53
  Run HBAT Command-Line Interface (CLI) using `hbat` or launch HBAT GUI using `hbat-gui`.
54
54
 
55
+ **Recommended**: For [fixing missing Hydrogen Atoms](https://hbat.abhishek-tiwari.com/pdbfixing), install PDBFixer (preferred over OpenBabel).
56
+
57
+ ```bash
58
+ pip install git+https://github.com/openmm/pdbfixer.git
59
+ ```
60
+
55
61
  ### Option 2: Install from Source
56
62
 
57
63
  ```bash
@@ -60,6 +66,12 @@ cd hbat
60
66
  pip install -e .
61
67
  ```
62
68
 
69
+ Alternatively,
70
+
71
+ ```bash
72
+ pip install git+https://github.com/abhishektiwari/hbat.git
73
+ ```
74
+
63
75
  Run HBAT Command-Line Interface (CLI) using `hbat` or launch HBAT GUI using `hbat-gui`.
64
76
 
65
77
  ### Option 3: Install from Conda
@@ -0,0 +1,384 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Build script for HBAT standalone Linux executables.
4
+
5
+ This script creates standalone Linux executables using PyInstaller and AppImage.
6
+ Run this from the project root directory on Linux.
7
+ """
8
+
9
+ import os
10
+ import shutil
11
+ import subprocess
12
+ import sys
13
+ import urllib.request
14
+ from pathlib import Path
15
+
16
+
17
+ def install_dependencies():
18
+ """Install build dependencies."""
19
+ print("Installing build dependencies...")
20
+ try:
21
+ subprocess.run(
22
+ [
23
+ sys.executable,
24
+ "-m",
25
+ "pip",
26
+ "install",
27
+ "pyinstaller>=5.0.0",
28
+ "setuptools-scm>=6.2.0",
29
+ ],
30
+ check=True,
31
+ )
32
+ return True
33
+ except subprocess.CalledProcessError:
34
+ print("Failed to install dependencies")
35
+ return False
36
+
37
+
38
+ def clean_build():
39
+ """Clean previous build artifacts."""
40
+ print("Cleaning previous builds...")
41
+ paths_to_clean = ["build", "dist", "__pycache__"]
42
+
43
+ for path in paths_to_clean:
44
+ if os.path.exists(path):
45
+ shutil.rmtree(path)
46
+ print(f" Removed {path}")
47
+
48
+
49
+ def build_gui():
50
+ """Build GUI executable for Linux."""
51
+ print("Building Linux GUI executable...")
52
+
53
+ cmd = [
54
+ "pyinstaller",
55
+ "--onefile",
56
+ "--windowed",
57
+ "--name",
58
+ "HBAT-GUI",
59
+ "--add-data",
60
+ "example_pdb_files:example_pdb_files",
61
+ "--add-data",
62
+ "example_presets:example_presets",
63
+ "--add-data",
64
+ "hbat.png:.",
65
+ "--add-data",
66
+ "README.md:.",
67
+ "--hidden-import",
68
+ "tkinter",
69
+ "--hidden-import",
70
+ "matplotlib.backends.backend_tkagg",
71
+ "--hidden-import",
72
+ "networkx",
73
+ "--exclude-module",
74
+ "PyQt5",
75
+ "--exclude-module",
76
+ "PyQt6",
77
+ "--clean",
78
+ "--distpath",
79
+ "dist/linux",
80
+ "hbat_gui.py",
81
+ ]
82
+
83
+ # Add icon if available
84
+ if os.path.exists("hbat.png"):
85
+ cmd.extend(["--icon", "hbat.png"])
86
+
87
+ try:
88
+ subprocess.run(cmd, check=True)
89
+ print("✓ Linux GUI executable built successfully")
90
+ return True
91
+ except subprocess.CalledProcessError as e:
92
+ print(f"✗ Linux GUI build failed: {e}")
93
+ return False
94
+
95
+
96
+ def build_cli():
97
+ """Build CLI executable for Linux."""
98
+ print("Building Linux CLI executable...")
99
+
100
+ cmd = [
101
+ "pyinstaller",
102
+ "--onefile",
103
+ "--console",
104
+ "--name",
105
+ "hbat",
106
+ "--add-data",
107
+ "example_pdb_files:example_pdb_files",
108
+ "--add-data",
109
+ "example_presets:example_presets",
110
+ "--hidden-import",
111
+ "matplotlib",
112
+ "--hidden-import",
113
+ "networkx",
114
+ "--clean",
115
+ "--distpath",
116
+ "dist/linux",
117
+ "hbat_cli.py",
118
+ ]
119
+
120
+ try:
121
+ subprocess.run(cmd, check=True)
122
+ print("✓ Linux CLI executable built successfully")
123
+ return True
124
+ except subprocess.CalledProcessError as e:
125
+ print(f"✗ Linux CLI build failed: {e}")
126
+ return False
127
+
128
+
129
+ def create_appimage():
130
+ """Create AppImage for better Linux distribution."""
131
+ print("\nCreating AppImage...")
132
+
133
+ # Create AppDir structure
134
+ appdir = Path("HBAT.AppDir")
135
+ if appdir.exists():
136
+ shutil.rmtree(appdir)
137
+
138
+ appdir.mkdir()
139
+ (appdir / "usr" / "bin").mkdir(parents=True)
140
+ (appdir / "usr" / "share" / "applications").mkdir(parents=True)
141
+ (appdir / "usr" / "share" / "icons" / "hicolor" / "256x256" / "apps").mkdir(
142
+ parents=True
143
+ )
144
+
145
+ # Copy executables
146
+ if os.path.exists("dist/linux/HBAT-GUI"):
147
+ shutil.copy2("dist/linux/HBAT-GUI", appdir / "usr" / "bin" / "HBAT-GUI")
148
+ os.chmod(appdir / "usr" / "bin" / "HBAT-GUI", 0o755)
149
+
150
+ if os.path.exists("dist/linux/hbat"):
151
+ shutil.copy2("dist/linux/hbat", appdir / "usr" / "bin" / "hbat")
152
+ os.chmod(appdir / "usr" / "bin" / "hbat", 0o755)
153
+
154
+ # Copy icon
155
+ if os.path.exists("hbat.png"):
156
+ shutil.copy2(
157
+ "hbat.png",
158
+ appdir
159
+ / "usr"
160
+ / "share"
161
+ / "icons"
162
+ / "hicolor"
163
+ / "256x256"
164
+ / "apps"
165
+ / "hbat.png",
166
+ )
167
+
168
+ # Create desktop file
169
+ desktop_content = """[Desktop Entry]
170
+ Name=HBAT
171
+ Comment=Hydrogen Bond Analysis Tool
172
+ Exec=HBAT-GUI
173
+ Icon=hbat
174
+ Type=Application
175
+ Categories=Science;Chemistry;
176
+ Terminal=false
177
+ """
178
+
179
+ with open(appdir / "usr" / "share" / "applications" / "hbat.desktop", "w") as f:
180
+ f.write(desktop_content)
181
+
182
+ # Create AppRun script
183
+ apprun_content = """#!/bin/bash
184
+ SELF=$(readlink -f "$0")
185
+ HERE=${SELF%/*}
186
+ export PATH="${HERE}/usr/bin:${PATH}"
187
+
188
+ if [ "$1" = "cli" ]; then
189
+ shift
190
+ exec "${HERE}/usr/bin/hbat" "$@"
191
+ else
192
+ exec "${HERE}/usr/bin/HBAT-GUI" "$@"
193
+ fi
194
+ """
195
+
196
+ with open(appdir / "AppRun", "w") as f:
197
+ f.write(apprun_content)
198
+ os.chmod(appdir / "AppRun", 0o755)
199
+
200
+ # Download appimagetool if not present
201
+ appimagetool = "appimagetool-x86_64.AppImage"
202
+ if not os.path.exists(appimagetool):
203
+ print("Downloading appimagetool...")
204
+ try:
205
+ urllib.request.urlretrieve(
206
+ "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage",
207
+ appimagetool,
208
+ )
209
+ os.chmod(appimagetool, 0o755)
210
+ except Exception as e:
211
+ print(f"Failed to download appimagetool: {e}")
212
+ return False
213
+
214
+ # Build AppImage
215
+ try:
216
+ env = os.environ.copy()
217
+ env["ARCH"] = "x86_64"
218
+ subprocess.run(
219
+ [f"./{appimagetool}", "HBAT.AppDir", "dist/HBAT-x86_64.AppImage"],
220
+ check=True,
221
+ env=env,
222
+ )
223
+ shutil.rmtree(appdir)
224
+ print("✓ AppImage created successfully")
225
+ return True
226
+ except subprocess.CalledProcessError:
227
+ print("✗ Failed to create AppImage")
228
+ return False
229
+
230
+
231
+ def create_deb_package():
232
+ """Create .deb package for Debian/Ubuntu."""
233
+ print("\nCreating .deb package...")
234
+
235
+ # Create debian package structure
236
+ debdir = Path("hbat-deb")
237
+ if debdir.exists():
238
+ shutil.rmtree(debdir)
239
+
240
+ # Create directory structure
241
+ (debdir / "DEBIAN").mkdir(parents=True)
242
+ (debdir / "usr" / "bin").mkdir(parents=True)
243
+ (debdir / "usr" / "share" / "applications").mkdir(parents=True)
244
+ (debdir / "usr" / "share" / "icons" / "hicolor" / "256x256" / "apps").mkdir(
245
+ parents=True
246
+ )
247
+
248
+ # Copy executables
249
+ if os.path.exists("dist/linux/HBAT-GUI"):
250
+ shutil.copy2("dist/linux/HBAT-GUI", debdir / "usr" / "bin" / "hbat-gui")
251
+ os.chmod(debdir / "usr" / "bin" / "hbat-gui", 0o755)
252
+
253
+ if os.path.exists("dist/linux/hbat"):
254
+ shutil.copy2("dist/linux/hbat", debdir / "usr" / "bin" / "hbat")
255
+ os.chmod(debdir / "usr" / "bin" / "hbat", 0o755)
256
+
257
+ # Copy icon
258
+ if os.path.exists("hbat.png"):
259
+ shutil.copy2(
260
+ "hbat.png",
261
+ debdir
262
+ / "usr"
263
+ / "share"
264
+ / "icons"
265
+ / "hicolor"
266
+ / "256x256"
267
+ / "apps"
268
+ / "hbat.png",
269
+ )
270
+
271
+ # Create desktop file
272
+ desktop_content = """[Desktop Entry]
273
+ Name=HBAT
274
+ Comment=Hydrogen Bond Analysis Tool
275
+ Exec=hbat-gui
276
+ Icon=hbat
277
+ Type=Application
278
+ Categories=Science;Chemistry;
279
+ Terminal=false
280
+ """
281
+
282
+ with open(debdir / "usr" / "share" / "applications" / "hbat.desktop", "w") as f:
283
+ f.write(desktop_content)
284
+
285
+ # Create control file
286
+ control_content = """Package: hbat
287
+ Version: 1.0.0
288
+ Section: science
289
+ Priority: optional
290
+ Architecture: amd64
291
+ Maintainer: HBAT Team
292
+ Description: Hydrogen Bond Analysis Tool
293
+ A comprehensive tool for analyzing hydrogen bonds in molecular structures.
294
+ """
295
+
296
+ with open(debdir / "DEBIAN" / "control", "w") as f:
297
+ f.write(control_content)
298
+
299
+ # Build .deb package
300
+ try:
301
+ subprocess.run(
302
+ ["dpkg-deb", "--build", "hbat-deb", "dist/hbat_1.0.0_amd64.deb"], check=True
303
+ )
304
+ shutil.rmtree(debdir)
305
+ print("✓ .deb package created successfully")
306
+ return True
307
+ except (subprocess.CalledProcessError, FileNotFoundError):
308
+ print("✗ Failed to create .deb package (dpkg-deb not found)")
309
+ if debdir.exists():
310
+ shutil.rmtree(debdir)
311
+ return False
312
+
313
+
314
+ def main():
315
+ """Main build function."""
316
+ print("HBAT Linux Build Script")
317
+ print("=" * 40)
318
+
319
+ # Check we're in the right directory
320
+ if not os.path.exists("hbat_gui.py"):
321
+ print("Error: Please run this script from the HBAT project root directory")
322
+ return 1
323
+
324
+ # Check if running on Linux
325
+ if sys.platform != "linux":
326
+ print("Warning: This script is designed for Linux.")
327
+ print("Cross-compilation may not work properly.")
328
+
329
+ # Install dependencies
330
+ if not install_dependencies():
331
+ return 1
332
+
333
+ # Clean previous builds
334
+ clean_build()
335
+
336
+ # Build executables
337
+ gui_success = build_gui()
338
+ cli_success = build_cli()
339
+
340
+ if not (gui_success or cli_success):
341
+ print("All builds failed!")
342
+ return 1
343
+
344
+ # Try to create packages
345
+ appimage_success = create_appimage()
346
+ deb_success = create_deb_package()
347
+
348
+ print("\n" + "=" * 40)
349
+ print("Build Summary")
350
+ print("=" * 40)
351
+
352
+ if gui_success:
353
+ print("✓ GUI: dist/linux/HBAT-GUI")
354
+ else:
355
+ print("✗ GUI build failed")
356
+
357
+ if cli_success:
358
+ print("✓ CLI: dist/linux/hbat")
359
+ else:
360
+ print("✗ CLI build failed")
361
+
362
+ if appimage_success:
363
+ print("✓ AppImage: dist/HBAT-x86_64.AppImage")
364
+ else:
365
+ print("✗ AppImage creation skipped/failed")
366
+
367
+ if deb_success:
368
+ print("✓ DEB Package: dist/hbat_1.0.0_amd64.deb")
369
+ else:
370
+ print("✗ DEB package creation skipped/failed")
371
+
372
+ print("\nUsage:")
373
+ if gui_success:
374
+ print(" GUI: ./dist/linux/HBAT-GUI")
375
+ if cli_success:
376
+ print(" CLI: ./dist/linux/hbat")
377
+ if appimage_success:
378
+ print(" AppImage: ./dist/HBAT-x86_64.AppImage")
379
+
380
+ return 0
381
+
382
+
383
+ if __name__ == "__main__":
384
+ sys.exit(main())