stjames 0.0.35__tar.gz → 0.0.37__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.35/stjames.egg-info → stjames-0.0.37}/PKG-INFO +1 -1
  2. {stjames-0.0.35 → stjames-0.0.37}/pyproject.toml +4 -1
  3. {stjames-0.0.35 → stjames-0.0.37}/stjames/__init__.py +3 -1
  4. {stjames-0.0.35 → stjames-0.0.37}/stjames/calculation.py +2 -0
  5. stjames-0.0.37/stjames/constraint.py +16 -0
  6. stjames-0.0.37/stjames/message.py +13 -0
  7. {stjames-0.0.35 → stjames-0.0.37}/stjames/opt_settings.py +2 -16
  8. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/__init__.py +4 -5
  9. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/conformer.py +24 -8
  10. stjames-0.0.37/stjames/workflows/descriptors.py +10 -0
  11. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/workflow.py +2 -0
  12. {stjames-0.0.35 → stjames-0.0.37/stjames.egg-info}/PKG-INFO +1 -1
  13. {stjames-0.0.35 → stjames-0.0.37}/stjames.egg-info/SOURCES.txt +3 -0
  14. {stjames-0.0.35 → stjames-0.0.37}/LICENSE +0 -0
  15. {stjames-0.0.35 → stjames-0.0.37}/README.md +0 -0
  16. {stjames-0.0.35 → stjames-0.0.37}/setup.cfg +0 -0
  17. {stjames-0.0.35 → stjames-0.0.37}/stjames/_deprecated_solvent_settings.py +0 -0
  18. {stjames-0.0.35 → stjames-0.0.37}/stjames/base.py +0 -0
  19. {stjames-0.0.35 → stjames-0.0.37}/stjames/basis_set.py +0 -0
  20. {stjames-0.0.35 → stjames-0.0.37}/stjames/correction.py +0 -0
  21. {stjames-0.0.35 → stjames-0.0.37}/stjames/diis_settings.py +0 -0
  22. {stjames-0.0.35 → stjames-0.0.37}/stjames/grid_settings.py +0 -0
  23. {stjames-0.0.35 → stjames-0.0.37}/stjames/int_settings.py +0 -0
  24. {stjames-0.0.35 → stjames-0.0.37}/stjames/method.py +0 -0
  25. {stjames-0.0.35 → stjames-0.0.37}/stjames/mode.py +0 -0
  26. {stjames-0.0.35 → stjames-0.0.37}/stjames/molecule.py +0 -0
  27. {stjames-0.0.35 → stjames-0.0.37}/stjames/py.typed +0 -0
  28. {stjames-0.0.35 → stjames-0.0.37}/stjames/scf_settings.py +0 -0
  29. {stjames-0.0.35 → stjames-0.0.37}/stjames/settings.py +0 -0
  30. {stjames-0.0.35 → stjames-0.0.37}/stjames/solvent.py +0 -0
  31. {stjames-0.0.35 → stjames-0.0.37}/stjames/status.py +0 -0
  32. {stjames-0.0.35 → stjames-0.0.37}/stjames/task.py +0 -0
  33. {stjames-0.0.35 → stjames-0.0.37}/stjames/thermochem_settings.py +0 -0
  34. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/fukui.py +0 -0
  35. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/pka.py +0 -0
  36. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/redox_potential.py +0 -0
  37. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/scan.py +0 -0
  38. {stjames-0.0.35 → stjames-0.0.37}/stjames/workflows/tautomer.py +0 -0
  39. {stjames-0.0.35 → stjames-0.0.37}/stjames.egg-info/dependency_links.txt +0 -0
  40. {stjames-0.0.35 → stjames-0.0.37}/stjames.egg-info/requires.txt +0 -0
  41. {stjames-0.0.35 → stjames-0.0.37}/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.35
3
+ Version: 0.0.37
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.35"
3
+ version = "0.0.37"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -40,5 +40,8 @@ select = [
40
40
  ]
41
41
  ignore = ["E741"]
42
42
 
