rust-sasa-python 0.3.0__cp314-cp314-win_amd64.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,5 @@
1
+ from .rust_sasa_python import *
2
+
3
+ __doc__ = rust_sasa_python.__doc__
4
+ if hasattr(rust_sasa_python, "__all__"):
5
+ __all__ = rust_sasa_python.__all__
@@ -0,0 +1,151 @@
1
+ """Type stubs for rust_sasa_python module."""
2
+
3
+ from typing import List
4
+
5
+ class Protein:
6
+ """Protein-level SASA results."""
7
+
8
+ total: float
9
+ polar: float
10
+ non_polar: float
11
+
12
+ class Residue:
13
+ """Residue-level SASA results."""
14
+
15
+ chain_id: str
16
+ residue_name: str
17
+ residue_number: int
18
+ sasa: float
19
+
20
+ class Chain:
21
+ """Chain-level SASA results."""
22
+
23
+ chain_id: str
24
+ sasa: float
25
+
26
+ class SASACalculator:
27
+ """SASA calculator with configurable parameters."""
28
+
29
+ def __init__(self, pdb_path: str) -> None:
30
+ """Initialize SASA calculator with PDB file path.
31
+
32
+ Args:
33
+ pdb_path: Path to PDB or mmCIF file
34
+
35
+ """
36
+
37
+ def with_probe_radius(self, radius: float) -> SASACalculator:
38
+ """Set the probe radius for SASA calculation.
39
+
40
+ Args:
41
+ radius: Probe sphere radius in Ångströms (default: 1.4)
42
+
43
+ Returns:
44
+ Self for method chaining
45
+
46
+ """
47
+
48
+ def with_n_points(self, points: int) -> SASACalculator:
49
+ """Set the number of points for surface sampling.
50
+
51
+ Args:
52
+ points: Number of sampling points (default: 100)
53
+
54
+ Returns:
55
+ Self for method chaining
56
+
57
+ """
58
+
59
+ def calculate_protein(self) -> Protein:
60
+ """Calculate SASA at the protein level.
61
+
62
+ Returns:
63
+ Protein: Object containing total, polar, and non-polar SASA values
64
+
65
+ """
66
+
67
+ def calculate_chain(self) -> List[Chain]:
68
+ """Calculate SASA at the chain level.
69
+
70
+ Returns:
71
+ List[Chain]: List of chain-level SASA results
72
+
73
+ """
74
+
75
+ def calculate_residue(self) -> List[Residue]:
76
+ """Calculate SASA at the residue level.
77
+
78
+ Returns:
79
+ List[Residue]: List of residue-level SASA results
80
+
81
+ """
82
+
83
+ def calculate_atom(self) -> List[float]:
84
+ """Calculate SASA at the atom level.
85
+
86
+ Returns:
87
+ List[float]: List of atom-level SASA values
88
+
89
+ """
90
+
91
+ # Convenience functions
92
+ def calculate_protein_sasa(pdb_path: str) -> Protein:
93
+ """Calculate protein-level SASA for a PDB file.
94
+
95
+ Args:
96
+ pdb_path: Path to PDB or mmCIF file
97
+
98
+ Returns:
99
+ Protein: Object containing total, polar, and non-polar SASA values
100
+
101
+ """
102
+
103
+ def calculate_residue_sasa(pdb_path: str) -> List[Residue]:
104
+ """Calculate residue-level SASA for a PDB file.
105
+
106
+ Args:
107
+ pdb_path: Path to PDB or mmCIF file
108
+
109
+ Returns:
110
+ List[Residue]: List of residue-level SASA results
111
+
112
+ """
113
+
114
+ def calculate_atom_sasa(pdb_path: str) -> List[float]:
115
+ """Calculate atom-level SASA for a PDB file.
116
+
117
+ Args:
118
+ pdb_path: Path to PDB or mmCIF file
119
+
120
+ Returns:
121
+ List[float]: List of atom-level SASA values
122
+
123
+ """
124
+
125
+ def calculate_chain_sasa(pdb_path: str) -> List[Chain]:
126
+ """Calculate chain-level SASA for a PDB file.
127
+
128
+ Args:
129
+ pdb_path: Path to PDB or mmCIF file
130
+
131
+ Returns:
132
+ List[Chain]: List of chain-level SASA results
133
+
134
+ """
135
+
136
+ def calculate_sasa_internal(
137
+ atoms_in: list[tuple[tuple[float, float, float], float, int]],
138
+ probe_radius: float,
139
+ n_points: int,
140
+ ) -> list[float]:
141
+ """Calculate SASA for a set of atoms.
142
+
143
+ Args:
144
+ atoms_in: List of atom coordinates, radii, and indices
145
+ probe_radius: Probe radius
146
+ n_points: Number of points on the sphere
147
+
148
+ Returns:
149
+ List[float]: List of SASA values
150
+
151
+ """
File without changes
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: rust-sasa-python
3
+ Version: 0.3.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Dist: pytest>=8.4.1 ; extra == 'dev'
8
+ Requires-Dist: maturin>=1.5,<2.0 ; extra == 'dev'
9
+ Provides-Extra: dev
10
+ License-File: LICENSE.md
11
+ Summary: An ultra-fast package for computing Solvent Accessible Surface Area (SASA/ASA) for proteins
12
+ **46X** faster than Biopython, **7X** faster than Freesasa
13
+ Author: Max Campbell
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
16
+
17
+ # rust-sasa-python
18
+
19
+ A high-performance **Python library** for computing SASA (Solvent Accessible Surface Area) using Rust as the backend. This library provides a clean, Pythonic interface to the fast RustSASA calculation engine.
20
+
21
+ ## Features
22
+
23
+ - 🦀 **Powered by [RustSASA](https://github.com/maxall41/RustSASA)**: Leverages Rust's performance and safety.
24
+ - ⚡️ **Ludicrous Speed**: **46X** faster than Biopython, **7X** faster than Freesasa.
25
+ - 🐍 **Pythonic Interface**: Clean, intuitive API.
26
+ - 🔧 **Configurable**: Customizable probe radius and sampling points.
27
+ - 📁 **PDB and mmCIF SUPPORT**: Supports both PDB and mmCIF files.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install rust-sasa-python
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```python
38
+ import rust_sasa_python as sasa
39
+
40
+ # Simple calculation - use convenience function
41
+ result = sasa.calculate_protein_sasa("protein.pdb")
42
+ print(f"Total SASA: {result.total:.2f}")
43
+
44
+ # Builder pattern for more control
45
+ calculator = (sasa.SASACalculator("protein.pdb")
46
+ .with_probe_radius(1.2)
47
+ .with_n_points(2000))
48
+ result = calculator.calculate_protein()
49
+ print(f"Total SASA: {result.total:.2f}")
50
+ print(f"Polar SASA: {result.polar:.2f}")
51
+ print(f"Non-polar SASA: {result.non_polar:.2f}")
52
+ ```
53
+
54
+ See [DOCS](https://github.com/maxall41/rust-sasa-python/blob/main/DOCS.md) for more information and API reference.
55
+
56
+ ## Contributing
57
+
58
+ Contributions are welcome! Please feel free to submit issues and pull requests.
59
+
60
+ ## License
61
+
62
+ This project is licensed under the MIT License.
63
+
64
+ ## Related Projects
65
+
66
+ - [RustSASA](https://github.com/maxall41/RustSASA) - The core Rust library.
67
+ - [DPXRust](https://github.com/maxall41/DPXRust) - Rust library for DPX calculations.
68
+
@@ -0,0 +1,8 @@
1
+ rust_sasa_python-0.3.0.dist-info/METADATA,sha256=-cyPq44k3YIzSh2Gx3Bp2OLMzVuks88o18HzSMRv0Fs,2402
2
+ rust_sasa_python-0.3.0.dist-info/WHEEL,sha256=tZ3VAZ5HuUzziFCJ2lDsDJnJO-xy4omAQIa7TJCFCZk,96
3
+ rust_sasa_python-0.3.0.dist-info/licenses/LICENSE.md,sha256=Wy79HDisHgyh-fvS8i-HOSiBePW1NXTRUdOLxxQgQfk,1092
4
+ rust_sasa_python/__init__.py,sha256=GwXUM63Xm1llfQ1qZLKralpgqaG4xQ7gWZjqdtN9BXc,147
5
+ rust_sasa_python/__init__.pyi,sha256=YR6gWJ-vh5KkHoclp4JogFppAd2CyFqi_iHxqFU4T2o,3535
6
+ rust_sasa_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ rust_sasa_python/rust_sasa_python.cp314-win_amd64.pyd,sha256=Won7cT2SgOV5cim-dfEsWlO5X5zGryn_lBvHonvQDjY,1284608
8
+ rust_sasa_python-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-win_amd64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Maxwell Campbell
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.