stjames 0.0.68__py3-none-any.whl → 0.0.70__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/method.py CHANGED
@@ -36,6 +36,7 @@ class Method(LowercaseStrEnum):
36
36
  OCP24_S = "ocp24_s"
37
37
  OCP24_L = "ocp24_l"
38
38
  ORB_V2 = "orb_v2"
39
+ ORB_V3_CONSERVATIVE_INF_OMAT = "orb_v3_conservative_inf_omat"
39
40
 
40
41
  GFN_FF = "gfn_ff"
41
42
  GFN0_XTB = "gfn0_xtb"
@@ -50,8 +51,8 @@ class Method(LowercaseStrEnum):
50
51
  RM1 = "rm1"
51
52
 
52
53
 
53
- PrepackagedNNPMethod = Literal[Method.AIMNET2_WB97MD3, Method.OCP24_S, Method.OCP24_L, Method.RM1]
54
- PREPACKAGED_NNP_METHODS = [Method.AIMNET2_WB97MD3, Method.OCP24_S, Method.OCP24_L, Method.RM1]
54
+ PrepackagedNNPMethod = Literal[Method.AIMNET2_WB97MD3, Method.OCP24_S, Method.OCP24_L, Method.RM1, Method.ORB_V3_CONSERVATIVE_INF_OMAT]
55
+ PREPACKAGED_NNP_METHODS = [Method.AIMNET2_WB97MD3, Method.OCP24_S, Method.OCP24_L, Method.RM1, Method.ORB_V3_CONSERVATIVE_INF_OMAT]
55
56
 
56
57
  CorrectableNNPMethod = Literal[Method.MACE_MP_0B2_L, Method.ORB_V2]
57
58
  CORRECTABLE_NNP_METHODS = [Method.MACE_MP_0B2_L, Method.ORB_V2]
stjames/opt_settings.py CHANGED
@@ -9,6 +9,7 @@ from .constraint import Constraint
9
9
  class OptimizationSettings(Base):
10
10
  max_steps: PositiveInt = 250
11
11
  transition_state: bool = False
12
+ recalc_hess_every: int = 0 # Recalculate the hessian every `n` steps (or never with 0)
12
13
 
13
14
  # when are we converged? (Hartree and Hartree/Å)
14
15
  max_gradient_threshold: PositiveFloat = 7e-4
@@ -14,6 +14,7 @@ from .fukui import *
14
14
  from .hydrogen_bond_basicity import *
15
15
  from .ion_mobility import *
16
16
  from .irc import *
17
+ from .macropka import *
17
18
  from .molecular_dynamics import *
18
19
  from .multistage_opt import *
19
20
  from .pka import *
