rust-sasa-python 0.2.0__tar.gz → 0.2.1__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.
@@ -138,6 +138,7 @@ jobs:
138
138
  name: Release
139
139
  runs-on: ubuntu-latest
140
140
  needs: [linux, windows, macos, sdist, test]
141
+ if: github.ref_name != 'radical'
141
142
  steps:
142
143
  - uses: actions/download-artifact@v4
143
144
  - name: Publish to PyPI
@@ -659,7 +659,7 @@ dependencies = [
659
659
 
660
660
  [[package]]
661
661
  name = "rust-sasa-python"
662
- version = "0.2.0"
662
+ version = "0.2.1"
663
663
  dependencies = [
664
664
  "pdbtbx",
665
665
  "pyo3",
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "rust-sasa-python"
3
- version = "0.2.0"
4
- edition = "2021"
3
+ version = "0.2.1"
4
+ edition = "2024"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
  [lib]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rust-sasa-python
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -0,0 +1,134 @@
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
+ """
@@ -1,6 +0,0 @@
1
- import rust_sasa_python as sasa
2
-
3
- # Simple calculation - use convenience function
4
- calculator = sasa.SASACalculator("example.cif").with_n_points(960)
5
- residues = calculator.calculate_residue()
6
- print(residues)