stjames 0.0.119__tar.gz → 0.0.121__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 (85) hide show
  1. {stjames-0.0.119/stjames.egg-info → stjames-0.0.121}/PKG-INFO +1 -1
  2. {stjames-0.0.119 → stjames-0.0.121}/pyproject.toml +1 -1
  3. {stjames-0.0.119 → stjames-0.0.121}/stjames/__init__.py +1 -0
  4. {stjames-0.0.119 → stjames-0.0.121}/stjames/calculation.py +15 -2
  5. {stjames-0.0.119 → stjames-0.0.121}/stjames/settings.py +11 -2
  6. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/__init__.py +3 -0
  7. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/basic_calculation.py +6 -1
  8. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/fukui.py +6 -3
  9. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/molecular_dynamics.py +3 -1
  10. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/scan.py +12 -5
  11. {stjames-0.0.119 → stjames-0.0.121/stjames.egg-info}/PKG-INFO +1 -1
  12. {stjames-0.0.119 → stjames-0.0.121}/LICENSE +0 -0
  13. {stjames-0.0.119 → stjames-0.0.121}/README.md +0 -0
  14. {stjames-0.0.119 → stjames-0.0.121}/setup.cfg +0 -0
  15. {stjames-0.0.119 → stjames-0.0.121}/stjames/_deprecated_solvent_settings.py +0 -0
  16. {stjames-0.0.119 → stjames-0.0.121}/stjames/atom.py +0 -0
  17. {stjames-0.0.119 → stjames-0.0.121}/stjames/atomium_stjames/__init__.py +0 -0
  18. {stjames-0.0.119 → stjames-0.0.121}/stjames/atomium_stjames/data.py +0 -0
  19. {stjames-0.0.119 → stjames-0.0.121}/stjames/atomium_stjames/mmcif.py +0 -0
  20. {stjames-0.0.119 → stjames-0.0.121}/stjames/atomium_stjames/pdb.py +0 -0
  21. {stjames-0.0.119 → stjames-0.0.121}/stjames/atomium_stjames/utilities.py +0 -0
  22. {stjames-0.0.119 → stjames-0.0.121}/stjames/base.py +0 -0
  23. {stjames-0.0.119 → stjames-0.0.121}/stjames/basis_set.py +0 -0
  24. {stjames-0.0.119 → stjames-0.0.121}/stjames/compute_settings.py +0 -0
  25. {stjames-0.0.119 → stjames-0.0.121}/stjames/constraint.py +0 -0
  26. {stjames-0.0.119 → stjames-0.0.121}/stjames/correction.py +0 -0
  27. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/__init__.py +0 -0
  28. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/bragg_radii.json +0 -0
  29. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/elements.py +0 -0
  30. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/isotopes.json +0 -0
  31. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/nist_isotopes.json +0 -0
  32. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/read_nist_isotopes.py +0 -0
  33. {stjames-0.0.119 → stjames-0.0.121}/stjames/data/symbol_element.json +0 -0
  34. {stjames-0.0.119 → stjames-0.0.121}/stjames/engine.py +0 -0
  35. {stjames-0.0.119 → stjames-0.0.121}/stjames/message.py +0 -0
  36. {stjames-0.0.119 → stjames-0.0.121}/stjames/method.py +0 -0
  37. {stjames-0.0.119 → stjames-0.0.121}/stjames/mode.py +0 -0
  38. {stjames-0.0.119 → stjames-0.0.121}/stjames/molecule.py +0 -0
  39. {stjames-0.0.119 → stjames-0.0.121}/stjames/opt_settings.py +0 -0
  40. {stjames-0.0.119 → stjames-0.0.121}/stjames/optimization/__init__.py +0 -0
  41. {stjames-0.0.119 → stjames-0.0.121}/stjames/optimization/freezing_string_method.py +0 -0
  42. {stjames-0.0.119 → stjames-0.0.121}/stjames/pdb.py +0 -0
  43. {stjames-0.0.119 → stjames-0.0.121}/stjames/periodic_cell.py +0 -0
  44. {stjames-0.0.119 → stjames-0.0.121}/stjames/py.typed +0 -0
  45. {stjames-0.0.119 → stjames-0.0.121}/stjames/scf_settings.py +0 -0
  46. {stjames-0.0.119 → stjames-0.0.121}/stjames/solvent.py +0 -0
  47. {stjames-0.0.119 → stjames-0.0.121}/stjames/status.py +0 -0
  48. {stjames-0.0.119 → stjames-0.0.121}/stjames/task.py +0 -0
  49. {stjames-0.0.119 → stjames-0.0.121}/stjames/thermochem_settings.py +0 -0
  50. {stjames-0.0.119 → stjames-0.0.121}/stjames/types.py +0 -0
  51. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/admet.py +0 -0
  52. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/batch_docking.py +0 -0
  53. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/bde.py +0 -0
  54. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/conformer.py +0 -0
  55. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/conformer_search.py +0 -0
  56. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/descriptors.py +0 -0
  57. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/docking.py +0 -0
  58. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/double_ended_ts_search.py +0 -0
  59. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/electronic_properties.py +0 -0
  60. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  61. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/ion_mobility.py +0 -0
  62. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/irc.py +0 -0
  63. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/macropka.py +0 -0
  64. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/multistage_opt.py +0 -0
  65. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/nmr.py +0 -0
  66. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/pka.py +0 -0
  67. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/pose_analysis_md.py +0 -0
  68. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/protein_binder_design.py +0 -0
  69. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/protein_cofolding.py +0 -0
  70. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/redox_potential.py +0 -0
  71. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/solubility.py +0 -0
  72. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/spin_states.py +0 -0
  73. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/strain.py +0 -0
  74. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/tautomer.py +0 -0
  75. {stjames-0.0.119 → stjames-0.0.121}/stjames/workflows/workflow.py +0 -0
  76. {stjames-0.0.119 → stjames-0.0.121}/stjames.egg-info/SOURCES.txt +0 -0
  77. {stjames-0.0.119 → stjames-0.0.121}/stjames.egg-info/dependency_links.txt +0 -0
  78. {stjames-0.0.119 → stjames-0.0.121}/stjames.egg-info/requires.txt +0 -0
  79. {stjames-0.0.119 → stjames-0.0.121}/stjames.egg-info/top_level.txt +0 -0
  80. {stjames-0.0.119 → stjames-0.0.121}/tests/test_constraints.py +0 -0
  81. {stjames-0.0.119 → stjames-0.0.121}/tests/test_from_extxyz.py +0 -0
  82. {stjames-0.0.119 → stjames-0.0.121}/tests/test_molecule.py +0 -0
  83. {stjames-0.0.119 → stjames-0.0.121}/tests/test_pdb.py +0 -0
  84. {stjames-0.0.119 → stjames-0.0.121}/tests/test_rounding.py +0 -0
  85. {stjames-0.0.119 → stjames-0.0.121}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.119
3
+ Version: 0.0.121
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.119"
3
+ version = "0.0.121"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -22,3 +22,4 @@ from .status import *
22
22
  from .constraint import *
23
23
  from .message import *
24
24
  from .types import *
25
+ from .engine import *
@@ -1,10 +1,13 @@
1
- from typing import Optional
1
+ from typing import Optional, Self
2
2
 
3
- from .base import Base, LowercaseStrEnum
3
+ from pydantic import model_validator
4
+
5
+ from .base import Base, LowercaseStrEnum, UniqueList
4
6
  from .message import Message
5
7
  from .molecule import Molecule
6
8
  from .settings import Settings
7
9
  from .status import Status
10
+ from .task import Task
8
11
  from .types import UUID
9
12
 
10
13
 
@@ -20,6 +23,7 @@ class StJamesVersion(LowercaseStrEnum):
20
23
  class Calculation(Base):
21
24
  molecules: list[Molecule]
22
25
 
26
+ tasks: UniqueList[Task] = []
23
27
  settings: Settings = Settings()
24
28
 
25
29
  status: Status = Status.QUEUED
@@ -29,8 +33,17 @@ class Calculation(Base):
29
33
  logfile: Optional[str] = None
30
34
  messages: list[Message] = []
31
35
 
36
+ # DEPRECATED - moving into settings
32
37
  engine: Optional[str] = "peregrine"
38
+
33
39
  uuids: list[UUID | None] | None = None
34
40
 
35
41
  # not to be changed by end users, diff. versions will have diff. defaults
36
42
  json_format: str = StJamesVersion.V0
43
+
44
+ @model_validator(mode="after")
45
+ def populate_tasks(self) -> Self:
46
+ """Set the tasks from the settings, so that we don't have to migrate old entries."""
47
+ if len(self.tasks) == 0:
48
+ self.tasks = self.settings.tasks
49
+ return self
@@ -6,6 +6,7 @@ from .base import Base, UniqueList
6
6
  from .basis_set import BasisSet
7
7
  from .compute_settings import ComputeSettings
8
8
  from .correction import Correction
9
+ from .engine import Engine
9
10
  from .method import CORRECTABLE_NNP_METHODS, METHODS_WITH_CORRECTION, PREPACKAGED_METHODS, Method
10
11
  from .mode import Mode
11
12
  from .opt_settings import OptimizationSettings
@@ -20,11 +21,13 @@ _T = TypeVar("_T")
20
21
  class Settings(Base):
21
22
  mode: Mode = Mode.AUTO
22
23
 
24
+ # DEPRECATED - specify tasks only in BasicCalculationWorkflow or Calculation now
25
+ tasks: UniqueList[Task] = [Task.ENERGY, Task.CHARGE, Task.DIPOLE]
26
+
23
27
  method: Method = Method.HARTREE_FOCK
24
28
  basis_set: Optional[BasisSet] = None
25
- tasks: UniqueList[Task] = [Task.ENERGY, Task.CHARGE, Task.DIPOLE]
29
+ engine: Engine = None # type: ignore [assignment]
26
30
  corrections: UniqueList[Correction] = []
27
-
28
31
  solvent_settings: Optional[SolventSettings] = None
29
32
 
30
33
  # scf/opt settings will be set automatically based on mode, but can be overridden manually
@@ -33,6 +36,12 @@ class Settings(Base):
33
36
  thermochem_settings: ThermochemistrySettings = ThermochemistrySettings()
34
37
  compute_settings: ComputeSettings = ComputeSettings()
35
38
 
39
+ @model_validator(mode="after")
40
+ def set_engine(self) -> Self:
41
+ """Set the calculation engine."""
42
+ self.engine = self.engine or self.method.default_engine()
43
+ return self
44
+
36
45
  # mypy has this dead wrong (https://docs.pydantic.dev/2.0/usage/computed_fields/)
37
46
  # Python 3.12 narrows the reason for the ignore to prop-decorator
38
47
  @computed_field # type: ignore[misc, prop-decorator, unused-ignore]
@@ -4,6 +4,7 @@ from typing import Literal
4
4
 
5
5
  from .admet import *
6
6
  from .basic_calculation import *
7
+ from .batch_docking import *
7
8
  from .bde import *
8
9
  from .conformer import *
9
10
  from .conformer_search import *
