napxplorer 1.0.0__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 (122) hide show
  1. napxplorer-1.0.0/LICENSE +21 -0
  2. napxplorer-1.0.0/PKG-INFO +443 -0
  3. napxplorer-1.0.0/README.md +393 -0
  4. napxplorer-1.0.0/napxplorer/__init__.py +13 -0
  5. napxplorer-1.0.0/napxplorer/__version__.py +1 -0
  6. napxplorer-1.0.0/napxplorer/benchmark/ARG_nuc_edge_analysis.py +147 -0
  7. napxplorer-1.0.0/napxplorer/benchmark/H-BOND_score_vs_energy_analysis.py +229 -0
  8. napxplorer-1.0.0/napxplorer/benchmark/NAxplorer_vs_PRince_surface_residues_benchmark.py +275 -0
  9. napxplorer-1.0.0/napxplorer/benchmark/__init__.py +0 -0
  10. napxplorer-1.0.0/napxplorer/benchmark/analyze_af3_preservation.py +487 -0
  11. napxplorer-1.0.0/napxplorer/benchmark/benchmark.py +931 -0
  12. napxplorer-1.0.0/napxplorer/benchmark/diagnose_benchmark_filed.py +92 -0
  13. napxplorer-1.0.0/napxplorer/benchmark/naxplorer_benchmark.py +218 -0
  14. napxplorer-1.0.0/napxplorer/benchmark/plot_grouped_barplot.py +243 -0
  15. napxplorer-1.0.0/napxplorer/benchmark/plot_upSetplot.py +379 -0
  16. napxplorer-1.0.0/napxplorer/benchmark/run_af3_benchmark.py +291 -0
  17. napxplorer-1.0.0/napxplorer/benchmark/run_rf2na_benchmark.py +543 -0
  18. napxplorer-1.0.0/napxplorer/benchmark/stats_on_benchamrks.py +230 -0
  19. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/analyze_curvature_interaction_importance.py +287 -0
  20. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/benchmark_surface_residues.py +291 -0
  21. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/capture_tutorial_screenshots.py +55 -0
  22. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/comprehensive_curvature_benchmark.py +512 -0
  23. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/create_surface_curvature_documentation.py +708 -0
  24. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/generate_manuscript_surface_figures.py +277 -0
  25. napxplorer-1.0.0/napxplorer/benchmark/surface_residues_vs_naccess/prepare_supplementary_comparison.py +223 -0
  26. napxplorer-1.0.0/napxplorer/core/__init__.py +0 -0
  27. napxplorer-1.0.0/napxplorer/core/base.py +37 -0
  28. napxplorer-1.0.0/napxplorer/core/capabilities.py +0 -0
  29. napxplorer-1.0.0/napxplorer/core/component.py +0 -0
  30. napxplorer-1.0.0/napxplorer/core/constants.py +0 -0
  31. napxplorer-1.0.0/napxplorer/core/exceptions.py +0 -0
  32. napxplorer-1.0.0/napxplorer/core/logger.py +0 -0
  33. napxplorer-1.0.0/napxplorer/core/metadata.py +46 -0
  34. napxplorer-1.0.0/napxplorer/core/registry.py +0 -0
  35. napxplorer-1.0.0/napxplorer/core/requirements.py +14 -0
  36. napxplorer-1.0.0/napxplorer/core/settings.py +0 -0
  37. napxplorer-1.0.0/napxplorer/core/typing.py +9 -0
  38. napxplorer-1.0.0/napxplorer/data/__init__.py +1 -0
  39. napxplorer-1.0.0/napxplorer/data/ch_isolated_pi.json +7390 -0
  40. napxplorer-1.0.0/napxplorer/data/electrostatic.json +1151 -0
  41. napxplorer-1.0.0/napxplorer/data/interaction_caps_xtb_modified_v2.py +2363 -0
  42. napxplorer-1.0.0/napxplorer/data/mmcif_clean_reader.py +807 -0
  43. napxplorer-1.0.0/napxplorer/data/naxplorer_additional_pi_defs.json +722 -0
  44. napxplorer-1.0.0/napxplorer/data/renaming.py +136 -0
  45. napxplorer-1.0.0/napxplorer/data/rna_residue_defs.json +20170 -0
  46. napxplorer-1.0.0/napxplorer/data/surface.xyz +15269 -0
  47. napxplorer-1.0.0/napxplorer/data/weak_ch_donor.json +10212 -0
  48. napxplorer-1.0.0/napxplorer/helper_coco2/gen_coco2_json_input.py +262 -0
  49. napxplorer-1.0.0/napxplorer/interactions/__init__.py +0 -0
  50. napxplorer-1.0.0/napxplorer/interactions/run_clapnac_sweep.py +150 -0
  51. napxplorer-1.0.0/napxplorer/interactions/run_coco2_parallel.py +124 -0
  52. napxplorer-1.0.0/napxplorer/interactions/run_napxplorer_parallel.py +609 -0
  53. napxplorer-1.0.0/napxplorer/interactions/run_snap_parallel.py +160 -0
  54. napxplorer-1.0.0/napxplorer/models/data.py +41 -0
  55. napxplorer-1.0.0/napxplorer/modifications/NAPxplorer_modifications_interactions.py +667 -0
  56. napxplorer-1.0.0/napxplorer/modifications/__init__.py +25 -0
  57. napxplorer-1.0.0/napxplorer/modifications/build_webpage_assets.py +425 -0
  58. napxplorer-1.0.0/napxplorer/modifications/catalog.py +256 -0
  59. napxplorer-1.0.0/napxplorer/modifications/ccd_parser.py +109 -0
  60. napxplorer-1.0.0/napxplorer/modifications/describe.py +227 -0
  61. napxplorer-1.0.0/napxplorer/modifications/fetch_modified_nucleotides_data.py +256 -0
  62. napxplorer-1.0.0/napxplorer/modifications/fetch_modified_structures.py +235 -0
  63. napxplorer-1.0.0/napxplorer/modifications/interaction_rules.py +138 -0
  64. napxplorer-1.0.0/napxplorer/modifications/panel_builder.py +238 -0
  65. napxplorer-1.0.0/napxplorer/modifications/pdb_metadata.py +41 -0
  66. napxplorer-1.0.0/napxplorer/modifications/plot_parent_base_to_modified_nucleotides.py +257 -0
  67. napxplorer-1.0.0/napxplorer/modifications/refresh_catalog_status.py +129 -0
  68. napxplorer-1.0.0/napxplorer/modifications/registry.py +361 -0
  69. napxplorer-1.0.0/napxplorer/modifications/render_representatives.py +177 -0
  70. napxplorer-1.0.0/napxplorer/modifications/renderer_2d.py +89 -0
  71. napxplorer-1.0.0/napxplorer/modifications/representatives.py +222 -0
  72. napxplorer-1.0.0/napxplorer/modifications/run_all_modified_structures_gxtb.py +164 -0
  73. napxplorer-1.0.0/napxplorer/modifications/run_pipeline.py +317 -0
  74. napxplorer-1.0.0/napxplorer/parsers/NAPxplorer_parser.py +712 -0
  75. napxplorer-1.0.0/napxplorer/parsers/NAenergy.py +10 -0
  76. napxplorer-1.0.0/napxplorer/parsers/NAwrapping.py +10 -0
  77. napxplorer-1.0.0/napxplorer/parsers/__init__.py +29 -0
  78. napxplorer-1.0.0/napxplorer/parsers/base.py +255 -0
  79. napxplorer-1.0.0/napxplorer/parsers/bpfind.py +0 -0
  80. napxplorer-1.0.0/napxplorer/parsers/claPNAC.py +164 -0
  81. napxplorer-1.0.0/napxplorer/parsers/coco2.py +184 -0
  82. napxplorer-1.0.0/napxplorer/parsers/dssr.py +467 -0
  83. napxplorer-1.0.0/napxplorer/parsers/extractElements_PDB_CIF.py +320 -0
  84. napxplorer-1.0.0/napxplorer/parsers/hbplus.py +819 -0
  85. napxplorer-1.0.0/napxplorer/parsers/mmcifReader.py +563 -0
  86. napxplorer-1.0.0/napxplorer/parsers/naccess.py +582 -0
  87. napxplorer-1.0.0/napxplorer/parsers/pymolParser.py +99 -0
  88. napxplorer-1.0.0/napxplorer/parsers/snap.py +707 -0
  89. napxplorer-1.0.0/napxplorer/plugins/PyMol_render_figures.py +714 -0
  90. napxplorer-1.0.0/napxplorer/utils/mmcif_clean_reader.py +563 -0
  91. napxplorer-1.0.0/napxplorer/utils/renaming.py +136 -0
  92. napxplorer-1.0.0/napxplorer/visualization/__init__.py +77 -0
  93. napxplorer-1.0.0/napxplorer/visualization/chimerax_renderer.py +104 -0
  94. napxplorer-1.0.0/napxplorer/visualization/colors.py +115 -0
  95. napxplorer-1.0.0/napxplorer/visualization/generate_previews.py +116 -0
  96. napxplorer-1.0.0/napxplorer/visualization/molstar_renderer.py +153 -0
  97. napxplorer-1.0.0/napxplorer/visualization/ngl_renderer.py +118 -0
  98. napxplorer-1.0.0/napxplorer/visualization/presets.py +117 -0
  99. napxplorer-1.0.0/napxplorer/visualization/profile.py +23 -0
  100. napxplorer-1.0.0/napxplorer/visualization/pymol_renderer.py +446 -0
  101. napxplorer-1.0.0/napxplorer/visualization/pymol_utils.py +467 -0
  102. napxplorer-1.0.0/napxplorer/visualization/registry.py +56 -0
  103. napxplorer-1.0.0/napxplorer/visualization/renderer.py +82 -0
  104. napxplorer-1.0.0/napxplorer/visualization/styles.py +72 -0
  105. napxplorer-1.0.0/napxplorer/visualization/use.py +21 -0
  106. napxplorer-1.0.0/napxplorer.egg-info/PKG-INFO +443 -0
  107. napxplorer-1.0.0/napxplorer.egg-info/SOURCES.txt +120 -0
  108. napxplorer-1.0.0/napxplorer.egg-info/dependency_links.txt +1 -0
  109. napxplorer-1.0.0/napxplorer.egg-info/entry_points.txt +3 -0
  110. napxplorer-1.0.0/napxplorer.egg-info/requires.txt +25 -0
  111. napxplorer-1.0.0/napxplorer.egg-info/top_level.txt +2 -0
  112. napxplorer-1.0.0/pyproject.toml +82 -0
  113. napxplorer-1.0.0/scripts/NAPxplorer.py +6451 -0
  114. napxplorer-1.0.0/scripts/NAxplorer.py +25 -0
  115. napxplorer-1.0.0/scripts/NAxplorer_dummyDebug.py +5252 -0
  116. napxplorer-1.0.0/scripts/__init__.py +3 -0
  117. napxplorer-1.0.0/scripts/benchmark_prdbv3_validation.py +684 -0
  118. napxplorer-1.0.0/scripts/capture_focused_molstar.py +42 -0
  119. napxplorer-1.0.0/scripts/capture_tutorial_screenshots.py +191 -0
  120. napxplorer-1.0.0/scripts/capture_water_bridge_zoom.py +27 -0
  121. napxplorer-1.0.0/setup.cfg +4 -0
  122. napxplorer-1.0.0/setup.py +34 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shrikant (<shrikant92pharmacy@gmail.com>)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,443 @@
