stjames 0.0.104__tar.gz → 0.0.106__tar.gz

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.

Files changed (84) hide show
  1. {stjames-0.0.104/stjames.egg-info → stjames-0.0.106}/PKG-INFO +1 -1
  2. {stjames-0.0.104 → stjames-0.0.106}/pyproject.toml +1 -1
  3. {stjames-0.0.104 → stjames-0.0.106}/stjames/method.py +3 -0
  4. {stjames-0.0.104 → stjames-0.0.106}/stjames/solvent.py +2 -0
  5. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/__init__.py +3 -0
  6. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/conformer_search.py +35 -1
  7. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/docking.py +14 -9
  8. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/nmr.py +2 -2
  9. stjames-0.0.106/stjames/workflows/pka.py +115 -0
  10. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/protein_cofolding.py +26 -5
  11. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/solubility.py +2 -1
  12. stjames-0.0.106/stjames/workflows/strain.py +46 -0
  13. {stjames-0.0.104 → stjames-0.0.106/stjames.egg-info}/PKG-INFO +1 -1
  14. {stjames-0.0.104 → stjames-0.0.106}/stjames.egg-info/SOURCES.txt +1 -0
  15. stjames-0.0.104/stjames/workflows/pka.py +0 -66
  16. {stjames-0.0.104 → stjames-0.0.106}/LICENSE +0 -0
  17. {stjames-0.0.104 → stjames-0.0.106}/README.md +0 -0
  18. {stjames-0.0.104 → stjames-0.0.106}/setup.cfg +0 -0
  19. {stjames-0.0.104 → stjames-0.0.106}/stjames/__init__.py +0 -0
  20. {stjames-0.0.104 → stjames-0.0.106}/stjames/_deprecated_solvent_settings.py +0 -0
  21. {stjames-0.0.104 → stjames-0.0.106}/stjames/atom.py +0 -0
  22. {stjames-0.0.104 → stjames-0.0.106}/stjames/atomium_stjames/__init__.py +0 -0
  23. {stjames-0.0.104 → stjames-0.0.106}/stjames/atomium_stjames/data.py +0 -0
  24. {stjames-0.0.104 → stjames-0.0.106}/stjames/atomium_stjames/mmcif.py +0 -0
  25. {stjames-0.0.104 → stjames-0.0.106}/stjames/atomium_stjames/pdb.py +0 -0
  26. {stjames-0.0.104 → stjames-0.0.106}/stjames/atomium_stjames/utilities.py +0 -0
  27. {stjames-0.0.104 → stjames-0.0.106}/stjames/base.py +0 -0
  28. {stjames-0.0.104 → stjames-0.0.106}/stjames/basis_set.py +0 -0
  29. {stjames-0.0.104 → stjames-0.0.106}/stjames/calculation.py +0 -0
  30. {stjames-0.0.104 → stjames-0.0.106}/stjames/compute_settings.py +0 -0
  31. {stjames-0.0.104 → stjames-0.0.106}/stjames/constraint.py +0 -0
  32. {stjames-0.0.104 → stjames-0.0.106}/stjames/correction.py +0 -0
  33. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/__init__.py +0 -0
  34. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/bragg_radii.json +0 -0
  35. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/elements.py +0 -0
  36. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/isotopes.json +0 -0
  37. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/nist_isotopes.json +0 -0
  38. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/read_nist_isotopes.py +0 -0
  39. {stjames-0.0.104 → stjames-0.0.106}/stjames/data/symbol_element.json +0 -0
  40. {stjames-0.0.104 → stjames-0.0.106}/stjames/engine.py +0 -0
  41. {stjames-0.0.104 → stjames-0.0.106}/stjames/message.py +0 -0
  42. {stjames-0.0.104 → stjames-0.0.106}/stjames/mode.py +0 -0
  43. {stjames-0.0.104 → stjames-0.0.106}/stjames/molecule.py +0 -0
  44. {stjames-0.0.104 → stjames-0.0.106}/stjames/opt_settings.py +0 -0
  45. {stjames-0.0.104 → stjames-0.0.106}/stjames/optimization/__init__.py +0 -0
  46. {stjames-0.0.104 → stjames-0.0.106}/stjames/optimization/freezing_string_method.py +0 -0
  47. {stjames-0.0.104 → stjames-0.0.106}/stjames/pdb.py +0 -0
  48. {stjames-0.0.104 → stjames-0.0.106}/stjames/periodic_cell.py +0 -0
  49. {stjames-0.0.104 → stjames-0.0.106}/stjames/py.typed +0 -0
  50. {stjames-0.0.104 → stjames-0.0.106}/stjames/scf_settings.py +0 -0
  51. {stjames-0.0.104 → stjames-0.0.106}/stjames/settings.py +0 -0
  52. {stjames-0.0.104 → stjames-0.0.106}/stjames/status.py +0 -0
  53. {stjames-0.0.104 → stjames-0.0.106}/stjames/task.py +0 -0
  54. {stjames-0.0.104 → stjames-0.0.106}/stjames/thermochem_settings.py +0 -0
  55. {stjames-0.0.104 → stjames-0.0.106}/stjames/types.py +0 -0
  56. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/admet.py +0 -0
  57. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/basic_calculation.py +0 -0
  58. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/bde.py +0 -0
  59. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/conformer.py +0 -0
  60. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/descriptors.py +0 -0
  61. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/double_ended_ts_search.py +0 -0
  62. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/electronic_properties.py +0 -0
  63. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/fukui.py +0 -0
  64. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  65. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/ion_mobility.py +0 -0
  66. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/irc.py +0 -0
  67. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/macropka.py +0 -0
  68. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/molecular_dynamics.py +0 -0
  69. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/multistage_opt.py +0 -0
  70. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/pose_analysis_md.py +0 -0
  71. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/redox_potential.py +0 -0
  72. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/scan.py +0 -0
  73. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/spin_states.py +0 -0
  74. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/tautomer.py +0 -0
  75. {stjames-0.0.104 → stjames-0.0.106}/stjames/workflows/workflow.py +0 -0
  76. {stjames-0.0.104 → stjames-0.0.106}/stjames.egg-info/dependency_links.txt +0 -0
  77. {stjames-0.0.104 → stjames-0.0.106}/stjames.egg-info/requires.txt +0 -0
  78. {stjames-0.0.104 → stjames-0.0.106}/stjames.egg-info/top_level.txt +0 -0
  79. {stjames-0.0.104 → stjames-0.0.106}/tests/test_constraints.py +0 -0
  80. {stjames-0.0.104 → stjames-0.0.106}/tests/test_from_extxyz.py +0 -0
  81. {stjames-0.0.104 → stjames-0.0.106}/tests/test_molecule.py +0 -0
  82. {stjames-0.0.104 → stjames-0.0.106}/tests/test_pdb.py +0 -0
  83. {stjames-0.0.104 → stjames-0.0.106}/tests/test_rounding.py +0 -0
  84. {stjames-0.0.104 → stjames-0.0.106}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.104
