hbat 2.2.11.dev29__tar.gz → 2.2.12__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 (153) hide show
  1. {hbat-2.2.11.dev29 → hbat-2.2.12}/PKG-INFO +2 -2
  2. {hbat-2.2.11.dev29 → hbat-2.2.12}/README.md +1 -1
  3. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/index.rst +2 -2
  4. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/_version.py +2 -2
  5. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/cli/test_cli_output_formats.py +181 -77
  6. {hbat-2.2.11.dev29 → hbat-2.2.12}/.github/workflows/cleanup-prereleases.yml +0 -0
  7. {hbat-2.2.11.dev29 → hbat-2.2.12}/.github/workflows/release.yml +0 -0
  8. {hbat-2.2.11.dev29 → hbat-2.2.12}/.github/workflows/test.yml +0 -0
  9. {hbat-2.2.11.dev29 → hbat-2.2.12}/CITATION.cff +0 -0
  10. {hbat-2.2.11.dev29 → hbat-2.2.12}/CODE_OF_CONDUCT.md +0 -0
  11. {hbat-2.2.11.dev29 → hbat-2.2.12}/CONTRIBUTING.md +0 -0
  12. {hbat-2.2.11.dev29 → hbat-2.2.12}/LICENSE +0 -0
  13. {hbat-2.2.11.dev29 → hbat-2.2.12}/MANIFEST.in +0 -0
  14. {hbat-2.2.11.dev29 → hbat-2.2.12}/Makefile +0 -0
  15. {hbat-2.2.11.dev29 → hbat-2.2.12}/build_standalone.py +0 -0
  16. {hbat-2.2.11.dev29 → hbat-2.2.12}/build_standalone_linux.py +0 -0
  17. {hbat-2.2.11.dev29 → hbat-2.2.12}/build_standalone_windows.py +0 -0
  18. {hbat-2.2.11.dev29 → hbat-2.2.12}/conda/meta.yaml +0 -0
  19. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/Makefile +0 -0
  20. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/requirements.txt +0 -0
  21. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/_static/custom.css +0 -0
  22. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/_static/light-theme.css +0 -0
  23. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/ccd/ccd_analyzer.rst +0 -0
  24. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/ccd/constants_generator.rst +0 -0
  25. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/ccd/generate_ccd_constants.rst +0 -0
  26. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/ccd/index.rst +0 -0
  27. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/cli/index.rst +0 -0
  28. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/app.rst +0 -0
  29. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/atomic_data.rst +0 -0
  30. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/index.rst +0 -0
  31. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/misc.rst +0 -0
  32. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/parameters.rst +0 -0
  33. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/constants/pdb_constants.rst +0 -0
  34. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/index.rst +0 -0
  35. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/interactions.rst +0 -0
  36. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/np_analyzer.rst +0 -0
  37. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/np_vector.rst +0 -0
  38. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/pdb_fixer.rst +0 -0
  39. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/pdb_parser.rst +0 -0
  40. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/core/structure.rst +0 -0
  41. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/examples/index.rst +0 -0
  42. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/gui/index.rst +0 -0
  43. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/index.rst +0 -0
  44. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/utilities/atom_utils.rst +0 -0
  45. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/utilities/graphviz_utils.rst +0 -0
  46. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/api/utilities/index.rst +0 -0
  47. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/cli.rst +0 -0
  48. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/conf.py +0 -0
  49. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/development.rst +0 -0
  50. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/installation.rst +0 -0
  51. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/license.rst +0 -0
  52. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/logic.rst +0 -0
  53. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/parameters.rst +0 -0
  54. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/pdbfixing.rst +0 -0
  55. {hbat-2.2.11.dev29 → hbat-2.2.12}/docs/source/quickstart.rst +0 -0
  56. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/1bhl.pdb +0 -0
  57. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/1gai.pdb +0 -0
  58. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/1ubi.pdb +0 -0
  59. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/2izf.pdb +0 -0
  60. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/4jsv.pdb +0 -0
  61. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/4laz.pdb +0 -0
  62. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/4ub7.pdb +0 -0
  63. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/4x21.pdb +0 -0
  64. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_pdb_files/6rsa.pdb +0 -0
  65. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/drug_design_strict.hbat +0 -0
  66. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/high_resolution.hbat +0 -0
  67. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/low_resolution.hbat +0 -0
  68. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/membrane_proteins.hbat +0 -0
  69. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/nmr_structures.hbat +0 -0
  70. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/standard_resolution.hbat +0 -0
  71. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/strong_interactions_only.hbat +0 -0
  72. {hbat-2.2.11.dev29 → hbat-2.2.12}/example_presets/weak_interactions_permissive.hbat +0 -0
  73. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/__init__.py +0 -0
  74. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/ccd/__init__.py +0 -0
  75. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/ccd/ccd_analyzer.py +0 -0
  76. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/ccd/constants_generator.py +0 -0
  77. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/ccd/generate_ccd_constants.py +0 -0
  78. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/cli/__init__.py +0 -0
  79. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/cli/main.py +0 -0
  80. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/__init__.py +0 -0
  81. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/app.py +0 -0
  82. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/atomic_data.py +0 -0
  83. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/misc.py +0 -0
  84. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/parameters.py +0 -0
  85. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/pdb_constants.py +0 -0
  86. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/constants/residue_bonds.py +0 -0
  87. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/__init__.py +0 -0
  88. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/analysis.py +0 -0
  89. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/analyzer.py +0 -0
  90. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/app_config.py +0 -0
  91. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/atom_classifier.py +0 -0
  92. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/interactions.py +0 -0
  93. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/np_analyzer.py +0 -0
  94. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/np_vector.py +0 -0
  95. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/pdb_fixer.py +0 -0
  96. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/pdb_parser.py +0 -0
  97. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/core/structure.py +0 -0
  98. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/__init__.py +0 -0
  99. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/chain_visualization.py +0 -0
  100. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/export_manager.py +0 -0
  101. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/graphviz_preferences_dialog.py +0 -0
  102. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/graphviz_renderer.py +0 -0
  103. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/main_window.py +0 -0
  104. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/matplotlib_renderer.py +0 -0
  105. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/parameter_panel.py +0 -0
  106. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/results_panel.py +0 -0
  107. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/gui/visualization_renderer.py +0 -0
  108. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/utilities/__init__.py +0 -0
  109. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/utilities/atom_utils.py +0 -0
  110. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat/utilities/graphviz_utils.py +0 -0
  111. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat.egg-info/SOURCES.txt +0 -0
  112. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat.icns +0 -0
  113. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat.ico +0 -0
  114. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat.png +0 -0
  115. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat.svg +0 -0
  116. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat_cli.py +0 -0
  117. {hbat-2.2.11.dev29 → hbat-2.2.12}/hbat_gui.py +0 -0
  118. {hbat-2.2.11.dev29 → hbat-2.2.12}/pyproject.toml +0 -0
  119. {hbat-2.2.11.dev29 → hbat-2.2.12}/pytest.ini +0 -0
  120. {hbat-2.2.11.dev29 → hbat-2.2.12}/requirements-dev.txt +0 -0
  121. {hbat-2.2.11.dev29 → hbat-2.2.12}/requirements.txt +0 -0
  122. {hbat-2.2.11.dev29 → hbat-2.2.12}/setup.cfg +0 -0
  123. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/README.md +0 -0
  124. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/__init__.py +0 -0
  125. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/cli/__init__.py +0 -0
  126. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/cli/test_cli_main.py +0 -0
  127. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/conftest.py +0 -0
  128. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/e2e/__init__.py +0 -0
  129. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/e2e/test_cli_workflows.py +0 -0
  130. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/e2e/test_complete_workflows.py +0 -0
  131. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/e2e/test_graphviz_workflows.py +0 -0
  132. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/e2e/test_gui_workflows.py +0 -0
  133. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/gui/__init__.py +0 -0
  134. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/gui/test_gui_components.py +0 -0
  135. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/__init__.py +0 -0
  136. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/test_analyzer_components.py +0 -0
  137. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/test_cli_integration.py +0 -0
  138. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/test_graphviz_renderer.py +0 -0
  139. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/test_molecular_validation.py +0 -0
  140. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/integration/test_pdb_parsing.py +0 -0
  141. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/performance/__init__.py +0 -0
  142. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/performance/test_ccd_performance.py +0 -0
  143. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/performance/test_performance_workflows.py +0 -0
  144. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/run_tests.py +0 -0
  145. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/__init__.py +0 -0
  146. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_cli_parsing.py +0 -0
  147. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_graphviz_utils.py +0 -0
  148. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_gui_components.py +0 -0
  149. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_interactions.py +0 -0
  150. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_parameters.py +0 -0
  151. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_scrollable_canvas.py +0 -0
  152. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_structures.py +0 -0
  153. {hbat-2.2.11.dev29 → hbat-2.2.12}/tests/unit/test_vector_math.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hbat
