stjames 0.0.83__py3-none-any.whl → 0.0.85__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/method.py +3 -2
- stjames/pdb.py +1 -1
- stjames/workflows/__init__.py +4 -1
- stjames/workflows/pose_analysis_md.py +104 -0
- {stjames-0.0.83.dist-info → stjames-0.0.85.dist-info}/METADATA +1 -1
- {stjames-0.0.83.dist-info → stjames-0.0.85.dist-info}/RECORD +9 -8
- {stjames-0.0.83.dist-info → stjames-0.0.85.dist-info}/WHEEL +0 -0
- {stjames-0.0.83.dist-info → stjames-0.0.85.dist-info}/licenses/LICENSE +0 -0
- {stjames-0.0.83.dist-info → stjames-0.0.85.dist-info}/top_level.txt +0 -0
stjames/method.py
CHANGED
|
@@ -43,6 +43,7 @@ class Method(LowercaseStrEnum):
|
|
|
43
43
|
GFN0_XTB = "gfn0_xtb"
|
|
44
44
|
GFN1_XTB = "gfn1_xtb"
|
|
45
45
|
GFN2_XTB = "gfn2_xtb"
|
|
46
|
+
G_XTB = "g_xtb"
|
|
46
47
|
|
|
47
48
|
# this was going to be removed, but Jonathon wrote such a nice basis set test... it's off the front end.
|
|
48
49
|
BP86 = "bp86"
|
|
@@ -86,8 +87,8 @@ CORRECTABLE_NNP_METHODS = [Method.MACE_MP_0B2_L, Method.ORB_V2]
|
|
|
86
87
|
NNPMethod = PrepackagedNNPMethod | CorrectableNNPMethod
|
|
87
88
|
NNP_METHODS = [*PREPACKAGED_NNP_METHODS, *CORRECTABLE_NNP_METHODS]
|
|
88
89
|
|
|
89
|
-
XTBMethod = Literal[Method.GFN_FF, Method.GFN0_XTB, Method.GFN1_XTB, Method.GFN2_XTB]
|
|
90
|
-
XTB_METHODS = [Method.GFN_FF, Method.GFN0_XTB, Method.GFN1_XTB, Method.GFN2_XTB]
|
|
90
|
+
XTBMethod = Literal[Method.GFN_FF, Method.GFN0_XTB, Method.GFN1_XTB, Method.GFN2_XTB, Method.G_XTB]
|
|
91
|
+
XTB_METHODS = [Method.GFN_FF, Method.GFN0_XTB, Method.GFN1_XTB, Method.GFN2_XTB, Method.G_XTB]
|
|
91
92
|
|
|
92
93
|
CompositeMethod = Literal[Method.HF3C, Method.B973C, Method.R2SCAN3C, Method.WB97X3C]
|
|
93
94
|
COMPOSITE_METHODS = [Method.HF3C, Method.B973C, Method.R2SCAN3C, Method.WB97X3C]
|
stjames/pdb.py
CHANGED
stjames/workflows/__init__.py
CHANGED
|
@@ -18,6 +18,7 @@ from .macropka import *
|
|
|
18
18
|
from .molecular_dynamics import *
|
|
19
19
|
from .multistage_opt import *
|
|
20
20
|
from .pka import *
|
|
21
|
+
from .pose_analysis_md import *
|
|
21
22
|
from .protein_cofolding import *
|
|
22
23
|
from .redox_potential import *
|
|
23
24
|
from .scan import *
|
|
@@ -43,6 +44,7 @@ WORKFLOW_NAME = Literal[
|
|
|
43
44
|
"molecular_dynamics",
|
|
44
45
|
"multistage_opt",
|
|
45
46
|
"pka",
|
|
47
|
+
"pose_analysis_md",
|
|
46
48
|
"protein_cofolding",
|
|
47
49
|
"redox_potential",
|
|
48
50
|
"scan",
|
|
@@ -68,10 +70,11 @@ WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
|
|
|
68
70
|
"molecular_dynamics": MolecularDynamicsWorkflow, # type: ignore [dict-item]
|
|
69
71
|
"multistage_opt": MultiStageOptWorkflow, # type: ignore [dict-item]
|
|
70
72
|
"pka": pKaWorkflow, # type: ignore [dict-item]
|
|
73
|
+
"pose_analysis_md": PoseAnalysisMolecularDynamicsWorkflow, # type: ignore [dict-item]
|
|
74
|
+
"protein_cofolding": ProteinCofoldingWorkflow, # type: ignore [dict-item]
|
|
71
75
|
"redox_potential": RedoxPotentialWorkflow, # type: ignore [dict-item]
|
|
72
76
|
"scan": ScanWorkflow, # type: ignore [dict-item]
|
|
73
77
|
"solubility": SolubilityWorkflow, # type: ignore [dict-item]
|
|
74
78
|
"spin_states": SpinStatesWorkflow, # type: ignore [dict-item]
|
|
75
|
-
"protein_cofolding": ProteinCofoldingWorkflow, # type: ignore [dict-item]
|
|
76
79
|
"tautomers": TautomerWorkflow, # type: ignore [dict-item]
|
|
77
80
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
from typing import Annotated, Self
|
|
2
|
+
|
|
3
|
+
from pydantic import AfterValidator, PositiveFloat, PositiveInt, model_validator
|
|
4
|
+
|
|
5
|
+
from ..base import Base, round_float
|
|
6
|
+
from ..pdb import PDB
|
|
7
|
+
from ..types import UUID, round_list
|
|
8
|
+
from .workflow import MoleculeWorkflow
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BindingPoseContact(Base):
|
|
12
|
+
"""
|
|
13
|
+
A single protein–ligand contact from an MD trajectory.
|
|
14
|
+
|
|
15
|
+
:param protein_atom_index: the index of the protein atom
|
|
16
|
+
:param ligand_atom_index: the index of the ligand atom
|
|
17
|
+
:occupancy: the probability of seeing this interaction in a frame, between 0 and 1
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
protein_atom_index: int
|
|
21
|
+
ligand_atom_index: int
|
|
22
|
+
occupancy: Annotated[float, AfterValidator(round_float(3))]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BindingPoseTrajectory(Base):
|
|
26
|
+
"""
|
|
27
|
+
Represents a single trajectory looking at a binding pose.
|
|
28
|
+
|
|
29
|
+
:param uuid: the UUID of the trajectory
|
|
30
|
+
:param ligand_rmsd: the RMSD of the ligand vs. starting pose (aligning the protein)
|
|
31
|
+
:param contacts: the conserved binding-pose contacts
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
uuid: UUID
|
|
35
|
+
ligand_rmsd: Annotated[list[float], AfterValidator(round_list(3))] = []
|
|
36
|
+
contacts: list[BindingPoseContact] = []
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class PoseAnalysisMolecularDynamicsWorkflow(MoleculeWorkflow):
|
|
40
|
+
"""
|
|
41
|
+
Pose analysis molecular dynamics workflow.
|
|
42
|
+
|
|
43
|
+
Note that the protein can be supplied either by UUID or raw PDB object.
|
|
44
|
+
We anticipate that the former will dominate deployed usage, but the latter is handy for isolated testing.
|
|
45
|
+
If, for whatever reason, the workflow is initialized with both a `target_uuid` and a `target`, the UUID will be ignored.
|
|
46
|
+
|
|
47
|
+
Inherited:
|
|
48
|
+
:param initial_molecule: Molecule of interest
|
|
49
|
+
:param mode: Mode for workflow (currently unused)
|
|
50
|
+
|
|
51
|
+
New:
|
|
52
|
+
:param protein: PDB of the protein.
|
|
53
|
+
:param protein_uuid: UUID of the protein.
|
|
54
|
+
:param num_trajectories: how many trajectories to run
|
|
55
|
+
:param equilibration_time_ns: how long to equilibrate trajectories for, in nanoseconds
|
|
56
|
+
:param simulation_time_ns: how long to run trajectories for, in nanoseconds
|
|
57
|
+
:param temperature: the temperature, in K
|
|
58
|
+
:param pressure_atm: the pressure, in atm
|
|
59
|
+
:param langevin_timescale_ps: the timescale for the Langevin integrator, in inverse picoseconds
|
|
60
|
+
:param timestep_fs: the timestep, in femtoseconds
|
|
61
|
+
:param constrain_hydrogens: whether or not to use SHAKE to freeze bonds to hydrogen
|
|
62
|
+
:param nonbonded_cutoff: the nonbonded cutoff for particle-mesh Ewald, in Å
|
|
63
|
+
:param protein_prune_cutoff: the cutoff past which residues will be deleted, in Å
|
|
64
|
+
:param protein_restraint_cutoff: the cutoff past which alpha-carbons will be constrained, in Å
|
|
65
|
+
:param protein_restraint_constant: the force constant for backbone restraints, in kcal/mol/Å**2
|
|
66
|
+
:param ionic_strength_M: the ionic strength of the solution, in M (molar)
|
|
67
|
+
:param water_buffer: the amount of water to add around the protein, in Å
|
|
68
|
+
|
|
69
|
+
Results:
|
|
70
|
+
:param trajectories: for each replicate, a UUID and the corresponding analysis results
|
|
71
|
+
:param minimized_protein_uuid: UUID of final system PDB
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
protein: PDB | None = None
|
|
75
|
+
protein_uuid: UUID | None = None
|
|
76
|
+
|
|
77
|
+
num_trajectories: PositiveInt = 4
|
|
78
|
+
equilibration_time_ns: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 5
|
|
79
|
+
simulation_time_ns: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 10
|
|
80
|
+
|
|
81
|
+
temperature: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 300
|
|
82
|
+
pressure_atm: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 1.0
|
|
83
|
+
langevin_timescale_ps: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 1.0
|
|
84
|
+
|
|
85
|
+
timestep_fs: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 2
|
|
86
|
+
constrain_hydrogens: bool = True
|
|
87
|
+
nonbonded_cutoff: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 8.0
|
|
88
|
+
|
|
89
|
+
protein_prune_cutoff: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 9.0
|
|
90
|
+
protein_restraint_cutoff: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 7.0
|
|
91
|
+
protein_restraint_constant: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 100
|
|
92
|
+
|
|
93
|
+
ionic_strength_M: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 0.10
|
|
94
|
+
water_buffer: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 6.0
|
|
95
|
+
|
|
96
|
+
minimized_protein_uuid: UUID | None = None
|
|
97
|
+
trajectories: list[BindingPoseTrajectory] = []
|
|
98
|
+
|
|
99
|
+
@model_validator(mode="after")
|
|
100
|
+
def check_cutoff_sanity(self) -> Self:
|
|
101
|
+
"""Check if protein is provided."""
|
|
102
|
+
if self.protein_prune_cutoff < self.protein_restraint_cutoff:
|
|
103
|
+
raise ValueError("Pruning cutoff must be larger than restraint cutoff")
|
|
104
|
+
return self
|
|
@@ -11,11 +11,11 @@ stjames/diis_settings.py,sha256=4m1EQQWBlpHhMnWopix8qOqJv7QCluvdnV9jSKJDFtE,552
|
|
|
11
11
|
stjames/grid_settings.py,sha256=WrSNGc-8_f87YBZYt9Hh7RbhM4MweADoVzwBMcSqcsE,640
|
|
12
12
|
stjames/int_settings.py,sha256=5HXp8opt5ZyY1UpmfaK7NVloWVLM5jkG0elEEqpVLUo,896
|
|
13
13
|
stjames/message.py,sha256=Rq6QqmHZKecWxYH8fVyXmuoCCPZv8YinvgykSeorXSU,216
|
|
14
|
-
stjames/method.py,sha256=
|
|
14
|
+
stjames/method.py,sha256=xurVdREwRfn_eR3P2dB5p1zUlksO2zwXksN5hvsdKhs,2869
|
|
15
15
|
stjames/mode.py,sha256=xw46Cc7f3eTS8i35qECi-8DocAlANhayK3w4akD4HBU,496
|
|
16
16
|
stjames/molecule.py,sha256=l4S6prH1xflnZtbwidSF2THsiHaSJtRiy1rmUbH366Q,20631
|
|
17
17
|
stjames/opt_settings.py,sha256=LEwGXUEKq5TfU5rr60Z4QQBhCqiw1Ch5w0M_lXawWo8,642
|
|
18
|
-
stjames/pdb.py,sha256=
|
|
18
|
+
stjames/pdb.py,sha256=NtNB3M_OXq8raQA5ivjFKcIxOGemBvpGDIlCeb-s80E,26461
|
|
19
19
|
stjames/periodic_cell.py,sha256=eV_mArsY_MPEFSrFEsTC-CyCc6V8ITAXdk7yhjjNI7M,1080
|
|
20
20
|
stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
stjames/scf_settings.py,sha256=WotVgVrayQ_8PUHP39zVtG7iLT9PV41lpzruttFACP8,2356
|
|
@@ -37,7 +37,7 @@ stjames/data/isotopes.json,sha256=5ba8QnLrHD_Ypv2xekv2cIRwYrX3MQ19-1FOFtt0RuU,83
|
|
|
37
37
|
stjames/data/nist_isotopes.json,sha256=d5DNk1dX0iB1waEYIRR6JMHuA7AuYwSBEgBvb4EKyhM,14300
|
|
38
38
|
stjames/data/read_nist_isotopes.py,sha256=y10FNjW43QpC45qib7VHsIghEwT7GG5rsNwHdc9osRI,3309
|
|
39
39
|
stjames/data/symbol_element.json,sha256=vl_buFusTqBd-muYQtMLtTDLy2OtBI6KkBeqkaWRQrg,1186
|
|
40
|
-
stjames/workflows/__init__.py,sha256=
|
|
40
|
+
stjames/workflows/__init__.py,sha256=S5Z8bOWvvh9-TYV2VgfSpfvvfN1ceShTo5Dro5tmlP0,2796
|
|
41
41
|
stjames/workflows/admet.py,sha256=h8ph6oeRCxU3-_jqRRWPg3RZcheu9JzCHiWqSC9VYKY,1296
|
|
42
42
|
stjames/workflows/basic_calculation.py,sha256=ZX3KwhfyyCTjc2ougQIL4If7gtwZP9WjqpL45mBquW0,573
|
|
43
43
|
stjames/workflows/bde.py,sha256=hdTjwma5L9SrU5F5r6dB1ruB_B6buBUtZHf2sanNW2k,9802
|
|
@@ -54,6 +54,7 @@ stjames/workflows/macropka.py,sha256=KRIyk4gsSYL3eqyzCDndStGLwjWSo60cgCAzvAoD1Nk
|
|
|
54
54
|
stjames/workflows/molecular_dynamics.py,sha256=kxugE73Ntzpj-xpJSoQ1EwGzXXdvi_NTyeP4913EVwE,3173
|
|
55
55
|
stjames/workflows/multistage_opt.py,sha256=P8rxMUhKXMmDi7Id95IOTEmM0xN1ErsKcDJfgY08vjc,16538
|
|
56
56
|
stjames/workflows/pka.py,sha256=j3vBh2YM3nJzJ1XJKPsmYahRCeaU9n3P-G-u9_moaFw,2065
|
|
57
|
+
stjames/workflows/pose_analysis_md.py,sha256=LAn6IXcQIUCt9M54kDzwWkmoCH0r1H99_APFu55skQc,4619
|
|
57
58
|
stjames/workflows/protein_cofolding.py,sha256=_05DCzzKGZFtns9HARAMjcWxVrJU9DPb3VNVWSgwWR8,2173
|
|
58
59
|
stjames/workflows/redox_potential.py,sha256=7S18t9Y3eynSnA3lZbRlvLfdbgeBopdiigLzt1zxg5c,3871
|
|
59
60
|
stjames/workflows/scan.py,sha256=DXQBpa2t2PowAtOwmdgpxaSLq--fEShljzAGSb8Nf5U,2993
|
|
@@ -61,8 +62,8 @@ stjames/workflows/solubility.py,sha256=kGfVyPPGDLRpf2j6dSY7woCkfsoXSbUzdSImA4mcM
|
|
|
61
62
|
stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
|
|
62
63
|
stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
|
|
63
64
|
stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
|
|
64
|
-
stjames-0.0.
|
|
65
|
-
stjames-0.0.
|
|
66
|
-
stjames-0.0.
|
|
67
|
-
stjames-0.0.
|
|
68
|
-
stjames-0.0.
|
|
65
|
+
stjames-0.0.85.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
|
|
66
|
+
stjames-0.0.85.dist-info/METADATA,sha256=NfOJ2u6ZnG8pX0AlUyLJHQXR9SuzaH8IqQERw0Yz5Sg,1724
|
|
67
|
+
stjames-0.0.85.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
68
|
+
stjames-0.0.85.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
|
|
69
|
+
stjames-0.0.85.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|