43
+ [tool.ruff.lint.per-file-ignores]
44
+ "__init__.py" = ["F401", "F403"]
45
+
43
46
  [tool.mypy]
44
47
  plugins = ["pydantic.mypy"]
@@ -1,4 +1,4 @@
1
- # ruff: noqa
1
+ # ruff: noqa: I001
2
2
 
3
3
  from .calculation import *
4
4
  from .molecule import *
@@ -19,3 +19,5 @@ from .correction import *
19
19
  from .solvent import *
20
20
  from .mode import *
21
21
  from .status import *
22
+ from .constraint import *
23
+ from .message import *
@@ -1,6 +1,7 @@
1
1
  from typing import Optional
2
2
 
3
3
  from .base import Base, LowercaseStrEnum
4
+ from .message import Message
4
5
  from .molecule import Molecule
5
6
  from .settings import Settings
6
7
  from .status import Status
@@ -25,6 +26,7 @@ class Calculation(Base):
25
26
  name: Optional[str] = None
26
27
  elapsed: Optional[float] = None
27
28
  logfile: Optional[str] = None
29
+ messages: list[Message] = []
28
30
 
29
31
  engine: Optional[str] = "peregrine"
30
32
 
@@ -0,0 +1,16 @@
1
+ from .base import Base, LowercaseStrEnum
2
+
3
+
4
+ class ConstraintType(LowercaseStrEnum):
5
+ """Different sorts of constraints."""
6
+
7
+ BOND = "bond"
8
+ ANGLE = "angle"
9
+ DIHEDRAL = "dihedral"
10
+
11
+
12
+ class Constraint(Base):
13
+ """Represents a single constraint."""
14
+
15
+ constraint_type: ConstraintType
16
+ atoms: list[int] # 1-indexed
@@ -0,0 +1,13 @@
1
+ from .base import Base, LowercaseStrEnum
2
+
3
+
4
+ class MessageType(LowercaseStrEnum):
5
+ ERROR = "error"
6
+ WARNING = "warning"
7
+ INFO = "info"
8
+
9
+
10
+ class Message(Base):
11
+ type: MessageType
12
+ title: str
13
+ body: str
@@ -1,21 +1,7 @@
1
1
  from pydantic import Field, PositiveFloat, PositiveInt
2
2
 
3
- from .base import Base, LowercaseStrEnum
4
-
5
-
6
- class ConstraintType(LowercaseStrEnum):
7
- """Different sorts of constraints."""
8
-
9
- BOND = "bond"
10
- ANGLE = "angle"
11
- DIHEDRAL = "dihedral"
12
-
13
-
14
- class Constraint(Base):
15
- """Represents a single constraint."""
16
-
17
- constraint_type: ConstraintType
18
- atoms: list[int] # 1-indexed
3
+ from .base import Base
4
+ from .constraint import Constraint
19
5
 
20
6
 
21
7
  class OptimizationSettings(Base):
@@ -1,8 +1,7 @@
1
- # ruff: noqa
2
-
3
- from .pka import *
4
1
  from .conformer import *
5
- from .tautomer import *
2
+ from .descriptors import *
3
+ from .fukui import *
4
+ from .pka import *
6
5
  from .redox_potential import *
7
6
  from .scan import *
8
- from .fukui import *
7
+ from .tautomer import *
@@ -1,6 +1,7 @@
1
1
  from typing import Any, Optional
2
2
 
3
3
  from ..base import Base
4
+ from ..constraint import Constraint
4
5
  from ..method import Method
5
6
  from ..mode import Mode
6
7
  from ..solvent import Solvent
@@ -16,6 +17,8 @@ class ConformerSettings(Base):
16
17
  solvent: Optional[Solvent] = Solvent.WATER
17
18
  max_energy: float = 5
18
19
 
20
+ constraints: list[Constraint] = []
21
+
19
22
 
20
23
  class RdkitConformerSettings(ConformerSettings):
21
24
  num_initial_confs: int = 100
@@ -42,29 +45,35 @@ class ConformerWorkflow(Workflow):
42
45
  conformers: list[Conformer] = []