3
- Version: 2.2.11.dev29
3
+ Version: 2.2.12
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
@@ -86,7 +86,7 @@ A Python package to automate the analysis of potential hydrogen bonds and simila
86
86
  ![PyPI Downloads](https://img.shields.io/pepy/dt/hbat?label=PyPI%20Downloads)
87
87
  [![codecov](https://codecov.io/gh/abhishektiwari/hbat/graph/badge.svg?token=QSKYLB3M1V)](https://codecov.io/gh/abhishektiwari/hbat)
88
88
  [![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)
89
- [![Socket](https://socket.dev/api/badge/pypi/package/hbat/2.2.6?artifact_id=tar-gz#1753326341848)](https://socket.dev/pypi/package/hbat/overview/2.2.6/tar-gz)
89
+ [![Socket](https://socket.dev/api/badge/pypi/package/hbat/2.2.11?artifact_id=py3-none-any-whl)](https://socket.dev/pypi/package/hbat/overview/2.2.11/py3-none-any-whl)
90
90
  [![CodeFactor](https://www.codefactor.io/repository/github/abhishektiwari/hbat/badge/main)](https://www.codefactor.io/repository/github/abhishektiwari/hbat/overview/main)
91
91
 
92
92
  ## Background
@@ -18,7 +18,7 @@ A Python package to automate the analysis of potential hydrogen bonds and simila
18
18
  ![PyPI Downloads](https://img.shields.io/pepy/dt/hbat?label=PyPI%20Downloads)
19
19
  [![codecov](https://codecov.io/gh/abhishektiwari/hbat/graph/badge.svg?token=QSKYLB3M1V)](https://codecov.io/gh/abhishektiwari/hbat)
20
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)
21
- [![Socket](https://socket.dev/api/badge/pypi/package/hbat/2.2.6?artifact_id=tar-gz#1753326341848)](https://socket.dev/pypi/package/hbat/overview/2.2.6/tar-gz)
21
+ [![Socket](https://socket.dev/api/badge/pypi/package/hbat/2.2.11?artifact_id=py3-none-any-whl)](https://socket.dev/pypi/package/hbat/overview/2.2.11/py3-none-any-whl)
22
22
  [![CodeFactor](https://www.codefactor.io/repository/github/abhishektiwari/hbat/badge/main)](https://www.codefactor.io/repository/github/abhishektiwari/hbat/overview/main)
23
23
 
24
24
  ## Background
@@ -56,9 +56,9 @@ HBAT Documentation
56
56
  :alt: Cited by Google Scholar
57
57
  :target: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=Mb7eYKYAAAAJ&citation_for_view=Mb7eYKYAAAAJ:u-x6o8ySG0sC
58
58
 
59
- .. image:: https://socket.dev/api/badge/pypi/package/hbat/2.2.6?artifact_id=tar-gz#1753326341848
59
+ .. image:: https://socket.dev/api/badge/pypi/package/hbat/2.2.11?artifact_id=py3-none-any-whl
60
60
  :alt: Socket
61
- :target: https://socket.dev/pypi/package/hbat/overview/2.2.6/tar-gz
61
+ :target: https://socket.dev/api/badge/pypi/package/hbat/2.2.11?artifact_id=py3-none-any-whl
62
62
 
63
63
  .. image:: https://www.codefactor.io/repository/github/abhishektiwari/hbat/badge/main
64
64
  :target: https://www.codefactor.io/repository/github/abhishektiwari/hbat/overview/main
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.2.11.dev29'
21
- __version_tuple__ = version_tuple = (2, 2, 11, 'dev29')
20
+ __version__ = version = '2.2.12'
21
+ __version_tuple__ = version_tuple = (2, 2, 12)
@@ -66,54 +66,110 @@ class TestSingleFileExports:
66
66
  """Create a mock analyzer with sample results."""
67
67
  analyzer = Mock(spec=NPMolecularInteractionAnalyzer)
68
68
 
69
- # Mock hydrogen bonds
70
- hb1 = Mock()
71
- hb1.donor_residue = "A123GLY"
72
- hb1.donor.name = "N"
73
- hb1.hydrogen.name = "H"
74
- hb1.acceptor_residue = "A124ALA"
75
- hb1.acceptor.name = "O"
76
- hb1.distance = 2.8
77
- hb1.angle = 2.79 # radians (~160 degrees)
78
- hb1.donor_acceptor_distance = 3.2
79
- hb1.bond_type = "N-H...O"
80
- hb1.donor_acceptor_properties = "PBN-PBN"
81
- hb1.get_backbone_sidechain_interaction = Mock(return_value="B-B")
69
+ # Create mock coordinate objects that support to_list()
70
+ def mock_coords(x, y, z):
71
+ coords = Mock()
72
+ coords.to_list.return_value = [x, y, z]
73
+ return coords
82
74
 
83
- # Mock halogen bonds
84
- xb1 = Mock()
85
- xb1.halogen_residue = "A125TYR"
86
- xb1.donor_residue = "A125TYR" # For compatibility
87
- xb1.halogen.name = "CL"
88
- xb1.acceptor_residue = "A126ASP"
89
- xb1.acceptor.name = "OD1"
90
- xb1.distance = 3.5
91
- xb1.angle = 2.62 # radians (~150 degrees)
92
- xb1.bond_type = "C-Cl...O"
93
- xb1.donor_acceptor_properties = "PSN-PSN"
94
- xb1.get_backbone_sidechain_interaction = Mock(return_value="S-S")
75
+ # Create mock atom objects with proper attributes
76
+ def mock_atom(name, x=0.0, y=0.0, z=0.0):
77
+ atom = Mock()
78
+ atom.name = name
79
+ atom.coords = mock_coords(x, y, z)
80
+ return atom
95
81
 
96
- # Mock pi interactions
97
- pi1 = Mock()
98
- pi1.donor_residue = "A127LYS"
99
- pi1.donor.name = "NZ"
100
- pi1.hydrogen.name = "HZ1"
101
- pi1.pi_residue = "A128PHE"
102
- pi1.distance = 3.8
103
- pi1.angle = 2.44 # radians (~140 degrees)
104
- pi1.donor_acceptor_properties = "PSN-PSN"
105
- pi1.get_backbone_sidechain_interaction = Mock(return_value="S-S")
106
- pi1.get_interaction_type_display = Mock(return_value="NH-π")
82
+ # Create hydrogen bond object using a simple namespace class
83
+ class SimpleHBond:
84
+ def __init__(self):
85
+ self.donor_residue = "A123GLY"
86
+ self.donor = mock_atom("N", 1.0, 2.0, 3.0)
87
+ self.hydrogen = mock_atom("H", 1.1, 2.1, 3.1)
88
+ self.acceptor_residue = "A124ALA"
89
+ self.acceptor = mock_atom("O", 4.0, 5.0, 6.0)
90
+ self.distance = 2.8
91
+ self.angle = 2.79 # radians (~160 degrees)
92
+ self.donor_acceptor_distance = 3.2
93
+ self.bond_type = "N-H...O"
94
+ self.donor_acceptor_properties = "PBN-PBN"
95
+
96
+ def get_backbone_sidechain_interaction(self):
97
+ return "B-B"
98
+
99
+ hb1 = SimpleHBond()
100
+
101
+ # Create halogen bond object using a simple namespace class
102
+ class SimpleXBond:
103
+ def __init__(self):
104
+ self.halogen_residue = "A125TYR"
105
+ self.donor_residue = "A125TYR" # For compatibility
106
+ self.halogen = mock_atom("CL", 7.0, 8.0, 9.0)
107
+ self.acceptor_residue = "A126ASP"
108
+ self.acceptor = mock_atom("OD1", 10.0, 11.0, 12.0)
109
+ self.distance = 3.5
110
+ self.angle = 2.62 # radians (~150 degrees)
111
+ self.bond_type = "C-Cl...O"
112
+ self.donor_acceptor_properties = "PSN-PSN"
113
+
114
+ def get_backbone_sidechain_interaction(self):
115
+ return "S-S"
116
+
117
+ xb1 = SimpleXBond()
118
+
119
+ # Create pi interaction object using a simple namespace class
120
+ class SimplePiBond:
121
+ def __init__(self):
122
+ self.donor_residue = "A127LYS"
123
+ self.donor = mock_atom("NZ", 13.0, 14.0, 15.0)
124
+ self.hydrogen = mock_atom("HZ1", 13.1, 14.1, 15.1)
125
+ self.pi_residue = "A128PHE"
126
+ self.pi_center = mock_coords(16.0, 17.0, 18.0)
127
+ self.distance = 3.8
128
+ self.angle = 2.44 # radians (~140 degrees)
129
+ self.donor_acceptor_properties = "PSN-PSN"
130
+
131
+ def get_backbone_sidechain_interaction(self):
132
+ return "S-S"
133
+
134
+ def get_interaction_type_display(self):
135
+ return "NH-π"
136
+
137
+ pi1 = SimplePiBond()
107
138
 
108
- # Mock cooperativity chains
109
- chain1 = Mock()
110
- chain1.chain_length = 3
111
- chain1.chain_type = "H-bond chain"
139
+ # Create cooperativity chain with simple namespace classes
140
+ class SimpleChainInteraction:
141
+ def __init__(self):
142
+ self.interaction_type = "H-Bond"
143
+ self.distance = 2.8
144
+ self.angle = 2.79
145
+ self.bond_type = "N-H...O"
146
+
147
+ def get_donor_residue(self):
148
+ return "A123GLY"
149
+
150
+ def get_acceptor_residue(self):
151
+ return "A124ALA"
152
+
153
+ def get_donor_atom(self):
154
+ atom = Mock()
155
+ atom.name = "N"
156
+ return atom
157
+
158
+ def get_acceptor_atom(self):
159
+ atom = Mock()
160
+ atom.name = "O"
161
+ return atom
162
+
163
+ def get_interaction_type(self):
164
+ return self.interaction_type
112
165
 
113
- interaction1 = Mock()
114
- interaction1.get_donor_residue = Mock(return_value="A123GLY")
115
- interaction1.get_donor_atom = Mock(return_value=Mock(name="N"))
116
- chain1.interactions = [interaction1, interaction1, interaction1]
166
+ class SimpleChain:
167
+ def __init__(self):
168
+ self.chain_length = 3
169
+ self.chain_type = "H-bond chain"
170
+ self.interactions = [SimpleChainInteraction(), SimpleChainInteraction(), SimpleChainInteraction()]
171
+
172
+ chain1 = SimpleChain()
117
173
 
118
174
  analyzer.hydrogen_bonds = [hb1]
119
175
  analyzer.halogen_bonds = [xb1]
@@ -205,42 +261,90 @@ class TestMultipleFileExports:
205
261
  """Create a mock analyzer with sample results."""
206
262
  analyzer = Mock(spec=NPMolecularInteractionAnalyzer)
207
263
 
208
- # Mock hydrogen bonds
209
- hb1 = Mock()
210
- hb1.donor_residue = "A123GLY"
211
- hb1.donor.name = "N"
212
- hb1.hydrogen.name = "H"
213
- hb1.acceptor_residue = "A124ALA"
214
- hb1.acceptor.name = "O"
215
- hb1.distance = 2.8
216
- hb1.angle = 2.79 # radians
217
- hb1.donor_acceptor_distance = 3.2
218
- hb1.bond_type = "N-H...O"
219
- hb1.donor_acceptor_properties = "PBN-PBN"
220
- hb1.get_backbone_sidechain_interaction = Mock(return_value="B-B")
264
+ # Create mock coordinate objects that support to_list()
265
+ def mock_coords(x, y, z):
266
+ coords = Mock()
267
+ coords.to_list.return_value = [x, y, z]
268
+ return coords
269
+
270
+ # Create mock atom objects with proper attributes
271
+ def mock_atom(name, x=0.0, y=0.0, z=0.0):
272
+ atom = Mock()
273
+ atom.name = name
274
+ atom.coords = mock_coords(x, y, z)
275
+ return atom
276
+
277
+ # Create hydrogen bond object using a simple namespace class
278
+ class SimpleHBond:
279
+ def __init__(self):
280
+ self.donor_residue = "A123GLY"
281
+ self.donor = mock_atom("N", 1.0, 2.0, 3.0)
282
+ self.hydrogen = mock_atom("H", 1.1, 2.1, 3.1)
283
+ self.acceptor_residue = "A124ALA"
284
+ self.acceptor = mock_atom("O", 4.0, 5.0, 6.0)
285
+ self.distance = 2.8
286
+ self.angle = 2.79 # radians
287
+ self.donor_acceptor_distance = 3.2
288
+ self.bond_type = "N-H...O"
289
+ self.donor_acceptor_properties = "PBN-PBN"
290
+
291
+ def get_backbone_sidechain_interaction(self):
292
+ return "B-B"
293
+
294
+ hb1 = SimpleHBond()
295
+
296
+ # Create halogen bond object using a simple namespace class
297
+ class SimpleXBond:
298
+ def __init__(self):
299
+ self.halogen_residue = "A125TYR"
300
+ self.donor_residue = "A125TYR" # For compatibility
301
+ self.halogen = mock_atom("CL", 7.0, 8.0, 9.0)
302
+ self.acceptor_residue = "A126ASP"
303
+ self.acceptor = mock_atom("OD1", 10.0, 11.0, 12.0)
304
+ self.distance = 3.5
305
+ self.angle = 2.62 # radians
306
+ self.bond_type = "C-Cl...O"
307
+ self.donor_acceptor_properties = "PSN-PSN"
308
+
309
+ def get_backbone_sidechain_interaction(self):
310
+ return "S-S"
221
311
 
222
- # Mock halogen bonds with all required attributes
223
- xb1 = Mock()
224
- xb1.halogen_residue = "A125TYR"
225
- xb1.donor_residue = "A125TYR" # For compatibility
226
- xb1.halogen.name = "CL"
227
- xb1.acceptor_residue = "A126ASP"
228
- xb1.acceptor.name = "OD1"
229
- xb1.distance = 3.5
230
- xb1.angle = 2.62 # radians
231
- xb1.bond_type = "C-Cl...O"
232
- xb1.donor_acceptor_properties = "PSN-PSN"
233
- xb1.get_backbone_sidechain_interaction = Mock(return_value="S-S")
312
+ xb1 = SimpleXBond()
313
+
314
+ # Create cooperativity chain with simple namespace classes
315
+ class SimpleChainInteraction:
316
+ def __init__(self):
317
+ self.interaction_type = "H-Bond"
318
+ self.distance = 2.8
319
+ self.angle = 2.79
320
+ self.bond_type = "N-H...O"
321
+
322
+ def get_donor_residue(self):
323
+ return "A123GLY"
324
+
325
+ def get_acceptor_residue(self):
326
+ return "A124ALA"
327
+
328
+ def get_donor_atom(self):
329
+ atom = Mock()
330
+ atom.name = "N"
331
+ return atom
332
+
333
+ def get_acceptor_atom(self):
334
+ atom = Mock()
335
+ atom.name = "O"
336
+ return atom
337
+
338
+ def get_interaction_type(self):
339
+ return self.interaction_type
234
340
 
235
- # Mock cooperativity chains
236
- chain1 = Mock()
237
- chain1.chain_length = 3
238
- chain1.chain_type = "H-bond chain"
341
+ class SimpleChain:
342
+ def __init__(self):
343
+ self.chain_length = 3
344
+ self.chain_type = "H-bond chain"
345
+ self.interactions = [SimpleChainInteraction()]
239
346
 
240
- interaction1 = Mock()
241
- interaction1.get_donor_residue = Mock(return_value="A123GLY")
242
- interaction1.get_donor_atom = Mock(return_value=Mock(name="N"))
243
- chain1.interactions = [interaction1]
347
+ chain1 = SimpleChain()
244
348
 
245
349
  analyzer.hydrogen_bonds = [hb1]
246
350
  analyzer.halogen_bonds = [xb1]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes