stjames 0.0.36__tar.gz → 0.0.38__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.

Files changed (41) hide show
  1. {stjames-0.0.36/stjames.egg-info → stjames-0.0.38}/PKG-INFO +1 -1
  2. {stjames-0.0.36 → stjames-0.0.38}/pyproject.toml +1 -1
  3. {stjames-0.0.36 → stjames-0.0.38}/stjames/base.py +1 -1
  4. {stjames-0.0.36 → stjames-0.0.38}/stjames/method.py +13 -24
  5. {stjames-0.0.36 → stjames-0.0.38}/stjames/settings.py +9 -6
  6. {stjames-0.0.36 → stjames-0.0.38}/stjames/solvent.py +1 -0
  7. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/conformer.py +19 -6
  8. {stjames-0.0.36 → stjames-0.0.38/stjames.egg-info}/PKG-INFO +1 -1
  9. {stjames-0.0.36 → stjames-0.0.38}/LICENSE +0 -0
  10. {stjames-0.0.36 → stjames-0.0.38}/README.md +0 -0
  11. {stjames-0.0.36 → stjames-0.0.38}/setup.cfg +0 -0
  12. {stjames-0.0.36 → stjames-0.0.38}/stjames/__init__.py +0 -0
  13. {stjames-0.0.36 → stjames-0.0.38}/stjames/_deprecated_solvent_settings.py +0 -0
  14. {stjames-0.0.36 → stjames-0.0.38}/stjames/basis_set.py +0 -0
  15. {stjames-0.0.36 → stjames-0.0.38}/stjames/calculation.py +0 -0
  16. {stjames-0.0.36 → stjames-0.0.38}/stjames/constraint.py +0 -0
  17. {stjames-0.0.36 → stjames-0.0.38}/stjames/correction.py +0 -0
  18. {stjames-0.0.36 → stjames-0.0.38}/stjames/diis_settings.py +0 -0
  19. {stjames-0.0.36 → stjames-0.0.38}/stjames/grid_settings.py +0 -0
  20. {stjames-0.0.36 → stjames-0.0.38}/stjames/int_settings.py +0 -0
  21. {stjames-0.0.36 → stjames-0.0.38}/stjames/message.py +0 -0
  22. {stjames-0.0.36 → stjames-0.0.38}/stjames/mode.py +0 -0
  23. {stjames-0.0.36 → stjames-0.0.38}/stjames/molecule.py +0 -0
  24. {stjames-0.0.36 → stjames-0.0.38}/stjames/opt_settings.py +0 -0
  25. {stjames-0.0.36 → stjames-0.0.38}/stjames/py.typed +0 -0
  26. {stjames-0.0.36 → stjames-0.0.38}/stjames/scf_settings.py +0 -0
  27. {stjames-0.0.36 → stjames-0.0.38}/stjames/status.py +0 -0
  28. {stjames-0.0.36 → stjames-0.0.38}/stjames/task.py +0 -0
  29. {stjames-0.0.36 → stjames-0.0.38}/stjames/thermochem_settings.py +0 -0
  30. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/__init__.py +0 -0
  31. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/descriptors.py +0 -0
  32. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/fukui.py +0 -0
  33. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/pka.py +0 -0
  34. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/redox_potential.py +0 -0
  35. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/scan.py +0 -0
  36. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/tautomer.py +0 -0
  37. {stjames-0.0.36 → stjames-0.0.38}/stjames/workflows/workflow.py +0 -0
  38. {stjames-0.0.36 → stjames-0.0.38}/stjames.egg-info/SOURCES.txt +0 -0
  39. {stjames-0.0.36 → stjames-0.0.38}/stjames.egg-info/dependency_links.txt +0 -0
  40. {stjames-0.0.36 → stjames-0.0.38}/stjames.egg-info/requires.txt +0 -0
  41. {stjames-0.0.36 → stjames-0.0.38}/stjames.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stjames
3
- Version: 0.0.36
3
+ Version: 0.0.38
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stjames"
3
- version = "0.0.36"
3
+ version = "0.0.38"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -24,7 +24,7 @@ class LowercaseStrEnum(str, Enum):
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 = "hf-3c"
6
+ HF3C = "hf_3c"
8
7
 
9
- #### DFT:
10
- # LDA
11
- LSDA = "lsda"
12
-
13
- # local GGA
14
8
  PBE = "pbe"
15
- BLYP = "blyp"
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
- B3PW91 = "b3pw91"
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
- # xTB methods
32
+ # GFN0_XTB = "gfn1_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"
@@ -16,18 +16,19 @@ 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.GFN_FF,
23
24
  ]
