stjames 0.0.114__py3-none-any.whl → 0.0.116__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/workflows/conformer_search.py +22 -2
- stjames/workflows/docking.py +12 -1
- stjames/workflows/pka.py +4 -4
- stjames/workflows/pose_analysis_md.py +2 -2
- {stjames-0.0.114.dist-info → stjames-0.0.116.dist-info}/METADATA +1 -1
- {stjames-0.0.114.dist-info → stjames-0.0.116.dist-info}/RECORD +9 -9
- {stjames-0.0.114.dist-info → stjames-0.0.116.dist-info}/WHEEL +0 -0
- {stjames-0.0.114.dist-info → stjames-0.0.116.dist-info}/licenses/LICENSE +0 -0
- {stjames-0.0.114.dist-info → stjames-0.0.116.dist-info}/top_level.txt +0 -0
|
@@ -9,9 +9,10 @@ from ..base import LowercaseStrEnum
|
|
|
9
9
|
from ..constraint import Constraint
|
|
10
10
|
from ..method import Method, XTBMethod
|
|
11
11
|
from ..mode import Mode
|
|
12
|
+
from ..molecule import Molecule
|
|
12
13
|
from ..types import UUID, FloatPerAtom, round_float_per_atom
|
|
13
14
|
from .multistage_opt import MultiStageOptMixin
|
|
14
|
-
from .workflow import MoleculeWorkflow
|
|
15
|
+
from .workflow import MoleculeWorkflow, SMILESWorkflow
|
|
15
16
|
|
|
16
17
|
_sentinel = object()
|
|
17
18
|
|
|
@@ -377,12 +378,16 @@ class ConformerSearchMixin(ConformerGenMixin, MultiStageOptMixin):
|
|
|
377
378
|
return self
|
|
378
379
|
|
|
379
380
|
|
|
380
|
-
class ConformerSearchWorkflow(ConformerSearchMixin, MoleculeWorkflow):
|
|
381
|
+
class ConformerSearchWorkflow(ConformerSearchMixin, SMILESWorkflow, MoleculeWorkflow):
|
|
381
382
|
"""
|
|
382
383
|
ConformerSearch Workflow.
|
|
383
384
|
|
|
385
|
+
This workflow supports both SMILES and 3D molecular input. Some conformer generation settings
|
|
386
|
+
support both methods; others (like CREST) require 3D information. Only one should be supplied.
|
|
387
|
+
|
|
384
388
|
Inherited:
|
|
385
389
|
:param initial_molecule: Molecule of interest
|
|
390
|
+
:param initial_smiles: SMILES of the molecule of interest
|
|
386
391
|
:param conf_gen_mode: Mode for calculations
|
|
387
392
|
:param conf_gen_settings: settings for conformer generation
|
|
388
393
|
:param mso_mode: Mode for MultiStageOptSettings
|
|
@@ -401,6 +406,21 @@ class ConformerSearchWorkflow(ConformerSearchMixin, MoleculeWorkflow):
|
|
|
401
406
|
:param energies: energies of the molecules
|
|
402
407
|
"""
|
|
403
408
|
|
|
409
|
+
initial_smiles: str = ""
|
|
410
|
+
initial_molecule: Molecule | None = None # type: ignore [assignment]
|
|
411
|
+
|
|
404
412
|
# Results
|
|
405
413
|
conformer_uuids: list[list[UUID | None]] = Field(default_factory=list)
|
|
406
414
|
energies: Annotated[FloatPerAtom, AfterValidator(round_float_per_atom(6))] = Field(default_factory=list)
|
|
415
|
+
|
|
416
|
+
@model_validator(mode="after")
|
|
417
|
+
def validate_mol_input(self) -> Self:
|
|
418
|
+
"""Ensure that only one of initial_molecule or initial_smiles is set."""
|
|
419
|
+
|
|
420
|
+
if not (bool(self.initial_smiles) ^ bool(self.initial_molecule)):
|
|
421
|
+
raise ValueError("Can only set one of initial_molecule and initial_smiles")
|
|
422
|
+
|
|
423
|
+
if isinstance(self.conf_gen_settings, iMTDSettings) and (self.initial_molecule is None):
|
|
424
|
+
raise ValueError("iMTDSettings requires `initial_molecule` to be set")
|
|
425
|
+
|
|
426
|
+
return self
|
stjames/workflows/docking.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Docking workflow."""
|
|
2
2
|
|
|
3
|
-
from typing import Annotated, Self, TypeAlias
|
|
3
|
+
from typing import Annotated, Literal, Self, TypeAlias
|
|
4
4
|
|
|
5
5
|
from pydantic import AfterValidator, ConfigDict, field_validator, model_validator
|
|
6
6
|
|
|
@@ -46,12 +46,23 @@ class VinaSettings(DockingSettings):
|
|
|
46
46
|
"""
|
|
47
47
|
Controls how AutoDock Vina is run.
|
|
48
48
|
|
|
49
|
+
:param executable: which Vina implementation is run.
|
|
50
|
+
:param scoring_function: which scoring function is employed.
|
|
49
51
|
:param exhaustiveness: how many times Vina attempts to find a pose.
|
|
50
52
|
8 is typical, 32 is considered relatively careful.
|
|
51
53
|
"""
|
|
52
54
|
|
|
55
|
+
executable: Literal["qvina2", "vina"] = "vina"
|
|
56
|
+
scoring_function: Literal["vinardo", "vina"] = "vinardo"
|
|
53
57
|
exhaustiveness: int = 8
|
|
54
58
|
|
|
59
|
+
@model_validator(mode="after")
|
|
60
|
+
def check_executable_scoring_function(self) -> Self:
|
|
61
|
+
"""Check if the combination of exectuable and scoring function is supported."""
|
|
62
|
+
if (self.executable == "qvina2") and (self.scoring_function == "vinardo"):
|
|
63
|
+
raise ValueError("qvina2 does not implement the vinardo scoring function!")
|
|
64
|
+
return self
|
|
65
|
+
|
|
55
66
|
|
|
56
67
|
class DockingWorkflow(MoleculeWorkflow):
|
|
57
68
|
"""
|
stjames/workflows/pka.py
CHANGED
|
@@ -10,7 +10,7 @@ from ..molecule import Molecule
|
|
|
10
10
|
from ..solvent import Solvent
|
|
11
11
|
from .workflow import DBCalculation, MoleculeWorkflow, SMILESWorkflow
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
CHEMPROP_NEVOLIANIS2025_ALLOWED_SOLVENTS = {
|
|
14
14
|
Solvent.WATER,
|
|
15
15
|
Solvent.DIMETHYLSULFOXIDE,
|
|
16
16
|
Solvent.DIMETHYLFORMAMIDE,
|
|
@@ -24,7 +24,7 @@ CHEMPROP_NEVOLIANUS2025_ALLOWED_SOLVENTS = {
|
|
|
24
24
|
|
|
25
25
|
class MicroscopicpKaMethod(LowercaseStrEnum):
|
|
26
26
|
AIMNET2_WAGEN2024 = "aimnet2_wagen2024"
|
|
27
|
-
|
|
27
|
+
CHEMPROP_NEVOLIANIS2025 = "chemprop_nevolianis2025"
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class pKaMicrostate(Base):
|
|
@@ -102,8 +102,8 @@ class pKaWorkflow(SMILESWorkflow, MoleculeWorkflow):
|
|
|
102
102
|
case MicroscopicpKaMethod.AIMNET2_WAGEN2024:
|
|
103
103
|
if self.solvent is not Solvent.WATER:
|
|
104
104
|
raise ValueError(f"{self.microscopic_pka_method} only supports water")
|
|
105
|
-
case MicroscopicpKaMethod.
|
|
106
|
-
if self.solvent not in
|
|
105
|
+
case MicroscopicpKaMethod.CHEMPROP_NEVOLIANIS2025:
|
|
106
|
+
if self.solvent not in CHEMPROP_NEVOLIANIS2025_ALLOWED_SOLVENTS:
|
|
107
107
|
raise ValueError(f"Solvent `{self.solvent}` is not supported by method `{self.microscopic_pka_method}`.")
|
|
108
108
|
if len(self.protonate_atoms) or len(self.deprotonate_atoms):
|
|
109
109
|
raise ValueError(f"Method `{self.microscopic_pka_method}` does not support selecting atoms by number.")
|
|
@@ -76,8 +76,8 @@ class PoseAnalysisMolecularDynamicsWorkflow(SMILESWorkflow):
|
|
|
76
76
|
protein_uuid: UUID | None = None
|
|
77
77
|
ligand_residue_name: str = "LIG"
|
|
78
78
|
|
|
79
|
-
num_trajectories: PositiveInt =
|
|
80
|
-
equilibration_time_ns: Annotated[PositiveFloat, AfterValidator(round_float(3))] =
|
|
79
|
+
num_trajectories: PositiveInt = 1
|
|
80
|
+
equilibration_time_ns: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 1
|
|
81
81
|
simulation_time_ns: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 10
|
|
82
82
|
|
|
83
83
|
temperature: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 300
|
|
@@ -42,9 +42,9 @@ stjames/workflows/admet.py,sha256=qFUpCFiLW-3gzuEjCMNBJ6DEG_vquJcPAsN4SVZRfdE,12
|
|
|
42
42
|
stjames/workflows/basic_calculation.py,sha256=sAgHBcNHE72ZbZPB9vyZShALRC4zOVw6It6cpJlbX2A,911
|
|
43
43
|
stjames/workflows/bde.py,sha256=g_In-caftXiimrhfdptHjpfrYQUs3vF58qYmRnaTN8g,10825
|
|
44
44
|
stjames/workflows/conformer.py,sha256=18aO6ngMBeGAmQkBdLGCCHr398RIYr1v2hD2IT1u4cc,3005
|
|
45
|
-
stjames/workflows/conformer_search.py,sha256=
|
|
45
|
+
stjames/workflows/conformer_search.py,sha256=1kBUT0yCcTPTCtxg1tlTKHRRXkfNYNqzla_89lDEL9k,15696
|
|
46
46
|
stjames/workflows/descriptors.py,sha256=T4tc7xdtBdxESGO86KR323jPQ2pgwxBqgV0khA6MEgQ,584
|
|
47
|
-
stjames/workflows/docking.py,sha256=
|
|
47
|
+
stjames/workflows/docking.py,sha256=t30kqeFXQ0yrlqvN6Jdwt0SdfnJLDsfK-7yFi0gwNbY,4753
|
|
48
48
|
stjames/workflows/double_ended_ts_search.py,sha256=ovJgEVFc6c3mijCE3TKAY70YvqNmAZ5Y4XgV4-tIxBI,3127
|
|
49
49
|
stjames/workflows/electronic_properties.py,sha256=GT3-NC7w-dbcOJ-3AzJ7LgzH6frTbiH2Iyb9BCa-SvY,4112
|
|
50
50
|
stjames/workflows/fukui.py,sha256=095GDGSSEc5PDD1aoKM8J7icgR5tfwS5Bs9XxFQHge4,2387
|
|
@@ -55,8 +55,8 @@ stjames/workflows/macropka.py,sha256=Krj0xXuB-u57Kqlf4bbRiHDUWCpliFr6YPiYqPmYaWk
|
|
|
55
55
|
stjames/workflows/molecular_dynamics.py,sha256=HqWNxxPSAphfI0DdbTERFkq8UeBjEvhnA_ETv0xw_RY,3522
|
|
56
56
|
stjames/workflows/multistage_opt.py,sha256=UN-4WLsT2WEjO5KqDPrcCkb708Co-ZScHx3g2bto768,16597
|
|
57
57
|
stjames/workflows/nmr.py,sha256=1QEF4SB6dWIr-jzLEZ7V972UnRUOTufOJSHwIGyV3dM,2681
|
|
58
|
-
stjames/workflows/pka.py,sha256=
|
|
59
|
-
stjames/workflows/pose_analysis_md.py,sha256=
|
|
58
|
+
stjames/workflows/pka.py,sha256=i-jzl2lN0yRWc0tgrWSBCplITEByfRyEQrlUhjnzcBc,4580
|
|
59
|
+
stjames/workflows/pose_analysis_md.py,sha256=dpWVKC-8fPdw6ExIXk9xbeVBDUMUYQECpixb-oFa23I,4803
|
|
60
60
|
stjames/workflows/protein_cofolding.py,sha256=cN0WUh8trrWwzNvoU75hB-VectIer-g5sMKgibQJcfE,4293
|
|
61
61
|
stjames/workflows/redox_potential.py,sha256=7S18t9Y3eynSnA3lZbRlvLfdbgeBopdiigLzt1zxg5c,3871
|
|
62
62
|
stjames/workflows/scan.py,sha256=DXQBpa2t2PowAtOwmdgpxaSLq--fEShljzAGSb8Nf5U,2993
|
|
@@ -65,8 +65,8 @@ stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQ
|
|
|
65
65
|
stjames/workflows/strain.py,sha256=paYxDDQTB1eYP_c2kLVz1-QX7Vpw0LLb3ujnFin_SOM,1834
|
|
66
66
|
stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
|
|
67
67
|
stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
|
|
68
|
-
stjames-0.0.
|
|
69
|
-
stjames-0.0.
|
|
70
|
-
stjames-0.0.
|
|
71
|
-
stjames-0.0.
|
|
72
|
-
stjames-0.0.
|
|
68
|
+
stjames-0.0.116.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
|
|
69
|
+
stjames-0.0.116.dist-info/METADATA,sha256=IbTEKrb49Z5vD7QdSV412MBQQH4Yv2uSftLO2IoObzY,1725
|
|
70
|
+
stjames-0.0.116.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
71
|
+
stjames-0.0.116.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
|
|
72
|
+
stjames-0.0.116.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|