stjames 0.0.28__tar.gz → 0.0.30__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.28/stjames.egg-info → stjames-0.0.30}/PKG-INFO +1 -1
- {stjames-0.0.28 → stjames-0.0.30}/pyproject.toml +10 -3
- {stjames-0.0.28 → stjames-0.0.30}/stjames/__init__.py +6 -5
- {stjames-0.0.28 → stjames-0.0.30}/stjames/base.py +3 -2
- {stjames-0.0.28 → stjames-0.0.30}/stjames/scf_settings.py +4 -3
- {stjames-0.0.28 → stjames-0.0.30}/stjames/settings.py +21 -9
- stjames-0.0.30/stjames/workflows/__init__.py +8 -0
- stjames-0.0.30/stjames/workflows/conformer.py +90 -0
- stjames-0.0.30/stjames/workflows/fukui.py +13 -0
- stjames-0.0.30/stjames/workflows/pka.py +27 -0
- stjames-0.0.30/stjames/workflows/redox_potential.py +18 -0
- stjames-0.0.30/stjames/workflows/scan.py +38 -0
- stjames-0.0.30/stjames/workflows/tautomer.py +19 -0
- stjames-0.0.30/stjames/workflows/workflow.py +16 -0
- {stjames-0.0.28 → stjames-0.0.30/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.28 → stjames-0.0.30}/stjames.egg-info/SOURCES.txt +14 -6
- {stjames-0.0.28 → stjames-0.0.30}/LICENSE +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/README.md +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/setup.cfg +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/basis_set.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/calculation.py +1 -1
- /stjames-0.0.28/stjames/corrections.py → /stjames-0.0.30/stjames/correction.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/diis_settings.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/grid_settings.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/int_settings.py +0 -0
- /stjames-0.0.28/stjames/methods.py → /stjames-0.0.30/stjames/method.py +0 -0
- /stjames-0.0.28/stjames/modes.py → /stjames-0.0.30/stjames/mode.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/molecule.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/opt_settings.py +0 -0
- /stjames-0.0.28/stjames/solvent_settings.py → /stjames-0.0.30/stjames/solvent.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/status.py +0 -0
- /stjames-0.0.28/stjames/tasks.py → /stjames-0.0.30/stjames/task.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.28 → stjames-0.0.30}/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.30"
|
|
4
4
|
description = "standardized JSON atom/molecule encoding scheme"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.8"
|
|
@@ -23,11 +23,18 @@ build-backend = "setuptools.build_meta"
|
|
|
23
23
|
|
|
24
24
|
[tool.setuptools.packages.find]
|
|
25
25
|
where = ["."] # list of folders that contain the packages (["."] by default)
|
|
26
|
-
include = ["stjames"] # package names should match these glob patterns (["*"] by default)
|
|
26
|
+
include = ["stjames", "stjames.*"] # package names should match these glob patterns (["*"] by default)
|
|
27
27
|
exclude = [] # exclude packages matching these glob patterns (empty by default)
|
|
28
28
|
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"]
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from .calculation import *
|
|
4
4
|
from .molecule import *
|
|
5
|
+
from .workflows import *
|
|
5
6
|
|
|
6
7
|
from .scf_settings import *
|
|
7
8
|
from .int_settings import *
|
|
@@ -10,12 +11,12 @@ from .diis_settings import *
|
|
|
10
11
|
from .solvent_settings import *
|
|
11
12
|
from .thermochem_settings import *
|
|
12
13
|
from .grid_settings import *
|
|
13
|
-
from .solvent_settings import *
|
|
14
14
|
from .settings import *
|
|
15
15
|
|
|
16
|
-
from .
|
|
16
|
+
from .method import *
|
|
17
17
|
from .basis_set import *
|
|
18
|
-
from .
|
|
19
|
-
from .
|
|
20
|
-
from .
|
|
18
|
+
from .task import *
|
|
19
|
+
from .correction import *
|
|
20
|
+
from .solvent import *
|
|
21
|
+
from .mode import *
|
|
21
22
|
from .status import *
|
|
@@ -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,16 +1,27 @@
|
|
|
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 .correction import Correction
|
|
8
|
+
from .method import Method
|
|
9
|
+
from .mode import Mode
|
|
11
10
|
from .opt_settings import OptimizationSettings
|
|
11
|
+
from .scf_settings import SCFSettings
|
|
12
|
+
from .solvent import SolventSettings
|
|
13
|
+
from .task import Task
|
|
12
14
|
from .thermochem_settings import ThermochemistrySettings
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
PREPACKAGED_METHODS = [Method.HF3C, Method.B973C, Method.AIMNET2_WB97MD3, Method.AIMNET2_B973C, Method.GFN2_XTB, Method.GFN1_XTB]
|
|
17
|
+
|
|
18
|
+
METHODS_WITH_CORRECTION = [
|
|
19
|
+
Method.B97D3,
|
|
20
|
+
Method.WB97XD,
|
|
21
|
+
Method.WB97XD3,
|
|
22
|
+
Method.WB97XV,
|
|
23
|
+
Method.WB97MV,
|
|
24
|
+
]
|
|
14
25
|
|
|
15
26
|
|
|
16
27
|
class Settings(Base):
|
|
@@ -31,9 +42,10 @@ class Settings(Base):
|
|
|
31
42
|
@pydantic.computed_field
|
|
32
43
|
@property
|
|
33
44
|
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:
|
|
45
|
+
if self.method in PREPACKAGED_METHODS or self.basis_set is None:
|
|
36
46
|
method = self.method.value
|
|
47
|
+
elif self.method in METHODS_WITH_CORRECTION:
|
|
48
|
+
method = f"{self.method.value}/{self.basis_set.name.lower()}"
|
|
37
49
|
else:
|
|
38
50
|
corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
|
|
39
51
|
method = f"{self.method.value}-{'-'.join([c.value for c in corrections])}/{self.basis_set.name.lower()}"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from typing import Any, Optional
|
|
2
|
+
|
|
3
|
+
from ..base import Base
|
|
4
|
+
from ..method import Method
|
|
5
|
+
from ..mode import Mode
|
|
6
|
+
from ..solvent import Solvent
|
|
7
|
+
from .workflow import Workflow
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ConformerSettings(Base):
|
|
11
|
+
num_confs_considered: int = 100
|
|
12
|
+
num_confs_taken: int = 50
|
|
13
|
+
rmsd_cutoff: float = 0.1
|
|
14
|
+
|
|
15
|
+
final_method: Method = Method.AIMNET2_WB97MD3
|
|
16
|
+
solvent: Optional[Solvent] = Solvent.WATER
|
|
17
|
+
max_energy: float = 5
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class RdkitConformerSettings(ConformerSettings):
|
|
21
|
+
csearch_program: str = "rdkit"
|
|
22
|
+
|
|
23
|
+
num_initial_confs: int = 100
|
|
24
|
+
max_mmff_energy: float = 10
|
|
25
|
+
max_mmff_iterations: int = 500
|
|
26
|
+
num_confs_considered: float = 10
|
|
27
|
+
num_confs_taken: float = 3
|
|
28
|
+
rmsd_cutoff: float = 0.1
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CrestConformerSettings(ConformerSettings):
|
|
32
|
+
csearch_program: str = "crest"
|
|
33
|
+
|
|
34
|
+
flags: str = "--quick --ewin 10"
|
|
35
|
+
gfn: int | str = "ff"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Conformer(Base):
|
|
39
|
+
energy: float
|
|
40
|
+
weight: Optional[float] = None
|
|
41
|
+
|
|
42
|
+
# uuid, optionally
|
|
43
|
+
uuid: Optional[str] = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ConformerWorkflow(Workflow):
|
|
47
|
+
settings: ConformerSettings = ConformerSettings()
|
|
48
|
+
conformers: list[Conformer] = []
|
|
49
|
+
|
|
50
|
+
def model_post_init(self, __context: Any) -> None:
|
|
51
|
+
self.settings = csearch_settings_by_mode(self.mode)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
|
|
55
|
+
if mode == Mode.METICULOUS:
|
|
56
|
+
return CrestConformerSettings(
|
|
57
|
+
gfn=2,
|
|
58
|
+
flags="--ewin 15",
|
|
59
|
+
max_energy=10,
|
|
60
|
+
num_confs_considered=500,
|
|
61
|
+
num_confs_taken=150,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
elif mode == Mode.CAREFUL:
|
|
65
|
+
return CrestConformerSettings(
|
|
66
|
+
gfn="ff",
|
|
67
|
+
flags="--quick --ewin 10",
|
|
68
|
+
num_confs_considered=150,
|
|
69
|
+
num_confs_taken=50,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
elif mode == Mode.RAPID:
|
|
73
|
+
return RdkitConformerSettings(
|
|
74
|
+
num_initial_confs=300,
|
|
75
|
+
max_mmff_energy=15,
|
|
76
|
+
num_confs_considered=100,
|
|
77
|
+
num_confs_taken=50,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
elif mode == Mode.RECKLESS:
|
|
81
|
+
return RdkitConformerSettings(
|
|
82
|
+
num_initial_confs=200,
|
|
83
|
+
max_mmff_energy=10,
|
|
84
|
+
num_confs_considered=50,
|
|
85
|
+
num_confs_taken=20,
|
|
86
|
+
rmsd_cutoff=0.25,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
else:
|
|
90
|
+
raise ValueError(f"invalid mode ``{mode.value}`` for conformer settings")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from .workflow import Workflow
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FukuiIndexWorkflow(Workflow):
|
|
7
|
+
# uuid of optimization
|
|
8
|
+
optimization: Optional[str] = None
|
|
9
|
+
|
|
10
|
+
global_electrophilicity_index: Optional[float] = None
|
|
11
|
+
fukui_positive: Optional[list[float]] = None
|
|
12
|
+
fukui_negative: Optional[list[float]] = None
|
|
13
|
+
fukui_zero: Optional[list[float]] = None
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ..base import Base
|
|
4
|
+
from .workflow import DBCalculation, Workflow
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class pKaMicrostate(Base):
|
|
8
|
+
atom_index: int
|
|
9
|
+
structures: list[DBCalculation] = []
|
|
10
|
+
delta_G: float
|
|
11
|
+
pKa: float
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class pKaWorkflow(Workflow):
|
|
15
|
+
pka_range: tuple[float, float] = (2, 12)
|
|
16
|
+
deprotonate_elements: list[int] = [7, 8, 16]
|
|
17
|
+
deprotonate_atoms: list[int] = []
|
|
18
|
+
protonate_elements: list[int] = [7]
|
|
19
|
+
protonate_atoms: list[int] = []
|
|
20
|
+
|
|
21
|
+
reasonableness_buffer: float = 5
|
|
22
|
+
|
|
23
|
+
structures: list[DBCalculation] = []
|
|
24
|
+
conjugate_acids: list[pKaMicrostate] = []
|
|
25
|
+
conjugate_bases: list[pKaMicrostate] = []
|
|
26
|
+
strongest_acid: Optional[float] = None
|
|
27
|
+
strongest_base: Optional[float] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ..solvent import Solvent
|
|
4
|
+
from .workflow import Workflow
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RedoxPotentialWorkflow(Workflow):
|
|
8
|
+
solvent: Solvent = Solvent.ACETONITRILE
|
|
9
|
+
reduction: bool = True
|
|
10
|
+
oxidation: bool = True
|
|
11
|
+
|
|
12
|
+
# uuids
|
|
13
|
+
neutral_molecule: Optional[str] = None
|
|
14
|
+
anion_molecule: Optional[str] = None
|
|
15
|
+
cation_molecule: Optional[str] = None
|
|
16
|
+
|
|
17
|
+
reduction_potential: Optional[float] = None
|
|
18
|
+
oxidation_potential: Optional[float] = None
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
from ..base import Base
|
|
6
|
+
from ..molecule import Molecule
|
|
7
|
+
from ..settings import Settings
|
|
8
|
+
from .workflow import Workflow
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ScanPoint(Base):
|
|
12
|
+
index: int
|
|
13
|
+
molecule: Molecule
|
|
14
|
+
energy: Optional[float] = None
|
|
15
|
+
uuid: Optional[str] = None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ScanSettings(Base):
|
|
19
|
+
type: str # "bond", "angle", "dihedral" - make Enum later
|
|
20
|
+
atoms: list[int]
|
|
21
|
+
start: float
|
|
22
|
+
stop: float
|
|
23
|
+
num: int
|
|
24
|
+
|
|
25
|
+
def vals(self) -> np.ndarray:
|
|
26
|
+
return np.linspace(self.start, self.stop, self.num)
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
from_attributes = True
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ScanWorkflow(Workflow):
|
|
33
|
+
scan_settings: ScanSettings
|
|
34
|
+
calc_settings: Settings
|
|
35
|
+
engine: str
|
|
36
|
+
|
|
37
|
+
# uuids of scan points
|
|
38
|
+
scan_points: list[str] = []
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ..base import Base
|
|
4
|
+
from .conformer import ConformerSettings
|
|
5
|
+
from .workflow import DBCalculation, Workflow
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Tautomer(Base):
|
|
9
|
+
energy: float
|
|
10
|
+
weight: Optional[float] = None
|
|
11
|
+
predicted_relative_energy: Optional[float] = None
|
|
12
|
+
|
|
13
|
+
# uuids, optionally
|
|
14
|
+
structures: list[DBCalculation] = []
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TautomerWorkflow(Workflow):
|
|
18
|
+
settings: ConformerSettings
|
|
19
|
+
tautomers: list[Tautomer] = []
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from ..base import Base
|
|
2
|
+
from ..mode import Mode
|
|
3
|
+
from ..molecule import Molecule
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Workflow(Base):
|
|
7
|
+
"""All workflows should have these properties."""
|
|
8
|
+
|
|
9
|
+
initial_molecule: Molecule
|
|
10
|
+
mode: Mode
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DBCalculation(Base):
|
|
14
|
+
"""Encodes a calculation that's in the database. This isn't terribly useful by itself."""
|
|
15
|
+
|
|
16
|
+
uuid: str
|
|
@@ -6,22 +6,30 @@ stjames/_deprecated_solvent_settings.py
|
|
|
6
6
|
stjames/base.py
|
|
7
7
|
stjames/basis_set.py
|
|
8
8
|
stjames/calculation.py
|
|
9
|
-
stjames/
|
|
9
|
+
stjames/correction.py
|
|
10
10
|
stjames/diis_settings.py
|
|
11
11
|
stjames/grid_settings.py
|
|
12
12
|
stjames/int_settings.py
|
|
13
|
-
stjames/
|
|
14
|
-
stjames/
|
|
13
|
+
stjames/method.py
|
|
14
|
+
stjames/mode.py
|
|
15
15
|
stjames/molecule.py
|
|
16
16
|
stjames/opt_settings.py
|
|
17
17
|
stjames/scf_settings.py
|
|
18
18
|
stjames/settings.py
|
|
19
|
-
stjames/
|
|
19
|
+
stjames/solvent.py
|
|
20
20
|
stjames/status.py
|
|
21
|
-
stjames/
|
|
21
|
+
stjames/task.py
|
|
22
22
|
stjames/thermochem_settings.py
|
|
23
23
|
stjames.egg-info/PKG-INFO
|
|
24
24
|
stjames.egg-info/SOURCES.txt
|
|
25
25
|
stjames.egg-info/dependency_links.txt
|
|
26
26
|
stjames.egg-info/requires.txt
|
|
27
|
-
stjames.egg-info/top_level.txt
|
|
27
|
+
stjames.egg-info/top_level.txt
|
|
28
|
+
stjames/workflows/__init__.py
|
|
29
|
+
stjames/workflows/conformer.py
|
|
30
|
+
stjames/workflows/fukui.py
|
|
31
|
+
stjames/workflows/pka.py
|
|
32
|
+
stjames/workflows/redox_potential.py
|
|
33
|
+
stjames/workflows/scan.py
|
|
34
|
+
stjames/workflows/tautomer.py
|
|
35
|
+
stjames/workflows/workflow.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
|