hbat 2.2.5__tar.gz → 2.2.6.dev24__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 (152) hide show
  1. {hbat-2.2.5 → hbat-2.2.6.dev24}/.github/workflows/release.yml +18 -5
  2. {hbat-2.2.5 → hbat-2.2.6.dev24}/.github/workflows/test.yml +13 -5
  3. {hbat-2.2.5 → hbat-2.2.6.dev24}/CLAUDE.md +6 -0
  4. {hbat-2.2.5 → hbat-2.2.6.dev24}/Makefile +39 -14
  5. {hbat-2.2.5 → hbat-2.2.6.dev24}/PKG-INFO +5 -2
  6. {hbat-2.2.5 → hbat-2.2.6.dev24}/README.md +4 -1
  7. {hbat-2.2.5 → hbat-2.2.6.dev24}/build_standalone_linux.py +27 -17
  8. hbat-2.2.6.dev24/docs/source/_static/custom.css +4 -0
  9. hbat-2.2.6.dev24/docs/source/_static/light-theme.css +1 -0
  10. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/conf.py +39 -5
  11. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/index.rst +77 -16
  12. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/installation.rst +17 -14
  13. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/_version.py +2 -2
  14. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/cli/main.py +96 -1
  15. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/pdb_constants.py +104 -0
  16. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/app_config.py +14 -14
  17. hbat-2.2.6.dev24/hbat/core/atom_classifier.py +123 -0
  18. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/interactions.py +178 -12
  19. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/np_analyzer.py +209 -118
  20. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/np_vector.py +16 -16
  21. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/pdb_parser.py +18 -9
  22. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/structure.py +15 -0
  23. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/gui/main_window.py +163 -59
  24. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/gui/results_panel.py +67 -30
  25. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat.egg-info/SOURCES.txt +20 -10
  26. {hbat-2.2.5 → hbat-2.2.6.dev24}/pytest.ini +6 -1
  27. {hbat-2.2.5 → hbat-2.2.6.dev24}/requirements-dev.txt +7 -1
  28. {hbat-2.2.5 → hbat-2.2.6.dev24}/requirements.txt +8 -1
  29. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/cli/test_cli_main.py +4 -218
  30. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/conftest.py +158 -0
  31. hbat-2.2.6.dev24/tests/e2e/__init__.py +0 -0
  32. hbat-2.2.6.dev24/tests/e2e/test_cli_workflows.py +458 -0
  33. hbat-2.2.6.dev24/tests/e2e/test_complete_workflows.py +357 -0
  34. hbat-2.2.6.dev24/tests/e2e/test_gui_workflows.py +540 -0
  35. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/gui/test_gui_components.py +445 -464
  36. hbat-2.2.6.dev24/tests/integration/__init__.py +0 -0
  37. hbat-2.2.6.dev24/tests/integration/test_analyzer_components.py +484 -0
  38. hbat-2.2.6.dev24/tests/integration/test_cli_integration.py +506 -0
  39. hbat-2.2.6.dev24/tests/integration/test_molecular_validation.py +209 -0
  40. hbat-2.2.6.dev24/tests/integration/test_pdb_parsing.py +837 -0
  41. hbat-2.2.6.dev24/tests/performance/__init__.py +6 -0
  42. hbat-2.2.6.dev24/tests/performance/test_performance_workflows.py +558 -0
  43. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/run_tests.py +44 -20
  44. hbat-2.2.6.dev24/tests/unit/__init__.py +0 -0
  45. hbat-2.2.6.dev24/tests/unit/test_cli_parsing.py +341 -0
  46. hbat-2.2.6.dev24/tests/unit/test_gui_components.py +406 -0
  47. {hbat-2.2.5/tests/core → hbat-2.2.6.dev24/tests/unit}/test_interactions.py +290 -304
  48. hbat-2.2.6.dev24/tests/unit/test_parameters.py +446 -0
  49. hbat-2.2.6.dev24/tests/unit/test_structures.py +471 -0
  50. hbat-2.2.6.dev24/tests/unit/test_vector_math.py +454 -0
  51. hbat-2.2.5/docs/source/_static/custom.css +0 -78
  52. hbat-2.2.5/docs/source/_static/light-theme.css +0 -39
  53. hbat-2.2.5/tests/core/__init__.py +0 -5
  54. hbat-2.2.5/tests/core/test_analyzer.py +0 -631
  55. hbat-2.2.5/tests/core/test_np_vector.py +0 -156
  56. hbat-2.2.5/tests/core/test_pdb_fixer.py +0 -366
  57. hbat-2.2.5/tests/core/test_pdb_parser.py +0 -582
  58. hbat-2.2.5/tests/gui/test_numpy_integration.py +0 -103
  59. hbat-2.2.5/tests/test_np_analyzer.py +0 -310
  60. hbat-2.2.5/tests/test_np_vector.py +0 -293
  61. {hbat-2.2.5 → hbat-2.2.6.dev24}/.github/workflows/cleanup-prereleases.yml +0 -0
  62. {hbat-2.2.5 → hbat-2.2.6.dev24}/CITATION.cff +0 -0
  63. {hbat-2.2.5 → hbat-2.2.6.dev24}/CODE_OF_CONDUCT.md +0 -0
  64. {hbat-2.2.5 → hbat-2.2.6.dev24}/CONTRIBUTING.md +0 -0
  65. {hbat-2.2.5 → hbat-2.2.6.dev24}/LICENSE +0 -0
  66. {hbat-2.2.5 → hbat-2.2.6.dev24}/MANIFEST.in +0 -0
  67. {hbat-2.2.5 → hbat-2.2.6.dev24}/build_standalone.py +0 -0
  68. {hbat-2.2.5 → hbat-2.2.6.dev24}/build_standalone_windows.py +0 -0
  69. {hbat-2.2.5 → hbat-2.2.6.dev24}/conda/meta.yaml +0 -0
  70. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/Makefile +0 -0
  71. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/requirements.txt +0 -0
  72. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/ccd/ccd_analyzer.rst +0 -0
  73. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/ccd/constants_generator.rst +0 -0
  74. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/ccd/generate_ccd_constants.rst +0 -0
  75. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/ccd/index.rst +0 -0
  76. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/cli/index.rst +0 -0
  77. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/app.rst +0 -0
  78. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/atomic_data.rst +0 -0
  79. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/index.rst +0 -0
  80. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/misc.rst +0 -0
  81. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/parameters.rst +0 -0
  82. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/constants/pdb_constants.rst +0 -0
  83. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/index.rst +0 -0
  84. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/interactions.rst +0 -0
  85. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/np_analyzer.rst +0 -0
  86. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/np_vector.rst +0 -0
  87. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/pdb_fixer.rst +0 -0
  88. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/pdb_parser.rst +0 -0
  89. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/core/structure.rst +0 -0
  90. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/examples/index.rst +0 -0
  91. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/gui/index.rst +0 -0
  92. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/index.rst +0 -0
  93. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/utilities/atom_utils.rst +0 -0
  94. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/api/utilities/index.rst +0 -0
  95. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/cli.rst +0 -0
  96. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/development.rst +0 -0
  97. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/license.rst +0 -0
  98. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/logic.rst +0 -0
  99. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/parameters.rst +0 -0
  100. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/pdbfixing.rst +0 -0
  101. {hbat-2.2.5 → hbat-2.2.6.dev24}/docs/source/quickstart.rst +0 -0
  102. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/1bhl.pdb +0 -0
  103. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/1gai.pdb +0 -0
  104. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/1ubi.pdb +0 -0
  105. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/2izf.pdb +0 -0
  106. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/4jsv.pdb +0 -0
  107. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/4laz.pdb +0 -0
  108. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/4ub7.pdb +0 -0
  109. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/4x21.pdb +0 -0
  110. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_pdb_files/6rsa.pdb +0 -0
  111. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/drug_design_strict.hbat +0 -0
  112. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/high_resolution.hbat +0 -0
  113. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/low_resolution.hbat +0 -0
  114. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/membrane_proteins.hbat +0 -0
  115. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/nmr_structures.hbat +0 -0
  116. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/standard_resolution.hbat +0 -0
  117. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/strong_interactions_only.hbat +0 -0
  118. {hbat-2.2.5 → hbat-2.2.6.dev24}/example_presets/weak_interactions_permissive.hbat +0 -0
  119. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/__init__.py +0 -0
  120. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/ccd/__init__.py +0 -0
  121. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/ccd/ccd_analyzer.py +0 -0
  122. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/ccd/constants_generator.py +0 -0
  123. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/ccd/generate_ccd_constants.py +0 -0
  124. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/cli/__init__.py +0 -0
  125. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/__init__.py +0 -0
  126. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/app.py +0 -0
  127. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/atomic_data.py +0 -0
  128. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/misc.py +0 -0
  129. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/parameters.py +0 -0
  130. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/constants/residue_bonds.py +0 -0
  131. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/__init__.py +0 -0
  132. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/analysis.py +0 -0
  133. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/analyzer.py +0 -0
  134. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/core/pdb_fixer.py +0 -0
  135. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/gui/__init__.py +0 -0
  136. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/gui/chain_visualization.py +0 -0
  137. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/gui/parameter_panel.py +0 -0
  138. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/utilities/__init__.py +0 -0
  139. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat/utilities/atom_utils.py +0 -0
  140. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat.icns +0 -0
  141. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat.ico +0 -0
  142. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat.png +0 -0
  143. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat.svg +0 -0
  144. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat_cli.py +0 -0
  145. {hbat-2.2.5 → hbat-2.2.6.dev24}/hbat_gui.py +0 -0
  146. {hbat-2.2.5 → hbat-2.2.6.dev24}/pyproject.toml +0 -0
  147. {hbat-2.2.5 → hbat-2.2.6.dev24}/setup.cfg +0 -0
  148. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/README.md +0 -0
  149. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/__init__.py +0 -0
  150. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/cli/__init__.py +0 -0
  151. {hbat-2.2.5 → hbat-2.2.6.dev24}/tests/gui/__init__.py +0 -0
  152. {hbat-2.2.5/tests/core → hbat-2.2.6.dev24/tests/performance}/test_ccd_performance.py +0 -0
@@ -116,7 +116,6 @@ jobs:
116
116
  retention-days: 30
117
117
 
118
118
  - name: Publish to PyPI
119
- if: needs.generate-version.outputs.is_prerelease == 'false'
120
119
  uses: pypa/gh-action-pypi-publish@release/v1
121
120
  with:
122
121
  attestations: true
@@ -419,21 +418,28 @@ jobs:
419
418
  - `hbat_${{ needs.generate-version.outputs.version }}_amd64.deb` - Debian package
420
419
 
421
420
  ### Conda Package
422
- - `hbat-${{ needs.generate-version.outputs.version }}.tar.bz2` or `.conda`
421
+ - `hbat-${{ needs.generate-version.outputs.version }}-py0.conda`
423
422
 
424
423
  ### Documentation
425
424
  - `hbat-docs-${{ needs.generate-version.outputs.version }}.zip` - Full HTML documentation
426
425
 
427
426
  ## Installation
428
427
 
429
- **pip:**
428
+ **PIP:**
430
429
  ```bash
431
430
  pip install https://github.com/${{ github.repository }}/releases/download/${{ needs.generate-version.outputs.github_tag }}/hbat-${{ needs.generate-version.outputs.version }}-py3-none-any.whl
432
431
  ```
433
432
 
434
- ${{ needs.generate-version.outputs.is_prerelease == 'false' && '**PyPI:**\n```bash\npip install hbat\n```' || '' }}
433
+ **PyPI:**
434
+ ```bash
435
+ pip install hbat${{ needs.generate-version.outputs.is_prerelease == 'true' && '==' || '' }}${{ needs.generate-version.outputs.is_prerelease == 'true' && needs.generate-version.outputs.version || '' }}
436
+ ```
435
437
 