3
+ Version: 0.0.106
4
4
  Summary: standardized JSON atom/molecule encoding scheme
5
5
  Author-email: Corin Wagen <corin@rowansci.com>
6
6
  Project-URL: Homepage, https://github.com/rowansci/stjames
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stjames"
3
- version = "0.0.104"
3
+ version = "0.0.106"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -135,3 +135,6 @@ PREPACKAGED_METHODS = [*XTB_METHODS, *COMPOSITE_METHODS, *PREPACKAGED_NNP_METHOD
135
135
 
136
136
  MethodWithCorrection = Literal[Method.WB97XD3, Method.WB97XV, Method.WB97MV, Method.WB97MD3BJ, Method.DSDBLYPD3BJ]
137
137
  METHODS_WITH_CORRECTION = [Method.WB97XD3, Method.WB97XV, Method.WB97MV, Method.WB97MD3BJ, Method.DSDBLYPD3BJ, Method.B97D3BJ]
138
+
139
+ MGGAFunctionals = Literal[Method.R2SCAN, Method.R2SCAN3C, Method.TPSS, Method.TPSSH, Method.M06L, Method.M06, Method.M062X, Method.WB97MD3BJ, Method.WB97MV]
140
+ MGGA_FUNCTIONALS = [Method.R2SCAN, Method.R2SCAN3C, Method.TPSS, Method.TPSSH, Method.M06L, Method.M06, Method.M062X, Method.WB97MD3BJ, Method.WB97MV]
@@ -28,6 +28,8 @@ class Solvent(LowercaseStrEnum):
28
28
  ISOPROPANOL = "isopropanol"
29
29
  DIMETHYLACETAMIDE = "dimethylacetamide"
30
30
  DIMETHYLFORMAMIDE = "dimethylformamide"
31
+ N_METHYLPYRROLIDONE = "n_methylpyrrolidone"
32
+ ETHYLENE_GLYCOL = "ethylene_glycol"
31
33
 
32
34
 
33
35
  class SolventModel(LowercaseStrEnum):
@@ -26,6 +26,7 @@ from .redox_potential import *
26
26
  from .scan import *
27
27
  from .solubility import *
28
28
  from .spin_states import *
29
+ from .strain import *
29
30
  from .tautomer import *
30
31
  from .workflow import *
31
32
 
@@ -54,6 +55,7 @@ WORKFLOW_NAME = Literal[
54
55
  "scan",
55
56
  "solubility",
56
57
  "spin_states",
58
+ "strain",
57
59
  "tautomers",
58
60
  ]
59
61
 
@@ -82,5 +84,6 @@ WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
82
84
  "scan": ScanWorkflow, # type: ignore [dict-item]
83
85
  "solubility": SolubilityWorkflow, # type: ignore [dict-item]
84
86
  "spin_states": SpinStatesWorkflow, # type: ignore [dict-item]
87
+ "strain": StrainWorkflow, # type: ignore [dict-item]
85
88
  "tautomers": TautomerWorkflow, # type: ignore [dict-item]
86
89
  }
