stjames 0.0.37__tar.gz → 0.0.39__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.37/stjames.egg-info → stjames-0.0.39}/PKG-INFO +1 -1
- {stjames-0.0.37 → stjames-0.0.39}/pyproject.toml +1 -1
- {stjames-0.0.37 → stjames-0.0.39}/stjames/base.py +2 -2
- {stjames-0.0.37 → stjames-0.0.39}/stjames/method.py +13 -24
- {stjames-0.0.37 → stjames-0.0.39}/stjames/molecule.py +5 -5
- {stjames-0.0.37 → stjames-0.0.39}/stjames/settings.py +10 -6
- {stjames-0.0.37 → stjames-0.0.39}/stjames/solvent.py +1 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/conformer.py +1 -1
- {stjames-0.0.37 → stjames-0.0.39/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.37 → stjames-0.0.39}/LICENSE +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/README.md +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/setup.cfg +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/__init__.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/basis_set.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/calculation.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/constraint.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/correction.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/diis_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/grid_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/int_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/message.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/mode.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/opt_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/py.typed +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/scf_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/status.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/task.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/__init__.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/descriptors.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/fukui.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/pka.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/redox_potential.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/scan.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/tautomer.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames/workflows/workflow.py +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames.egg-info/SOURCES.txt +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.37 → stjames-0.0.39}/stjames.egg-info/top_level.txt +0 -0
|
@@ -18,13 +18,13 @@ class Base(pydantic.BaseModel):
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class LowercaseStrEnum(str, Enum):
|
|
21
|
-
"""Enum where hyphens and case are ignored."""
|
|
21
|
+
"""Enum where hyphens, underscores, and case are ignored."""
|
|
22
22
|
|
|
23
23
|
@classmethod
|
|
24
24
|
def _missing_(cls, value: str) -> str | None: # type: ignore
|
|
25
25
|
# Type note: technically breaking Liskov, value: object in Enum
|
|
26
26
|
for member in cls:
|
|
27
|
-
if member.lower().replace("-", "") == value.lower().replace("-", ""):
|
|
27
|
+
if member.lower().replace("-", "").replace("_", "") == value.lower().replace("-", "").replace("_", ""):
|
|
28
28
|
return member
|
|
29
29
|
return None
|
|
30
30
|
|
|
@@ -2,48 +2,37 @@ from .base import LowercaseStrEnum
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class Method(LowercaseStrEnum):
|
|
5
|
-
#### Hartree–Fock:
|
|
6
5
|
HARTREE_FOCK = "hf"
|
|
7
|
-
HF3C = "
|
|
6
|
+
HF3C = "hf_3c"
|
|
8
7
|
|
|
9
|
-
#### DFT:
|
|
10
|
-
# LDA
|
|
11
|
-
LSDA = "lsda"
|
|
12
|
-
|
|
13
|
-
# local GGA
|
|
14
8
|
PBE = "pbe"
|
|
15
|
-
|
|
16
|
-
BP86 = "bp86"
|
|
17
|
-
B97D3 = "b97-d3"
|
|
18
|
-
B973C = "b97-3c"
|
|
19
|
-
|
|
20
|
-
# mGGA
|
|
9
|
+
B973C = "b97_3c"
|
|
21
10
|
R2SCAN = "r2scan"
|
|
11
|
+
R2SCAN3C = "r2scan_3c"
|
|
22
12
|
TPSS = "tpss"
|
|
23
13
|
M06L = "m06l"
|
|
24
14
|
|
|
25
|
-
# hybrid GGA
|
|
26
15
|
PBE0 = "pbe0"
|
|
27
16
|
B3LYP = "b3lyp"
|
|
28
|
-
|
|
29
|
-
B97MV = "b97m_v"
|
|
30
|
-
|
|
31
|
-
# hybrid mGGA
|
|
32
|
-
TPSS0 = "tpss0"
|
|
17
|
+
TPSSH = "tpssh"
|
|
33
18
|
M06 = "m06"
|
|
34
19
|
M062X = "m062x"
|
|
35
20
|
|
|
36
|
-
# range-separated
|
|
37
21
|
CAMB3LYP = "camb3lyp"
|
|
38
|
-
WB97XD = "wb97x_d"
|
|
39
22
|
WB97XD3 = "wb97x_d3"
|
|
40
23
|
WB97XV = "wb97x_v"
|
|
41
24
|
WB97MV = "wb97m_v"
|
|
25
|
+
WB97MD3BJ = "wb97m_d3bj"
|
|
26
|
+
WB97X3C = "wb97x_3c"
|
|
27
|
+
|
|
28
|
+
DSDBLYPD3BJ = "dsd_blyp_d3bj"
|
|
42
29
|
|
|
43
|
-
# ML methods
|
|
44
30
|
AIMNET2_WB97MD3 = "aimnet2_wb97md3"
|
|
45
|
-
AIMNET2_B973C = "aimnet2_b973c"
|
|
46
31
|
|
|
47
|
-
|
|
32
|
+
GFN0_XTB = "gfn0_xtb"
|
|
48
33
|
GFN1_XTB = "gfn1_xtb"
|
|
49
34
|
GFN2_XTB = "gfn2_xtb"
|
|
35
|
+
GFN_FF = "gfn_ff"
|
|
36
|
+
|
|
37
|
+
# this was going to be removed, but Jonathon wrote such a nice basis set test... it's off the front end.
|
|
38
|
+
BP86 = "bp86"
|
|
@@ -10,7 +10,7 @@ from .base import Base
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class VibrationalMode(Base):
|
|
13
|
-
frequency: float
|
|
13
|
+
frequency: float # in cm-1
|
|
14
14
|
reduced_mass: float
|
|
15
15
|
force_constant: float
|
|
16
16
|
displacements: list[list[float]]
|
|
@@ -18,7 +18,7 @@ class VibrationalMode(Base):
|
|
|
18
18
|
|
|
19
19
|
class Atom(Base):
|
|
20
20
|
atomic_number: NonNegativeInt
|
|
21
|
-
position: list[float]
|
|
21
|
+
position: list[float] # in Å
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class Molecule(Base):
|
|
@@ -26,10 +26,10 @@ class Molecule(Base):
|
|
|
26
26
|
multiplicity: PositiveInt
|
|
27
27
|
atoms: list[Atom]
|
|
28
28
|
|
|
29
|
-
energy: Optional[float] = None
|
|
29
|
+
energy: Optional[float] = None # in Hartree
|
|
30
30
|
scf_iterations: Optional[NonNegativeInt] = None
|
|
31
31
|
scf_completed: Optional[bool] = None
|
|
32
|
-
elapsed: Optional[float] = None
|
|
32
|
+
elapsed: Optional[float] = None # in seconds
|
|
33
33
|
|
|
34
34
|
homo_lumo_gap: Optional[float] = None # in eV
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ class Molecule(Base):
|
|
|
37
37
|
|
|
38
38
|
mulliken_charges: Optional[list[float]] = None
|
|
39
39
|
mulliken_spin_densities: Optional[list[float]] = None
|
|
40
|
-
dipole: Optional[list[float]] = None
|
|
40
|
+
dipole: Optional[list[float]] = None # in Debye
|
|
41
41
|
|
|
42
42
|
vibrational_modes: Optional[list[VibrationalMode]] = None
|
|
43
43
|
|
|
@@ -16,18 +16,20 @@ from .thermochem_settings import ThermochemistrySettings
|
|
|
16
16
|
PREPACKAGED_METHODS = [
|
|
17
17
|
Method.HF3C,
|
|
18
18
|
Method.B973C,
|
|
19
|
+
Method.R2SCAN3C,
|
|
19
20
|
Method.AIMNET2_WB97MD3,
|
|
20
|
-
Method.AIMNET2_B973C,
|
|
21
21
|
Method.GFN2_XTB,
|
|
22
22
|
Method.GFN1_XTB,
|
|
23
|
+
Method.GFN0_XTB,
|
|
24
|
+
Method.GFN_FF,
|
|
23
25
|
]
|
|
24
26
|
|
|
25
27
|
METHODS_WITH_CORRECTION = [
|
|
26
|
-
Method.B97D3,
|
|
27
|
-
Method.WB97XD,
|
|
28
28
|
Method.WB97XD3,
|
|
29
29
|
Method.WB97XV,
|
|
30
30
|
Method.WB97MV,
|
|
31
|
+
Method.WB97MD3BJ,
|
|
32
|
+
Method.DSDBLYPD3BJ,
|
|
31
33
|
]
|
|
32
34
|
|
|
33
35
|
T = TypeVar("T")
|
|
@@ -48,15 +50,17 @@ class Settings(Base):
|
|
|
48
50
|
opt_settings: OptimizationSettings = OptimizationSettings()
|
|
49
51
|
thermochem_settings: ThermochemistrySettings = ThermochemistrySettings()
|
|
50
52
|
|
|
53
|
+
# mypy has this dead wrong (https://docs.pydantic.dev/2.0/usage/computed_fields/)
|
|
54
|
+
@pydantic.computed_field # type: ignore[misc]
|
|
51
55
|
@property
|
|
52
|
-
@pydantic.computed_field
|
|
53
56
|
def level_of_theory(self) -> str:
|
|
57
|
+
corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
|
|
58
|
+
|
|
54
59
|
if self.method in PREPACKAGED_METHODS or self.basis_set is None:
|
|
55
60
|
method = self.method.value
|
|
56
|
-
elif self.method in METHODS_WITH_CORRECTION:
|
|
61
|
+
elif self.method in METHODS_WITH_CORRECTION or len(corrections) == 0:
|
|
57
62
|
method = f"{self.method.value}/{self.basis_set.name.lower()}"
|
|
58
63
|
else:
|
|
59
|
-
corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
|
|
60
64
|
method = f"{self.method.value}-{'-'.join([c.value for c in corrections])}/{self.basis_set.name.lower()}"
|
|
61
65
|
|
|
62
66
|
if self.solvent_settings is not None:
|
|
@@ -48,7 +48,7 @@ class ConformerWorkflow(Workflow):
|
|
|
48
48
|
self.settings = csearch_settings_by_mode(self.mode, self.settings)
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
def csearch_settings_by_mode(mode: Mode, old_settings: Optional[ConformerSettings]) -> ConformerSettings:
|
|
51
|
+
def csearch_settings_by_mode(mode: Mode, old_settings: Optional[ConformerSettings] = None) -> ConformerSettings:
|
|
52
52
|
if mode == Mode.MANUAL:
|
|
53
53
|
assert old_settings is not None
|
|
54
54
|
return old_settings
|
|
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
|