24
25
 
25
26
  METHODS_WITH_CORRECTION = [
26
- Method.B97D3,
27
- Method.WB97XD,
28
27
  Method.WB97XD3,
29
28
  Method.WB97XV,
30
29
  Method.WB97MV,
30
+ Method.WB97MD3BJ,
31
+ Method.DSDBLYPD3BJ,
31
32
  ]
32
33
 
33
34
  T = TypeVar("T")
@@ -48,15 +49,17 @@ class Settings(Base):
48
49
  opt_settings: OptimizationSettings = OptimizationSettings()
49
50
  thermochem_settings: ThermochemistrySettings = ThermochemistrySettings()
50
51
 
52
+ # mypy has this dead wrong (https://docs.pydantic.dev/2.0/usage/computed_fields/)
53
+ @pydantic.computed_field # type: ignore[misc]
51
54
  @property
52
- @pydantic.computed_field
53
55
  def level_of_theory(self) -> str:
56
+ corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
57
+
54
58
  if self.method in PREPACKAGED_METHODS or self.basis_set is None:
55
59
  method = self.method.value
56
- elif self.method in METHODS_WITH_CORRECTION:
60
+ elif self.method in METHODS_WITH_CORRECTION or len(corrections) == 0:
57
61
  method = f"{self.method.value}/{self.basis_set.name.lower()}"
58
62
  else:
59
- corrections = list(filter(lambda x: x not in (None, ""), self.corrections))
60
63
  method = f"{self.method.value}-{'-'.join([c.value for c in corrections])}/{self.basis_set.name.lower()}"
61
64
 
62
65
  if self.solvent_settings is not None:
@@ -31,6 +31,7 @@ class Solvent(LowercaseStrEnum):
31
31
 
32
32
 
33
33
  class SolventModel(LowercaseStrEnum):
34
+ PCM = "pcm"
34
35
  CPCM = "cpcm"
35
36
  ALPB = "alpb"
36
37
  COSMO = "cosmo"
@@ -45,12 +45,18 @@ class ConformerWorkflow(Workflow):
45
45
  conformers: list[Conformer] = []
46
46
 
47
47
  def model_post_init(self, __context: Any) -> None:
48
- self.settings = csearch_settings_by_mode(self.mode)
48
+ self.settings = csearch_settings_by_mode(self.mode, self.settings)
49
49
 
50
50
 
51
- def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
51
+ def csearch_settings_by_mode(mode: Mode, old_settings: Optional[ConformerSettings] = None) -> ConformerSettings:
52
+ if mode == Mode.MANUAL:
53
+ assert old_settings is not None
54
+ return old_settings
55
+
56
+ settings: ConformerSettings
57
+
52
58
  if mode == Mode.METICULOUS:
53
- return CrestConformerSettings(
59
+ settings = CrestConformerSettings(
54
60
  gfn=2,
55
61
  flags="--ewin 15 --noreftopo",
56
62
  max_energy=10,
@@ -59,7 +65,7 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
59
65
  )
60
66
 
61
67
  elif mode == Mode.CAREFUL:
62
- return CrestConformerSettings(
68
+ settings = CrestConformerSettings(
63
69
  gfn="ff",
64
70
  flags="--quick --ewin 10 --noreftopo",
65
71
  num_confs_considered=150,
@@ -67,7 +73,7 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
67
73
  )
68
74
 
69
75
  elif mode == Mode.RAPID or Mode.AUTO:
70
- return RdkitConformerSettings(
76
+ settings = RdkitConformerSettings(
71
77
  num_initial_confs=300,
72
78
  max_mmff_energy=15,
73
79
  num_confs_considered=100,
@@ -75,7 +81,7 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
75
81
  )
76
82
 
77
83
  elif mode == Mode.RECKLESS:
78
- return RdkitConformerSettings(
84
+ settings = RdkitConformerSettings(
79
85
  num_initial_confs=200,
80
86
  max_mmff_energy=10,
81
87
  num_confs_considered=50,
@@ -85,3 +91,10 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
85
91
 
86
92
  else:
87
93
  raise ValueError(f"invalid mode ``{mode.value}`` for conformer settings")
94
+
95
+ if old_settings is not None:
96
+ settings.final_method = old_settings.final_method
97
+ settings.solvent = old_settings.solvent
98
+ settings.constraints = old_settings.constraints
99
+
100
+ return settings
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stjames
3
- Version: 0.0.36
3
+ Version: 0.0.38
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
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