@@ -34,6 +35,7 @@ from .workflow import *
34
35
  WORKFLOW_NAME = Literal[
35
36
  "admet",
36
37
  "basic_calculation",
38
+ "batch_docking",
37
39
  "bde",
38
40
  "conformers",
39
41
  "conformer_search",
@@ -64,6 +66,7 @@ WORKFLOW_NAME = Literal[
64
66
  WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
65
67
  "admet": ADMETWorkflow, # type: ignore [dict-item]
66
68
  "basic_calculation": BasicCalculationWorkflow, # type: ignore [dict-item]
69
+ "batch_docking": BatchDockingWorkflow, # type: ignore [dict-item]
67
70
  "bde": BDEWorkflow, # type: ignore [dict-item]
68
71
  "conformers": ConformerWorkflow, # type: ignore [dict-item]
69
72
  "conformer_search": ConformerSearchWorkflow, # type: ignore [dict-item]
@@ -4,8 +4,10 @@ from typing import Self
4
4
 
5
5
  from pydantic import model_validator
6
6
 
7
+ from ..base import UniqueList
7
8
  from ..engine import Engine
8
9
  from ..settings import Settings
10
+ from ..task import Task
9
11
  from ..types import UUID
10
12
  from .workflow import MoleculeWorkflow
11
13
 
@@ -25,9 +27,12 @@ class BasicCalculationWorkflow(MoleculeWorkflow):
25
27
  """
26
28
 
27
29
  settings: Settings
28
- engine: Engine = None # type: ignore [assignment]
30
+ tasks: UniqueList[Task] = [Task.ENERGY, Task.CHARGE, Task.DIPOLE]
29
31
  calculation_uuid: UUID | None = None
30
32
 
33
+ # DEPRECATED - specify in settings now
34
+ engine: Engine = None # type: ignore [assignment]
35
+
31
36
  @model_validator(mode="after")
32
37
  def set_engine(self) -> Self:
33
38
  """Set the calculation engine."""
@@ -36,9 +36,13 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
36
36
  """
37
37
 
38
38
  opt_settings: Settings | None = None
39
+
40
+ # DEPRECATED - will be removed
39
41
  opt_engine: Engine | None = None
40
42
 
41
43
  fukui_settings: Settings = Settings(method=Method.GFN1_XTB)
44
+
45
+ # DEPRECATED - will be removed
42
46
  fukui_engine: Engine = None # type: ignore [assignment]
43
47
 
44
48
  optimization: UUID | None = None
@@ -52,7 +56,6 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
52
56
  def set_engines(self) -> Self:
53
57
  """Set the engines for optimization and Fukui index calculations."""
54
58
  if self.opt_settings is not None and self.opt_engine is None:
55
- self.opt_engine = self.opt_settings.method.default_engine()
56
- self.fukui_engine = self.fukui_engine or self.fukui_settings.method.default_engine()
57
-
59
+ self.opt_engine = self.opt_settings.engine
60
+ self.fukui_engine = self.fukui_engine or self.fukui_settings.engine
58
61
  return self
@@ -96,6 +96,8 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
96
96
 
97
97
  settings: MolecularDynamicsSettings
98
98
  calc_settings: Settings
99
+
100
+ # DEPRECATED - will remove later
99
101
  calc_engine: Engine = None # type: ignore[assignment]
100
102
 
101
103
  frames: list[Frame] = []
@@ -103,6 +105,6 @@ class MolecularDynamicsWorkflow(MoleculeWorkflow):
103
105
  @model_validator(mode="after")
104
106
  def validate_calc_engine(self) -> Self:
105
107
  """Ensure that the calc_engine is set."""
106
- self.calc_engine = self.calc_engine or self.calc_settings.method.default_engine()
108
+ self.calc_engine = self.calc_engine or self.calc_settings.engine
107
109
 
108
110
  return self
@@ -1,12 +1,11 @@
1
- """Scan workflow."""
2
-
3
- from typing import Annotated
1
+ from typing import Annotated, Self
4
2
 
5
3
  import numpy as np
6
4
  from numpy.typing import NDArray
7
- from pydantic import AfterValidator, field_validator
5
+ from pydantic import AfterValidator, field_validator, model_validator
8
6
 
9
7
  from ..base import Base, round_optional_float
8
+ from ..engine import Engine
10
9
  from ..molecule import Molecule
11
10
  from ..settings import Settings
12
11
  from ..types import UUID
@@ -75,7 +74,9 @@ class ScanWorkflow(MoleculeWorkflow):
75
74
  scan_settings: ScanSettings | list[ScanSettings]
76
75
  scan_settings_2d: ScanSettings | list[ScanSettings] = []
77
76
  calc_settings: Settings
78
- calc_engine: str
77
+
78
+ # DEPRECATED - will be removed in future
79
+ calc_engine: Engine = None # type: ignore [assignment]
79
80
 
80
81
  wavefront_propagation: bool = True
81
82
 
@@ -94,3 +95,9 @@ class ScanWorkflow(MoleculeWorkflow):
94
95
  raise ValueError("Concerted scan settings must have same number of steps!")
95
96
 
96
97
  return val
98
+
99
+ @model_validator(mode="after")
100
+ def set_calc_engine(self) -> Self:
101
+ """Set the calculation engine."""
102
+ self.calc_engine = self.calc_engine or self.calc_settings.engine
103
+ return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.119
3
+ Version: 0.0.121
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
File without changes
File without changes
File without changes
File without changes