stjames 0.0.99__tar.gz → 0.0.102__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.99 → stjames-0.0.102}/LICENSE +1 -1
- {stjames-0.0.99/stjames.egg-info → stjames-0.0.102}/PKG-INFO +1 -1
- {stjames-0.0.99 → stjames-0.0.102}/pyproject.toml +1 -1
- {stjames-0.0.99 → stjames-0.0.102}/stjames/molecule.py +8 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/__init__.py +3 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/basic_calculation.py +13 -1
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/nmr.py +2 -2
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/solubility.py +29 -5
- {stjames-0.0.99 → stjames-0.0.102/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.99 → stjames-0.0.102}/README.md +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/setup.cfg +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/__init__.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atom.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atomium_stjames/__init__.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atomium_stjames/data.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atomium_stjames/mmcif.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atomium_stjames/pdb.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/atomium_stjames/utilities.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/base.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/basis_set.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/calculation.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/compute_settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/constraint.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/correction.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/__init__.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/bragg_radii.json +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/elements.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/isotopes.json +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/nist_isotopes.json +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/read_nist_isotopes.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/data/symbol_element.json +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/engine.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/message.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/method.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/mode.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/opt_settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/optimization/__init__.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/optimization/freezing_string_method.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/pdb.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/periodic_cell.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/py.typed +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/scf_settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/solvent.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/status.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/task.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/types.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/admet.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/bde.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/conformer.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/conformer_search.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/descriptors.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/docking.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/double_ended_ts_search.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/electronic_properties.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/fukui.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/ion_mobility.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/irc.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/macropka.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/molecular_dynamics.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/multistage_opt.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/pka.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/pose_analysis_md.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/protein_cofolding.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/redox_potential.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/scan.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/spin_states.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/tautomer.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames/workflows/workflow.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames.egg-info/SOURCES.txt +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/stjames.egg-info/top_level.txt +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_constraints.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_from_extxyz.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_molecule.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_pdb.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_rounding.py +0 -0
- {stjames-0.0.99 → stjames-0.0.102}/tests/test_settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Rowan
|
|
3
|
+
Copyright (c) Rowan Scientific Corporation
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -157,12 +157,20 @@ class Molecule(Base):
|
|
|
157
157
|
return None
|
|
158
158
|
return self.energy + self.thermal_enthalpy_corr
|
|
159
159
|
|
|
160
|
+
@property
|
|
161
|
+
def enthalpy(self) -> Optional[float]:
|
|
162
|
+
return self.sum_energy_enthalpy
|
|
163
|
+
|
|
160
164
|
@property
|
|
161
165
|
def sum_energy_free_energy(self) -> Optional[float]:
|
|
162
166
|
if (self.energy is None) or (self.thermal_free_energy_corr is None):
|
|
163
167
|
return None
|
|
164
168
|
return self.energy + self.thermal_free_energy_corr
|
|
165
169
|
|
|
170
|
+
@property
|
|
171
|
+
def gibbs_free_energy(self) -> Optional[float]:
|
|
172
|
+
return self.sum_energy_free_energy
|
|
173
|
+
|
|
166
174
|
@pydantic.model_validator(mode="after")
|
|
167
175
|
def check_electron_sanity(self) -> Self:
|
|
168
176
|
num_electrons = sum(self.atomic_numbers) - self.charge
|
|
@@ -9,6 +9,7 @@ from .conformer import *
|
|
|
9
9
|
from .conformer_search import *
|
|
10
10
|
from .descriptors import *
|
|
11
11
|
from .docking import *
|
|
12
|
+
from .double_ended_ts_search import DoubleEndedTSSearchWorkflow
|
|
12
13
|
from .electronic_properties import *
|
|
13
14
|
from .fukui import *
|
|
14
15
|
from .hydrogen_bond_basicity import *
|
|
@@ -36,6 +37,7 @@ WORKFLOW_NAME = Literal[
|
|
|
36
37
|
"conformer_search",
|
|
37
38
|
"descriptors",
|
|
38
39
|
"docking",
|
|
40
|
+
"double_ended_ts_search",
|
|
39
41
|
"electronic_properties",
|
|
40
42
|
"fukui",
|
|
41
43
|
"hydrogen_bond_basicity",
|
|
@@ -63,6 +65,7 @@ WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
|
|
|
63
65
|
"conformer_search": ConformerSearchWorkflow, # type: ignore [dict-item]
|
|
64
66
|
"descriptors": DescriptorsWorkflow, # type: ignore [dict-item]
|
|
65
67
|
"docking": DockingWorkflow, # type: ignore [dict-item]
|
|
68
|
+
"double_ended_ts_search": DoubleEndedTSSearchWorkflow, # type: ignore [dict-item]
|
|
66
69
|
"electronic_properties": ElectronicPropertiesWorkflow, # type: ignore [dict-item]
|
|
67
70
|
"fukui": FukuiIndexWorkflow, # type: ignore [dict-item]
|
|
68
71
|
"hydrogen_bond_basicity": HydrogenBondBasicityWorkflow, # type: ignore [dict-item]
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"""Basic calculation workflow."""
|
|
2
2
|
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from pydantic import model_validator
|
|
6
|
+
|
|
7
|
+
from ..engine import Engine
|
|
3
8
|
from ..settings import Settings
|
|
4
9
|
from ..types import UUID
|
|
5
10
|
from .workflow import MoleculeWorkflow
|
|
@@ -20,5 +25,12 @@ class BasicCalculationWorkflow(MoleculeWorkflow):
|
|
|
20
25
|
"""
|
|
21
26
|
|
|
22
27
|
settings: Settings
|
|
23
|
-
engine:
|
|
28
|
+
engine: Engine = None # type: ignore [assignment]
|
|
24
29
|
calculation_uuid: UUID | None = None
|
|
30
|
+
|
|
31
|
+
@model_validator(mode="after")
|
|
32
|
+
def set_engine(self) -> Self:
|
|
33
|
+
"""Set the calculation engine."""
|
|
34
|
+
self.engine = self.engine or self.settings.method.default_engine()
|
|
35
|
+
|
|
36
|
+
return self
|
|
@@ -29,7 +29,7 @@ class NMRPeak(Base):
|
|
|
29
29
|
|
|
30
30
|
nucleus: int
|
|
31
31
|
shift: Annotated[float, AfterValidator(round_float(3))]
|
|
32
|
-
atom_indices:
|
|
32
|
+
atom_indices: list[int]
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class NMRSpectroscopyWorkflow(MoleculeWorkflow):
|
|
@@ -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: list[
|
|
71
|
+
symmetry_equivalent_nuclei: list[list[int]] = []
|
|
72
72
|
|
|
73
73
|
predicted_peaks: dict[int, list[NMRPeak]] = {}
|
|
@@ -4,10 +4,17 @@ from typing import Annotated, Self
|
|
|
4
4
|
|
|
5
5
|
from pydantic import AfterValidator, BaseModel, model_validator
|
|
6
6
|
|
|
7
|
-
from ..
|
|
7
|
+
from ..base import LowercaseStrEnum
|
|
8
|
+
from ..types import round_list, round_optional_list
|
|
8
9
|
from .workflow import SMILESWorkflow
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
class SolubilityMethod(LowercaseStrEnum):
|
|
13
|
+
FASTSOLV = "fastsolv"
|
|
14
|
+
KINGFISHER = "kingfisher"
|
|
15
|
+
ESOL = "esol"
|
|
16
|
+
|
|
17
|
+
|
|
11
18
|
class SolubilityResult(BaseModel):
|
|
12
19
|
"""
|
|
13
20
|
Solubility result.
|
|
@@ -17,7 +24,7 @@ class SolubilityResult(BaseModel):
|
|
|
17
24
|
"""
|
|
18
25
|
|
|
19
26
|
solubilities: Annotated[list[float], AfterValidator(round_list(6))]
|
|
20
|
-
uncertainties: Annotated[list[float], AfterValidator(
|
|
27
|
+
uncertainties: Annotated[list[float | None], AfterValidator(round_optional_list(6))]
|
|
21
28
|
|
|
22
29
|
@model_validator(mode="after")
|
|
23
30
|
def check_size(self) -> Self:
|
|
@@ -41,9 +48,10 @@ class SolubilityWorkflow(SMILESWorkflow):
|
|
|
41
48
|
:param solubilities: {solvent: SolubilityResult}
|
|
42
49
|
"""
|
|
43
50
|
|
|
51
|
+
solubility_method: SolubilityMethod = SolubilityMethod.FASTSOLV
|
|
44
52
|
initial_smiles: str
|
|
45
|
-
solvents: list[str]
|
|
46
|
-
temperatures: list[float] = [
|
|
53
|
+
solvents: list[str] = ["O"]
|
|
54
|
+
temperatures: list[float] = [298.15]
|
|
47
55
|
|
|
48
56
|
solubilities: dict[str, SolubilityResult] = {}
|
|
49
57
|
|
|
@@ -55,6 +63,22 @@ class SolubilityWorkflow(SMILESWorkflow):
|
|
|
55
63
|
raise ValueError(f"Solubilities for {solvent} must have the same length as temperatures.")
|
|
56
64
|
|
|
57
65
|
if solvent not in self.solvents:
|
|
58
|
-
raise ValueError(f"Solvent {solvent} not in initial list of solvents")
|
|
66
|
+
raise ValueError(f"Solvent {solvent} not in initial list of solvents.")
|
|
67
|
+
|
|
68
|
+
return self
|
|
69
|
+
|
|
70
|
+
@model_validator(mode="after")
|
|
71
|
+
def check_solvent_temperature(self) -> Self:
|
|
72
|
+
"""Check that models with limited domain of applicability are predicting within correct domain."""
|
|
73
|
+
match self.solubility_method:
|
|
74
|
+
case SolubilityMethod.KINGFISHER | SolubilityMethod.ESOL:
|
|
75
|
+
if (len(self.solvents) > 1) or (self.solvents[0] != "O"):
|
|
76
|
+
raise ValueError(f"Method `{self.solubility_method}` can only predict aqueous solubility, so `solvents` must be [`O`] only.")
|
|
77
|
+
if (len(self.temperatures) > 1) or (abs(self.temperatures[0] - 298.15) > 0.1):
|
|
78
|
+
raise ValueError(
|
|
79
|
+
f"Method `{self.solubility_method}` can only predict solubility at room temperature, so `temperatures` must be [298.15] only."
|
|
80
|
+
)
|
|
81
|
+
case _:
|
|
82
|
+
pass
|
|
59
83
|
|
|
60
84
|
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
|