stjames 0.0.97__tar.gz → 0.0.99__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.
- {stjames-0.0.97/stjames.egg-info → stjames-0.0.99}/PKG-INFO +1 -1
- {stjames-0.0.97 → stjames-0.0.99}/pyproject.toml +1 -1
- {stjames-0.0.97 → stjames-0.0.99}/stjames/engine.py +1 -1
- {stjames-0.0.97 → stjames-0.0.99}/stjames/method.py +21 -26
- stjames-0.0.99/stjames/optimization/freezing_string_method.py +56 -0
- stjames-0.0.99/stjames/py.typed +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/docking.py +2 -3
- stjames-0.0.99/stjames/workflows/double_ended_ts_search.py +77 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/fukui.py +19 -7
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/molecular_dynamics.py +10 -2
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/nmr.py +1 -1
- {stjames-0.0.97 → stjames-0.0.99/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.97 → stjames-0.0.99}/stjames.egg-info/SOURCES.txt +3 -0
- {stjames-0.0.97 → stjames-0.0.99}/LICENSE +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/README.md +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/setup.cfg +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/__init__.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atom.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atomium_stjames/__init__.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atomium_stjames/data.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atomium_stjames/mmcif.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atomium_stjames/pdb.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/atomium_stjames/utilities.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/base.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/basis_set.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/calculation.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/compute_settings.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/constraint.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/correction.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/__init__.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/bragg_radii.json +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/elements.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/isotopes.json +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/nist_isotopes.json +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/read_nist_isotopes.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/data/symbol_element.json +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/message.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/mode.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/molecule.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/opt_settings.py +0 -0
- /stjames-0.0.97/stjames/py.typed → /stjames-0.0.99/stjames/optimization/__init__.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/pdb.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/periodic_cell.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/scf_settings.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/settings.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/solvent.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/status.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/task.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/types.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/__init__.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/admet.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/basic_calculation.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/bde.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/conformer.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/conformer_search.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/descriptors.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/electronic_properties.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/ion_mobility.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/irc.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/macropka.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/multistage_opt.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/pka.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/pose_analysis_md.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/protein_cofolding.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/redox_potential.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/scan.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/solubility.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/spin_states.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/tautomer.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames/workflows/workflow.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/stjames.egg-info/top_level.txt +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_constraints.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_from_extxyz.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_molecule.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_pdb.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_rounding.py +0 -0
- {stjames-0.0.97 → stjames-0.0.99}/tests/test_settings.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import Literal
|
|
2
2
|
|
|
3
3
|
from .base import LowercaseStrEnum
|
|
4
|
+
from .engine import Engine
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class Method(LowercaseStrEnum):
|
|
@@ -55,48 +56,42 @@ class Method(LowercaseStrEnum):
|
|
|
55
56
|
EGRET_1E = "egret_1e"
|
|
56
57
|
EGRET_1T = "egret_1t"
|
|
57
58
|
|
|
58
|
-
def default_engine(self, *, is_periodic: bool = False) ->
|
|
59
|
+
def default_engine(self, *, is_periodic: bool = False) -> Engine:
|
|
59
60
|
"""
|
|
60
|
-
Return the canonical
|
|
61
|
+
Return the canonical Engine for this quantum-chemistry method.
|
|
61
62
|
|
|
62
63
|
:param bool is_periodic:
|
|
63
64
|
If ``True`` **and** the method is in the XTB family, return
|
|
64
65
|
``"tblite"`` (periodic-capable backend) instead of ``"xtb"``.
|
|
65
|
-
:returns:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Method.GFN2_XTB.default_engine()
|
|
75
|
-
# 'xtb'
|
|
76
|
-
|
|
77
|
-
Method.GFN2_XTB.default_engine(is_periodic=True)
|
|
78
|
-
# 'tblite'
|
|
66
|
+
:returns: lower-case engine identifier (e.g. ``"psi4"``, ``"mace"``).
|
|
67
|
+
|
|
68
|
+
>>> Method.MACE_MP_0B2_L.default_engine().value
|
|
69
|
+
'mace'
|
|
70
|
+
>>> Method.GFN2_XTB.default_engine().value
|
|
71
|
+
'xtb'
|
|
72
|
+
>>> Method.GFN2_XTB.default_engine(is_periodic=True).value
|
|
73
|
+
'tblite'
|
|
79
74
|
"""
|
|
80
75
|
match self:
|
|
81
76
|
case Method.AIMNET2_WB97MD3:
|
|
82
|
-
return
|
|
77
|
+
return Engine.AIMNET2
|
|
83
78
|
case Method.MACE_MP_0B2_L:
|
|
84
|
-
return
|
|
79
|
+
return Engine.MACE
|
|
85
80
|
case Method.OCP24_S | Method.OCP24_L:
|
|
86
|
-
return
|
|
81
|
+
return Engine.OCP24
|
|
87
82
|
case Method.OMOL25_CONSERVING_S | Method.UMA_M_OMOL | Method.UMA_S_OMOL:
|
|
88
|
-
return
|
|
83
|
+
return Engine.OMOL25
|
|
89
84
|
case Method.ORB_V3_CONSERVATIVE_INF_OMAT:
|
|
90
|
-
return
|
|
91
|
-
case
|
|
92
|
-
return
|
|
85
|
+
return Engine.ORB
|
|
86
|
+
case method if method in XTB_METHODS:
|
|
87
|
+
return Engine.TBLITE if is_periodic else Engine.XTB
|
|
93
88
|
case Method.OFF_SAGE_2_2_1:
|
|
94
|
-
return
|
|
89
|
+
return Engine.OPENFF
|
|
95
90
|
case Method.EGRET_1 | Method.EGRET_1E | Method.EGRET_1T:
|
|
96
|
-
return
|
|
91
|
+
return Engine.EGRET
|
|
97
92
|
case _:
|
|
98
93
|
# All remaining methods (HF, DFT, composite, etc.) fall back to Psi4
|
|
99
|
-
return
|
|
94
|
+
return Engine.PSI4
|
|
100
95
|
|
|
101
96
|
|
|
102
97
|
PrepackagedNNPMethod = Literal[
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Settings for the Freezing String Method (FSM)."""
|
|
2
|
+
|
|
3
|
+
from typing import Annotated, Self
|
|
4
|
+
|
|
5
|
+
from pydantic import AfterValidator, BaseModel, PositiveFloat, PositiveInt, model_validator
|
|
6
|
+
|
|
7
|
+
from ..base import LowercaseStrEnum, round_float
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FSMOptimizationCoordinates(LowercaseStrEnum):
|
|
11
|
+
"""Coordinate systems for FSM optimization step."""
|
|
12
|
+
|
|
13
|
+
CARTESIAN = "cartesian"
|
|
14
|
+
REDUNDANT_INTERNAL_COORDINATES = "redundant_internal_coordinates"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FSMInterpolation(LowercaseStrEnum):
|
|
18
|
+
"""Methods for FSM interpolation step."""
|
|
19
|
+
|
|
20
|
+
CARTESIAN = "cartesian"
|
|
21
|
+
LINEAR_SYNCHRONOUS_TRANSIT = "linear_synchronous_transit"
|
|
22
|
+
REDUNDANT_INTERNAL_COORDINATES = "redundant_internal_coordinates"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class FSMSettings(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Settings for the Freezing String Method (FSM) TS search.
|
|
28
|
+
|
|
29
|
+
:param opt_coords: coordinate system to use for optimization
|
|
30
|
+
:param interpolation_method: method to use for interpolation between nodes
|
|
31
|
+
:param min_num_nodes: minimum number of nodes to use in the string
|
|
32
|
+
:param num_interpolation_points: number of interpolation points to use between end nodes
|
|
33
|
+
:param max_optimizer_iterations: maximum number of optimizer iterations to perform (scipy.minimize maxiter)
|
|
34
|
+
:param max_line_search_steps: maximum number of line search steps to perform (scipy.minimize maxls)
|
|
35
|
+
:param max_displacement: maximum displacement for a single coordinate (Å for distances, internally converted for angles)
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
optimization_coordinates: FSMOptimizationCoordinates = FSMOptimizationCoordinates.CARTESIAN
|
|
39
|
+
interpolation_method: FSMInterpolation = FSMInterpolation.REDUNDANT_INTERNAL_COORDINATES
|
|
40
|
+
|
|
41
|
+
min_num_nodes: PositiveInt = 18
|
|
42
|
+
num_interpolation_points: PositiveInt = 100
|
|
43
|
+
|
|
44
|
+
max_optimizer_iterations: PositiveInt = 3
|
|
45
|
+
max_line_search_steps: PositiveInt = 2
|
|
46
|
+
max_displacement: Annotated[PositiveFloat, AfterValidator(round_float(3))] = 0.3
|
|
47
|
+
|
|
48
|
+
@model_validator(mode="after")
|
|
49
|
+
def sanity_check(self) -> Self:
|
|
50
|
+
"""Sanity check for settings."""
|
|
51
|
+
if self.min_num_nodes < 5:
|
|
52
|
+
raise ValueError("Must have at least 5 nodes for the Freezing String Method.")
|
|
53
|
+
if self.max_displacement < 0.001:
|
|
54
|
+
raise ValueError("Maximum displacement must be at least 0.001 Å.")
|
|
55
|
+
|
|
56
|
+
return self
|
|
File without changes
|
|
@@ -58,11 +58,10 @@ class DockingWorkflow(MoleculeWorkflow):
|
|
|
58
58
|
:param mode: Mode for workflow (currently unused)
|
|
59
59
|
|
|
60
60
|
New:
|
|
61
|
-
:param docking_engine: which docking method to use
|
|
62
61
|
:param do_csearch: whether to csearch starting structures
|
|
63
|
-
:param
|
|
62
|
+
:param conformer_gen_settings: settings for initial conformer search.
|
|
64
63
|
:param do_optimization: whether to optimize starting structures
|
|
65
|
-
:param
|
|
64
|
+
:param optimization_settings: settings for conformer optimization.
|
|
66
65
|
:param do_pose_refinement: whether to optimize non-rotatable bonds in output poses
|
|
67
66
|
:param target: PDB of the protein.
|
|
68
67
|
:param target_uuid: UUID of the protein.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Double ended transition-state-search workflow."""
|
|
2
|
+
|
|
3
|
+
from typing import Annotated, Self
|
|
4
|
+
|
|
5
|
+
from pydantic import AfterValidator, PositiveFloat, model_validator
|
|
6
|
+
|
|
7
|
+
from ..molecule import Molecule
|
|
8
|
+
from ..optimization.freezing_string_method import FSMSettings
|
|
9
|
+
from ..settings import Settings
|
|
10
|
+
from ..types import UUID, round_list
|
|
11
|
+
from .workflow import Workflow
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DoubleEndedTSSearchWorkflow(Workflow):
|
|
15
|
+
"""
|
|
16
|
+
Settings for running a double-ended-transition-state-search Workflow.
|
|
17
|
+
|
|
18
|
+
# Inputs
|
|
19
|
+
:param reactant: reactant Molecule
|
|
20
|
+
:param product: product Molecule
|
|
21
|
+
:param calculation_settings: Settings for the calculations
|
|
22
|
+
:param search_settings: Settings for the search
|
|
23
|
+
:param optimize_inputs: Whether to optimize the input reactant and product
|
|
24
|
+
:param optimize_ts: Whether to optimize the guess transition state
|
|
25
|
+
|
|
26
|
+
# Results
|
|
27
|
+
:param forward_string_distances: distances along the string
|
|
28
|
+
:param backward_string_distances: distances along the backward string (starting from the end of the forward string)
|
|
29
|
+
:param forward_calculation_uuids: UUIDs of the calculations for the forward string nodes
|
|
30
|
+
:param backward_calculation_uuids: UUIDs of the calculations for the backward string nodes
|
|
31
|
+
:param ts_guess_calculation_uuid: UUID of the calculation for the guess (or optimized) transition state
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
reactant: Molecule
|
|
35
|
+
product: Molecule
|
|
36
|
+
|
|
37
|
+
calculation_settings: Settings
|
|
38
|
+
search_settings: FSMSettings
|
|
39
|
+
optimize_inputs: bool = False
|
|
40
|
+
optimize_ts: bool = True
|
|
41
|
+
|
|
42
|
+
# Results
|
|
43
|
+
forward_string_distances: Annotated[list[PositiveFloat], AfterValidator(round_list(5))] = []
|
|
44
|
+
backward_string_distances: Annotated[list[PositiveFloat], AfterValidator(round_list(5))] = []
|
|
45
|
+
|
|
46
|
+
forward_calculation_uuids: list[UUID | None] = []
|
|
47
|
+
backward_calculation_uuids: list[UUID | None] = []
|
|
48
|
+
|
|
49
|
+
ts_guess_calculation_uuid: UUID | None = None
|
|
50
|
+
|
|
51
|
+
@model_validator(mode="after")
|
|
52
|
+
def validate_input_molecules(self) -> Self:
|
|
53
|
+
"""Validate that reactant and product are compatible."""
|
|
54
|
+
|
|
55
|
+
if self.reactant.charge != self.product.charge:
|
|
56
|
+
raise ValueError("Reactant and product must have the same charge.")
|
|
57
|
+
if self.reactant.multiplicity != self.product.multiplicity:
|
|
58
|
+
raise ValueError("Reactant and product must have the same multiplicity.")
|
|
59
|
+
|
|
60
|
+
if len(self.reactant) != len(self.product):
|
|
61
|
+
raise ValueError("Reactant and product must have the same number of atoms.")
|
|
62
|
+
|
|
63
|
+
for r_atom, p_atom in zip(self.reactant.atoms, self.product.atoms, strict=True):
|
|
64
|
+
if r_atom.atomic_number != p_atom.atomic_number:
|
|
65
|
+
raise ValueError("Reactant and product must have the same atom ordering.")
|
|
66
|
+
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def path_uuids(self) -> list[UUID | None]:
|
|
71
|
+
"""Return the path from reactant to product."""
|
|
72
|
+
return self.forward_calculation_uuids + self.backward_calculation_uuids
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def distances(self) -> list[float]:
|
|
76
|
+
"""Return the path from reactant to product."""
|
|
77
|
+
return self.forward_string_distances + self.backward_string_distances[::-1]
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"""Fukui index workflow."""
|
|
2
2
|
|
|
3
|
-
from typing import Annotated
|
|
3
|
+
from typing import Annotated, Self
|
|
4
4
|
|
|
5
|
-
from pydantic import AfterValidator
|
|
5
|
+
from pydantic import AfterValidator, model_validator
|
|
6
|
+
|
|
7
|
+
from stjames.method import Method
|
|
6
8
|
|
|
7
9
|
from ..base import round_optional_float
|
|
10
|
+
from ..engine import Engine
|
|
8
11
|
from ..settings import Settings
|
|
9
12
|
from ..types import UUID, FloatPerAtom, round_optional_float_per_atom
|
|
10
13
|
from .workflow import MoleculeWorkflow
|
|
@@ -20,9 +23,9 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
|
|
|
20
23
|
|
|
21
24
|
Settings:
|
|
22
25
|
:param opt_settings: if given, the settings for optimization. if none, no optimization will be conducted.
|
|
23
|
-
:param opt_engine: the engine for optimization
|
|
26
|
+
:param opt_engine: the engine for optimization [uses opt_settings.method.default_engine if not set]
|
|
24
27
|
:param fukui_settings: the settings for Fukui index calculations.
|
|
25
|
-
:param fukui_engine: the engine for Fukui index calculations
|
|
28
|
+
:param fukui_engine: the engine for Fukui index calculations [uses fukui_settings.method.default_engine if not set]
|
|
26
29
|
|
|
27
30
|
Results:
|
|
28
31
|
:param optimization: UUID of optimization
|
|
@@ -33,10 +36,10 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
|
|
|
33
36
|
"""
|
|
34
37
|
|
|
35
38
|
opt_settings: Settings | None = None
|
|
36
|
-
opt_engine:
|
|
39
|
+
opt_engine: Engine | None = None
|
|
37
40
|
|
|
38
|
-
fukui_settings: Settings = Settings(method=
|
|
39
|
-
fukui_engine:
|
|
41
|
+
fukui_settings: Settings = Settings(method=Method.GFN1_XTB)
|
|
42
|
+
fukui_engine: Engine = None # type: ignore [assignment]
|
|
40
43
|
|
|
41
44
|
optimization: UUID | None = None
|
|
42
45
|
|
|
@@ -44,3 +47,12 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
|
|
|
44
47
|
fukui_positive: Annotated[FloatPerAtom | None, AfterValidator(round_optional_float_per_atom(6))] = None
|
|
45
48
|
fukui_negative: Annotated[FloatPerAtom | None, AfterValidator(round_optional_float_per_atom(6))] = None
|
|
46
49
|
fukui_zero: Annotated[FloatPerAtom | None, AfterValidator(round_optional_float_per_atom(6))] = None
|
|
50
|
+
|
|
51
|
+
@model_validator(mode="after")
|
|
52
|
+
def set_engines(self) -> Self:
|
|
53
|
+
"""Set the engines for optimization and Fukui index calculations."""
|
|
54
|
+
if self.opt_settings is not None and self.opt_engine is None:
|
|
55
|
+
self.opt_engine = self.opt_settings.method.default_engine()
|
|
56
|
+
self.fukui_engine = self.fukui_engine or self.fukui_settings.method.default_engine()
|
|
57
|
+
|
|
58
|
+
return self
|
|
@@ -6,6 +6,7 @@ from pydantic import PositiveFloat, PositiveInt, computed_field, model_validator
|
|
|
6
6
|
|
|
7
7
|
from ..base import Base, LowercaseStrEnum
|
|
8
8
|
from ..constraint import PairwiseHarmonicConstraint, SphericalHarmonicConstraint
|
|
9
|
+
from ..engine import Engine
|
|
9
10
|
from ..settings import Settings
|
|
10
11
|
from ..types import UUID
|
|
11
12
|
from .workflow import MoleculeWorkflow
|
|
@@ -87,7 +88,7 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
|
|
|
87
88
|
New:
|
|
88
89
|
:param settings: settings for the molecular dynamics simulation
|
|
89
90
|
:param calc_settings: settings for the gradient calculation
|
|
90
|
-
:param calc_engine: engine to use for the gradient calculation
|
|
91
|
+
:param calc_engine: engine to use for the gradient calculation [uses calc_settings.method.default_engine() if not set]
|
|
91
92
|
|
|
92
93
|
Results:
|
|
93
94
|
:param frames: Frames from the MD
|
|
@@ -95,6 +96,13 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
|
|
|
95
96
|
|
|
96
97
|
settings: MolecularDynamicsSettings
|
|
97
98
|
calc_settings: Settings
|
|
98
|
-
calc_engine:
|
|
99
|
+
calc_engine: Engine = None # type: ignore[assignment]
|
|
99
100
|
|
|
100
101
|
frames: list[Frame] = []
|
|
102
|
+
|
|
103
|
+
@model_validator(mode="after")
|
|
104
|
+
def validate_calc_engine(self) -> Self:
|
|
105
|
+
"""Ensure that the calc_engine is set."""
|
|
106
|
+
self.calc_engine = self.calc_engine or self.calc_settings.method.default_engine()
|
|
107
|
+
|
|
108
|
+
return self
|
|
@@ -68,6 +68,6 @@ class NMRSpectroscopyWorkflow(MoleculeWorkflow):
|
|
|
68
68
|
boltzmann_weights: Annotated[list[float], AfterValidator(round_list(3))] = []
|
|
69
69
|
per_conformer_chemical_shifts: list[Annotated[list[float | None], AfterValidator(round_optional_list(3))]] = []
|
|
70
70
|
chemical_shifts: Annotated[list[float | None], AfterValidator(round_optional_list(3))] = []
|
|
71
|
-
symmetry_equivalent_nuclei:
|
|
71
|
+
symmetry_equivalent_nuclei: list[set[int]] = []
|
|
72
72
|
|
|
73
73
|
predicted_peaks: dict[int, list[NMRPeak]] = {}
|
|
@@ -43,6 +43,8 @@ stjames/data/isotopes.json
|
|
|
43
43
|
stjames/data/nist_isotopes.json
|
|
44
44
|
stjames/data/read_nist_isotopes.py
|
|
45
45
|
stjames/data/symbol_element.json
|
|
46
|
+
stjames/optimization/__init__.py
|
|
47
|
+
stjames/optimization/freezing_string_method.py
|
|
46
48
|
stjames/workflows/__init__.py
|
|
47
49
|
stjames/workflows/admet.py
|
|
48
50
|
stjames/workflows/basic_calculation.py
|
|
@@ -51,6 +53,7 @@ stjames/workflows/conformer.py
|
|
|
51
53
|
stjames/workflows/conformer_search.py
|
|
52
54
|
stjames/workflows/descriptors.py
|
|
53
55
|
stjames/workflows/docking.py
|
|
56
|
+
stjames/workflows/double_ended_ts_search.py
|
|
54
57
|
stjames/workflows/electronic_properties.py
|
|
55
58
|
stjames/workflows/fukui.py
|
|
56
59
|
stjames/workflows/hydrogen_bond_basicity.py
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|