436
- ${{ needs.generate-version.outputs.is_prerelease == 'false' && '**Conda:**\n```bash\nconda install -c ${{ secrets.ANACONDA_ORG }} hbat\n```' || '**Conda:** Download the package and install locally' }}
438
+ ${{ needs.generate-version.outputs.is_prerelease == 'false' && '**Conda:**
439
+ ```bash
440
+ conda install -c ${{ secrets.ANACONDA_ORG }} hbat
441
+ ```' || '**Conda:**
442
+ Download the package and install locally' }}
437
443
  prerelease: ${{ needs.generate-version.outputs.is_prerelease == 'true' }}
438
444
  draft: false
439
445
 
@@ -451,6 +457,13 @@ jobs:
451
457
  A pre-release has been created for this PR: **${tag}**
452
458
 
453
459
  ### Quick Install
460
+
461
+ **From PyPI (recommended):**
462
+ \`\`\`bash
463
+ pip install hbat==${version}
464
+ \`\`\`
465
+
466
+ **From GitHub Release:**
454
467
  \`\`\`bash
455
468
  pip install https://github.com/${{ github.repository }}/releases/download/${tag}/hbat-${version}-py3-none-any.whl
456
469
  \`\`\`
@@ -38,11 +38,19 @@ jobs:
38
38
 
39
39
  - name: Run coverage
40
40
  run: make test-coverage
41
- if: matrix.python-version == '3.9'
41
+ if: matrix.python-version == '3.10'
42
42
 
43
43
  - name: Upload coverage to Codecov
44
- uses: codecov/codecov-action@v3
45
- if: matrix.python-version == '3.9'
44
+ uses: codecov/codecov-action@v5
45
+ if: matrix.python-version == '3.10'
46
46
  with:
47
- file: ./tests/htmlcov/coverage.xml
48
- fail_ci_if_error: false
47
+ fail_ci_if_error: false
48
+ files: ./coverage.xml
49
+ token: ${{ secrets.CODECOV_TOKEN }}
50
+
51
+ - name: Upload test results to Codecov
52
+ if: ${{ !cancelled() }}
53
+ uses: codecov/test-results-action@v1
54
+ with:
55
+ files: ./junit.xml
56
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -33,3 +33,9 @@
33
33
  - 1UBI.pdb and 1BHL.pdb lack hydrogen atoms. Add missing hydrogen atoms (i.e. PDB fixing) and then perform hydrogen bond analysis. Test both OpenBabel and PDB fixer for fixing missing hydrogen atoms.
34
34
 
35
35
  6. Store all debugging and experimental scripts and utilities in `experiments` folder
36
+
37
+ 7. When asked, output planning details into `plan` folder in markdown files. For every feature first plan and then implement. During plan phase, create a new `feature-XYZ` folder under `plan`. Create 3 files (1) `requirements.md`: includes detailed requirements for the feature and acceptance criteria (which can be used for writing tests), (2) `design.md` contains detailed design for the feature including any mermaid and or plantUML diagrams, and (3) `tasks.md` implementation plan for test first development.
38
+
39
+ 9. We will follow test-first development i.e. write tests before the actual code that implements the functionality they verify.
40
+
41
+ 10. Always use existing constants from `constants` package and avoid directly hard coding in the code. If you need new constants define them and import.
@@ -1,6 +1,6 @@
1
1
  # HBAT Development Makefile
2
2
 
3
- .PHONY: help install install-dev test test-fast test-legacy test-pytest test-core test-cli test-gui test-coverage test-ccd clean lint format type-check docs generate-ccd-bonds
3
+ .PHONY: help install install-dev test test-all test-fast test-legacy test-pytest test-unit test-integration test-e2e test-performance test-cli test-gui test-coverage test-ccd clean lint format type-check docs generate-ccd-bonds
4
4
 
5
5
  # Default target
6
6
  help:
@@ -9,11 +9,15 @@ help:
9
9
  @echo " install-dev Install with development dependencies"
10
10
  @echo ""
11
11
  @echo "Testing:"
12
- @echo " test Run comprehensive test suite (recommended)"
12
+ @echo " test Run comprehensive test suite (excludes slow tests)"
13
+ @echo " test-all Run ALL tests including slow performance tests"
13
14
  @echo " test-fast Run fast tests only (skip slow integration tests)"
14
15
  @echo " test-legacy Run legacy test runner"
15
16
  @echo " test-pytest Run tests with pytest (if available)"
16
- @echo " test-core Run core module tests only"
17
+ @echo " test-unit Run unit tests only (fast, isolated)"
18
+ @echo " test-integration Run integration tests only (component interactions)"
19
+ @echo " test-e2e Run end-to-end workflow tests only"
20
+ @echo " test-performance Run performance benchmark tests only"
17
21
  @echo " test-cli Run CLI tests only"
18
22
  @echo " test-gui Run GUI tests only (requires display)"
19
23
  @echo " test-coverage Generate test coverage report"
@@ -32,6 +36,7 @@ help:
32
36
  @echo "Development:"
33
37
  @echo " clean Clean build artifacts"
34
38
  @echo " docs Build documentation"
39
+ @echo " docs-watch Build docs with auto-reload and open browser"
35
40
  @echo " run-gui Launch GUI application"
36
41
  @echo " run-cli Run CLI with test file"
37
42
  @echo " generate-ccd-bonds Generate residue bond constants from CCD files"
@@ -46,36 +51,52 @@ install-dev:
46
51
 
47
52
  # Testing
48
53
  test:
49
- @echo "Running additional pytest tests if available..."
50
- -pytest tests/ -v
54
+ @echo "Running all tests except slow ones..."
55
+ pytest tests/ -v -m "not slow"
51
56
 
52
57
  test-fast:
53
58
  @echo "Running fast tests only..."
54
59
  cd tests && python run_tests.py --fast
55
60
 
61
+ test-all:
62
+ @echo "Running ALL tests including slow ones..."
63
+ pytest tests/ -v
64
+
56
65
  test-pytest:
57
66
  @echo "Running tests with pytest..."
58
67
  pytest tests/ -v
59
68
 
60
69
  test-cli:
61
70
  @echo "Running CLI tests..."
62
- cd tests && python run_tests.py --cli --fast
63
-
64
- test-core:
65
- @echo "Running core tests..."
66
- cd tests && python run_tests.py --core --fast
71
+ pytest tests/cli/ -v -m "cli"
67
72
 
68
73
  test-coverage:
69
- @echo "Running tests with coverage..."
70
- cd tests && python run_tests.py --coverage
74
+ @echo "Running tests with coverage...(excludes slow tests)"
75
+ pytest tests/ -v -m "not slow" --cov --cov-branch --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
71
76
 
72
77
  test-gui:
73
78
  @echo "Running GUI tests..."
74
- cd tests && python run_tests.py --gui --fast
79
+ pytest tests/gui/ -v -m "gui"
80
+
81
+ test-unit:
82
+ @echo "Running unit tests..."
83
+ pytest tests/unit/ -v -m "unit"
84
+
85
+ test-integration:
86
+ @echo "Running integration tests..."
87
+ pytest tests/integration/ -v -m "integration"
88
+
89
+ test-e2e:
90
+ @echo "Running end-to-end tests..."
91
+ pytest tests/e2e/ -v -m "e2e"
92
+
93
+ test-performance:
94
+ @echo "Running performance tests..."
95
+ pytest tests/performance/ -v -m "performance"
75
96
 
76
97
  test-ccd:
77
98
  @echo "Running CCD performance tests..."
78
- pytest tests/core/test_ccd_performance.py -v -m "ccd"
99
+ pytest tests/performance/test_ccd_performance.py -v -m "ccd"
79
100
 
80
101
  # Code quality
81
102
  lint:
@@ -125,6 +146,10 @@ docs-serve:
125
146
  echo "Documentation not built. Run 'make docs' first."; \
126
147
  fi
127
148
 
149
+ docs-watch:
150
+ @echo "Building and watching documentation with auto-reload (requires sphinx-autobuild)..."
151
+ sphinx-autobuild docs/source/ docs/build/html/ --open-browser
152
+
128
153
  # Development runners
129
154
  run-gui:
130
155
  python hbat_gui.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hbat
3
- Version: 2.2.5
3
+ Version: 2.2.6.dev24
4
4
  Summary: Hydrogen Bond Analysis Tool for PDB structures
5
5
  Author-email: Abhishek Tiwari <hbat@abhishek-tiwari.com>
6
6
  License-Expression: MIT
@@ -87,13 +87,16 @@ A Python package to automate the analysis of potential hydrogen bonds and simila
87
87
  ![License](https://img.shields.io/github/license/abhishektiwari/hbat)
88
88
  ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/abhishektiwari/hbat/total?label=GitHub%20Downloads)
89
89
  ![SourceForge Downloads](https://img.shields.io/sourceforge/dt/hbat?label=SourceForge%20Downloads)
90
-
90
+ ![PyPI Downloads](https://img.shields.io/pypi/dm/hbat?label=PyPI%20Downloads)
91
+ [![codecov](https://codecov.io/gh/abhishektiwari/hbat/graph/badge.svg?token=QSKYLB3M1V)](https://codecov.io/gh/abhishektiwari/hbat)
92
+ [![Cited By](https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fscholar.google.com%2Fcitations%3Fview_op%3Dview_citation%26hl%3Den%26user%3DMb7eYKYAAAAJ%26citation_for_view%3DMb7eYKYAAAAJ%3Au-x6o8ySG0sC&search=Cited%20by%20(%5Cd%2B)&replace=%241&style=plastic&logo=googlescholar&label=Cited%20By&cacheSeconds=86400)](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=Mb7eYKYAAAAJ&citation_for_view=Mb7eYKYAAAAJ:u-x6o8ySG0sC)
91
93
 
92
94
 
93
95
  ## Background
94
96
 
95
97
  HBAT v2 is a modern Python re-implementation of the original Perl-based tool developed by [Abhishek Tiwari](https://www.abhishek-tiwari.com) and Sunil Kumar Panigrahi.
96
98
 
99
+
97
100
  ## Features
98
101
 
99
102
  - **Comprehensive Analysis**: Detect and analyze potential hydrogen bonds, halogen bonds, and X-H...π interactions
@@ -15,13 +15,16 @@ A Python package to automate the analysis of potential hydrogen bonds and simila
15
15
  ![License](https://img.shields.io/github/license/abhishektiwari/hbat)
16
16
  ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/abhishektiwari/hbat/total?label=GitHub%20Downloads)
17
17
  ![SourceForge Downloads](https://img.shields.io/sourceforge/dt/hbat?label=SourceForge%20Downloads)
18
-
18
+ ![PyPI Downloads](https://img.shields.io/pypi/dm/hbat?label=PyPI%20Downloads)
19
+ [![codecov](https://codecov.io/gh/abhishektiwari/hbat/graph/badge.svg?token=QSKYLB3M1V)](https://codecov.io/gh/abhishektiwari/hbat)
20
+ [![Cited By](https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fscholar.google.com%2Fcitations%3Fview_op%3Dview_citation%26hl%3Den%26user%3DMb7eYKYAAAAJ%26citation_for_view%3DMb7eYKYAAAAJ%3Au-x6o8ySG0sC&search=Cited%20by%20(%5Cd%2B)&replace=%241&style=plastic&logo=googlescholar&label=Cited%20By&cacheSeconds=86400)](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=Mb7eYKYAAAAJ&citation_for_view=Mb7eYKYAAAAJ:u-x6o8ySG0sC)
19
21
 
20
22
 
21
23
  ## Background
22
24
 
23
25
  HBAT v2 is a modern Python re-implementation of the original Perl-based tool developed by [Abhishek Tiwari](https://www.abhishek-tiwari.com) and Sunil Kumar Panigrahi.
24
26
 
27
+
25
28
  ## Features
26
29
 
27
30
  - **Comprehensive Analysis**: Detect and analyze potential hydrogen bonds, halogen bonds, and X-H...π interactions
@@ -38,7 +38,13 @@ def install_dependencies():
38
38
  def clean_build():
39
39
  """Clean previous build artifacts."""
40
40
  print("Cleaning previous builds...")
41
- paths_to_clean = ["build", "dist", "__pycache__", "appimagetool-extracted", "squashfs-root"]
41
+ paths_to_clean = [
42
+ "build",
43
+ "dist",
44
+ "__pycache__",
45
+ "appimagetool-extracted",
46
+ "squashfs-root",
47
+ ]
42
48
 
43
49
  for path in paths_to_clean:
44
50
  if os.path.exists(path):
@@ -129,9 +135,9 @@ def build_cli():
129
135
  def create_appimage():
130
136
  """Create AppImage for better Linux distribution."""
131
137
  print("\nCreating AppImage...")
132
-
138
+
133
139
  # Get version from environment or use default
134
- version = os.environ.get('HBAT_VERSION', '2.0.0')
140
+ version = os.environ.get("HBAT_VERSION", "2.0.0")
135
141
 
136
142
  # Create AppDir structure
137
143
  appdir = Path("HBAT.AppDir")
@@ -183,7 +189,7 @@ Terminal=false
183
189
 
184
190
  with open(appdir / "usr" / "share" / "applications" / "hbat.desktop", "w") as f:
185
191
  f.write(desktop_content)
186
-
192
+
187
193
  # Also create desktop file at root for appimagetool
188
194
  with open(appdir / "hbat.desktop", "w") as f:
189
195
  f.write(desktop_content)
@@ -209,7 +215,7 @@ fi
209
215
  # Download and extract appimagetool if not present
210
216
  appimagetool = "appimagetool-x86_64.AppImage"
211
217
  appimagetool_dir = "appimagetool-extracted"
212
-
218
+
213
219
  if not os.path.exists(appimagetool_dir):
214
220
  if not os.path.exists(appimagetool):
215
221
  print("Downloading appimagetool...")
@@ -222,13 +228,16 @@ fi
222
228
  except Exception as e:
223
229
  print(f"Failed to download appimagetool: {e}")
224
230
  return False
225
-
231
+
226
232
  # Extract appimagetool to avoid FUSE requirement
227
233
  print("Extracting appimagetool...")
228
234
  try:
229
235
  # Extract quietly to avoid verbose output
230
- result = subprocess.run([f"./{appimagetool}", "--appimage-extract"],
231
- capture_output=True, text=True)
236
+ result = subprocess.run(
237
+ [f"./{appimagetool}", "--appimage-extract"],
238
+ capture_output=True,
239
+ text=True,
240
+ )
232
241
  if result.returncode != 0 and "squashfs-root" not in result.stdout:
233
242
  print(f"Failed to extract appimagetool: {result.stderr}")
234
243
  return False
@@ -246,13 +255,13 @@ fi
246
255
  env = os.environ.copy()
247
256
  env["ARCH"] = "x86_64"
248
257
  appimage_name = f"dist/HBAT-{version}-x86_64.AppImage"
249
-
258
+
250
259
  # Check if desktop file exists at root (required by appimagetool)
251
260
  desktop_file = appdir / "hbat.desktop"
252
261
  if not desktop_file.exists():
253
262
  print(f"Error: Desktop file not found at {desktop_file}")
254
263
  return False
255
-
264
+
256
265
  # Use the extracted AppRun instead of the AppImage
257
266
  print(f"Building AppImage with {appimagetool_dir}/AppRun...")
258
267
  result = subprocess.run(
@@ -261,12 +270,12 @@ fi
261
270
  text=True,
262
271
  env=env,
263
272
  )
264
-
273
+
265
274
  if result.returncode != 0:
266
275
  print(f"AppImage build failed: {result.stderr}")
267
276
  print(f"stdout: {result.stdout}")
268
277
  return False
269
-
278
+
270
279
  shutil.rmtree(appdir)
271
280
  print(f"✓ AppImage created successfully: HBAT-{version}-x86_64.AppImage")
272
281
  return True
@@ -278,9 +287,9 @@ fi
278
287
  def create_deb_package():
279
288
  """Create .deb package for Debian/Ubuntu."""
280
289
  print("\nCreating .deb package...")
281
-
290
+
282
291
  # Get version from environment or use default
283
- version = os.environ.get('HBAT_VERSION', '2.0.0')
292
+ version = os.environ.get("HBAT_VERSION", "2.0.0")
284
293
 
285
294
  # Create debian package structure
286
295
  debdir = Path("hbat-deb")
@@ -349,7 +358,8 @@ Description: Hydrogen Bond Analysis Tool
349
358
  # Build .deb package
350
359
  try:
351
360
  subprocess.run(
352
- ["dpkg-deb", "--build", "hbat-deb", f"dist/hbat_{version}_amd64.deb"], check=True
361
+ ["dpkg-deb", "--build", "hbat-deb", f"dist/hbat_{version}_amd64.deb"],
362
+ check=True,
353
363
  )
354
364
  shutil.rmtree(debdir)
355
365
  print(f"✓ .deb package created successfully: hbat_{version}_amd64.deb")
@@ -365,9 +375,9 @@ def main():
365
375
  """Main build function."""
366
376
  print("HBAT Linux Build Script")
367
377
  print("=" * 40)
368
-
378
+
369
379
  # Get version from environment or use default
370
- version = os.environ.get('HBAT_VERSION', '2.0.0')
380
+ version = os.environ.get("HBAT_VERSION", "2.0.0")
371
381
  print(f"Building version: {version}")
372
382
 
373
383
  # Check we're in the right directory
@@ -0,0 +1,4 @@
1
+ /* Custom styles for HBAT documentation */
2
+ a.image-reference {
3
+ text-decoration: none;
4
+ }
@@ -0,0 +1 @@
1
+ /* Light Theme Override for HBAT Documentation */
@@ -35,6 +35,7 @@ extensions = [
35
35
  'sphinx.ext.githubpages',
36
36
  'sphinx_toolbox.shields',
37
37
  'sphinx_sitemap',
38
+ 'sphinx_copybutton',
38
39
  ]
39
40
 
40
41
  # Mock imports for modules that might not be available in CI
@@ -56,7 +57,7 @@ master_doc = 'index'
56
57
  # -- Options for HTML output -------------------------------------------------
57
58
 
58
59
  # The theme to use for HTML and HTML Help pages.
59
- html_theme = 'sphinx_rtd_theme'
60
+ html_theme = 'sphinx_book_theme'
60
61
 
61
62
  # Add any paths that contain custom static files (such as style sheets) here,
62
63
  # relative to this directory. They are copied after the builtin static files,
@@ -64,9 +65,9 @@ html_theme = 'sphinx_rtd_theme'
64
65
  html_static_path = ['_static']
65
66
 
66
67
  # Custom CSS files
67
- # html_css_files = [
68
- # 'custom.css',
69
- # ]
68
+ html_css_files = [
69
+ 'custom.css',
70
+ ]
70
71
 
71
72
  # -- Extension configuration -------------------------------------------------
72
73
 
@@ -107,6 +108,7 @@ intersphinx_mapping = {
107
108
  html_theme_options = {
108
109
  'canonical_url': '',
109
110
  'analytics_id': '',
111
+ 'google_analytics_id': 'G-PLZNCJY1B7',
110
112
  'logo_only': False,
111
113
  'prev_next_buttons_location': 'bottom',
112
114
  'style_external_links': False,
@@ -116,7 +118,39 @@ html_theme_options = {
116
118
  'sticky_navigation': True,
117
119
  'navigation_depth': 4,
118
120
  'includehidden': True,
119
- 'titles_only': False
121
+ 'titles_only': False,
122
+ "repository_url": "https://github.com/abhishektiwari/hbat",
123
+ "repository_provider": "github",
124
+ "repository_branch": "main",
125
+ "path_to_docs": "docs/source",
126
+ "use_issues_button": True,
127
+ "use_repository_button": True,
128
+ "use_edit_page_button": True,
129
+ "use_download_button": False,
130
+ "use_fullscreen_button": True,
131
+ "use_search_button": True,
132
+ "use_sidenotes": True,
133
+ "icon_links_label": "Quick Links",
134
+ "icon_links": [
135
+ {
136
+ "name": "GitHub",
137
+ "url": "https://github.com/abhishektiwari/hbat",
138
+ "icon": "fa-brands fa-square-github",
139
+ "type": "fontawesome",
140
+ },
141
+ {
142
+ "name": "Abhishek Tiwari",
143
+ "url": "https://www.abhishek-tiwari.com",
144
+ "icon": "https://www.abhishek-tiwari.com/images/logo.svg",
145
+ "type": "local",
146
+ },
147
+ {
148
+ "name": "PyPI",
149
+ "url": "https://pypi.org/project/hbat/",
150
+ "icon": "fa-brands fa-python",
151
+ "type": "fontawesome",
152
+ },
153
+ ]
120
154
  }
121
155
 
122
156
  # The version info for the project you're documenting, acts as replacement for
@@ -3,9 +3,11 @@ HBAT Documentation
3
3
 
4
4
  .. image:: https://img.shields.io/github/v/release/abhishektiwari/hbat
5
5
  :alt: GitHub Release
6
+ :target: https://github.com/abhishektiwari/hbat/releases
6
7
 
7
8
  .. image:: https://img.shields.io/github/actions/workflow/status/abhishektiwari/hbat/test.yml?label=tests
8
9
  :alt: GitHub Actions Test Workflow Status
10
+ :target: https://github.com/abhishektiwari/hbat/actions/workflows/test.yml
9
11
 
10
12
  .. pypi-shield::
11
13
  :project: hbat
@@ -36,43 +38,59 @@ HBAT Documentation
36
38
 
37
39
  .. image:: https://img.shields.io/github/downloads/abhishektiwari/hbat/total?label=GitHub%20Downloads
38
40
  :alt: GitHub Downloads (all assets, all releases)
41
+ :target: https://github.com/abhishektiwari/hbat/releases
39
42
 
40
43
  .. image:: https://img.shields.io/sourceforge/dt/hbat?label=SourceForge%20Downloads
41
44
  :alt: SourceForge Downloads
45
+ :target: https://sourceforge.net/projects/hbat/files/
46
+
47
+ .. image:: https://img.shields.io/pypi/dm/hbat?label=PyPI%20Downloads
48
+ :alt: PyPI Downloads
49
+ :target: https://pypi.org/project/hbat/
50
+
51
+ .. image:: https://codecov.io/gh/abhishektiwari/hbat/graph/badge.svg?token=QSKYLB3M1V
52
+ :alt: Codecov Coverage
53
+ :target: https://codecov.io/gh/abhishektiwari/hbat
54
+
55
+ .. image:: https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fscholar.google.com%2Fcitations%3Fview_op%3Dview_citation%26hl%3Den%26user%3DMb7eYKYAAAAJ%26citation_for_view%3DMb7eYKYAAAAJ%3Au-x6o8ySG0sC&search=Cited%20by%20(%5Cd%2B)&replace=%241&style=plastic&logo=googlescholar&label=Cited%20By&cacheSeconds=86400
56
+ :alt: Cited by Google Scholar
57
+ :target: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=Mb7eYKYAAAAJ&citation_for_view=Mb7eYKYAAAAJ:u-x6o8ySG0sC
58
+
59
+
42
60
 
43
61
  Welcome to HBAT (Hydrogen Bond Analysis Tool) documentation!
44
62
 
63
+
64
+ .. raw:: html
65
+
66
+ <span class="__dimensions_badge_embed__" data-doi="10.3233/isi-2007-00337" data-legend="always" data-style="small_circle"></span><script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>
67
+
45
68
  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.
46
69
 
47
70
  .. toctree::
48
- :maxdepth: 2
49
- :caption: Contents:
71
+ :maxdepth: 1
72
+ :caption: User Guide
50
73
 
51
74
  installation
52
75
  quickstart
53
76
  cli
54
77
  parameters
55
78
  pdbfixing
56
- api/index
57
- development
58
- logic
59
79
  license
60
80
 
61
- Features
62
- --------
81
+ .. toctree::
82
+ :maxdepth: 1
83
+ :caption: Developer Guide
63
84
 
64
- - **Comprehensive Analysis**: Detects hydrogen bonds, halogen bonds, and X-H...π interactions
65
- - **Cooperativity Detection**: Identifies chains of cooperative molecular interactions
66
- - **Structure Enhancement**: Automated PDB fixing with OpenBabel and PDBFixer integration
67
- - **Flexible Parameters**: Customizable analysis parameters for different research needs
68
- - **Multiple Output Formats**: Support for CSV, JSON, and formatted text output
69
- - **GUI Interface**: User-friendly graphical interface for interactive analysis
70
- - **Command Line Tool**: Scriptable CLI for batch processing and automation
85
+ api/index
86
+ development
87
+ logic
71
88
 
72
89
  Quick Start
73
90
  -----------
74
91
 
75
- Install HBAT:
92
+ Install HBAT
93
+ ~~~~~~~~~~~~
76
94
 
77
95
  .. code-block:: bash
78
96
 
@@ -80,11 +98,22 @@ Install HBAT:
80
98
 
81
99
  **Recommended**: For fixing missing Hydrogen Atoms, install PDBFixer (preferred over OpenBabel). See :doc:`pdbfixing` for details.
82
100
 
101
+ .. code-block:: bash
102
+
103
+ pip install git+https://github.com/abhishektiwari/hbat.git
104
+
105
+
106
+ If you installed HBAT from PyPI, you can also install PDBFixer using,
107
+
83
108
  .. code-block:: bash
84
109
 
85
110
  pip install git+https://github.com/openmm/pdbfixer.git
86
111
 
87
- Basic usage:
112
+
113
+ See complete installation instructions in :doc:`installation`.
114
+
115
+ Basic usage
116
+ ~~~~~~~~~~~
88
117
 
89
118
  .. code-block:: bash
90
119
 
@@ -93,6 +122,38 @@ Basic usage:
93
122
 
94
123
  See full CLI options :doc:`cli`.
95
124
 
125
+ Features
126
+ --------
127
+
128
+ - **Comprehensive Analysis**: Detects hydrogen bonds, halogen bonds, and X-H...π interactions
129
+ - **Cooperativity Detection**: Identifies chains of cooperative molecular interactions
130
+ - **Structure Enhancement**: Automated PDB fixing with OpenBabel and PDBFixer integration
131
+ - **Flexible Parameters**: Customizable analysis parameters for different research needs
132
+ - **Multiple Output Formats**: Support for CSV, JSON, and formatted text output
133
+ - **GUI Interface**: User-friendly graphical interface for interactive analysis
134
+ - **Command Line Tool**: Scriptable CLI for batch processing and automation
135
+
136
+
137
+ Cite HBAT
138
+ ---------
139
+
140
+ .. code-block:: bash
141
+
142
+ @article{tiwari2023hbat,
143
+ title={HBAT: A Python Package for Automated Hydrogen Bond Analysis in Macromolecular Structures},
144
+ author={Tiwari, Abhishek and others},
145
+ journal={Journal of Open Research Software},
146
+ volume={11},
147
+ number={1},
148
+ pages={1-8},
149
+ year={2023},
150
+ publisher={Ubiquity Press}
151
+ }
152
+
153
+ .. code-block:: bash
154
+
155
+ Tiwari, A., & Panigrahi, S. K. (2007). HBAT: A Complete Package for Analysing Strong and Weak Hydrogen Bonds in Macromolecular Crystal Structures. In Silico Biology, 7(6). https://doi.org/10.3233/ISI-2007-00337
156
+
96
157
  Indices and tables
97
158
  ==================
98
159
 
@@ -9,21 +9,33 @@ HBAT requires:
9
9
  - **Python**: 3.9 or higher
10
10
  - **tkinter**: Included with Python standard library on most systems. On macOS, install Python and tkinter using Homebrew:
11
11
 
12
- .. code-block:: bash
12
+ .. code-block:: bash
13
13
 
14
- brew install python python3-tk
14
+ brew install python python3-tk
15
15
 
16
16
  Installation Methods
17
17
  --------------------
18
18
 
19
- From PyPI (Recommended)
20
- ~~~~~~~~~~~~~~~~~~~~~~~
19
+ From PyPI
20
+ ~~~~~~~~~
21
21
 
22
22
  .. code-block:: bash
23
23
 
24
24
  pip install hbat
25
25
 
26
- **Recommended**: For fixing missing Hydrogen Atoms, install PDBFixer (preferred over OpenBabel). See :doc:`pdbfixing` for details.
26
+
27
+ From Github
28
+ ~~~~~~~~~~~
29
+
30
+ **Recommended** for fixing missing Hydrogen Atoms using PDBFixer (preferred over OpenBabel). See :doc:`pdbfixing` for details.
31
+
32
+
33
+ .. code-block:: bash
34
+
35
+ pip install git+https://github.com/abhishektiwari/hbat.git
36
+
37
+
38
+ If you installed HBAT from PyPI, you can also install PDBFixer using,
27
39
 
28
40
  .. code-block:: bash
29
41
 
@@ -38,15 +50,6 @@ From Source
38
50
  git clone https://github.com/abhishektiwari/hbat.git
39
51
  cd hbat
40
52
  pip install -e .
41
-
42
-
43
- Alternatively,
44
-
45
- .. code-block:: bash
46
-
47
- pip install git+https://github.com/abhishektiwari/hbat.git
48
-
49
-
50
53
  From Conda
51
54
  ~~~~~~~~~~
52
55