prot-rsa 1.0.1__py3-none-any.whl

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.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: prot-rsa
3
+ Version: 1.0.1
4
+ Summary: Fast protein residue surface-area calculation in Python
5
+ Author: Junjun Mao
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/newbooks/prot-rsa
8
+ Project-URL: Repository, https://github.com/newbooks/prot-rsa
9
+ Project-URL: Issues, https://github.com/newbooks/prot-rsa/issues
10
+ Project-URL: Changelog, https://github.com/newbooks/prot-rsa/blob/main/HISTORY.md
11
+ Project-URL: Documentation, https://github.com/newbooks/prot-rsa/blob/main/README.md
12
+ Keywords: bioinformatics,computational biology,protein,residue surface area,structural biology
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3
23
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
24
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: numpy
29
+ Requires-Dist: scipy
30
+ Requires-Dist: numba
31
+ Dynamic: license-file
32
+
33
+ # prot-rsa
34
+
35
+ Fast protein residue surface-area calculation in Python.
36
+
37
+ ## Installation
38
+
39
+ Install the distribution from PyPI:
40
+
41
+ ```bash
42
+ pip install prot-rsa
43
+ ```
44
+
45
+ ## Command-line use
46
+
47
+ Run the installed application with:
48
+
49
+ ```bash
50
+ prot-rsa structure.pdb
51
+ # optionally choose a lower sampling resolution (minimum 122 points)
52
+ prot-rsa structure.pdb --sphere-points 480
53
+ ```
54
+
55
+ Run `prot-rsa --help` to see the supported PDB/mmCIF input suffixes, calculation
56
+ options, defaults, and derived output filenames.
57
+
58
+ The command writes `<base>.atom_sas.tsv` and `<base>.res_sas.tsv` as TSV files, plus a
59
+ normalized `<base>.pqr` containing the selected radii and placeholder charge
60
+ `0.000`. The production calculation uses cKDTree neighbor pruning; the
61
+ deliberately naive serial implementation remains available as a correctness
62
+ reference.
63
+
64
+ ## Python use
65
+
66
+ The application can also be imported as the `protrsa` module so its functions
67
+ and constants can be used directly:
68
+
69
+ ```python
70
+ import protrsa
71
+ ```
72
+
73
+ The distribution and command are named `prot-rsa`. The import name is
74
+ `protrsa` because Python module names cannot contain hyphens.
75
+
76
+ ## Residue exposure
77
+
78
+ Residue solvent-accessible surface area will be calculated by summing the
79
+ already computed atom SASAs for each residue. The residue report will contain
80
+ both complete-residue (`ALL`) and side-chain (`SIDE`) **Contextual Exposure
81
+ Fraction (CEF)** values rather than conventional RSA:
82
+
83
+ ```text
84
+ CEF = selected-atom SASA in the complete protein
85
+ / SASA of the same selected residue conformation in isolation
86
+ ```
87
+
88
+ The denominator is a naked-residue calculation using the same selected atoms,
89
+ atomic radii, probe radius, and sphere points, but without other residues
90
+ present. The compact output columns are `all`, `a_ref`, `a_cef`, `side`,
91
+ `s_ref`, and `s_cef`; leading `#` comment lines explain every field. CEF therefore represents
92
+ the fraction of the selected residue surface retained in its protein context.
93
+ It is distinct from conventional RSA, which normally uses a fixed residue-type
94
+ reference or maximum ASA.
95
+
96
+ Residues without retained side-chain atoms, such as glycine under the
97
+ canonical backbone definition, use `NA` for the three SIDE fields.
98
+
99
+ CEF lies in `[0, 1]` up to floating-point roundoff. The complete residue
100
+ output contract is documented in `docs/specs/residue-cef.md`.
101
+
102
+
103
+ ## Optimization Comparison
104
+
105
+ This program targets the speed optimization of residue surface solvent exposure calculation.
106
+
107
+ The table below compares protein RSA calculation times under each
108
+ optimization. Execution times are reported in seconds; lower values are
109
+ better.
110
+
111
+ | Optimization | Sphere points | Time (small) | Time (medium) | Time (large) | Atom-SASA MAE vs `*.sas.baseline` (small / medium / large, Ų) |
112
+ | --- | ---: | ---: | ---: | ---: | ---: |
113
+ | Naive | 960 | 551 | 2185 | 11634 | 0.000 / 0.000 / 0.000 |
114
+ | cKDTree | 960 | 19.490 | 40.644 | 86.590 | 0.000 / 0.000 / 0.000 |
115
+ | Vectorized mask | 960 | 0.609 | 1.285 | 2.820 | 0.000 / 0.000 / 0.000 |
116
+ | Occlusion-ordered neighbors | 960 | 0.319 | 0.630 | 1.620 | 0.000 / 0.000 / 0.000 |
117
+ | Cache | 960 | 0.276 | 0.536 | 1.393 | 0.000 / 0.000 / 0.000 |
118
+ | Numba CPU | 960 | 0.328 | 0.388 | 0.735 | 0.000 / 0.000 / 0.000 |
119
+ | Reduced points | 480 | 0.358 | 0.382 | 0.494 | 0.164 / 0.145 / 0.184 |
120
+
121
+ Benchmark structures are **small** — 1LYZ (129 residues); **medium** — 1CA2
122
+ (256 residues); **large** — 1UOR (580 residues). Residue counts are the numbers
123
+ of unique residues represented by `ATOM` records; waters, ions, and other
124
+ `HETATM` records are excluded.
@@ -0,0 +1,7 @@
1
+ protrsa.py,sha256=swuXEoBwoGw9J6-6xgz7lo6mOEOE35B_VFylKkj32-k,62665
2
+ prot_rsa-1.0.1.dist-info/licenses/LICENSE,sha256=oCSOht5ssI7Bw-fHeIPV6VssFgNAvXnYo4cyNxenMYc,1067
3
+ prot_rsa-1.0.1.dist-info/METADATA,sha256=Nl9236Uowx4__MY_DHFFXHWK58IK32Xv9WbDgvypNNM,4957
4
+ prot_rsa-1.0.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
5
+ prot_rsa-1.0.1.dist-info/entry_points.txt,sha256=ZOcjS_Cx_mgW3kHgD94BVjBJxPlSbHJqXGMYJ-qhA68,42
6
+ prot_rsa-1.0.1.dist-info/top_level.txt,sha256=0NScA00sZEK-eDEyd_cXdTkWpFJU97Qrz8G7FbeNK7E,8
7
+ prot_rsa-1.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ prot-rsa = protrsa:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Junjun Mao
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 @@
1
+ protrsa