pyjess 0.7.0__cp38-abi3-macosx_11_0_arm64.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.

Potentially problematic release.


This version of pyjess might be problematic. Click here for more details.

pyjess/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ _jess.c
2
+ _jess.html
pyjess/CMakeLists.txt ADDED
@@ -0,0 +1 @@
1
+ cython_extension(_jess LINKS jess)
pyjess/__init__.py ADDED
@@ -0,0 +1,21 @@
1
+ # noqa: D104
2
+ from . import _jess
3
+ from ._jess import Atom, Hit, Jess, Query, Molecule, Template, TemplateAtom
4
+
5
+ __author__ = "Martin Larralde <martin.larralde@embl.de>"
6
+ __all__ = ["Atom", "Hit", "Jess", "Query", "Molecule", "Template", "TemplateAtom"]
7
+ __doc__ = _jess.__doc__
8
+ __version__ = _jess.__version__
9
+
10
+ # Small addition to the docstring: we want to show a link redirecting to the
11
+ # rendered version of the documentation, but this can only work when Python
12
+ # is running with docstrings enabled
13
+ if __doc__ is not None:
14
+ __doc__ += """See Also:
15
+ An online rendered version of the documentation for this version
16
+ of the library on
17
+ `Read The Docs <https://pyjess.readthedocs.io/en/v{}/>`_.
18
+
19
+ """.format(
20
+ __version__
21
+ )
pyjess/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ import sys
2
+ from .cli import main
3
+
4
+ sys.exit(main())
pyjess/_jess.abi3.so ADDED
Binary file
pyjess/_jess.pyi ADDED
@@ -0,0 +1,268 @@
1
+ import os
2
+ import typing
3
+ from typing import Any, Dict, Generic, Union, Optional, Sequence, Iterator, Iterable, List, TextIO, Sized, TypeVar, Tuple
4
+
5
+ try:
6
+ from typing import Literal
7
+ except ImportError:
8
+ from typing_extensions import Literal # type: ignore
9
+
10
+ try:
11
+ from Bio.PDB.Model import Model
12
+ from Bio.PDB.Structure import Structure
13
+ except ImportError:
14
+ Model = Structure = Any # type: ignore
15
+
16
+ try:
17
+ import gemmi
18
+ except ImportError:
19
+ gemmi = Any # type: ignore
20
+
21
+ try:
22
+ import biotite.structure
23
+ except ImportError:
24
+ biotite = Any # type: ignore
25
+
26
+
27
+ MATCH_MODE = Literal[
28
+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 100, 101, 102, 103, 104, 105, 106, 107
29
+ ]
30
+
31
+ _SELF = TypeVar("_SELF")
32
+
33
+ __version__: str
34
+
35
+ class Molecule(Sequence[Atom]):
36
+ @classmethod
37
+ def from_biopython(cls, structure: Union[Structure, Model]) -> Molecule: ...
38
+ @classmethod
39
+ def from_gemmi(cls, structure: gemmi.Structure) -> Molecule: ...
40
+ @classmethod
41
+ def from_biotite(cls, atom_array: biotite.structure.AtomArray, id: Optional[str] = None) -> Molecule: ...
42
+ @classmethod
43
+ def load(
44
+ cls,
45
+ file: Union[TextIO, str, os.PathLike[str]],
46
+ format: Literal["pdb", "cif", "detect"] = "detect",
47
+ *,
48
+ id: Optional[str] = None,
49
+ ignore_endmdl: bool = False,
50
+ use_author: bool = False,
51
+ skip_hetatm: bool = False,
52
+ ) -> Molecule: ...
53
+ @classmethod
54
+ def loads(
55
+ cls,
56
+ text: str,
57
+ format: Literal["pdb", "cif", "detect"] = "detect",
58
+ *,
59
+ id: Optional[str] = None,
60
+ ignore_endmdl: bool = False,
61
+ use_author: bool = False,
62
+ skip_hetatm: bool = False,
63
+ ) -> Molecule: ...
64
+ def __init__(self, atoms: Sequence[Atom] = (), id: Optional[str] = None): ...
65
+ def __len__(self) -> int: ...
66
+ @typing.overload
67
+ def __getitem__(self, index: int) -> Atom: ...
68
+ @typing.overload
69
+ def __getitem__(self: _SELF, index: slice) -> _SELF: ...
70
+ @typing.overload
71
+ def __getitem__(self: _SELF, index: Union[int, slice]) -> Union[Atom, _SELF]: ...
72
+ def __copy__(self) -> Molecule: ...
73
+ def __eq__(self, other: object) -> bool: ...
74
+ def __hash__(self) -> int: ...
75
+ def __reduce__(self) -> Tuple[Any, ...]: ...
76
+ @property
77
+ def id(self) -> Optional[str]: ...
78
+ def conserved(self: _SELF, cutoff: float = 0.0) -> _SELF: ...
79
+ def copy(self) -> Molecule: ...
80
+
81
+ class Atom:
82
+ @classmethod
83
+ def load(cls, file: Union[TextIO, str, os.PathLike[str]]) -> Atom: ...
84
+ @classmethod
85
+ def loads(cls, text: str) -> Atom: ...
86
+ def __init__(
87
+ self,
88
+ *,
89
+ serial: int,
90
+ name: str,
91
+ residue_name: str,
92
+ chain_id: str,
93
+ residue_number: int,
94
+ x: float,
95
+ y: float,
96
+ z: float,
97
+ occupancy: float = 0.0,
98
+ temperature_factor: float = 0.0,
99
+ altloc: str = " ",
100
+ insertion_code: str = " ",
101
+ segment: str = "",
102
+ element: str = "",
103
+ charge: int = 0,
104
+ ): ...
105
+ def __eq__(self, other: object) -> bool: ...
106
+ def __hash__(self) -> int: ...
107
+ def __reduce__(self) -> Tuple[Any, ...]: ...
108
+ def __repr__(self) -> str: ...
109
+ def __copy__(self) -> Atom: ...
110
+ @property
111
+ def serial(self) -> int: ...
112
+ @property
113
+ def altloc(self) -> str: ...
114
+ @property
115
+ def name(self) -> str: ...
116
+ @property
117
+ def residue_name(self) -> str: ...
118
+ @property
119
+ def residue_number(self) -> int: ...
120
+ @property
121
+ def segment(self) -> str: ...
122
+ @property
123
+ def element(self) -> str: ...
124
+ @property
125
+ def insertion_code(self) -> str: ...
126
+ @property
127
+ def chain_id(self) -> str: ...
128
+ @property
129
+ def occupancy(self) -> float: ...
130
+ @property
131
+ def temperature_factor(self) -> float: ...
132
+ @property
133
+ def charge(self) -> int: ...
134
+ @property
135
+ def x(self) -> float: ...
136
+ @property
137
+ def y(self) -> float: ...
138
+ @property
139
+ def z(self) -> float: ...
140
+ def copy(self) -> Atom: ...
141
+
142
+ class TemplateAtom:
143
+ @classmethod
144
+ def load(cls, file: Union[TextIO, str, os.PathLike[str]]) -> Atom: ...
145
+ @classmethod
146
+ def loads(cls, text: str) -> TemplateAtom: ...
147
+ def __init__(
148
+ self,
149
+ *,
150
+ chain_id: str,
151
+ residue_number: int,
152
+ x: float,
153
+ y: float,
154
+ z: float,
155
+ residue_names: Sequence[str],
156
+ atom_names: Sequence[str],
157
+ distance_weight: float = 0.0,
158
+ match_mode: MATCH_MODE = 0,
159
+ ): ...
160
+ def __repr__(self) -> str: ...
161
+ def __eq__(self, other: object) -> bool: ...
162
+ def __hash__(self) -> int: ...
163
+ def __reduce__(self) -> Tuple[Any, ...]: ...
164
+ def __copy__(self: _SELF) -> _SELF: ...
165
+ @property
166
+ def match_mode(self) -> MATCH_MODE: ...
167
+ @property
168
+ def residue_number(self) -> int: ...
169
+ @property
170
+ def chain_id(self) -> str: ...
171
+ @property
172
+ def x(self) -> float: ...
173
+ @property
174
+ def y(self) -> float: ...
175
+ @property
176
+ def z(self) -> float: ...
177
+ @property
178
+ def atom_names(self) -> Tuple[str, ...]: ...
179
+ @property
180
+ def residue_names(self) -> Tuple[str, ...]: ...
181
+ @property
182
+ def distance_weight(self) -> float: ...
183
+ def copy(self: _SELF) -> _SELF: ...
184
+
185
+ class Template(Sequence[TemplateAtom]):
186
+ @classmethod
187
+ def load(cls, file: Union[TextIO, str, os.PathLike[str]], id: Optional[str] = None) -> Template: ...
188
+ @classmethod
189
+ def loads(cls, text: str, id: Optional[str] = None) -> Template: ...
190
+ def __init__(self, atoms: Sequence[TemplateAtom] = (), id: Optional[str] = None): ...
191
+ def __len__(self) -> int: ...
192
+ @typing.overload
193
+ def __getitem__(self, index: int) -> TemplateAtom: ...
194
+ @typing.overload
195
+ def __getitem__(self: _SELF, index: slice) -> _SELF: ...
196
+ @typing.overload
197
+ def __getitem__(self: _SELF, index: Union[int, slice]) -> Union[TemplateAtom, _SELF]: ...
198
+ def __eq__(self, other: object) -> bool: ...
199
+ def __hash__(self) -> int: ...
200
+ def __reduce__(self) -> Tuple[Any, ...]: ...
201
+ def __copy__(self) -> Template: ...
202
+ @property
203
+ def id(self) -> str: ...
204
+ @property
205
+ def dimension(self) -> int: ...
206
+ def copy(self) -> Template: ...
207
+
208
+ _T = TypeVar("_T", bound=Template)
209
+
210
+ class Query(Generic[_T], Iterator[Hit[_T]]):
211
+ @property
212
+ def jess(self) -> Jess[_T]: ...
213
+ @property
214
+ def molecule(self) -> Molecule: ...
215
+ @property
216
+ def ignore_chain(self) -> Literal[None, "atoms", "residues"]: ...
217
+ @property
218
+ def rmsd_threshold(self) -> float: ...
219
+ @property
220
+ def max_candidates(self) -> Optional[int]: ...
221
+ @property
222
+ def best_match(self) -> bool: ...
223
+ def __iter__(self) -> Query[_T]: ...
224
+ def __next__(self) -> Hit[_T]: ...
225
+
226
+ class Hit(Generic[_T]):
227
+ def __getstate__(self) -> Dict[str, object]: ...
228
+ def __setstate__(self, state: Dict[str, object]) -> None: ...
229
+ @property
230
+ def rmsd(self) -> float: ...
231
+ @property
232
+ def template(self) -> _T: ...
233
+ @property
234
+ def determinant(self) -> float: ...
235
+ @property
236
+ def log_evalue(self) -> float: ...
237
+ @property
238
+ def evalue(self) -> float: ...
239
+ def atoms(self, transform: bool = True) -> List[Atom]: ...
240
+ def molecule(self, transform: bool = False) -> Molecule: ...
241
+ def dump(self, file: TextIO, format: Literal["pdb"] = "pdb", transform: bool = True) -> None: ...
242
+ def dumps(self, format: Literal["pdb"] = "pdb", transform: bool = True) -> str: ...
243
+
244
+ class Jess(Generic[_T], Sequence[_T]):
245
+ def __init__(self, templates: Iterable[_T] = ()): ...
246
+ def __len__(self) -> int: ...
247
+ @typing.overload
248
+ def __getitem__(self, index: int) -> _T: ...
249
+ @typing.overload
250
+ def __getitem__(self, index: slice) -> Jess[_T]: ...
251
+ @typing.overload
252
+ def __getitem__(self, index: Union[int, slice]) -> Union[_T, Jess[_T]]: ...
253
+ def __eq__(self, other: object) -> bool: ...
254
+ def __hash__(self) -> int: ...
255
+ def __copy__(self: _SELF) -> _SELF: ...
256
+ def __reduce__(self) -> Tuple[Any, ...]: ...
257
+ def query(
258
+ self,
259
+ molecule: Molecule,
260
+ rmsd_threshold: float,
261
+ distance_cutoff: float,
262
+ max_dynamic_distance: float,
263
+ *,
264
+ max_candidates: Optional[int] = None,
265
+ ignore_chain: Literal[None, "atoms", "residues"] = None,
266
+ best_match: bool = False,
267
+ reorder: bool = True,
268
+ ) -> Query[_T]: ...