@@ -255,7 +255,41 @@ class iMTDsMTDSettings(iMTDSettings):
255
255
  run_type: str = "imtd-smtd"
256
256
 
257
257
 
258
- ConformerGenSettingsUnion = Annotated[ETKDGSettings | iMTDSettings, Field(discriminator="settings_type")]
258
+ class LyrebirdSettings(ConformerGenSettings):
259
+ """
260
+ Settings for Lyrebird-based conformer generation.
261
+
262
+ Inherited:
263
+ :param mode: Mode for calculations
264
+ :param conf_opt_method: method for the optimization
265
+ :param screening: post-generation screening settings
266
+ :param constraints: constraints for conformer generation
267
+ :param nci: add a constraining potential for non-covalent interactions (not supported in ETKDG)
268
+ :param max_confs: maximum number of conformers to keep
269
+
270
+ New:
271
+ :param num_initial_confs: number of initial conformers to generate
272
+ """
273
+
274
+ num_initial_confs: int = 300
275
+ settings_type: Literal["lyrebird"] = "lyrebird"
276
+
277
+ @field_validator("constraints")
278
+ def check_constraints(cls, constraints: Sequence[Constraint]) -> Sequence[Constraint]:
279
+ if constraints:
280
+ raise ValueError("Lyrebird does not support constraints")
281
+
282
+ return tuple(constraints)
283
+
284
+ @field_validator("nci")
285
+ def check_nci(cls, nci: bool) -> bool:
286
+ if nci:
287
+ raise ValueError("Lyrebird does not support NCI")
288
+
289
+ return nci
290
+
291
+
292
+ ConformerGenSettingsUnion = Annotated[ETKDGSettings | iMTDSettings | LyrebirdSettings, Field(discriminator="settings_type")]
259
293
 
260
294
 
261
295
  class ConformerGenMixin(BaseModel):
@@ -1,6 +1,6 @@
1
1
  """Docking workflow."""
2
2
 
3
- from typing import Annotated, Self
3
+ from typing import Annotated, Self, TypeAlias
4
4
 
5
5
  from pydantic import AfterValidator, ConfigDict, field_validator, model_validator
6
6
 
@@ -10,18 +10,26 @@ from ..types import UUID, Vector3D
10
10
  from .conformer_search import ConformerGenSettingsUnion, ETKDGSettings
11
11
  from .workflow import MoleculeWorkflow
12
12
 
13
+ ProteinUUID: TypeAlias = UUID
14
+ CalculationUUID: TypeAlias = UUID
15
+
13
16
 
14
17
  class Score(Base):
15
18
  """
16
19
  Pose with its score.
17
20
 
18
- :param pose: conformation of the ligand when docked
21
+ :param pose: conformation of the ligand when docked (calculation UUID)
22
+ :param complex_pdb: the UUID of the protein–ligand complex (protein UUID)
19
23
  :param score: score of the pose, in kcal/mol
24
+ :param posebusters_valid: whether or not the ligand pose passes the PoseBusters tests
25
+ :param strain: strain in kcal/mol
20
26
  """
21
27
 
