pyjess 0.6.0__pp38-pypy38_pp73-macosx_11_0_arm64.whl → 0.7.0__pp38-pypy38_pp73-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/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ import sys
2
+ from .cli import main
3
+
4
+ sys.exit(main())
pyjess/_jess.pyi CHANGED
@@ -1,12 +1,29 @@
1
1
  import os
2
2
  import typing
3
- from typing import Any, Generic, Union, Optional, Sequence, Iterator, Iterable, List, TextIO, Sized, TypeVar, Tuple
3
+ from typing import Any, Dict, Generic, Union, Optional, Sequence, Iterator, Iterable, List, TextIO, Sized, TypeVar, Tuple
4
4
 
5
5
  try:
6
6
  from typing import Literal
7
7
  except ImportError:
8
8
  from typing_extensions import Literal # type: ignore
9
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
+
10
27
  MATCH_MODE = Literal[
11
28
  -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 100, 101, 102, 103, 104, 105, 106, 107
12
29
  ]
@@ -17,9 +34,33 @@ __version__: str
17
34
 
18
35
  class Molecule(Sequence[Atom]):
19
36
  @classmethod
20
- def load(cls, file: Union[TextIO, str, os.PathLike[str]], id: Optional[str] = None, ignore_endmdl: bool = False) -> Molecule: ...
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: ...
21
42
  @classmethod
22
- def loads(cls, text: str, id: Optional[str] = None, ignore_endmdl: bool = False) -> Molecule: ...
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: ...
23
64
  def __init__(self, atoms: Sequence[Atom] = (), id: Optional[str] = None): ...
24
65
  def __len__(self) -> int: ...
25
66
  @typing.overload
@@ -47,16 +88,16 @@ class Atom:
47
88
  *,
48
89
  serial: int,
49
90
  name: str,
50
- altloc: str,
51
91
  residue_name: str,
52
92
  chain_id: str,
53
93
  residue_number: int,
54
- insertion_code: str,
55
94
  x: float,
56
95
  y: float,
57
96
  z: float,
58
97
  occupancy: float = 0.0,
59
98
  temperature_factor: float = 0.0,
99
+ altloc: str = " ",
100
+ insertion_code: str = " ",
60
101
  segment: str = "",
61
102
  element: str = "",
62
103
  charge: int = 0,
@@ -172,11 +213,11 @@ class Query(Generic[_T], Iterator[Hit[_T]]):
172
213
  @property
173
214
  def molecule(self) -> Molecule: ...
174
215
  @property
175
- def ignore_chain(self) -> bool: ...
216
+ def ignore_chain(self) -> Literal[None, "atoms", "residues"]: ...
176
217
  @property
177
218
  def rmsd_threshold(self) -> float: ...
178
219
  @property
179
- def max_candidates(self) -> int: ...
220
+ def max_candidates(self) -> Optional[int]: ...
180
221
  @property
181
222
  def best_match(self) -> bool: ...
182
223
  def __iter__(self) -> Query[_T]: ...
@@ -197,6 +238,8 @@ class Hit(Generic[_T]):
197
238
  def evalue(self) -> float: ...
198
239
  def atoms(self, transform: bool = True) -> List[Atom]: ...
199
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: ...
200
243
 
201
244
  class Jess(Generic[_T], Sequence[_T]):
202
245
  def __init__(self, templates: Iterable[_T] = ()): ...
@@ -218,8 +261,8 @@ class Jess(Generic[_T], Sequence[_T]):
218
261
  distance_cutoff: float,
219
262
  max_dynamic_distance: float,
220
263
  *,
221
- max_candidates: int = 1000,
222
- ignore_chain: bool = False,
264
+ max_candidates: Optional[int] = None,
265
+ ignore_chain: Literal[None, "atoms", "residues"] = None,
223
266
  best_match: bool = False,
224
267
  reorder: bool = True,
225
268
  ) -> Query[_T]: ...
Binary file