stjames 0.0.120__tar.gz → 0.0.121__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.120/stjames.egg-info → stjames-0.0.121}/PKG-INFO +1 -1
- {stjames-0.0.120 → stjames-0.0.121}/pyproject.toml +1 -1
- {stjames-0.0.120 → stjames-0.0.121}/stjames/__init__.py +1 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/calculation.py +15 -2
- {stjames-0.0.120 → stjames-0.0.121}/stjames/settings.py +11 -2
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/basic_calculation.py +6 -1
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/fukui.py +6 -3
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/molecular_dynamics.py +3 -1
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/scan.py +12 -5
- {stjames-0.0.120 → stjames-0.0.121/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.120 → stjames-0.0.121}/LICENSE +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/README.md +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/setup.cfg +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atom.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atomium_stjames/__init__.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atomium_stjames/data.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atomium_stjames/mmcif.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atomium_stjames/pdb.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/atomium_stjames/utilities.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/base.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/basis_set.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/compute_settings.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/constraint.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/correction.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/__init__.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/bragg_radii.json +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/elements.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/isotopes.json +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/nist_isotopes.json +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/read_nist_isotopes.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/data/symbol_element.json +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/engine.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/message.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/method.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/mode.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/molecule.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/opt_settings.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/optimization/__init__.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/optimization/freezing_string_method.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/pdb.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/periodic_cell.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/py.typed +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/scf_settings.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/solvent.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/status.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/task.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/types.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/__init__.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/admet.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/batch_docking.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/bde.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/conformer.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/conformer_search.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/descriptors.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/docking.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/double_ended_ts_search.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/electronic_properties.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/ion_mobility.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/irc.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/macropka.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/multistage_opt.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/nmr.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/pka.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/pose_analysis_md.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/protein_binder_design.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/protein_cofolding.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/redox_potential.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/solubility.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/spin_states.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/strain.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/tautomer.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames/workflows/workflow.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames.egg-info/SOURCES.txt +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/stjames.egg-info/top_level.txt +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_constraints.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_from_extxyz.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_molecule.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_pdb.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_rounding.py +0 -0
- {stjames-0.0.120 → stjames-0.0.121}/tests/test_settings.py +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, Self
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from pydantic import model_validator
|
|
4
|
+
|
|
5
|
+
from .base import Base, LowercaseStrEnum, UniqueList
|
|
4
6
|
from .message import Message
|
|
5
7
|
from .molecule import Molecule
|
|
6
8
|
from .settings import Settings
|
|
7
9
|
from .status import Status
|
|
10
|
+
from .task import Task
|
|
8
11
|
from .types import UUID
|
|
9
12
|
|
|
10
13
|
|
|
@@ -20,6 +23,7 @@ class StJamesVersion(LowercaseStrEnum):
|
|
|
20
23
|
class Calculation(Base):
|
|
21
24
|
molecules: list[Molecule]
|
|
22
25
|
|
|
26
|
+
tasks: UniqueList[Task] = []
|
|
23
27
|
settings: Settings = Settings()
|
|
24
28
|
|
|
25
29
|
status: Status = Status.QUEUED
|
|
@@ -29,8 +33,17 @@ class Calculation(Base):
|
|
|
29
33
|
logfile: Optional[str] = None
|
|
30
34
|
messages: list[Message] = []
|
|
31
35
|
|
|
36
|
+
# DEPRECATED - moving into settings
|
|
32
37
|
engine: Optional[str] = "peregrine"
|
|
38
|
+
|
|
33
39
|
uuids: list[UUID | None] | None = None
|
|
34
40
|
|
|
35
41
|
# not to be changed by end users, diff. versions will have diff. defaults
|
|
36
42
|
json_format: str = StJamesVersion.V0
|
|
43
|
+
|
|
44
|
+
@model_validator(mode="after")
|
|
45
|
+
def populate_tasks(self) -> Self:
|
|
46
|
+
"""Set the tasks from the settings, so that we don't have to migrate old entries."""
|
|
47
|
+
if len(self.tasks) == 0:
|
|
48
|
+
self.tasks = self.settings.tasks
|
|
49
|
+
return self
|
|
@@ -6,6 +6,7 @@ from .base import Base, UniqueList
|
|
|
6
6
|
from .basis_set import BasisSet
|
|
7
7
|
from .compute_settings import ComputeSettings
|
|
8
8
|
from .correction import Correction
|
|
9
|
+
from .engine import Engine
|
|
9
10
|
from .method import CORRECTABLE_NNP_METHODS, METHODS_WITH_CORRECTION, PREPACKAGED_METHODS, Method
|
|
10
11
|
from .mode import Mode
|
|
11
12
|
from .opt_settings import OptimizationSettings
|
|
@@ -20,11 +21,13 @@ _T = TypeVar("_T")
|
|
|
20
21
|
class Settings(Base):
|
|
21
22
|
mode: Mode = Mode.AUTO
|
|
22
23
|
|
|
24
|
+
# DEPRECATED - specify tasks only in BasicCalculationWorkflow or Calculation now
|
|
25
|
+
tasks: UniqueList[Task] = [Task.ENERGY, Task.CHARGE, Task.DIPOLE]
|
|
26
|
+
|
|
23
27
|
method: Method = Method.HARTREE_FOCK
|
|
24
28
|
basis_set: Optional[BasisSet] = None
|
|
25
|
-
|
|
29
|
+
engine: Engine = None # type: ignore [assignment]
|
|
26
30
|
corrections: UniqueList[Correction] = []
|
|
27
|
-
|
|
28
31
|
solvent_settings: Optional[SolventSettings] = None
|
|
29
32
|
|
|
30
33
|
# scf/opt settings will be set automatically based on mode, but can be overridden manually
|
|
@@ -33,6 +36,12 @@ class Settings(Base):
|
|
|
33
36
|
thermochem_settings: ThermochemistrySettings = ThermochemistrySettings()
|
|
34
37
|
compute_settings: ComputeSettings = ComputeSettings()
|
|
35
38
|
|
|
39
|
+
@model_validator(mode="after")
|
|
40
|
+
def set_engine(self) -> Self:
|
|
41
|
+
"""Set the calculation engine."""
|
|
42
|
+
self.engine = self.engine or self.method.default_engine()
|
|
43
|
+
return self
|
|
44
|
+
|
|
36
45
|
# mypy has this dead wrong (https://docs.pydantic.dev/2.0/usage/computed_fields/)
|
|
37
46
|
# Python 3.12 narrows the reason for the ignore to prop-decorator
|
|
38
47
|
@computed_field # type: ignore[misc, prop-decorator, unused-ignore]
|
|
@@ -4,8 +4,10 @@ from typing import Self
|
|
|
4
4
|
|
|
5
5
|
from pydantic import model_validator
|
|
6
6
|
|
|
7
|
+
from ..base import UniqueList
|
|
7
8
|
from ..engine import Engine
|
|
8
9
|
from ..settings import Settings
|
|
10
|
+
from ..task import Task
|
|
9
11
|
from ..types import UUID
|
|
10
12
|
from .workflow import MoleculeWorkflow
|
|
11
13
|
|
|
@@ -25,9 +27,12 @@ class BasicCalculationWorkflow(MoleculeWorkflow):
|
|
|
25
27
|
"""
|
|
26
28
|
|
|
27
29
|
settings: Settings
|
|
28
|
-
|
|
30
|
+
tasks: UniqueList[Task] = [Task.ENERGY, Task.CHARGE, Task.DIPOLE]
|
|
29
31
|
calculation_uuid: UUID | None = None
|
|
30
32
|
|
|
33
|
+
# DEPRECATED - specify in settings now
|
|
34
|
+
engine: Engine = None # type: ignore [assignment]
|
|
35
|
+
|
|
31
36
|
@model_validator(mode="after")
|
|
32
37
|
def set_engine(self) -> Self:
|
|
33
38
|
"""Set the calculation engine."""
|
|
@@ -36,9 +36,13 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
|
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
38
|
opt_settings: Settings | None = None
|
|
39
|
+
|
|
40
|
+
# DEPRECATED - will be removed
|
|
39
41
|
opt_engine: Engine | None = None
|
|
40
42
|
|
|
41
43
|
fukui_settings: Settings = Settings(method=Method.GFN1_XTB)
|
|
44
|
+
|
|
45
|
+
# DEPRECATED - will be removed
|
|
42
46
|
fukui_engine: Engine = None # type: ignore [assignment]
|
|
43
47
|
|
|
44
48
|
optimization: UUID | None = None
|
|
@@ -52,7 +56,6 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
|
|
|
52
56
|
def set_engines(self) -> Self:
|
|
53
57
|
"""Set the engines for optimization and Fukui index calculations."""
|
|
54
58
|
if self.opt_settings is not None and self.opt_engine is None:
|
|
55
|
-
self.opt_engine = self.opt_settings.
|
|
56
|
-
self.fukui_engine = self.fukui_engine or self.fukui_settings.
|
|
57
|
-
|
|
59
|
+
self.opt_engine = self.opt_settings.engine
|
|
60
|
+
self.fukui_engine = self.fukui_engine or self.fukui_settings.engine
|
|
58
61
|
return self
|
|
@@ -96,6 +96,8 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
|
|
|
96
96
|
|
|
97
97
|
settings: MolecularDynamicsSettings
|
|
98
98
|
calc_settings: Settings
|
|
99
|
+
|
|
100
|
+
# DEPRECATED - will remove later
|
|
99
101
|
calc_engine: Engine = None # type: ignore[assignment]
|
|
100
102
|
|
|
101
103
|
frames: list[Frame] = []
|
|
@@ -103,6 +105,6 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
|
|
|
103
105
|
@model_validator(mode="after")
|
|
104
106
|
def validate_calc_engine(self) -> Self:
|
|
105
107
|
"""Ensure that the calc_engine is set."""
|
|
106
|
-
self.calc_engine = self.calc_engine or self.calc_settings.
|
|
108
|
+
self.calc_engine = self.calc_engine or self.calc_settings.engine
|
|
107
109
|
|
|
108
110
|
return self
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
from typing import Annotated
|
|
1
|
+
from typing import Annotated, Self
|
|
4
2
|
|
|
5
3
|
import numpy as np
|
|
6
4
|
from numpy.typing import NDArray
|
|
7
|
-
from pydantic import AfterValidator, field_validator
|
|
5
|
+
from pydantic import AfterValidator, field_validator, model_validator
|
|
8
6
|
|
|
9
7
|
from ..base import Base, round_optional_float
|
|
8
|
+
from ..engine import Engine
|
|
10
9
|
from ..molecule import Molecule
|
|
11
10
|
from ..settings import Settings
|
|
12
11
|
from ..types import UUID
|
|
@@ -75,7 +74,9 @@ class ScanWorkflow(MoleculeWorkflow):
|
|
|
75
74
|
scan_settings: ScanSettings | list[ScanSettings]
|
|
76
75
|
scan_settings_2d: ScanSettings | list[ScanSettings] = []
|
|
77
76
|
calc_settings: Settings
|
|
78
|
-
|
|
77
|
+
|
|
78
|
+
# DEPRECATED - will be removed in future
|
|
79
|
+
calc_engine: Engine = None # type: ignore [assignment]
|
|
79
80
|
|
|
80
81
|
wavefront_propagation: bool = True
|
|
81
82
|
|
|
@@ -94,3 +95,9 @@ class ScanWorkflow(MoleculeWorkflow):
|
|
|
94
95
|
raise ValueError("Concerted scan settings must have same number of steps!")
|
|
95
96
|
|
|
96
97
|
return val
|
|
98
|
+
|
|
99
|
+
@model_validator(mode="after")
|
|
100
|
+
def set_calc_engine(self) -> Self:
|
|
101
|
+
"""Set the calculation engine."""
|
|
102
|
+
self.calc_engine = self.calc_engine or self.calc_settings.engine
|
|
103
|
+
return self
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|