@@ -37,6 +38,7 @@ WORKFLOW_NAME = Literal[
37
38
  "hydrogen_bond_basicity",
38
39
  "ion_mobility",
39
40
  "irc",
41
+ "macropka",
40
42
  "molecular_dynamics",
41
43
  "multistage_opt",
42
44
  "pka",
@@ -60,6 +62,7 @@ WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
60
62
  "hydrogen_bond_basicity": HydrogenBondBasicityWorkflow, # type: ignore [dict-item]
61
63
  "ion_mobility": IonMobilityWorkflow, # type: ignore [dict-item]
62
64
  "irc": IRCWorkflow, # type: ignore [dict-item]
65
+ "macropka": MacropKaWorkflow, # type: ignore [dict-item]
63
66
  "molecular_dynamics": MolecularDynamicsWorkflow, # type: ignore [dict-item]
64
67
  "multistage_opt": MultiStageOptWorkflow, # type: ignore [dict-item]
65
68
  "pka": pKaWorkflow, # type: ignore [dict-item]
@@ -5,6 +5,7 @@ from typing import Annotated
5
5
  from pydantic import AfterValidator
6
6
 
7
7
  from ..base import round_optional_float
8
+ from ..settings import Settings
8
9
  from ..types import UUID, FloatPerAtom, round_optional_float_per_atom
9
10
  from .workflow import MoleculeWorkflow
10
11
 
@@ -17,6 +18,12 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
17
18
  :param initial_molecule: Molecule of interest
18
19
  :param mode: Mode for workflow (currently unused)
19
20
 
21
+ Settings:
22
+ :param opt_settings: if given, the settings for optimization. if none, no optimization will be conducted.
23
+ :param opt_engine: the engine for optimization
24
+ :param fukui_settings: the settings for Fukui index calculations.
25
+ :param fukui_engine: the engine for Fukui index calculations
26
+
20
27
  Results:
21
28
  :param optimization: UUID of optimization
22
29
  :param global_electrophilicity_index: global electrophilicity index
@@ -25,7 +32,12 @@ class FukuiIndexWorkflow(MoleculeWorkflow):
25
32
  :param fukui_zero: Fukui index for zero charges
26
33
  """
27
34
 
28
- # UUID of optimization
35
+ opt_settings: Settings | None = None
36
+ opt_engine: str | None = None
37
+
38
+ fukui_settings: Settings = Settings(method="gfn1_xtb")
39
+ fukui_engine: str | None = None
40
+
29
41
  optimization: UUID | None = None
30
42
 
31
43
  global_electrophilicity_index: Annotated[float | None, AfterValidator(round_optional_float(6))] = None
@@ -1,6 +1,6 @@
1
1
  """pKa workflow."""
2
2
 
3
- from typing import Annotated, Self
3
+ from typing import Annotated, Optional, Self
4
4
 
5
5
  from pydantic import AfterValidator, model_validator
6
6
 
@@ -55,18 +55,48 @@ class MacropKaWorkflow(SMILESWorkflow):
55
55
  :param microstate_weights_by_pH: precompute the % of different microstates
56
56
  """
57
57
 
58
- temperature: Annotated[float, AfterValidator(round_float(3))] = 298.0
59
58
  min_pH: Annotated[float, AfterValidator(round_float(3))] = 0.0
60
59
  max_pH: Annotated[float, AfterValidator(round_float(3))] = 14.0
61
60
 
61
+ max_charge: int = 2
62
+ min_charge: int = -2
63
+
62
64
  microstates: list[MacropKaMicrostate] = []
63
65
  pKa_values: list[MacropKaValue] = []
64
- microstate_weights_by_pH: dict[float, Annotated[list[float], AfterValidator(round_list(6))]] = {}
66
+ microstate_weights_by_pH: list[
67
+ tuple[
68
+ Annotated[float, AfterValidator(round_float(3))],
69
+ Annotated[list[float], AfterValidator(round_list(6))],
70
+ ]
71
+ ] = []
72
+
73
+ isoelectric_point: Annotated[Optional[float], AfterValidator(round_float(3))] = None
74
+
75
+ logD_by_pH: list[
76
+ tuple[
77
+ Annotated[float, AfterValidator(round_float(3))],
78
+ Annotated[float, AfterValidator(round_float(3))],
79
+ ]
80
+ ] = []
81
+
82
+ aqueous_solubility_by_pH: list[
83
+ tuple[
84
+ Annotated[float, AfterValidator(round_float(3))],
85
+ Annotated[float, AfterValidator(round_float(3))],
86
+ ]
87
+ ] = []
65
88
 
66
89
  @model_validator(mode="after")
67
90
  def check_weights(self) -> Self:
68
- for weights in self.microstate_weights_by_pH.values():
91
+ for _, weights in self.microstate_weights_by_pH:
69
92
  if len(weights) != len(self.microstates):
70
93
  raise ValueError("Length of microstate weights doesn't match!")
71
94
 
72
95
  return self
96
+
97
+ @model_validator(mode="after")
98
+ def check_minmax_charges(self) -> Self:
99
+ if self.min_charge >= self.max_charge:
100
+ raise ValueError("Incoherent min/max charge specification")
101
+
102
+ return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.68
3
+ Version: 0.0.70
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
@@ -11,10 +11,10 @@ stjames/diis_settings.py,sha256=4m1EQQWBlpHhMnWopix8qOqJv7QCluvdnV9jSKJDFtE,552
11
11
  stjames/grid_settings.py,sha256=WrSNGc-8_f87YBZYt9Hh7RbhM4MweADoVzwBMcSqcsE,640
12
12
  stjames/int_settings.py,sha256=5HXp8opt5ZyY1UpmfaK7NVloWVLM5jkG0elEEqpVLUo,896
13
13
  stjames/message.py,sha256=Rq6QqmHZKecWxYH8fVyXmuoCCPZv8YinvgykSeorXSU,216
14
- stjames/method.py,sha256=5hBHk2xQLpxZ52LwJ9FHWaqQMdFKnsbQEOxaVe6O4Go,2321
14
+ stjames/method.py,sha256=4X2OdeOQCj0Ihtthl9mx6Q26RrZljYhvRUVz-huf0s8,2461
15
15
  stjames/mode.py,sha256=xw46Cc7f3eTS8i35qECi-8DocAlANhayK3w4akD4HBU,496
16
16
  stjames/molecule.py,sha256=4dakMkn-_I5bSWsijLLY0tn5NkBEuZhmtYDj-MDSJE0,17987
17
- stjames/opt_settings.py,sha256=gxXGtjy9l-Q5Wen9eO6T6HHRCuS8rfOofdVQIJj0JcI,550
17
+ stjames/opt_settings.py,sha256=LEwGXUEKq5TfU5rr60Z4QQBhCqiw1Ch5w0M_lXawWo8,642
18
18
  stjames/pdb.py,sha256=_pIdJCMhIzS4t2HWQa_susDWjZEl0oLn4Njb1QoKvKw,26460
19
19
  stjames/periodic_cell.py,sha256=eV_mArsY_MPEFSrFEsTC-CyCc6V8ITAXdk7yhjjNI7M,1080
20
20
  stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -37,7 +37,7 @@ stjames/data/isotopes.json,sha256=5ba8QnLrHD_Ypv2xekv2cIRwYrX3MQ19-1FOFtt0RuU,83
37
37
  stjames/data/nist_isotopes.json,sha256=d5DNk1dX0iB1waEYIRR6JMHuA7AuYwSBEgBvb4EKyhM,14300
38
38
  stjames/data/read_nist_isotopes.py,sha256=y10FNjW43QpC45qib7VHsIghEwT7GG5rsNwHdc9osRI,3309
39
39
  stjames/data/symbol_element.json,sha256=vl_buFusTqBd-muYQtMLtTDLy2OtBI6KkBeqkaWRQrg,1186
40
- stjames/workflows/__init__.py,sha256=sHKzK6ZtVt8TkaX3JoIrg46SVK9rDi_elA7qCIAqBpE,2410
40
+ stjames/workflows/__init__.py,sha256=X8uBwvmpaP38QQxYlvl9TbejEnnujpyWCLbxq0gRKao,2512
41
41
  stjames/workflows/admet.py,sha256=h8ph6oeRCxU3-_jqRRWPg3RZcheu9JzCHiWqSC9VYKY,1296
42
42
  stjames/workflows/basic_calculation.py,sha256=ZX3KwhfyyCTjc2ougQIL4If7gtwZP9WjqpL45mBquW0,573
43
43
  stjames/workflows/bde.py,sha256=hdTjwma5L9SrU5F5r6dB1ruB_B6buBUtZHf2sanNW2k,9802
@@ -46,11 +46,11 @@ stjames/workflows/conformer_search.py,sha256=4yPEKIIedeaVvaAwgjwC1FxiHqM6n2zOF6c
46
46
  stjames/workflows/descriptors.py,sha256=T4tc7xdtBdxESGO86KR323jPQ2pgwxBqgV0khA6MEgQ,584
47
47
  stjames/workflows/docking.py,sha256=GCW_-JeEZcMXKZ9EQFOxWUYRo0jsbzwIv10aSz8KuaQ,3027
48
48
  stjames/workflows/electronic_properties.py,sha256=GT3-NC7w-dbcOJ-3AzJ7LgzH6frTbiH2Iyb9BCa-SvY,4112
49
- stjames/workflows/fukui.py,sha256=e7CF7Mp2Dt1JTipQx-Sz_37W1urL-iRpjXY-9ItSvhM,1268
49
+ stjames/workflows/fukui.py,sha256=T6TDg-lcE-sfTDVpa3KFBenLe7PGUO2QrQ2jNuw_iiU,1756
50
50
  stjames/workflows/hydrogen_bond_basicity.py,sha256=XDpHEluw6DQ9Zk5g2Je2a81HqIkqPglZ-6f2YZnd4Bc,1159
51
51
  stjames/workflows/ion_mobility.py,sha256=e6XSidrud5qSkrAcjzOzgHaf-G09JoP09V76myjdyjc,1097
52
52
  stjames/workflows/irc.py,sha256=ZP7icylW8rgo_Uh7h3bmyumn0ru1IyF-61nP5Jnmq3M,3402
53
- stjames/workflows/macropka.py,sha256=d3jUKZIUU7ifcMCB6KuTEpP91Pl9sQA0WAmjnODbp6g,2058
53
+ stjames/workflows/macropka.py,sha256=k7ebG4s-GoTG3ZKxq-OQ7gmzT8Yaq_Zd4pkL7pqL_pI,2827
54
54
  stjames/workflows/molecular_dynamics.py,sha256=kxugE73Ntzpj-xpJSoQ1EwGzXXdvi_NTyeP4913EVwE,3173
55
55
  stjames/workflows/multistage_opt.py,sha256=pPLAZDztHd37q8cxCUkdq8EzOFyrTzZJHNfDV5auiHs,13638
56
56
  stjames/workflows/pka.py,sha256=j3vBh2YM3nJzJ1XJKPsmYahRCeaU9n3P-G-u9_moaFw,2065
@@ -60,8 +60,8 @@ stjames/workflows/solubility.py,sha256=kGfVyPPGDLRpf2j6dSY7woCkfsoXSbUzdSImA4mcM
60
60
  stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
61
61
  stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
62
62
  stjames/workflows/workflow.py,sha256=sk2BUz59wdIkT_EyKOnMt5woNrjo3aHVK38cU8x8I7Q,1423
63
- stjames-0.0.68.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
64
- stjames-0.0.68.dist-info/METADATA,sha256=QvoqeoYNBF5Kb1_Ojvaj08H4S1ObPREu1-9ocQ_RTtI,1694
65
- stjames-0.0.68.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
66
- stjames-0.0.68.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
67
- stjames-0.0.68.dist-info/RECORD,,
63
+ stjames-0.0.70.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
64
+ stjames-0.0.70.dist-info/METADATA,sha256=MOZJAAQ9roamz5kJ2Y5_vzOmCU97hPvzi_4pG6KhVDM,1694
65
+ stjames-0.0.70.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
66
+ stjames-0.0.70.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
67
+ stjames-0.0.70.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.0.2)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5