stjames 0.0.92__py3-none-any.whl → 0.0.93__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.
Potentially problematic release.
This version of stjames might be problematic. Click here for more details.
- stjames/pdb.py +2 -1
- stjames/workflows/docking.py +38 -8
- {stjames-0.0.92.dist-info → stjames-0.0.93.dist-info}/METADATA +1 -1
- {stjames-0.0.92.dist-info → stjames-0.0.93.dist-info}/RECORD +7 -7
- {stjames-0.0.92.dist-info → stjames-0.0.93.dist-info}/WHEEL +0 -0
- {stjames-0.0.92.dist-info → stjames-0.0.93.dist-info}/licenses/LICENSE +0 -0
- {stjames-0.0.92.dist-info → stjames-0.0.93.dist-info}/top_level.txt +0 -0
stjames/pdb.py
CHANGED
|
@@ -448,6 +448,7 @@ def _format_atom_line(
|
|
|
448
448
|
chg = " "
|
|
449
449
|
|
|
450
450
|
atom_name = atom.name if atom.name else atom.element
|
|
451
|
+
|
|
451
452
|
occupancy = atom.occupancy if atom.occupancy else 1.0
|
|
452
453
|
|
|
453
454
|
# Construct the line.
|
|
@@ -455,7 +456,7 @@ def _format_atom_line(
|
|
|
455
456
|
line = (
|
|
456
457
|
f"{record_type}"
|
|
457
458
|
f"{serial:5d} " # atom serial number (columns 7-11)
|
|
458
|
-
f"{atom_name:<4}" # atom name (columns 13-16, left-justified in this snippet)
|
|
459
|
+
f"{(' ' + atom_name if len(atom_name) < 4 else atom_name):<4}" # atom name (columns 13-16, left-justified in this snippet)
|
|
459
460
|
f"{alt_loc_char}" # altLoc (column 17)
|
|
460
461
|
f"{residue_name:>3}" # residue name (columns 18-20)
|
|
461
462
|
f" {chain_char}" # chain ID (column 22)
|
stjames/workflows/docking.py
CHANGED
|
@@ -7,6 +7,7 @@ from pydantic import AfterValidator, ConfigDict, field_validator, model_validato
|
|
|
7
7
|
from ..base import Base, round_float
|
|
8
8
|
from ..pdb import PDB
|
|
9
9
|
from ..types import UUID, Vector3D
|
|
10
|
+
from .conformer_search import ConformerGenSettings, ETKDGSettings
|
|
10
11
|
from .workflow import MoleculeWorkflow
|
|
11
12
|
|
|
12
13
|
|
|
@@ -20,6 +21,28 @@ class Score(Base):
|
|
|
20
21
|
|
|
21
22
|
pose: UUID | None # for calculation
|
|
22
23
|
score: Annotated[float, AfterValidator(round_float(3))]
|
|
24
|
+
posebusters_valid: bool
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DockingSettings(Base):
|
|
28
|
+
"""
|
|
29
|
+
Base class for controlling how docked poses are generated.
|
|
30
|
+
|
|
31
|
+
:param max_poses: the maximum number of poses generated per input molecule
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
max_poses: int = 4
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class VinaSettings(DockingSettings):
|
|
38
|
+
"""
|
|
39
|
+
Controls how AutoDock Vina is run.
|
|
40
|
+
|
|
41
|
+
:param exhaustiveness: how many times Vina attempts to find a pose.
|
|
42
|
+
8 is typical, 32 is considered relatively careful.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
exhaustiveness: int = 8
|
|
23
46
|
|
|
24
47
|
|
|
25
48
|
class DockingWorkflow(MoleculeWorkflow):
|
|
@@ -35,31 +58,38 @@ class DockingWorkflow(MoleculeWorkflow):
|
|
|
35
58
|
:param mode: Mode for workflow (currently unused)
|
|
36
59
|
|
|
37
60
|
New:
|
|
38
|
-
:param
|
|
39
|
-
:param smiles: SMILES strings of the ligands (optional)
|
|
61
|
+
:param docking_engine: which docking method to use
|
|
40
62
|
:param do_csearch: whether to csearch starting structures
|
|
63
|
+
:param csearch_settings: settings for initial conformer search.
|
|
41
64
|
:param do_optimization: whether to optimize starting structures
|
|
65
|
+
:param opt_settings: settings for conformer optimization.
|
|
42
66
|
:param do_pose_refinement: whether to optimize non-rotatable bonds in output poses
|
|
43
|
-
:param conformers: UUIDs of optimized conformers
|
|
44
67
|
:param target: PDB of the protein.
|
|
45
68
|
:param target_uuid: UUID of the protein.
|
|
46
69
|
:param pocket: center (x, y, z) and size (x, y, z) of the pocket
|
|
47
70
|
|
|
48
71
|
Results:
|
|
72
|
+
:param conformers: UUIDs of optimized conformers
|
|
49
73
|
:param scores: docked poses sorted by score
|
|
50
74
|
"""
|
|
51
75
|
|
|
52
76
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
53
77
|
|
|
54
|
-
do_csearch: bool = True
|
|
55
|
-
do_optimization: bool = True
|
|
56
|
-
conformers: list[UUID] = []
|
|
57
|
-
|
|
58
78
|
target: PDB | None = None
|
|
59
79
|
target_uuid: UUID | None = None
|
|
60
80
|
pocket: tuple[Vector3D, Vector3D]
|
|
61
81
|
|
|
82
|
+
do_csearch: bool = True
|
|
83
|
+
conformer_gen_settings: ConformerGenSettings = ETKDGSettings(mode="reckless")
|
|
84
|
+
|
|
85
|
+
do_optimization: bool = True
|
|
86
|
+
# optimization_settings - here in future once we have a cleaner mode sol'n, ccw 7.9.25
|
|
87
|
+
|
|
88
|
+
docking_settings: DockingSettings = VinaSettings()
|
|
89
|
+
|
|
62
90
|
do_pose_refinement: bool = True
|
|
91
|
+
|
|
92
|
+
conformers: list[UUID] = []
|
|
63
93
|
scores: list[Score] = []
|
|
64
94
|
|
|
65
95
|
def __str__(self) -> str:
|
|
@@ -80,7 +110,7 @@ class DockingWorkflow(MoleculeWorkflow):
|
|
|
80
110
|
def check_protein(self) -> Self:
|
|
81
111
|
"""Check if protein is provided."""
|
|
82
112
|
if not self.target and not self.target_uuid:
|
|
83
|
-
raise ValueError("Must provide either
|
|
113
|
+
raise ValueError("Must provide either target or target_uuid")
|
|
84
114
|
return self
|
|
85
115
|
|
|
86
116
|
@field_validator("pocket", mode="after")
|
|
@@ -16,7 +16,7 @@ stjames/method.py,sha256=8Cj0JYGMEaS_Cetfz8Wcu6-BZAv1SejRSagMgkKaXs0,4469
|
|
|
16
16
|
stjames/mode.py,sha256=xw46Cc7f3eTS8i35qECi-8DocAlANhayK3w4akD4HBU,496
|
|
17
17
|
stjames/molecule.py,sha256=l4S6prH1xflnZtbwidSF2THsiHaSJtRiy1rmUbH366Q,20631
|
|
18
18
|
stjames/opt_settings.py,sha256=LEwGXUEKq5TfU5rr60Z4QQBhCqiw1Ch5w0M_lXawWo8,642
|
|
19
|
-
stjames/pdb.py,sha256=
|
|
19
|
+
stjames/pdb.py,sha256=6ayVUUdTufkXs_nfpRQuT1yGvymuyICB4L5Wh55OsaA,26507
|
|
20
20
|
stjames/periodic_cell.py,sha256=eV_mArsY_MPEFSrFEsTC-CyCc6V8ITAXdk7yhjjNI7M,1080
|
|
21
21
|
stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
stjames/scf_settings.py,sha256=WotVgVrayQ_8PUHP39zVtG7iLT9PV41lpzruttFACP8,2356
|
|
@@ -45,7 +45,7 @@ stjames/workflows/bde.py,sha256=g_In-caftXiimrhfdptHjpfrYQUs3vF58qYmRnaTN8g,1082
|
|
|
45
45
|
stjames/workflows/conformer.py,sha256=18aO6ngMBeGAmQkBdLGCCHr398RIYr1v2hD2IT1u4cc,3005
|
|
46
46
|
stjames/workflows/conformer_search.py,sha256=4yPEKIIedeaVvaAwgjwC1FxiHqM6n2zOF6c9Yk_q1oA,13513
|
|
47
47
|
stjames/workflows/descriptors.py,sha256=T4tc7xdtBdxESGO86KR323jPQ2pgwxBqgV0khA6MEgQ,584
|
|
48
|
-
stjames/workflows/docking.py,sha256=
|
|
48
|
+
stjames/workflows/docking.py,sha256=CgpLjMfpPka1fcg0VJPeyJCOnZjnJTrgfNeMAKiX4zM,3897
|
|
49
49
|
stjames/workflows/electronic_properties.py,sha256=GT3-NC7w-dbcOJ-3AzJ7LgzH6frTbiH2Iyb9BCa-SvY,4112
|
|
50
50
|
stjames/workflows/fukui.py,sha256=T6TDg-lcE-sfTDVpa3KFBenLe7PGUO2QrQ2jNuw_iiU,1756
|
|
51
51
|
stjames/workflows/hydrogen_bond_basicity.py,sha256=q9eXty68ZyCmrB6G_8bfeOT8Ui_IQquRPu6z-3rNreQ,1589
|
|
@@ -63,8 +63,8 @@ stjames/workflows/solubility.py,sha256=kGfVyPPGDLRpf2j6dSY7woCkfsoXSbUzdSImA4mcM
|
|
|
63
63
|
stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
|
|
64
64
|
stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
|
|
65
65
|
stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
|
|
66
|
-
stjames-0.0.
|
|
67
|
-
stjames-0.0.
|
|
68
|
-
stjames-0.0.
|
|
69
|
-
stjames-0.0.
|
|
70
|
-
stjames-0.0.
|
|
66
|
+
stjames-0.0.93.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
|
|
67
|
+
stjames-0.0.93.dist-info/METADATA,sha256=45Vdq_ji_cnZN3uRObImOTBgOsc9lcVCJOTWVms8xjY,1724
|
|
68
|
+
stjames-0.0.93.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
stjames-0.0.93.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
|
|
70
|
+
stjames-0.0.93.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|