stjames 0.0.45__py3-none-any.whl → 0.0.46__py3-none-any.whl
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/constraint.py +6 -2
- stjames/diis_settings.py +1 -1
- stjames/scf_settings.py +1 -1
- stjames/workflows/__init__.py +41 -0
- stjames/workflows/bde.py +1 -2
- stjames/workflows/conformer_search.py +29 -22
- stjames/workflows/descriptors.py +1 -1
- stjames/workflows/electronic_properties.py +38 -28
- stjames/workflows/fukui.py +1 -1
- stjames/workflows/molecular_dynamics.py +3 -3
- stjames/workflows/multistage_opt.py +7 -12
- stjames/workflows/redox_potential.py +1 -1
- stjames/workflows/scan.py +1 -1
- stjames/workflows/spin_states.py +1 -1
- stjames/workflows/tautomer.py +1 -1
- {stjames-0.0.45.dist-info → stjames-0.0.46.dist-info}/METADATA +2 -2
- {stjames-0.0.45.dist-info → stjames-0.0.46.dist-info}/RECORD +20 -20
- {stjames-0.0.45.dist-info → stjames-0.0.46.dist-info}/WHEEL +1 -1
- {stjames-0.0.45.dist-info → stjames-0.0.46.dist-info}/LICENSE +0 -0
- {stjames-0.0.45.dist-info → stjames-0.0.46.dist-info}/top_level.txt +0 -0
stjames/constraint.py
CHANGED
|
@@ -11,6 +11,7 @@ class ConstraintType(LowercaseStrEnum):
|
|
|
11
11
|
BOND = "bond"
|
|
12
12
|
ANGLE = "angle"
|
|
13
13
|
DIHEDRAL = "dihedral"
|
|
14
|
+
FREEZE_ATOMS = "freeze_atoms"
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class Constraint(Base):
|
|
@@ -18,7 +19,7 @@ class Constraint(Base):
|
|
|
18
19
|
Represents a single (absolute) constraint.
|
|
19
20
|
|
|
20
21
|
:param constraint_type: which type
|
|
21
|
-
:param atoms: the atoms in question
|
|
22
|
+
:param atoms: the atoms in question. n.b. - these are 1-indexed!
|
|
22
23
|
:param value: the value to constrain this to, leaving this blank sets the current value
|
|
23
24
|
"""
|
|
24
25
|
|
|
@@ -38,6 +39,9 @@ class Constraint(Base):
|
|
|
38
39
|
case ConstraintType.DIHEDRAL:
|
|
39
40
|
if len(self.atoms) != 4:
|
|
40
41
|
raise ValueError("Dihedral constraint needs four atom indices!")
|
|
42
|
+
case ConstraintType.FREEZE_ATOMS:
|
|
43
|
+
if len(self.atoms) == 0:
|
|
44
|
+
raise ValueError("Can't freeze atoms without any atoms to freeze!")
|
|
41
45
|
case _:
|
|
42
46
|
raise ValueError("Unknown constraint_type!")
|
|
43
47
|
|
|
@@ -48,7 +52,7 @@ class PairwiseHarmonicConstraint(Base):
|
|
|
48
52
|
"""
|
|
49
53
|
Represents a harmonic constraint, with a characteristic spring constant.
|
|
50
54
|
|
|
51
|
-
:param atoms:
|
|
55
|
+
:param atoms: which atoms to apply to
|
|
52
56
|
:param force_constant: the strength of the attraction, in kcal/mol/Å
|
|
53
57
|
:param equilibrium: the distance at which force is zero
|
|
54
58
|
"""
|
stjames/diis_settings.py
CHANGED
stjames/scf_settings.py
CHANGED
stjames/workflows/__init__.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
# ruff: noqa: F405
|
|
2
|
+
from typing import Literal
|
|
3
|
+
|
|
1
4
|
from .admet import *
|
|
2
5
|
from .basic_calculation import *
|
|
3
6
|
from .bde import *
|
|
4
7
|
from .conformer import *
|
|
5
8
|
from .conformer_search import *
|
|
6
9
|
from .descriptors import *
|
|
10
|
+
from .electronic_properties import *
|
|
7
11
|
from .fukui import *
|
|
8
12
|
from .molecular_dynamics import *
|
|
9
13
|
from .multistage_opt import *
|
|
@@ -12,3 +16,40 @@ from .redox_potential import *
|
|
|
12
16
|
from .scan import *
|
|
13
17
|
from .spin_states import *
|
|
14
18
|
from .tautomer import *
|
|
19
|
+
from .workflow import Workflow
|
|
20
|
+
|
|
21
|
+
WORKFLOW_NAME = Literal[
|
|
22
|
+
"admet",
|
|
23
|
+
"basic_calculation",
|
|
24
|
+
"bde",
|
|
25
|
+
"conformers",
|
|
26
|
+
"conformer_search",
|
|
27
|
+
"descriptors",
|
|
28
|
+
"electronic_properties",
|
|
29
|
+
"fukui",
|
|
30
|
+
"molecular_dynamics",
|
|
31
|
+
"multistage_opt",
|
|
32
|
+
"pka",
|
|
33
|
+
"redox_potential",
|
|
34
|
+
"scan",
|
|
35
|
+
"spin_states",
|
|
36
|
+
"tautomers",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
WORKFLOW_MAPPING: dict[str, Workflow] = {
|
|
40
|
+
"admet": ADMETWorkflow, # type: ignore [dict-item]
|
|
41
|
+
"basic_calculation": BasicCalculationWorkflow, # type: ignore [dict-item]
|
|
42
|
+
"bde": BDEWorkflow, # type: ignore [dict-item]
|
|
43
|
+
"conformers": ConformerWorkflow, # type: ignore [dict-item]
|
|
44
|
+
"conformer_search": ConformerSearchWorkflow, # type: ignore [dict-item]
|
|
45
|
+
"descriptors": DescriptorsWorkflow, # type: ignore [dict-item]
|
|
46
|
+
"electronic_properties": ElectronicPropertiesWorkflow, # type: ignore [dict-item]
|
|
47
|
+
"fukui": FukuiIndexWorkflow, # type: ignore [dict-item]
|
|
48
|
+
"molecular_dynamics": MolecularDynamicsWorkflow, # type: ignore [dict-item]
|
|
49
|
+
"multistage_opt": MultiStageOptWorkflow, # type: ignore [dict-item]
|
|
50
|
+
"pka": pKaWorkflow, # type: ignore [dict-item]
|
|
51
|
+
"redox_potential": RedoxPotentialWorkflow, # type: ignore [dict-item]
|
|
52
|
+
"scan": ScanWorkflow, # type: ignore [dict-item]
|
|
53
|
+
"spin_states": SpinStatesWorkflow, # type: ignore [dict-item]
|
|
54
|
+
"tautomers": TautomerWorkflow, # type: ignore [dict-item]
|
|
55
|
+
}
|
stjames/workflows/bde.py
CHANGED
|
@@ -60,10 +60,10 @@ class BDEWorkflow(Workflow, MultiStageOptMixin):
|
|
|
60
60
|
:param multistage_opt_settings: set by mode unless mode=MANUAL (ignores additional settings if set)
|
|
61
61
|
:param solvent: solvent to use for singlepoint
|
|
62
62
|
:param xtb_preopt: pre-optimize with xtb (sets based on mode when None)
|
|
63
|
+
:param frequencies: whether to calculate frequencies
|
|
63
64
|
|
|
64
65
|
Overridden:
|
|
65
66
|
:param mso_mode: Mode for MultiStageOptSettings
|
|
66
|
-
:param frequencies: whether to calculate frequencies
|
|
67
67
|
|
|
68
68
|
Turned off:
|
|
69
69
|
:param constraints: constraints to add (not supported)
|
|
@@ -81,7 +81,6 @@ class BDEWorkflow(Workflow, MultiStageOptMixin):
|
|
|
81
81
|
"""
|
|
82
82
|
|
|
83
83
|
mso_mode: Mode = _sentinel_mso_mode # type: ignore [assignment]
|
|
84
|
-
frequencies: bool = False
|
|
85
84
|
optimize_fragments: bool = None # type: ignore [assignment]
|
|
86
85
|
|
|
87
86
|
atoms: tuple[PositiveInt, ...] = Field(default_factory=tuple)
|
|
@@ -26,16 +26,16 @@ def check_sentinel(value: _T, default: _U) -> _T | _U:
|
|
|
26
26
|
|
|
27
27
|
class ScreeningSettings(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
Settings for
|
|
29
|
+
Settings for determining unique and useful conformers.
|
|
30
30
|
|
|
31
|
-
:param
|
|
32
|
-
:param
|
|
33
|
-
:param rmsd:
|
|
31
|
+
:param energy_threshold: maximum relative energy for screening
|
|
32
|
+
:param rotational_constants_threshold: maximum difference in rotational constants for screening
|
|
33
|
+
:param rmsd: Cartesian RMSD for screening
|
|
34
34
|
:param max_confs: maximum number of conformers to keep
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
energy_threshold: float | None = None # kcal/mol
|
|
38
|
+
rotational_constants_threshold: float | None = 0.02
|
|
39
39
|
rmsd: float | None = 0.25
|
|
40
40
|
max_confs: int | None = None
|
|
41
41
|
|
|
@@ -76,10 +76,11 @@ class ETKDGSettings(ConformerGenSettings):
|
|
|
76
76
|
|
|
77
77
|
Inherited:
|
|
78
78
|
:param mode: Mode for calculations
|
|
79
|
+
:param conf_opt_method: method for the optimization
|
|
79
80
|
:param screening: post-generation screening settings
|
|
80
81
|
:param constraints: constraints for conformer generation
|
|
81
82
|
:param nci: add a constraining potential for non-covalent interactions (not supported in ETKDG)
|
|
82
|
-
:param
|
|
83
|
+
:param max_confs: maximum number of conformers to keep
|
|
83
84
|
|
|
84
85
|
New:
|
|
85
86
|
:param num_initial_confs: number of initial conformers to generate
|
|
@@ -87,7 +88,6 @@ class ETKDGSettings(ConformerGenSettings):
|
|
|
87
88
|
:param num_confs_taken: number of final conformers to take
|
|
88
89
|
:param max_mmff_energy: MMFF energy cutoff
|
|
89
90
|
:param max_mmff_iterations: MMFF optimization iterations
|
|
90
|
-
:param max_confs: maximum number of conformers to keep
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
93
|
num_initial_confs: int = 300
|
|
@@ -117,10 +117,10 @@ class ETKDGSettings(ConformerGenSettings):
|
|
|
117
117
|
case Mode.RECKLESS:
|
|
118
118
|
self.num_initial_confs = 200
|
|
119
119
|
self.num_confs_considered = 50
|
|
120
|
-
self.max_confs = 20 if self.max_confs is
|
|
120
|
+
self.max_confs = 20 if self.max_confs is None else self.max_confs
|
|
121
121
|
self.max_mmff_energy = 20
|
|
122
122
|
case Mode.RAPID:
|
|
123
|
-
self.max_confs = 50 if self.max_confs is
|
|
123
|
+
self.max_confs = 50 if self.max_confs is None else self.max_confs
|
|
124
124
|
self.conf_opt_method = Method.GFN0_XTB
|
|
125
125
|
case _:
|
|
126
126
|
raise NotImplementedError(f"Unsupported mode: {self.mode}")
|
|
@@ -194,6 +194,7 @@ class iMTDSettings(ConformerGenSettings, ABC):
|
|
|
194
194
|
:param screening: post-generation screening settings (not used)
|
|
195
195
|
:param constraints: constraints to add
|
|
196
196
|
:param nci: add an ellipsoide potential around the input structure
|
|
197
|
+
:param max_confs: maximum number of conformers to keep
|
|
197
198
|
|
|
198
199
|
New:
|
|
199
200
|
:param mtd_method: method for the metadynamics
|
|
@@ -216,11 +217,11 @@ class iMTDSettings(ConformerGenSettings, ABC):
|
|
|
216
217
|
if self.reopt is _sentinel:
|
|
217
218
|
raise ValueError("Must specify reopt with MANUAL mode")
|
|
218
219
|
case Mode.RECKLESS: # GFN-FF//MTD(GFN-FF)
|
|
219
|
-
self.max_confs = 20 if self.max_confs is
|
|
220
|
+
self.max_confs = 20 if self.max_confs is None else self.max_confs
|
|
220
221
|
self.speed = iMTDSpeeds.MEGAQUICK
|
|
221
222
|
self.reopt = check_sentinel(self.reopt, True)
|
|
222
223
|
case Mode.RAPID: # GFN0//MTD(GFN-FF)
|
|
223
|
-
self.max_confs = 50 if self.max_confs is
|
|
224
|
+
self.max_confs = 50 if self.max_confs is None else self.max_confs
|
|
224
225
|
self.speed = iMTDSpeeds.SUPERQUICK
|
|
225
226
|
self.conf_opt_method = Method.GFN0_XTB
|
|
226
227
|
self.reopt = check_sentinel(self.reopt, True)
|
|
@@ -258,11 +259,16 @@ class ConformerGenMixin(BaseModel):
|
|
|
258
259
|
|
|
259
260
|
:param conf_gen_mode: Mode for calculations
|
|
260
261
|
:param conf_gen_settings: settings for conformer generation
|
|
262
|
+
:param constraints: constraints to add
|
|
263
|
+
:param nci: add a constraining potential for non-covalent interactions
|
|
264
|
+
:param max_confs: maximum number of conformers to keep
|
|
261
265
|
"""
|
|
262
266
|
|
|
263
267
|
conf_gen_mode: Mode = Mode.RAPID
|
|
264
268
|
conf_gen_settings: ConformerGenSettings = _sentinel # type: ignore [assignment]
|
|
265
269
|
constraints: Sequence[Constraint] = tuple()
|
|
270
|
+
nci: bool = False
|
|
271
|
+
max_confs: int | None = None
|
|
266
272
|
|
|
267
273
|
@model_validator(mode="after")
|
|
268
274
|
def validate_and_build_conf_gen_settings(self) -> Self:
|
|
@@ -276,10 +282,10 @@ class ConformerGenMixin(BaseModel):
|
|
|
276
282
|
raise ValueError("Must specify conf_gen_settings with MANUAL mode")
|
|
277
283
|
|
|
278
284
|
case Mode.RECKLESS | Mode.RAPID:
|
|
279
|
-
# ETKDGSettings will error if constraints
|
|
280
|
-
self.conf_gen_settings = ETKDGSettings(mode=self.conf_gen_mode, constraints=self.constraints)
|
|
285
|
+
# ETKDGSettings will error if constraints or nci are set
|
|
286
|
+
self.conf_gen_settings = ETKDGSettings(mode=self.conf_gen_mode, constraints=self.constraints, nci=self.nci, max_confs=self.max_confs)
|
|
281
287
|
case Mode.CAREFUL | Mode.METICULOUS:
|
|
282
|
-
self.conf_gen_settings = iMTDSettings(mode=self.conf_gen_mode, constraints=self.constraints)
|
|
288
|
+
self.conf_gen_settings = iMTDSettings(mode=self.conf_gen_mode, constraints=self.constraints, nci=self.nci, max_confs=self.max_confs)
|
|
283
289
|
|
|
284
290
|
case _:
|
|
285
291
|
raise NotImplementedError(f"Unsupported mode: {self.conf_gen_mode}")
|
|
@@ -291,22 +297,23 @@ class ConformerSearchMixin(ConformerGenMixin, MultiStageOptMixin):
|
|
|
291
297
|
"""
|
|
292
298
|
Mixin for workflows that need conformer search—a combination of conformer generation and optimization.
|
|
293
299
|
|
|
294
|
-
Inherited:
|
|
300
|
+
Inherited (ConformerGenMixin):
|
|
295
301
|
:param conf_gen_mode: Mode for conformer generation
|
|
296
302
|
:param mso_mode: Mode for MultiStageOptSettings
|
|
297
303
|
:param conf_gen_settings: settings for conformer generation
|
|
304
|
+
:param nci: add a constraining potential for non-covalent interactions
|
|
305
|
+
|
|
306
|
+
Inherited (MultiStageOptMixin):
|
|
298
307
|
:param multistage_opt_settings: set by mso_mode unless mode=MANUAL (ignores additional settings if set)
|
|
299
308
|
:param solvent: solvent to use
|
|
300
309
|
:param xtb_preopt: pre-optimize with xtb (sets based on mode when None)
|
|
301
|
-
:param constraints: constraints to add (diamond inheritance, works as expected)
|
|
302
310
|
:param transition_state: whether this is a transition state
|
|
311
|
+
:param frequencies: whether to calculate frequencies
|
|
303
312
|
|
|
304
|
-
|
|
305
|
-
:param
|
|
313
|
+
Inherited (Both):
|
|
314
|
+
:param constraints: constraints to add (diamond inheritance, works as expected)
|
|
306
315
|
"""
|
|
307
316
|
|
|
308
|
-
frequencies: bool = False
|
|
309
|
-
|
|
310
317
|
def __str__(self) -> str:
|
|
311
318
|
"""Return a string representation of the ConformerSearch workflow."""
|
|
312
319
|
return repr(self)
|
|
@@ -330,7 +337,7 @@ class ConformerSearchWorkflow(ConformerSearchMixin, Workflow):
|
|
|
330
337
|
:param xtb_preopt: pre-optimize with xtb (sets based on mode when None)
|
|
331
338
|
:param constraints: constraints to add
|
|
332
339
|
:param transition_state: whether this is a transition state
|
|
333
|
-
:param frequencies: whether to calculate frequencies
|
|
340
|
+
:param frequencies: whether to calculate frequencies
|
|
334
341
|
|
|
335
342
|
Ignored:
|
|
336
343
|
:param mode: Mode to use (not used)
|
stjames/workflows/descriptors.py
CHANGED
|
@@ -14,15 +14,15 @@ class PropertyCubePoint(Base):
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class PropertyCube(Base):
|
|
17
|
-
"""
|
|
18
|
-
Represents a "cubefile" of some property.
|
|
19
|
-
"""
|
|
17
|
+
"""Represents a "cubefile" of some property."""
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
cube_points: list[PropertyCubePoint]
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
class MolecularOrbitalCube(PropertyCube):
|
|
25
23
|
"""
|
|
24
|
+
Cube of a molecular orbital.
|
|
25
|
+
|
|
26
26
|
Inherits `cube_data`.
|
|
27
27
|
"""
|
|
28
28
|
|
|
@@ -32,43 +32,48 @@ class MolecularOrbitalCube(PropertyCube):
|
|
|
32
32
|
|
|
33
33
|
class ElectronicPropertiesWorkflow(Workflow):
|
|
34
34
|
"""
|
|
35
|
-
Workflow for computing electronic properties
|
|
35
|
+
Workflow for computing electronic properties.
|
|
36
36
|
|
|
37
37
|
Inherited
|
|
38
|
-
:param initial_molecule:
|
|
38
|
+
:param initial_molecule: Molecule of interest
|
|
39
39
|
|
|
40
40
|
Config settings:
|
|
41
|
-
:param settings:
|
|
42
|
-
:param compute_density_cube: whether
|
|
43
|
-
:param compute_electrostatic_potential_cube: whether
|
|
44
|
-
:param compute_num_occupied_orbitals:
|
|
45
|
-
:param compute_num_virtual_orbitals:
|
|
41
|
+
:param settings: settings for the calculation
|
|
42
|
+
:param compute_density_cube: whether to compute the density cube
|
|
43
|
+
:param compute_electrostatic_potential_cube: whether to compute the electrostatic potential cube
|
|
44
|
+
:param compute_num_occupied_orbitals: number of occupied orbitals to save
|
|
45
|
+
:param compute_num_virtual_orbitals: number of virtual orbitals to save
|
|
46
46
|
|
|
47
47
|
Populated while running:
|
|
48
|
-
:param
|
|
49
|
-
:param dipole:
|
|
50
|
-
:param quadrupole:
|
|
51
|
-
:param
|
|
52
|
-
:param
|
|
53
|
-
:param wiberg_bond_orders:
|
|
54
|
-
:param mayer_bond_orders:
|
|
55
|
-
|
|
56
|
-
:param
|
|
57
|
-
:param
|
|
58
|
-
|
|
59
|
-
:param
|
|
60
|
-
|
|
61
|
-
:param
|
|
62
|
-
|
|
48
|
+
:param calc_uuid: UUID of the calculation
|
|
49
|
+
:param dipole: dipole moment
|
|
50
|
+
:param quadrupole: quadrupole moment
|
|
51
|
+
:param lowdin_charges: Löwdin charges
|
|
52
|
+
:param mulliken_charges: Mulliken charges
|
|
53
|
+
:param wiberg_bond_orders: Wiberg bond orders (`atom1`, `atom2`, `order`)
|
|
54
|
+
:param mayer_bond_orders: Mayer bond orders (`atom1`, `atom2`, `order`)
|
|
55
|
+
|
|
56
|
+
:param density_cube: electron density, as a cube
|
|
57
|
+
:param density_cube_alpha: α electron density, as a cube
|
|
58
|
+
:param density_cube_beta: β electron density, as a cube
|
|
59
|
+
:param density_cube_difference: difference spin densities, as a cube
|
|
60
|
+
|
|
61
|
+
:param electrostatic_potential_cube: electrostatic potential, as a cube
|
|
62
|
+
|
|
63
|
+
:param molecular_orbitals: MOs, key is absolute orbital index (for closed-shell species (RHF))
|
|
64
|
+
:param molecular_orbitals_alpha: α MOs, key is absolute orbital index (for open-shell species (UHF/ROHF))
|
|
65
|
+
:param molecular_orbitals_beta: β MOs, key is absolute orbital index (for open-shell species (UHF/ROHF))
|
|
63
66
|
"""
|
|
64
67
|
|
|
68
|
+
# Config settings
|
|
65
69
|
settings: Settings
|
|
66
70
|
compute_density_cube: bool = True
|
|
67
71
|
compute_electrostatic_potential_cube: bool = True
|
|
68
72
|
compute_num_occupied_orbitals: NonNegativeInt = 1
|
|
69
73
|
compute_num_virtual_orbitals: NonNegativeInt = 1
|
|
70
74
|
|
|
71
|
-
|
|
75
|
+
# Results
|
|
76
|
+
calc_uuid: UUID | None = None
|
|
72
77
|
|
|
73
78
|
dipole: Vector3D | None = None
|
|
74
79
|
quadrupole: Matrix3x3 | None = None
|
|
@@ -80,7 +85,12 @@ class ElectronicPropertiesWorkflow(Workflow):
|
|
|
80
85
|
mayer_bond_orders: list[tuple[NonNegativeInt, NonNegativeInt, NonNegativeFloat]] = []
|
|
81
86
|
|
|
82
87
|
density_cube: PropertyCube | None = None
|
|
88
|
+
density_cube_alpha: PropertyCube | None = None
|
|
89
|
+
density_cube_beta: PropertyCube | None = None
|
|
90
|
+
density_cube_difference: PropertyCube | None = None
|
|
91
|
+
|
|
83
92
|
electrostatic_potential_cube: PropertyCube | None = None
|
|
93
|
+
|
|
94
|
+
molecular_orbitals: dict[NonNegativeInt, MolecularOrbitalCube] = {}
|
|
84
95
|
molecular_orbitals_alpha: dict[NonNegativeInt, MolecularOrbitalCube] = {}
|
|
85
96
|
molecular_orbitals_beta: dict[NonNegativeInt, MolecularOrbitalCube] = {}
|
|
86
|
-
molecular_orbitals: dict[NonNegativeInt, MolecularOrbitalCube] = {}
|
stjames/workflows/fukui.py
CHANGED
|
@@ -12,6 +12,7 @@ from .workflow import Workflow
|
|
|
12
12
|
class MolecularDynamicsInitialization(LowercaseStrEnum):
|
|
13
13
|
RANDOM = "random"
|
|
14
14
|
QUASICLASSICAL = "quasiclassical"
|
|
15
|
+
READ = "read"
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class ThermodynamicEnsemble(LowercaseStrEnum):
|
|
@@ -37,6 +38,7 @@ class MolecularDynamicsSettings(Base):
|
|
|
37
38
|
|
|
38
39
|
timestep: PositiveFloat = 1.0 # fs
|
|
39
40
|
num_steps: PositiveInt = 500
|
|
41
|
+
save_interval: PositiveInt = 10
|
|
40
42
|
|
|
41
43
|
confining_constraint: SphericalHarmonicConstraint | None = None
|
|
42
44
|
|
|
@@ -63,7 +65,5 @@ class MolecularDynamicsWorkflow(Workflow):
|
|
|
63
65
|
calc_settings: Settings
|
|
64
66
|
calc_engine: str | None = None
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# uuids of scan points
|
|
68
|
+
# UUIDs of scan points
|
|
69
69
|
frames: list[Frame] = []
|
|
@@ -51,10 +51,10 @@ class MultiStageOptSettings(BaseModel):
|
|
|
51
51
|
optimization_settings: Sequence[Settings] = tuple()
|
|
52
52
|
singlepoint_settings: Settings | None = None
|
|
53
53
|
solvent: Solvent | None = None
|
|
54
|
-
xtb_preopt: bool
|
|
54
|
+
xtb_preopt: bool = False
|
|
55
55
|
constraints: Sequence[Constraint] = tuple()
|
|
56
56
|
transition_state: bool = False
|
|
57
|
-
frequencies: bool =
|
|
57
|
+
frequencies: bool = False
|
|
58
58
|
|
|
59
59
|
def __str__(self) -> str:
|
|
60
60
|
return repr(self)
|
|
@@ -152,7 +152,6 @@ class MultiStageOptSettings(BaseModel):
|
|
|
152
152
|
self.singlepoint_settings = sp(Method.GFN2_XTB, solvent=self.solvent)
|
|
153
153
|
|
|
154
154
|
case Mode.RAPID:
|
|
155
|
-
self.xtb_preopt = bool(self.xtb_preopt)
|
|
156
155
|
self.optimization_settings = [
|
|
157
156
|
*gfn0_pre_opt * self.xtb_preopt,
|
|
158
157
|
opt(Method.GFN2_XTB, freq=self.frequencies),
|
|
@@ -160,7 +159,6 @@ class MultiStageOptSettings(BaseModel):
|
|
|
160
159
|
self.singlepoint_settings = sp(Method.R2SCAN3C, solvent=self.solvent)
|
|
161
160
|
|
|
162
161
|
case Mode.CAREFUL:
|
|
163
|
-
self.xtb_preopt = (self.xtb_preopt is None) or self.xtb_preopt
|
|
164
162
|
self.optimization_settings = [
|
|
165
163
|
*gfn2_pre_opt * self.xtb_preopt,
|
|
166
164
|
opt(Method.R2SCAN3C, freq=self.frequencies),
|
|
@@ -168,7 +166,6 @@ class MultiStageOptSettings(BaseModel):
|
|
|
168
166
|
self.singlepoint_settings = sp(Method.WB97X3C, solvent=self.solvent)
|
|
169
167
|
|
|
170
168
|
case Mode.METICULOUS:
|
|
171
|
-
self.xtb_preopt = (self.xtb_preopt is None) or self.xtb_preopt
|
|
172
169
|
self.optimization_settings = [
|
|
173
170
|
*gfn2_pre_opt * self.xtb_preopt,
|
|
174
171
|
opt(Method.R2SCAN3C),
|
|
@@ -179,8 +176,6 @@ class MultiStageOptSettings(BaseModel):
|
|
|
179
176
|
case mode:
|
|
180
177
|
raise NotImplementedError(f"Cannot assign settings for {mode=}")
|
|
181
178
|
|
|
182
|
-
assert self.xtb_preopt is not None
|
|
183
|
-
|
|
184
179
|
|
|
185
180
|
class MultiStageOptWorkflow(Workflow, MultiStageOptSettings):
|
|
186
181
|
"""
|
|
@@ -232,10 +227,10 @@ class MultiStageOptMixin(BaseModel):
|
|
|
232
227
|
# Need to use a sentinel object to make both mypy and pydantic happy
|
|
233
228
|
multistage_opt_settings: MultiStageOptSettings = _sentinel_msos # type: ignore [assignment]
|
|
234
229
|
solvent: Solvent | None = None
|
|
235
|
-
xtb_preopt: bool
|
|
230
|
+
xtb_preopt: bool = False
|
|
236
231
|
constraints: Sequence[Constraint] = tuple()
|
|
237
232
|
transition_state: bool = False
|
|
238
|
-
frequencies: bool =
|
|
233
|
+
frequencies: bool = False
|
|
239
234
|
|
|
240
235
|
@model_validator(mode="after")
|
|
241
236
|
def set_mso_settings(self) -> Self:
|
|
@@ -277,14 +272,14 @@ def build_mso_settings(
|
|
|
277
272
|
use_solvent_for_opt: bool = False,
|
|
278
273
|
constraints: list[Constraint] | None = None,
|
|
279
274
|
transition_state: bool = False,
|
|
280
|
-
frequencies: bool =
|
|
275
|
+
frequencies: bool = False,
|
|
281
276
|
) -> MultiStageOptSettings:
|
|
282
277
|
"""
|
|
283
278
|
Helper function to construct multi-stage opt settings objects manually.
|
|
284
279
|
|
|
285
280
|
There's no xTB pre-optimization here - add that yourself!
|
|
286
281
|
|
|
287
|
-
:param optimization_settings:
|
|
282
|
+
:param optimization_settings: optimization settings to apply successively
|
|
288
283
|
:param singlepoint_settings: final single point settings
|
|
289
284
|
:param mode: Mode for settings, defaults to `MANUAL`
|
|
290
285
|
:param solvent: solvent to use
|
|
@@ -292,7 +287,7 @@ def build_mso_settings(
|
|
|
292
287
|
:param constraints: constraints for optimization
|
|
293
288
|
:param transition_state: whether this is a transition state
|
|
294
289
|
:param frequencies: whether to calculate frequencies
|
|
295
|
-
:returns:
|
|
290
|
+
:returns: MultiStageOptSettings
|
|
296
291
|
"""
|
|
297
292
|
if constraints is None:
|
|
298
293
|
constraints = []
|
|
@@ -53,7 +53,7 @@ class RedoxPotentialWorkflow(Workflow, MultiStageOptMixin):
|
|
|
53
53
|
redox_type: str | None = None
|
|
54
54
|
redox_potential: float | None = None
|
|
55
55
|
|
|
56
|
-
#
|
|
56
|
+
# UUIDs
|
|
57
57
|
neutral_molecule: UUID | None = None
|
|
58
58
|
anion_molecule: UUID | None = None
|
|
59
59
|
cation_molecule: UUID | None = None
|
stjames/workflows/scan.py
CHANGED
stjames/workflows/spin_states.py
CHANGED
|
@@ -52,7 +52,7 @@ class SpinStatesWorkflow(Workflow, MultiStageOptMixin):
|
|
|
52
52
|
:param mode: Mode for workflow
|
|
53
53
|
:param multistage_opt_settings: set by mode unless mode=MANUAL (ignores additional settings if set)
|
|
54
54
|
:param solvent: solvent to use for optimization
|
|
55
|
-
:param xtb_preopt: pre-optimize with xtb
|
|
55
|
+
:param xtb_preopt: pre-optimize with xtb
|
|
56
56
|
:param constraints: constraints to add
|
|
57
57
|
:param transition_state: whether this is a transition state
|
|
58
58
|
:param frequencies: whether to calculate frequencies
|
stjames/workflows/tautomer.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stjames
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
4
4
|
Summary: standardized JSON atom/molecule encoding scheme
|
|
5
5
|
Author-email: Corin Wagen <corin@rowansci.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/rowansci/stjames
|
|
@@ -8,7 +8,7 @@ Project-URL: Bug Tracker, https://github.com/rowansci/stjames/issues
|
|
|
8
8
|
Requires-Python: >=3.11
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
|
-
Requires-Dist: pydantic
|
|
11
|
+
Requires-Dist: pydantic>=2.4
|
|
12
12
|
Requires-Dist: numpy
|
|
13
13
|
|
|
14
14
|
# stjames
|
|
@@ -4,9 +4,9 @@ stjames/atom.py,sha256=w7q-x9xpBw4sJ1WGrWt65WAaStxhz-m7dugXCYEOpq4,2064
|
|
|
4
4
|
stjames/base.py,sha256=9PvUjBeVSkmA3TaruaB0uvjFMbWYTGKXECISNGAj_AU,1201
|
|
5
5
|
stjames/basis_set.py,sha256=wI3M2q9uPf9jhKpAi4E2DrsyKzloDGLRjAlk7krdYgc,949
|
|
6
6
|
stjames/calculation.py,sha256=O2LwwQ_cOLmDOGXTHA9J71YbUZXigUSbvbLA-fSVm3w,915
|
|
7
|
-
stjames/constraint.py,sha256=
|
|
7
|
+
stjames/constraint.py,sha256=B6oV0rYjmAWr8gpi5f03gRy_uuqjUURVDVwoez5Cfbg,2442
|
|
8
8
|
stjames/correction.py,sha256=ZVErCcj4TPyZeKrdvXVjHa0tFynsCaoy96QZUVxWFM8,413
|
|
9
|
-
stjames/diis_settings.py,sha256=
|
|
9
|
+
stjames/diis_settings.py,sha256=4m1EQQWBlpHhMnWopix8qOqJv7QCluvdnV9jSKJDFtE,552
|
|
10
10
|
stjames/grid_settings.py,sha256=WrSNGc-8_f87YBZYt9Hh7RbhM4MweADoVzwBMcSqcsE,640
|
|
11
11
|
stjames/int_settings.py,sha256=5HXp8opt5ZyY1UpmfaK7NVloWVLM5jkG0elEEqpVLUo,896
|
|
12
12
|
stjames/message.py,sha256=Rq6QqmHZKecWxYH8fVyXmuoCCPZv8YinvgykSeorXSU,216
|
|
@@ -16,7 +16,7 @@ stjames/molecule.py,sha256=v8NikFHfwOahXSo4VKGSqeHKI2HIoRdNjGE0GkZgNS4,10554
|
|
|
16
16
|
stjames/opt_settings.py,sha256=gxXGtjy9l-Q5Wen9eO6T6HHRCuS8rfOofdVQIJj0JcI,550
|
|
17
17
|
stjames/periodic_cell.py,sha256=JDCyynpamggTNi_HnTnnotRbeSMBfYc-srhD-IwUnrg,996
|
|
18
18
|
stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
stjames/scf_settings.py,sha256=
|
|
19
|
+
stjames/scf_settings.py,sha256=WotVgVrayQ_8PUHP39zVtG7iLT9PV41lpzruttFACP8,2356
|
|
20
20
|
stjames/settings.py,sha256=tfgEYns6WdsheQ6wpR6uyI8O4s2iTqyH7YWtNQ36k74,8666
|
|
21
21
|
stjames/solvent.py,sha256=u037tmu-9oa21s-WEDZ7VC7nuNVjkqR2ML4JWjWSME4,1158
|
|
22
22
|
stjames/status.py,sha256=wTKNcNxStoEHrxxgr_zTyN90NITa3rxMQZzOgrCifEw,332
|
|
@@ -30,25 +30,25 @@ stjames/data/isotopes.json,sha256=5ba8QnLrHD_Ypv2xekv2cIRwYrX3MQ19-1FOFtt0RuU,83
|
|
|
30
30
|
stjames/data/nist_isotopes.json,sha256=d5DNk1dX0iB1waEYIRR6JMHuA7AuYwSBEgBvb4EKyhM,14300
|
|
31
31
|
stjames/data/read_nist_isotopes.py,sha256=y10FNjW43QpC45qib7VHsIghEwT7GG5rsNwHdc9osRI,3309
|
|
32
32
|
stjames/data/symbol_element.json,sha256=vl_buFusTqBd-muYQtMLtTDLy2OtBI6KkBeqkaWRQrg,1186
|
|
33
|
-
stjames/workflows/__init__.py,sha256=
|
|
33
|
+
stjames/workflows/__init__.py,sha256=IRcfBNaFWVMmixQHjPKcBJkcUYWRnXNwrx2MUFNiQKM,1843
|
|
34
34
|
stjames/workflows/admet.py,sha256=V8noO0Eb7h2bDFSnj6Pxv4ILm0lGxyVRCi13hE0zmEQ,149
|
|
35
35
|
stjames/workflows/basic_calculation.py,sha256=q48bpab7ZqmRTR4PsGC6bWkuxqkVdJRM8gysevTYXP0,212
|
|
36
|
-
stjames/workflows/bde.py,sha256=
|
|
36
|
+
stjames/workflows/bde.py,sha256=iNrBiAUJA-VaAB-eFddApUO2xIc5PyPYXNtC2stQ_OU,9667
|
|
37
37
|
stjames/workflows/conformer.py,sha256=YYwL3l7OaVeea4N9-ihghwa_ieKY6hia9LNbiTraMb0,2732
|
|
38
|
-
stjames/workflows/conformer_search.py,sha256=
|
|
39
|
-
stjames/workflows/descriptors.py,sha256=
|
|
40
|
-
stjames/workflows/electronic_properties.py,sha256=
|
|
41
|
-
stjames/workflows/fukui.py,sha256=
|
|
42
|
-
stjames/workflows/molecular_dynamics.py,sha256=
|
|
43
|
-
stjames/workflows/multistage_opt.py,sha256=
|
|
38
|
+
stjames/workflows/conformer_search.py,sha256=zmGaSuka0VClmX36AkKvJAN565-hyp2ZJQIjhkAMQRM,12924
|
|
39
|
+
stjames/workflows/descriptors.py,sha256=lRRCsGzad3nIg0wI1090ffaXB0FVh0nRRb2lNxCY0kI,281
|
|
40
|
+
stjames/workflows/electronic_properties.py,sha256=DFrzU49rux13Fy5q7pgvuYNjiyC2KwMtqU6FTAxg9jo,3339
|
|
41
|
+
stjames/workflows/fukui.py,sha256=CsJ3_gvzqEqcxwYN7bnNIa37F3KlLm7obsU77TGmDgo,348
|
|
42
|
+
stjames/workflows/molecular_dynamics.py,sha256=wx633IhPjRwEYvfyuRnSb0c84lN2WtZJET2q-SJv5DY,2211
|
|
43
|
+
stjames/workflows/multistage_opt.py,sha256=FXSm-adv9TIiE6ftWPO50Yq9ypoJ7GSPkJKpnC0r4kQ,12686
|
|
44
44
|
stjames/workflows/pka.py,sha256=zpR90Yv2L-D56o2mGArM8027DWpnFFnay31UR9Xh5Nc,774
|
|
45
|
-
stjames/workflows/redox_potential.py,sha256=
|
|
46
|
-
stjames/workflows/scan.py,sha256=
|
|
47
|
-
stjames/workflows/spin_states.py,sha256=
|
|
48
|
-
stjames/workflows/tautomer.py,sha256=
|
|
45
|
+
stjames/workflows/redox_potential.py,sha256=e7WOyTIC_1NPfh7amvW7YzqQezcswX9YaXT-qPiePAo,3651
|
|
46
|
+
stjames/workflows/scan.py,sha256=Wqimw1nMErKOYHcC7U1hNC8LZb5XPtS-nE1a-c_6_88,814
|
|
47
|
+
stjames/workflows/spin_states.py,sha256=TXHqB7ClTkkCy1Yfcsv99v2woAhT8oG1-uaF20-oMbQ,4592
|
|
48
|
+
stjames/workflows/tautomer.py,sha256=owZOOfGlohxlaOG1pGpx7dVPvas8ZEnl_9Ms5F0Kpms,421
|
|
49
49
|
stjames/workflows/workflow.py,sha256=tIu5naADYgYS7kdW8quvGEWHWosBcrIdcD7L86v-uMQ,976
|
|
50
|
-
stjames-0.0.
|
|
51
|
-
stjames-0.0.
|
|
52
|
-
stjames-0.0.
|
|
53
|
-
stjames-0.0.
|
|
54
|
-
stjames-0.0.
|
|
50
|
+
stjames-0.0.46.dist-info/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
|
|
51
|
+
stjames-0.0.46.dist-info/METADATA,sha256=sagkuDdeazTP1wvoGMsletsSSFzY_8Qjv0shhmcj17w,1627
|
|
52
|
+
stjames-0.0.46.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
53
|
+
stjames-0.0.46.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
|
|
54
|
+
stjames-0.0.46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|