22
- pose: UUID | None # for calculation
28
+ pose: CalculationUUID | None
29
+ complex_pdb: ProteinUUID | None
23
30
  score: Annotated[float, AfterValidator(round_float(3))]
24
31
  posebusters_valid: bool
32
+ strain: float | None
25
33
 
26
34
 
27
35
  class DockingSettings(Base):
@@ -78,17 +86,14 @@ class DockingWorkflow(MoleculeWorkflow):
78
86
  target_uuid: UUID | None = None
79
87
  pocket: tuple[Vector3D, Vector3D]
80
88
 
89
+ docking_settings: VinaSettings = VinaSettings()
90
+
81
91
  do_csearch: bool = True
82
92
  conformer_gen_settings: ConformerGenSettingsUnion = ETKDGSettings(mode="reckless")
83
-
84
93
  do_optimization: bool = True
85
- # optimization_settings - here in future once we have a cleaner mode sol'n, ccw 7.9.25
86
-
87
- docking_settings: VinaSettings = VinaSettings()
88
-
89
94
  do_pose_refinement: bool = True
90
95
 
91
- conformers: list[UUID] = []
96
+ conformers: list[CalculationUUID] = []
92
97
  scores: list[Score] = []
93
98
 
94
99
  def __str__(self) -> str:
@@ -9,7 +9,7 @@ from ..mode import Mode
9
9
  from ..settings import Settings
10
10
  from ..solvent import Solvent
11
11
  from ..types import UUID, round_list
12
- from .conformer_search import ConformerGenSettings, iMTDSettings
12
+ from .conformer_search import ConformerGenSettingsUnion, iMTDSettings
13
13
  from .multistage_opt import MultiStageOptSettings
14
14
  from .workflow import MoleculeWorkflow
15
15
 
@@ -58,7 +58,7 @@ class NMRSpectroscopyWorkflow(MoleculeWorkflow):
58
58
  nmr_method: NMRMethod = NMRMethod.MAGNETZERO
59
59
  solvent: Solvent = Solvent.CHLOROFORM
60
60
 