1
+ Metadata-Version: 2.4
2
+ Name: napxplorer
3
+ Version: 1.0.0
4
+ Summary: NAPxplorer: Structural Analysis, Quantum Energetics & 3D Visualization of Nucleic Acid–Protein Complexes
5
+ Author: Shrikant
6
+ Author-email: Satyabrata Maiti <napxplorer@gmail.com>, Shri Kant <napxplorer@gmail.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/NAPxplorer/NAPxplorer
9
+ Project-URL: Documentation, https://github.com/NAPxplorer/NAPxplorer#readme
10
+ Project-URL: Repository, https://github.com/NAPxplorer/NAPxplorer.git
11
+ Project-URL: Issues, https://github.com/NAPxplorer/NAPxplorer/issues
12
+ Keywords: structural-biology,rna-protein-interactions,dna-protein-interactions,nucleic-acids,bioinformatics,xtb,quantum-chemistry
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
16
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: biopython>=1.80
26
+ Requires-Dist: gemmi>=0.6.0
27
+ Requires-Dist: pandas>=1.5.0
28
+ Requires-Dist: scipy>=1.9.0
29
+ Requires-Dist: numpy>=1.23.0
30
+ Requires-Dist: networkx>=2.8
31
+ Requires-Dist: scikit-learn>=1.1.0
32
+ Requires-Dist: matplotlib>=3.6.0
33
+ Requires-Dist: seaborn>=0.12.0
34
+ Provides-Extra: webserver
35
+ Requires-Dist: Flask>=2.0; extra == "webserver"
36
+ Requires-Dist: Flask-WTF>=1.0; extra == "webserver"
37
+ Requires-Dist: Flask-Limiter>=3.0; extra == "webserver"
38
+ Requires-Dist: wtforms>=3.0; extra == "webserver"
39
+ Provides-Extra: e2e
40
+ Requires-Dist: playwright>=1.40; extra == "e2e"
41
+ Requires-Dist: pytest>=7.0; extra == "e2e"
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest>=7.0; extra == "dev"
44
+ Requires-Dist: build; extra == "dev"
45
+ Requires-Dist: twine; extra == "dev"
46
+ Requires-Dist: wheel; extra == "dev"
47
+ Dynamic: author
48
+ Dynamic: license-file
49
+ Dynamic: requires-python
50
+
51
+ # NAPxplorer
52
+
53
+ <p align="center">
54
+ <picture>
55
+ <source media="(prefers-color-scheme: dark)" srcset="webserver/NAPxplorer/static/images/NAPxplorer_logo_kit_final/svg/NAPxplorer_wordmark_dark.svg">
56
+ <source media="(prefers-color-scheme: light)" srcset="webserver/NAPxplorer/static/images/NAPxplorer_logo_kit_final/svg/NAPxplorer_wordmark.svg">
57
+ <img src="webserver/NAPxplorer/static/images/NAPxplorer_logo_kit_final/svg/NAPxplorer_wordmark.svg" alt="NAPxplorer Logo" width="460">
58
+ </picture>
59
+ </p>
60
+
61
+ [![Python Version](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)
62
+ [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
63
+ [![PyPI Version](https://img.shields.io/badge/pypi-v1.0.0-blue.svg)](https://pypi.org/project/napxplorer/)
64
+ [![Bioconda](https://img.shields.io/badge/bioconda-napxplorer-green.svg)](https://bioconda.github.io/)
65
+ [![Interface Analysis](https://img.shields.io/badge/Analysis-Protein--Nucleic%20Acid%20Interfaces-purple.svg)](#scientific-capabilities--analytical-modules)
66
+ [![Quantum Chemistry](https://img.shields.io/badge/Quantum%20QC-g--xTB%20COSMO-orange.svg)](#quantum-chemical-interaction-energetics)
67
+ [![3D Viewer](https://img.shields.io/badge/Visualization-PDBe%20Mol*-cyan.svg)](#running-the-interactive-web-server)
68
+
69
+ **NAPxplorer** (Nucleic Acid–Protein Explorer) is an open-source, high-performance computational framework and interactive web platform for the comprehensive structural analysis, geometric profiling, quantum chemical energetics, and 3D visualization of protein–nucleic acid complexes (**Protein–RNA**, **Protein–DNA**, and **Protein–RNA–DNA Hybrids / DRBPs**).
70
+
71
+ ---
72
+
73
+ ## Table of Contents
74
+
75
+ - [Key Features](#key-features)
76
+ - [Scientific Capabilities & Analytical Modules](#scientific-capabilities--analytical-modules)
77
+ - [1. Comprehensive Interface Contact Detection](#1-comprehensive-interface-contact-detection)
78
+ - [2. Quantum Chemical Interaction Energetics (g-xTB)](#2-quantum-chemical-interaction-energetics-g-xtb)
79
+ - [3. Differential Geometry Surface Curvature & Shape Classification](#3-differential-geometry-surface-curvature--shape-classification)
80
+ - [4. Surface Wrapping Index & Nucleic Acid Crowding (OOI Index)](#4-surface-wrapping-index--nucleic-acid-crowding-ooi-index)
81
+ - [5. Modified Nucleotides & Non-Standard Residues](#5-modified-nucleotides--non-standard-residues)
82
+ - [6. Multi-Model NMR Conformer Ensembles](#6-multi-model-nmr-conformer-ensembles)
83
+ - [Installation](#installation)
84
+ - [Option A: Python Package (PyPI)](#option-a-python-package-pypi)
85
+ - [Option B: Bioconda & Conda-Forge](#option-b-bioconda--conda-forge)
86
+ - [Option C: From Source (Developer Mode)](#option-c-from-source-developer-mode)
87
+ - [Option D: Docker & Docker Compose](#option-d-docker--docker-compose-deployment)
88
+ - [Quick Start & Usage](#quick-start--usage)
89
+ - [Python API](#python-api)
90
+ - [Command-Line Interface (CLI)](#command-line-interface-cli)
91
+ - [Running the Interactive Web Server](#running-the-interactive-web-server)
92
+ - [REST API & Programmatic Web Services](#rest-api--programmatic-web-services)
93
+ - [Execution Provenance & Audit Records](#execution-provenance--audit-records)
94
+ - [Benchmark & Validation](#benchmark--validation)
95
+ - [Repository Structure](#repository-structure)
96
+ - [Citation & References](#citation--references)
97
+ - [License & Contact](#license--contact)
98
+
99
+ ---
100
+
101
+ ## Key Features
102
+
103
+ - **Unified Data Representation**: Clean, hierarchical, and extensible structural model connecting experimental (X-ray, Cryo-EM, NMR) and predicted (AlphaFold, ESMFold) structures.
104
+ - **14 Interaction Subtypes**: High-resolution classification of hydrogen bonds, weak C–H…O/N contacts, salt bridges, base stacking (π–π), cation–π, amino–π, sugar–π, 2'-OH contacts, metal coordination, and water-mediated bridges.
105
+ - **Semi-Empirical Quantum Energetics**: Automated g-xTB single-point interaction energies (COSMO implicit water by default, fixed geometry).
106
+ - **Differential Geometry Morphometry**: Solvent-accessible Fibonacci dot clouds, Monge patch quadratic fitting, and Koenderink shape index ($S$) classification (`POCKET`, `GROOVE`, `RIDGE`, `SADDLE`, `PLANAR`).
107
+ - **Nucleic Acid Crowding & OOI Index**: A nucleic acid–centered occlusion and crowding index adapting the classical Ooi number (Nishikawa & Ooi, 1986) to quantify local protein residue crowding, paired with directional 36-bin surface wrapping ($W$).
108
+ - **Dual RNA & DNA Support**: Full native support for single-stranded and double-stranded RNA, DNA duplexes, and RNA–DNA heteroduplexes (DRBPs).
109
+ - **Execution Provenance & Audit Trails**: Automated generation of `job_manifest.json` and `README_OUTPUTS.txt` for verifiable reproducibility.
110
+ - **Modern Interactive 3D Webserver & REST API**: Seamless integration with PDBe Mol*, 2D contact matrix grids, secondary structure sequence tracks, and full RESTful JSON services.
111
+ - **Standalone Engine Distribution**: Available via **PyPI** (`pip install napxplorer`) and **Bioconda**, cleanly decoupled from the web application.
112
+
113
+ ---
114
+
115
+ ## Scientific Capabilities & Analytical Modules
116
+
117
+ ### 1. Comprehensive Interface Contact Detection
118
+ NAPxplorer evaluates distances, angles, and spatial orientations to classify inter-macromolecular contacts into 14 distinct interaction categories:
119
+ - **Hydrogen Bonds**: Canonical donor-acceptor geometry (D–H…A).
120
+ - **Weak Hydrogen Bonds**: Non-canonical C–H…O/N contacts.
121
+ - **Salt Bridges & Electrostatics**: Oppositely charged ionic networks (e.g., Arg/Lys … Phosphate backbone).
122
+ - **Base Stacking (π–π)**: PInteract-style aromatic ring contacts (closest atoms ≤ 5.0 Å, ring-cylinder test) labelled stacked (P, 0–20°), inclined (I, 20–70°) or T-shaped (T, 70–90°) by interplanar tilt (Wilson et al.).
123
+ - **Cation–π & Amino–π**: Positively charged guanidinium/ammonium groups interacting with nucleic acid purine/pyrimidine rings.
124
+ - **Sugar–π & 2'-OH Mediated Contacts**: Ribose C–H and hydroxyl interactions targeting aromatic rings and protein backbones.
125
+ - **Metal Ion Coordination**: Transition and alkali-earth metal coordination spheres (Mg²⁺, Zn²⁺, Ca²⁺, Na⁺, K⁺).
126
+ - **Water Bridges**: Solvent-mediated interaction networks bridging protein and nucleic acid chains.
127
+
128
+ ### 2. Quantum Chemical Interaction Energetics (g-xTB)
129
+ Fixed-geometry [g-xTB](https://github.com/grimme-lab/g-xtb) single-point energies of the contacting fragments (capped, hydrogens added with Reduce, no geometry optimization), in COSMO implicit water by default (`-energy-solvent gas` for gas phase):
130
+
131
+ $$
132
+ E_{\mathrm{int}} = E_{AB} - E_A - E_B \qquad (\text{water/ion-mediated: } E_{ABM} - E_A - E_B - E_M)
133
+ $$
134
+
135
+ - g-xTB is a development method approximating ωB97M-V/def2-TZVPPD properties; the COSMO water model contains only the electrostatic part of solvation.
136
+ - No counterpoise, thermal or entropic correction is applied: values are fragment interaction-energy estimates, not binding free energies.
137
+ - Positive energies are screened for cross-fragment short contacts (`Short_contact_flag`: `Mild_short_contact` / `Severe_short_contact`).
138
+ - Requires `reduce` and the g-xTB build of `xtb` 6.7.1 (see [Installing g-xTB](#installing-g-xtb)).
139
+
140
+ #### Installing g-xTB
141
+ Energy calculations (`-energy`) need the g-xTB build of xtb 6.7.1, which is not on conda. A Linux x86_64 build is bundled in [`third_party/g-xtb/`](third_party/g-xtb/NOTICE.md) (GPL-3.0, separate from NAPxplorer's MIT license; extract with `tar xJf`). For other OSes download the archive from the [`binaries`](https://github.com/grimme-lab/g-xtb/tree/main/binaries) folder of the g-xtb repository. Extract it, and either put the executable on `PATH` as `gxtb` or point NAPxplorer to it:
142
+ ```bash
143
+ export NAPXPLORER_GXTB_BIN=/path/to/xtb-6.7.1/bin/xtb
144
+ napxplorer 3R1L.cif -energy -cpu 8 -outpath results/ # COSMO water (default)
145
+ napxplorer 3R1L.cif -energy -cpu 8 -energy-solvent gas -outpath results/
146
+ ```
147
+ `-energy` also requires `-cpu N`. Structures with more than 5,000 interactions skip energies unless `-force-energy` is given (`-max-energy-interactions N` changes the limit).
148
+
149
+ ### 3. Differential Geometry Surface Curvature & Shape Classification
150
+ A 5-step differential geometry engine profiles local protein surface curvature at contact interfaces:
151
+ 1. **Fibonacci Dot Cloud**: Uniform solvent-accessible dot sampling ($r_{\text{probe}} = 1.4$ Å).
152
+ 2. **Local Patch Selection**: 8.0 Å contiguous surface patch around each contacting protein site (Gaussian weighting σ = 4.0 Å).
153
+ 3. **Local PCA Coordinate Frame**: Tangent plane ($\hat{u}, \hat{v}$) and surface normal ($\hat{n}$) oriented toward the ligand.
154
+ 4. **Gaussian-Weighted Monge Patch Fitting**: Quadratic surface $z = ax^2 + bxy + cy^2 + dx + ey + f$ fitted via weighted least squares ($\sigma = 4.0$ Å).
155
+ 5. **Morphometric Invariants**:
156
+ - **Mean Curvature ($H$)**: Average bending direction.
157
+ - **Gaussian Curvature ($K = \kappa_1 \kappa_2$)**: Intrinsic surface topology ($K < 0$ denotes saddle passes).
158
+ - **Koenderink Shape Index ($S$)**: Degree of concavity vs convexity ($S \in [-1, +1]$).
159
+ - **Curvedness ($C$)**: RMS curvature magnitude (Å⁻¹).
160
+
161
+ | Shape Class | Shape Index ($S$) Criteria | Biological Interpretation |
162
+ |---|---|---|
163
+ | **POCKET** | $S \ge 0.625$ | Strongly concave cup / enclosed binding pocket |
164
+ | **GROOVE** | $0.125 \le S < 0.625$ | Concave protein channel / cleft enclosing nucleic acid |
165
+ | **SADDLE** | $|S| < 0.125$ | Hyperbolic pass between opposing surface curvatures |
166
+ | **RIDGE** | $-0.625 < S \le -0.125$ | Convex protein protrusion / spine inserting into groove |
167
+ | **CAP** | $S \le -0.625$ | Strongly convex dome / localized bump |
168
+ | **PLANAR** | $C < 0.02$ Å⁻¹ | Flat protein platform |
169
+
170
+ ### 4. Surface Wrapping Index & Nucleic Acid Crowding (OOI Index)
171
+ - **Classical Ooi Number Adaptation**: OOI-like measures have traditionally been used to describe radial packing, contact numbers, and solvent exposure around protein residues (Nishikawa and Ooi, 1986). NAPxplorer adapts this formulation to protein–nucleic acid interfaces as a **nucleic acid–centered crowding index (OOI index / Ooi number)**.
172
+ - **Local Protein Crowding Metric**: Quantifies the number of unique protein residues contributing $\mathrm{C}\alpha$ or $\mathrm{C}\beta$ atoms within a 14.0 Å spherical neighborhood of each interacting nucleobase centroid (`ooi_rp`), discriminating deeply buried cleft nucleotides from loosely exposed interface peripheries.
173
+ - **Directional Surface Wrapping Index ($W$)**: 36-bin spherical ray-tracing evaluation capturing steric engulfment and macromolecular shielding around each nucleobase.
174
+
175
+ ### 5. Modified Nucleotides & Non-Standard Residues
176
+ Native parsing and annotation of chemical modifications from the PDB Chemical Component Dictionary (CCD), including pseudouridine (Ψ), 4-thiouridine (`FHU`), 5-methylcytidine (`5MC`), and methylated bases.
177
+
178
+ ### 6. Multi-Model NMR Conformer Ensembles
179
+ Full support for multi-conformer NMR ensembles with dynamic model switching, ensemble contact consensus calculation, and per-model geometric tracking.
180
+
181
+ ---
182
+
183
+ ## Installation
184
+
185
+ ### Prerequisites
186
+ - Python $\ge$ 3.10
187
+ - Linux / macOS / WSL2
188
+
189
+ ### Option A: Python Package (PyPI)
190
+ Install the standalone NAPxplorer computation engine directly via `pip`:
191
+ ```bash
192
+ pip install napxplorer
193
+ ```
194
+ *(All runtime definitions and geometry templates are bundled internally within `napxplorer.data`—no external git clones required.)*
195
+
196
+ ### Option B: Bioconda & Conda-Forge
197
+ To install with binary scientific dependencies included (`reduce` and `pymol-open-source`; g-xTB is installed separately, see [Installing g-xTB](#installing-g-xtb)):
198
+ ```bash
199
+ conda install -c bioconda -c conda-forge napxplorer
200
+ ```
201
+
202
+ ### Option C: From Source (Developer Mode)
203
+ ```bash
204
+ # Clone the repository
205
+ git clone https://github.com/NAPxplorer/NAPxplorer.git
206
+ cd NAPxplorer
207
+
208
+ # Activate your Conda environment
209
+ conda activate NAPxplorer
210
+
211
+ # Install package and CLI executables in editable mode
212
+ pip install -e .
213
+ ```
214
+
215
+ ### Option D: Docker & Docker Compose Deployment
216
+ NAPxplorer includes a fully containerized deployment (`Dockerfile` & `docker-compose.yml`) with the bundled **g-xTB** build (`/opt/gxtb/bin/xtb`, exposed as `NAPXPLORER_GXTB_BIN`). `reduce` and PyMOL are not in the image yet, so energy and PyMOL steps need them added (or Slurm compute nodes that provide them):
217
+ ```bash
218
+ # Build and launch web server with Docker Compose
219
+ docker-compose up -d --build
220
+ ```
221
+
222
+ ---
223
+
224
+ ## Quick Start & Usage
225
+
226
+ ### Python API
227
+
228
+ ```python
229
+ import napxplorer as nap
230
+ from napxplorer import modifications, visualization
231
+
232
+ # 1. Access modified nucleotide annotations from PDB CCD
233
+ mod_info = modifications.get_modification_info("FHU")
234
+ print(f"Modified nucleotide details: {mod_info}")
235
+
236
+ # 2. Inspect visualization utilities
237
+ print(f"Visualization module ready: {visualization}")
238
+ ```
239
+
240
+ ### Command-Line Interface (CLI)
241
+
242
+ The CLI command is `napxplorer` (with `naxplorer` provided as a seamless backward-compatible alias). With internalized assets, specifying `-utility-dir` is fully optional:
243
+
244
+ ```bash
245
+ # Basic interface contact analysis with custom distance cutoff (Å)
246
+ napxplorer 1URN.cif -cdist 4.5 -outpath results/
247
+
248
+ # Complete analysis with strict sp2 acceptor angle restraint
249
+ napxplorer 1APL.cif -strict_acceptor_angle -cangle 100.0 -outpath results/
250
+
251
+ # Differential geometry surface curvature & shape classification
252
+ napxplorer 1URN.cif -detail -outpath results/
253
+
254
+ # Compute g-xTB quantum interaction energies with multi-core CPUs (needs gxtb, see Installing g-xTB)
255
+ napxplorer 3R1L.cif -energy -cpu 8 -outpath results/
256
+
257
+ # Multi-model NMR ensemble analysis
258
+ napxplorer 1ETG.cif -all -outpath results/
259
+ ```
260
+
261
+ ---
262
+
263
+ ## Running the Interactive Web Server
264
+
265
+ NAPxplorer includes a Flask web server featuring PDBe Mol* 3D visualization, interactive 2D interaction grids, PyMOL `.pse` session generators, and preloaded benchmark tutorials.
266
+
267
+ ```bash
268
+ python -m webserver.NAPxplorer.app --port 5000
269
+ ```
270
+ Open **[http://localhost:5000](http://localhost:5000)** in your web browser.
271
+
272
+ #### Interactive 5-Stage Tutorial & Benchmark Suite
273
+ The web server features an interactive educational walkthrough centered on **PDB 1K8W** (TruB/Pus1 + tRNA with modified `FHU`), demonstrating submission parameters, live asynchronous status monitoring, Mol* 3D translucent molecular surface patch rendering, 5-table breakdown, and data exports. It also includes 9 pre-calculated benchmark test cases:
274
+ 1. **1URN**: Protein–RNA canonical baseline (U1A RRM + U1 hairpin).
275
+ 2. **1APL**: Protein–DNA baseline (MATα2 homeodomain + DNA operator).
276
+ 3. **3R1L**: Protein–RNA with 46 Mg²⁺ ions & 51 ordered water bridges.
277
+ 4. **1RVB**: Protein–DNA with 2 catalytic Mg²⁺ ions & 185 waters (EcoRV).
278
+ 5. **1K8W**: Modified RNA nucleotide (TruB + 4-thiouridine `FHU` + 39 waters).
279
+ 6. **1ETG**: Multi-model RNA NMR conformer ensemble (HIV-1 Rev + RRE RNA).
280
+ 7. **2L1G**: Multi-model DNA NMR conformer ensemble (THAP1 zinc-finger).
281
+ 8. **1ZBI**: Protein–RNA–DNA hybrid heteroduplex (*Bacillus halodurans* RNase H catalytic domain).
282
+ 9. **7K00**: High-resolution 1.98 Å cryo-EM *E. coli* 70S ribosome (49 protein chains, 7 rRNA/tRNA chains, 11 modified rRNA nucleotides).
283
+
284
+ ---
285
+
286
+ ## REST API & Programmatic Web Services
287
+
288
+ The NAPxplorer webserver exposes a clean RESTful API for integration into bioinformatic pipelines:
289
+
290
+ | Method | Endpoint | Description |
291
+ |---|---|---|
292
+ | `GET` | `/api/parse_chains?pdb_id=<ID>` | Inspect protein and nucleic acid chains for a PDB code |
293
+ | `POST` | `/api/parse_upload_chains` | Parse chain IDs from an uploaded `.cif` or `.pdb` file |
294
+ | `POST` | `/submit` | Dispatch single structure or batch calculation jobs |
295
+ | `GET` | `/status/<session_id>` | Poll live calculation progress, counts, and status |
296
+ | `GET` | `/api/interactions/<session_id>/<timestamp>` | Retrieve Mol* 3D visualization JSON and interaction records |
297
+ | `GET` | `/download/<session_id>/<timestamp>/<file_type>` | Download outputs (`manifest_json`, `readme_txt`, `zip`, `csv`, `pse`, `curvature_csv`, `wrapping_csv`) |
298
+
299
+ ### cURL Example
300
+
301
+ ```bash
302
+ # 1. Inspect chains
303
+ curl -s "http://localhost:5000/api/parse_chains?pdb_id=1URN"
304
+
305
+ # 2. Submit job
306
+ curl -s -X POST "http://localhost:5000/submit" \
307
+ -F "input_mode=pdb_id" \
308
+ -F "pdb_id=1URN" \
309
+ -F "cdist=4.5" \
310
+ -F "detail=y"
311
+
312
+ # 3. Poll status
313
+ curl -s "http://localhost:5000/status/<session_id>"
314
+
315
+ # 4. Download execution manifest
316
+ curl -O -J "http://localhost:5000/download/<session_id>/<timestamp>/manifest_json"
317
+ ```
318
+
319
+ ### Python Requests Example
320
+
321
+ ```python
322
+ import time
323
+ import requests
324
+
325
+ BASE_URL = "http://localhost:5000"
326
+
327
+ # 1. Submit job
328
+ resp = requests.post(
329
+ f"{BASE_URL}/submit",
330
+ data={"input_mode": "pdb_id", "pdb_id": "1URN", "detail": "y"},
331
+ allow_redirects=False,
332
+ )
333
+ session_id = resp.headers.get("Location", "").split("/")[-1]
334
+
335
+ # 2. Poll until complete
336
+ while True:
337
+ status_info = requests.get(f"{BASE_URL}/status/{session_id}").json()
338
+ if status_info.get("status") == "Completed":
339
+ timestamp = status_info.get("timestamp")
340
+ break
341
+ time.sleep(2)
342
+
343
+ # 3. Download results archive
344
+ archive = requests.get(f"{BASE_URL}/download/{session_id}/{timestamp}/zip").content
345
+ with open(f"results_{session_id}.zip", "wb") as f:
346
+ f.write(archive)
347
+ ```
348
+
349
+ Interactive API documentation and interactive test suites are available on the web server at **[`/api`](http://localhost:5000/api)**.
350
+
351
+ ---
352
+
353
+ ## Execution Provenance & Audit Records
354
+
355
+ Every calculation run through the NAPxplorer engine or webserver automatically creates comprehensive audit records:
356
+
357
+ 1. **`job_manifest.json`**:
358
+ - Machine-readable provenance detailing package version, execution timestamp, runtime CLI arguments, interface contact metrics, and structured file inventory.
359
+ 2. **`README_OUTPUTS.txt`**:
360
+ - Human-readable summary detailing the calculation environment, geometry parameters, output files, and citations.
361
+ 3. **Complete Result Bundles (`.zip`)**:
362
+ - Results packages archive all coordinate files, interaction CSVs, PyMOL visualization scripts, Mol* scenes, and provenance records for direct sharing and publication submission.
363
+
364
+ ---
365
+
366
+ ## Benchmark & Validation
367
+
368
+ NAPxplorer has been validated across standard structural benchmarks:
369
+ - **Surface Residues vs NACCESS**: High-throughput validation across 262 protein–RNA complexes demonstrates that NAPxplorer surface residue patches ($R_{\text{patch}} = 14.0$ Å) are a **99.43% true subset** of NACCESS solvent-accessible surface residues ($R² = 0.9943$).
370
+ - **Interaction Accuracy**: Cross-benchmarked against DSSR, SNAP, and PRDB datasets.
371
+
372
+ ---
373
+
374
+ ## Repository Structure
375
+
376
+ ```text
377
+ NAPxplorer/
378
+ ├── setup.py # Setuptools configuration & console entry points
379
+ ├── pyproject.toml # PEP 517/518 build metadata & dependencies
380
+ ├── recipes/ # Bioconda / Conda-forge distribution recipes
381
+ │ └── napxplorer/
382
+ │ └── meta.yaml # Conda package recipe
383
+ ├── scripts/ # Analysis executables & CLI wrappers
384
+ │ ├── NAPxplorer.py # Primary computational pipeline & CLI engine
385
+ │ ├── NAxplorer.py # Backward-compatible entrypoint shim
386
+ │ └── benchmark_prdbv3_validation.py # Benchmarking pipeline
387
+ ├── napxplorer/ # Core Python computation package
388
+ │ ├── __init__.py # Package initialization & public API
389
+ │ ├── data/ # Bundled runtime geometry and definition files
390
+ │ ├── core/ # Data models and coordinate representations
391
+ │ ├── io/ # mmCIF, PDB, and CCD readers
392
+ │ ├── interactions/ # 14 contact classification engines
393
+ │ ├── geometry/ # Surface curvature, PCA, & Monge patch fitting
394
+ │ ├── modifications/ # Modified nucleotide mapping & CCD annotations
395
+ │ ├── parsers/ # xTB, DSSR, and parser wrappers
396
+ │ └── visualization/ # PyMOL scripts & Mol* JSON scene builders
397
+ ├── utility/ # Local reference definitions and surface dot cloud
398
+ ├── webserver/ # Flask web application & REST API
399
+ │ └── NAPxplorer/
400
+ │ ├── app.py # Server routes, REST API endpoints, & orchestrator
401
+ │ ├── config.py # Environment configuration & path resolutions
402
+ │ ├── run_job.py # Standalone calculation worker & manifest generator
403
+ │ ├── structure_parser.py# Multi-format structure parser
404
+ │ ├── templates/ # UI templates (results, api, tutorial, about)
405
+ │ └── static/ # Styling, assets, & PDBe Mol* plugin
406
+ ├── deploy/ # Production deployment configurations (Nginx, Apache, Slurm)
407
+ ├── Dockerfile # Container image specification
408
+ └── docker-compose.yml # Containerized production stack
409
+ ```
410
+
411
+ ---
412
+
413
+ ## Citation & References
414
+
415
+ If you use NAPxplorer in your research, please cite:
416
+ - **NAPxplorer Framework**: *NAPxplorer: A Unified Computational Platform for Structural Profiling, Differential Geometry Morphometry, and Quantum Energetics of Protein–Nucleic Acid Interfaces.* Manuscript in preparation.
417
+ - **Ooi Number (Residue Crowding / Location Measure)**: Nishikawa, K., Ooi, T. (1986). Radial locations of amino acid residues in a globular protein: correlation with the sequence. *J. Biochem.* 100(4): 1043–1047. [https://doi.org/10.1093/oxfordjournals.jbchem.a121789](https://doi.org/10.1093/oxfordjournals.jbchem.a121789)
418
+ - **g-xTB**: Froitzheim, T., Müller, M., Hansen, A., Grimme, S. (2025). *g-xTB: A General-Purpose Extended Tight-Binding Electronic Structure Method For the Elements H to Lr (Z=1–103).* ChemRxiv, not peer-reviewed (development version used; see [grimme-lab/g-xtb](https://github.com/grimme-lab/g-xtb)). [https://doi.org/10.26434/chemrxiv-2025-bjxvt](https://doi.org/10.26434/chemrxiv-2025-bjxvt)
419
+ - **PLIP**: Salentin, S., Schreiber, S., Haupt, V. J., Adasme, M. F., Schroeder, M. (2015). PLIP: collaborating tools for comprehensive analysis of non-covalent interactions. *Nucleic Acids Res.* 43(W1): W443–W447. [https://doi.org/10.1093/nar/gkv315](https://doi.org/10.1093/nar/gkv315)
420
+ - **3DNA-DSSR**: Lu, X. J., Bussemaker, H. J., Olson, W. K. (2015). DSSR: an integrated software tool for dissecting the spatial structure of RNA. *Nucleic Acids Res.* 43(21): e142. [https://doi.org/10.1093/nar/gkv716](https://doi.org/10.1093/nar/gkv716)
421
+ - **Leontis-Westhof RNA Base Pairs**: Leontis, N. B., Westhof, E. (2001). Geometric nomenclature and classification of RNA base pairs. *RNA* 7(4): 499–512. [https://doi.org/10.1017/s1355838201002515](https://doi.org/10.1017/s1355838201002515)
422
+ - **Dissecting Recognition Sites**: Chakrabarti, P., Janin, J. (2002). Dissecting protein-protein and protein-nucleic acid interfaces. *Proteins* 47(1): 71–80. [https://doi.org/10.1002/prot.10069](https://doi.org/10.1002/prot.10069)
423
+
424
+ ---
425
+
426
+ ## Acknowledgements
427
+
428
+ In the open-science spirit modeled by foundational structural biology projects such as [AlphaFold 3](https://github.com/google-deepmind/alphafold3), NAPxplorer gratefully acknowledges the open-source software, datasets, and design frameworks that made this platform possible:
429
+
430
+ - **[MolNympheas](https://github.com/JMB-Scripts/MolNympheas.git)**: For the inspiring modern color schema, sleek dark-mode aesthetics, and macromolecular visualization styling ideas adopted across the NAPxplorer webserver.
431
+ - **[xTB](https://github.com/grimme-lab/xtb)** (Prof. Stefan Grimme, University of Bonn): For the open-source semi-empirical quantum chemical program (and the g-xTB build of xtb 6.7.1) powering the interface interaction energies.
432
+ - **[PDBe Mol*](https://github.com/PDBe-KB/pdbe-molstar)** (PDBe & Mol* Consortium): For the robust WebGL 3D macromolecular rendering engine.
433
+ - **[3DNA-DSSR](https://x3dna.org/)** (Dr. Xiang-Jun Lu): For foundational secondary structure and base-pair geometry classification algorithms.
434
+ - **[wwPDB](https://www.wwpdb.org/) & [RCSB PDB](https://www.rcsb.org/)**: For providing the global structural biology community with open macromolecular coordinate archives and APIs.
435
+
436
+ ---
437
+
438
+ ## License & Contact
439
+
440
+ Distributed under the **MIT License**. See `LICENSE` for more information.
441
+
442
+ - **Developer**: Shrikant
443
+ - **GitHub**: [@shrikantcombio](https://github.com/shrikantcombio)