43
46
 
44
47
  def model_post_init(self, __context: Any) -> None:
45
- self.settings = csearch_settings_by_mode(self.mode)
48
+ self.settings = csearch_settings_by_mode(self.mode, self.settings)
49
+
50
+
51
+ def csearch_settings_by_mode(mode: Mode, old_settings: Optional[ConformerSettings]) -> ConformerSettings:
52
+ if mode == Mode.MANUAL:
53
+ assert old_settings is not None
54
+ return old_settings
46
55
 
56
+ settings: ConformerSettings
47
57
 
48
- def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
49
58
  if mode == Mode.METICULOUS:
50
- return CrestConformerSettings(
59
+ settings = CrestConformerSettings(
51
60
  gfn=2,
52
- flags="--ewin 15",
61
+ flags="--ewin 15 --noreftopo",
53
62
  max_energy=10,
54
63
  num_confs_considered=500,
55
64
  num_confs_taken=150,
56
65
  )
57
66
 
58
67
  elif mode == Mode.CAREFUL:
59
- return CrestConformerSettings(
68
+ settings = CrestConformerSettings(
60
69
  gfn="ff",
61
- flags="--quick --ewin 10",
70
+ flags="--quick --ewin 10 --noreftopo",
62
71
  num_confs_considered=150,
63
72
  num_confs_taken=50,
64
73
  )
65
74
 
66
75
  elif mode == Mode.RAPID or Mode.AUTO:
67
- return RdkitConformerSettings(
76
+ settings = RdkitConformerSettings(
68
77
  num_initial_confs=300,
69
78
  max_mmff_energy=15,
70
79
  num_confs_considered=100,
@@ -72,7 +81,7 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
72
81
  )
73
82
 
74
83
  elif mode == Mode.RECKLESS:
75
- return RdkitConformerSettings(
84
+ settings = RdkitConformerSettings(
76
85
  num_initial_confs=200,
77
86
  max_mmff_energy=10,
78
87
  num_confs_considered=50,
@@ -82,3 +91,10 @@ def csearch_settings_by_mode(mode: Mode) -> ConformerSettings:
82
91
 
83
92
  else:
84
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
@@ -0,0 +1,10 @@
1
+ from .workflow import Workflow
2
+
3
+ Descriptors = dict[str, dict[str, float] | tuple[float | None, ...] | float]
4
+
5
+
6
+ class DescriptorsWorkflow(Workflow):
7
+ # uuid of optimization
8
+ optimization: str | None = None
9
+
10
+ descriptors: Descriptors | None = None
@@ -1,4 +1,5 @@
1
1
  from ..base import Base
2
+ from ..message import Message
2
3
  from ..molecule import Molecule
3
4
 
4
5
 
@@ -6,6 +7,7 @@ class Workflow(Base):
6
7
  """All workflows should have these properties."""
7
8
 
8
9
  initial_molecule: Molecule
10
+ messages: list[Message] = []
9
11
 
10
12
 
11
13
  class DBCalculation(Base):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stjames
3
- Version: 0.0.35
3
+ Version: 0.0.37
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
@@ -6,10 +6,12 @@ stjames/_deprecated_solvent_settings.py
6
6
  stjames/base.py
7
7
  stjames/basis_set.py
8
8
  stjames/calculation.py
9
+ stjames/constraint.py
9
10
  stjames/correction.py
10
11
  stjames/diis_settings.py
11
12
  stjames/grid_settings.py
12
13
  stjames/int_settings.py
14
+ stjames/message.py
13
15
  stjames/method.py
14
16
  stjames/mode.py
15
17
  stjames/molecule.py
@@ -28,6 +30,7 @@ stjames.egg-info/requires.txt
28
30
  stjames.egg-info/top_level.txt
29
31
  stjames/workflows/__init__.py
30
32
  stjames/workflows/conformer.py
33
+ stjames/workflows/descriptors.py
31
34
  stjames/workflows/fukui.py
32
35
  stjames/workflows/pka.py
33
36
  stjames/workflows/redox_potential.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