61
- conf_gen_settings: ConformerGenSettings | None = iMTDSettings(mode="careful")
61
+ conf_gen_settings: ConformerGenSettingsUnion | None = iMTDSettings(mode="careful")
62
62
  multistage_opt_settings: MultiStageOptSettings | None = MultiStageOptSettings(
63
63
  mode=Mode.MANUAL,
64
64
  optimization_settings=[Settings(method="aimnet2_wb97md3", tasks=["optimize"])],
@@ -0,0 +1,115 @@
1
+ """pKa workflow."""
2
+
3
+ from typing import Annotated, Optional, Self
4
+
5
+ from pydantic import AfterValidator, model_validator
6
+
7
+ from ..base import Base, LowercaseStrEnum, round_float, round_optional_float
8
+ from ..mode import Mode
9
+ from ..solvent import Solvent
10
+ from .workflow import DBCalculation, MoleculeWorkflow, SMILESWorkflow
11
+
12
+ CHEMPROP_NEVOLIANUS2025_ALLOWED_SOLVENTS = {
13
+ Solvent.WATER,
14
+ Solvent.DIMETHYLSULFOXIDE,
15
+ Solvent.DIMETHYLFORMAMIDE,
16
+ Solvent.ACETONITRILE,
17
+ Solvent.METHANOL,
18
+ Solvent.ETHANOL,
19
+ Solvent.ETHYLENE_GLYCOL,
20
+ Solvent.N_METHYLPYRROLIDONE,
21
+ }
22
+
23
+
24
+ class MicroscopicpKaMethod(LowercaseStrEnum):
25
+ AIMNET2_WAGEN2024 = "aimnet2_wagen2024"
26
+ CHEMPROP_NEVOLIANUS2025 = "chemprop_nevolianus2025"
27
+
28
+
29
+ class pKaMicrostate(Base):
30
+ """
31
+ A microstate for pKa calculations.
32
+
33
+ :param atom_index: index of the atom
34
+ :param smiles: SMILES of the microstate
35
+ :param structures: DBCalculation for the microstate
36
+ :param deltaG: relative free energy
37
+ :param pka: pKa
38
+ :uncertainty: uncertainty
39
+ """
40
+
41
+ atom_index: int
42
+ smiles: Optional[str]
43
+ structures: list[DBCalculation] = []
44
+ deltaG: Annotated[Optional[float], AfterValidator(round_optional_float(3))] = None
45
+ pka: Annotated[float, AfterValidator(round_float(3))]
46
+ uncertainty: Annotated[Optional[float], AfterValidator(round_optional_float(3))] = None
47
+
48
+
49
+ class pKaWorkflow(SMILESWorkflow, MoleculeWorkflow):
50
+ """
51
+ Workflow for calculating pKa.
52
+
53
+ Inherited:
54
+ :param initial_molecule: Molecule of interest
55
+ :param mode: Mode for workflow
56
+ :param initial_smiles: SMILES of the molecule of interest
57
+
58
+ New:
59
+ :param microscopic_pka_method: method used for pka prediciton
60
+ :param solvent: solvent for the pka prediction
61
+ :param pka_range: range of pKa values to consider
62
+ :param deprotonate_elements: elements to deprotonate
63
+ :param deprotonate_atoms: atoms to deprotonate
64
+ :param protonate_elements: elements to protonate
65
+ :param protonate_atoms: atom indices to protonate
66
+ :param reasonableness_buffer: buffer for pKa reasonableness
67
+
68
+ Results:
69
+ :param structures: DBCalculations for the microstates
70
+ :param conjugate_acids: conjugate acid microstates
71
+ :param conjugate_bases: conjugate base microstates
72
+ :param strongest_acid: pKa of the strongest acid
73
+ :param strongest_base: pKa of the strongest base
74
+ """
75
+
76
+ mode: Mode = Mode.CAREFUL
77
+
78
+ microscopic_pka_method: MicroscopicpKaMethod = MicroscopicpKaMethod.CHEMPROP_NEVOLIANUS2025
79
+ solvent: Solvent = Solvent.WATER
80
+ pka_range: tuple[float, float] = (2, 12)
81
+ deprotonate_elements: list[int] = [7, 8, 16]
82
+ deprotonate_atoms: list[int] = []
83
+ protonate_elements: list[int] = [7]
84
+ protonate_atoms: list[int] = []
85
+
86
+ reasonableness_buffer: float = 5
87
+
88
+ structures: list[DBCalculation] = []
89
+ conjugate_acids: list[pKaMicrostate] = []
90
+ conjugate_bases: list[pKaMicrostate] = []
91
+ strongest_acid: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
92
+ strongest_base: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
93
+
94
+ @model_validator(mode="after")
95
+ def check_method_settings(self) -> Self:
96
+ """Check that models with limited domain of applicability are predicting within correct domain."""
97
+ match self.microscopic_pka_method:
98
+ case MicroscopicpKaMethod.AIMNET2_WAGEN2024:
99
+ if self.solvent is not Solvent.WATER:
100
+ raise ValueError(f"{self.microscopic_pka_method} only supports water")
101
+ case MicroscopicpKaMethod.CHEMPROP_NEVOLIANUS2025:
102
+ if self.solvent not in CHEMPROP_NEVOLIANUS2025_ALLOWED_SOLVENTS:
103
+ raise ValueError(f"Solvent `{self.solvent}` is not supported by method `{self.microscopic_pka_method}`.")
104
+ if len(self.protonate_atoms) or len(self.deprotonate_atoms):
105
+ raise ValueError(f"Method `{self.microscopic_pka_method}` does not support selecting atoms by number.")
106
+ return self
107
+
108
+ @model_validator(mode="after")
109
+ def validate_mol_input(self) -> Self:
110
+ """Ensure that only one of initial_molecule or initial_smiles is set."""
111
+
112
+ if not (bool(self.initial_smiles) ^ bool(self.initial_molecule)):
113
+ raise ValueError("Can only set one of initial_molecule should and initial_smiles")
114
+
115
+ return self
@@ -1,13 +1,16 @@
1
- """Protein Cofolding Workflow."""
1
+ """Protein cofolding Workflow."""
2
2
 
3
- from typing import Annotated, Literal
3
+ from typing import Annotated, Literal, TypeAlias
4
4
 
5
5
  from pydantic import AfterValidator, BaseModel, ConfigDict
6
6
 
7
- from ..base import LowercaseStrEnum, round_float
7
+ from ..base import LowercaseStrEnum, round_float, round_optional_float
8
8
  from ..types import UUID, round_list
9
9
  from .workflow import FASTAWorkflow
10
10
 
11
+ ProteinUUID: TypeAlias = UUID
12
+ CalculationUUID: TypeAlias = UUID
13
+
11
14
 
12
15
  class CofoldingModel(LowercaseStrEnum):
13
16
  """Cofolding model to be used for prediction."""
@@ -45,6 +48,8 @@ class PocketConstraint(BaseModel):
45
48
 
46
49
 
47
50
  class CofoldingScores(BaseModel):
51
+ """The output scores from co-folding scores."""
52
+
48
53
  confidence_score: Annotated[float, AfterValidator(round_float(3))]
49
54
  ptm: Annotated[float, AfterValidator(round_float(3))] # predicted template modeling score
50
55
  iptm: Annotated[float, AfterValidator(round_float(3))] # interface predicted template modeling score
@@ -71,7 +76,17 @@ class ProteinCofoldingWorkflow(FASTAWorkflow):
71
76
  New:
72
77
  :param use_msa_server: whether to use the MSA server
73
78
  :param use_templates_server: whether to use the templates server
79
+ :param use_potentials: whether to use the potentials (inference-time steering) with Boltz
80
+ :param contact_constraints: Boltz contact constraints
81
+ :param pocket_constraints: Boltz pocket constraints
82
+ :param do_pose_refinement: whether to optimize non-rotatable bonds in output poses
83
+ :param compute_strain: whether to compute the strain of the pose (if `pose_refinement` is enabled)
84
+ :param model: which cofolding model to use
85
+ :param affinity_score: the affinity score
86
+ :param lddt: the local distance different test result
74
87
  :param predicted_structure_uuid: UUID of the predicted structure
88
+ :param scores: the output cofolding scores
89
+ :param pose: the UUID of the calculation pose
75
90
  """
76
91
 
77
92
  model_config = ConfigDict(validate_assignment=True)
@@ -81,9 +96,15 @@ class ProteinCofoldingWorkflow(FASTAWorkflow):
81
96
  use_potentials: bool = False
82
97
  contact_constraints: list[ContactConstraint] = []
83
98
  pocket_constraints: list[PocketConstraint] = []
99
+ do_pose_refinement: bool = False
100
+ compute_strain: bool = False
84
101
 
85
- predicted_structure_uuid: UUID | None = None
86
- scores: CofoldingScores | None = None
87
102
  model: CofoldingModel = CofoldingModel.BOLTZ_2
88
103
  affinity_score: AffinityScore | None = None
89
104
  lddt: Annotated[list[float] | None, AfterValidator(round_list(3))] = None
105
+
106
+ predicted_structure_uuid: ProteinUUID | None = None
107
+ scores: CofoldingScores | None = None
108
+ pose: CalculationUUID | None = None
109
+ posebusters_valid: bool | None = None
110
+ strain: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
@@ -41,6 +41,7 @@ class SolubilityWorkflow(SMILESWorkflow):
41
41
 
42
42
  Inputs:
43
43
  :param initial_smiles: SMILES string of the molecule
44
+ :param solubility_method: model used for solubility prediction
44
45
  :param solvents: list of solvent SMILES strings
45
46
  :param temperatures: temperatures in K
46
47
 
@@ -48,8 +49,8 @@ class SolubilityWorkflow(SMILESWorkflow):
48
49
  :param solubilities: {solvent: SolubilityResult}
49
50
  """
50
51
 
51
- solubility_method: SolubilityMethod = SolubilityMethod.FASTSOLV
52
52
  initial_smiles: str
53
+ solubility_method: SolubilityMethod = SolubilityMethod.FASTSOLV
53
54
  solvents: list[str] = ["O"]
54
55
  temperatures: list[float] = [298.15]
55
56
 
@@ -0,0 +1,46 @@
1
+ from typing import Annotated
2
+
3
+ from pydantic import AfterValidator
4
+
5
+ from ..base import round_float, round_optional_float
6
+ from ..mode import Mode
7
+ from ..settings import Settings
8
+ from ..types import UUID
9
+ from .conformer_search import ConformerGenSettingsUnion, ETKDGSettings
10
+ from .multistage_opt import MultiStageOptSettings
11
+ from .workflow import MoleculeWorkflow
12
+
13
+
14
+ class StrainWorkflow(MoleculeWorkflow):
15
+ """
16
+ Workflow for calculating the strain of a given molecular geometry.
17
+
18
+ Inherited:
19
+ :param initial_molecule: Molecule of interest
20
+ :param mode: Mode for workflow (currently unused)
21
+
22
+ New:
23
+ :param conf_gen_settings : the conformer-search settings.
24
+ :param multistage_opt_settings: the optimization settings.
25
+ :param harmonic_constraint_spring_constant: the spring constant for the constraints in kcal/mol/Å
26
+ :param constrain_hydrogens: whether or not to constrain hydrogens
27
+
28
+ Results:
29
+ :param conformers: list of conformer UUIDs
30
+ :param constrained_optimization: the UUID of the optimized strained structure
31
+ :param strain: the actual strain in kcal/mol
32
+ """
33
+
34
+ conf_gen_settings: ConformerGenSettingsUnion = ETKDGSettings(mode="rapid")
35
+ multistage_opt_settings: MultiStageOptSettings = MultiStageOptSettings(
36
+ mode=Mode.MANUAL,
37
+ optimization_settings=[Settings(method="aimnet2_wb97md3", tasks=["optimize"])],
38
+ singlepoint_settings=Settings(method="aimnet2_wb97md3", tasks=["energy"], solvent_settings={"solvent": "water", "model": "cpcmx"}),
39
+ )
40
+
41
+ harmonic_constraint_spring_constant: Annotated[float, AfterValidator(round_float(3))] = 5.0
42
+ constrain_hydrogens: bool = False
43
+
44
+ constrained_optimization: UUID | None = None
45
+ conformers: list[UUID | None] = []
46
+ strain: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.104
3
+ Version: 0.0.106
4
4
  Summary: standardized JSON atom/molecule encoding scheme
5
5
  Author-email: Corin Wagen <corin@rowansci.com>
6
6
  Project-URL: Homepage, https://github.com/rowansci/stjames
@@ -70,6 +70,7 @@ stjames/workflows/redox_potential.py
70
70
  stjames/workflows/scan.py
71
71
  stjames/workflows/solubility.py
72
72
  stjames/workflows/spin_states.py
73
+ stjames/workflows/strain.py
73
74
  stjames/workflows/tautomer.py
74
75
  stjames/workflows/workflow.py
75
76
  tests/test_constraints.py
@@ -1,66 +0,0 @@
1
- """pKa workflow."""
2
-
3
- from typing import Annotated
4
-
5
- from pydantic import AfterValidator
6
-
7
- from ..base import Base, round_float, round_optional_float
8
- from ..mode import Mode
9
- from .workflow import DBCalculation, MoleculeWorkflow
10
-
11
-
12
- class pKaMicrostate(Base):
13
- """
14
- A microstate for pKa calculations.
15
-
16
- :param atom_index: index of the atom
17
- :param structures: DBCalculation for the microstate
18
- :param deltaG: relative free energy
19
- :param pka: pKa
20
- """
21
-
22
- atom_index: int
23
- structures: list[DBCalculation] = []
24
- deltaG: Annotated[float, AfterValidator(round_float(3))]
25
- pka: Annotated[float, AfterValidator(round_float(3))]
26
-
27
-
28
- class pKaWorkflow(MoleculeWorkflow):
29
- """
30
- Workflow for calculating pKa.
31
-
32
- Inherited:
33
- :param initial_molecule: Molecule of interest
34
- :param mode: Mode for workflow
35
-
36
- New:
37
- :param pka_range: range of pKa values to consider
38
- :param deprotonate_elements: elements to deprotonate
39
- :param deprotonate_atoms: atoms to deprotonate
40
- :param protonate_elements: elements to protonate
41
- :param protonate_atoms: atom indices to protonate
42
- :param reasonableness_buffer: buffer for pKa reasonableness
43
-
44
- Results:
45
- :param structures: DBCalculations for the microstates
46
- :param conjugate_acids: conjugate acid microstates
47
- :param conjugate_bases: conjugate base microstates
48
- :param strongest_acid: pKa of the strongest acid
49
- :param strongest_base: pKa of the strongest base
50
- """
51
-
52
- mode: Mode = Mode.CAREFUL
53
-
54
- pka_range: tuple[float, float] = (2, 12)
55
- deprotonate_elements: list[int] = [7, 8, 16]
56
- deprotonate_atoms: list[int] = []
57
- protonate_elements: list[int] = [7]
58
- protonate_atoms: list[int] = []
59
-
60
- reasonableness_buffer: float = 5
61
-
62
- structures: list[DBCalculation] = []
63
- conjugate_acids: list[pKaMicrostate] = []
64
- conjugate_bases: list[pKaMicrostate] = []
65
- strongest_acid: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
66
- strongest_base: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes