stjames 0.0.27__tar.gz → 0.0.29__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.27/stjames.egg-info → stjames-0.0.29}/PKG-INFO +1 -1
- {stjames-0.0.27 → stjames-0.0.29}/pyproject.toml +9 -2
- {stjames-0.0.27 → stjames-0.0.29}/stjames/__init__.py +1 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/base.py +3 -2
- {stjames-0.0.27 → stjames-0.0.29}/stjames/molecule.py +4 -4
- {stjames-0.0.27 → stjames-0.0.29}/stjames/scf_settings.py +4 -3
- {stjames-0.0.27 → stjames-0.0.29}/stjames/settings.py +28 -10
- {stjames-0.0.27 → stjames-0.0.29/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.27 → stjames-0.0.29}/LICENSE +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/README.md +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/setup.cfg +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/basis_set.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/calculation.py +1 -1
- {stjames-0.0.27 → stjames-0.0.29}/stjames/corrections.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/diis_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/grid_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/int_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/methods.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/modes.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/opt_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/solvent_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/status.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/tasks.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames.egg-info/SOURCES.txt +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.27 → stjames-0.0.29}/stjames.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stjames"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.29"
|
|
4
4
|
description = "standardized JSON atom/molecule encoding scheme"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.8"
|
|
@@ -29,5 +29,12 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default)
|
|
|
29
29
|
|
|
30
30
|
[tool.ruff]
|
|
31
31
|
line-length = 160
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
[tool.ruff.lint]
|
|
34
|
+
select = [
|
|
35
|
+
"E", # pycodestyle errors
|
|
36
|
+
"F", # pyflakes
|
|
37
|
+
"I", # isort
|
|
38
|
+
"W", # pycodestyle warnings
|
|
39
|
+
]
|
|
33
40
|
ignore = ["E741"]
|
|
@@ -54,28 +54,28 @@ class Molecule(Base):
|
|
|
54
54
|
return [a.atomic_number for a in self.atoms]
|
|
55
55
|
|
|
56
56
|
@property
|
|
57
|
-
def sum_energy_zpe(self) -> float
|
|
57
|
+
def sum_energy_zpe(self) -> Optional[float]:
|
|
58
58
|
if (self.energy is None) or (self.zero_point_energy is None):
|
|
59
59
|
return None
|
|
60
60
|
else:
|
|
61
61
|
return self.energy + self.zero_point_energy
|
|
62
62
|
|
|
63
63
|
@property
|
|
64
|
-
def sum_energy_thermal_corr(self) -> float
|
|
64
|
+
def sum_energy_thermal_corr(self) -> Optional[float]:
|
|
65
65
|
if (self.energy is None) or (self.thermal_energy_corr is None):
|
|
66
66
|
return None
|
|
67
67
|
else:
|
|
68
68
|
return self.energy + self.thermal_energy_corr
|
|
69
69
|
|
|
70
70
|
@property
|
|
71
|
-
def sum_energy_enthalpy(self) -> float
|
|
71
|
+
def sum_energy_enthalpy(self) -> Optional[float]:
|
|
72
72
|
if (self.energy is None) or (self.thermal_enthalpy_corr is None):
|
|
73
73
|
return None
|
|
74
74
|
else:
|
|
75
75
|
return self.energy + self.thermal_enthalpy_corr
|
|
76
76
|
|
|
77
77
|
@property
|
|
78
|
-
def sum_energy_free_energy(self) -> float
|
|
78
|
+
def sum_energy_free_energy(self) -> Optional[float]:
|
|
79
79
|
if (self.energy is None) or (self.thermal_free_energy_corr is None):
|
|
80
80
|
return None
|
|
81
81
|
else:
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Any, Optional
|
|
2
|
+
|
|
2
3
|
import pydantic
|
|
3
4
|
|
|
4
5
|
from .base import Base, LowercaseStrEnum
|
|
5
|
-
from .int_settings import IntSettings
|
|
6
|
-
from .grid_settings import GridSettings
|
|
7
6
|
from .diis_settings import DIISSettings
|
|
7
|
+
from .grid_settings import GridSettings
|
|
8
|
+
from .int_settings import IntSettings
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class SCFInitMethod(LowercaseStrEnum):
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import pydantic
|
|
2
1
|
from typing import Any, Optional
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
from .tasks import Task
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
7
5
|
from .base import Base, UniqueList
|
|
8
|
-
from .corrections import Correction
|
|
9
|
-
from .scf_settings import SCFSettings
|
|
10
6
|
from .basis_set import BasisSet
|
|
7
|
+
from .corrections import Correction
|
|
8
|
+
from .methods import Method
|
|
9
|
+
from .modes import Mode
|
|
11
10
|
from .opt_settings import OptimizationSettings
|
|
12
|
-
from .
|
|
11
|
+
from .scf_settings import SCFSettings
|
|
13
12
|
from .solvent_settings import SolventSettings
|
|
13
|
+
from .tasks import Task
|
|
14
|
+
from .thermochem_settings import ThermochemistrySettings
|
|
14
15
|
|
|
16
|
+
PREPACKAGED_METHODS = [
|
|
17
|
+
Method.HF3C,
|
|
18
|
+
Method.B973C,
|
|
19
|
+
Method.AIMNET2_WB97MD3,
|
|
20
|
+
Method.AIMNET2_B973C,
|
|
21
|
+
Method.GFN2_XTB,
|
|
22
|
+
Method.GFN1_XTB
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
METHODS_WITH_CORRECTION = [
|
|
26
|
+
Method.B97D3,
|
|
27
|
+
Method.WB97XD,
|
|
28
|
+
Method.WB97XD3,
|
|
29
|
+
Method.WB97XV,
|
|
30
|
+
Method.WB97MV,
|
|
31
|
+
]
|
|
15
32
|
|
|
16
33
|
class Settings(Base):
|
|
17
34
|
method: Method = Method.HARTREE_FOCK
|
|
@@ -31,9 +48,10 @@ class Settings(Base):
|
|
|
31
48
|
@pydantic.computed_field
|
|
32
49
|
@property
|
|
33
50
|
def level_of_theory(self) -> str:
|
|
34
|
-
|
|
35
|
-
if self.method in [Method.HF3C, Method.B973C, Method.AIMNET2_WB97MD3, Method.AIMNET2_B973C, Method.GFN2_XTB, Method.GFN1_XTB] or self.basis_set is None:
|
|
51
|
+
if self.method in PREPACKAGED_METHODS or self.basis_set is None:
|
|
36
52
|
method = self.method.value
|
|
53
|
+
elif self.method in METHODS_WITH_CORRECTION:
|
|
54
|
+
method = f"{self.method.value}/{self.basis_set.name.lower()}"
|
|
37
55
|
else:
|
|
38
56
|
corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
|
|
39
57
|
method = f"{self.method.value}-{'-'.join([c.value for c in corrections])}/{self.basis_set.name.lower()}"
|
|
@@ -60,7 +78,7 @@ class Settings(Base):
|
|
|
60
78
|
|
|
61
79
|
@pydantic.field_validator("basis_set", mode="before")
|
|
62
80
|
@classmethod
|
|
63
|
-
def parse_basis_set(cls, v: Any) -> BasisSet
|
|
81
|
+
def parse_basis_set(cls, v: Any) -> Optional[BasisSet]:
|
|
64
82
|
"""Turn a string into a ``BasisSet`` object. (This is a little crude.)"""
|
|
65
83
|
if isinstance(v, BasisSet):
|
|
66
84
|
return None if v.name is None else v
|
|
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
|