stjames 0.0.95__py3-none-any.whl → 0.0.97__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/workflows/nmr.py CHANGED
@@ -4,11 +4,11 @@ from typing import Annotated
4
4
 
5
5
  from pydantic import AfterValidator
6
6
 
7
- from ..base import LowercaseStrEnum
7
+ from ..base import Base, LowercaseStrEnum, round_float
8
8
  from ..mode import Mode
9
9
  from ..settings import Settings
10
10
  from ..solvent import Solvent
11
- from ..types import UUID, round_list
11
+ from ..types import UUID, round_list, round_optional_list
12
12
  from .conformer_search import ConformerGenSettings, iMTDSettings
13
13
  from .multistage_opt import MultiStageOptSettings
14
14
  from .workflow import MoleculeWorkflow
@@ -18,6 +18,20 @@ class NMRMethod(LowercaseStrEnum):
18
18
  MAGNETZERO = "magnet-zero"
19
19
 
20
20
 
21
+ class NMRPeak(Base):
22
+ """
23
+ Represents a single NMR peak.
24
+
25
+ :param nucleus: the atomic number of the nucleus in question
26
+ :param shift: the chemical shift of the peak
27
+ :param atom_indices: the zero-indices of the atoms giving rise to the peak
28
+ """
29
+
30
+ nucleus: int
31
+ shift: Annotated[float, AfterValidator(round_float(3))]
32
+ atom_indices: set[int]
33
+
34
+
21
35
  class NMRSpectroscopyWorkflow(MoleculeWorkflow):
22
36
  """
23
37
  Workflow for calculating NMR spectra.
@@ -35,8 +49,10 @@ class NMRSpectroscopyWorkflow(MoleculeWorkflow):
35
49
  Results:
36
50
  :param conformers: list of conformer UUIDs
37
51
  :param boltzmann_weights: the boltzmann weights for each conformer
38
- :param per_conformer_isotopic_shieldings: the per-atom shieldings for each conformer
39
- :param isotopic_shieldings: the per-atom shieldings
52
+ :param per_conformer_chemical_shifts: the per-atom shifts for each conformer
53
+ :param chemical_shifts: the per-atom shifts
54
+ :param symmetry_equivalent_nuclei: 0-indexed atoms which are equivalent to one another
55
+ :param predicted_peaks: the predicted NMR peaks
40
56
  """
41
57
 
42
58
  nmr_method: NMRMethod = NMRMethod.MAGNETZERO
@@ -45,10 +61,13 @@ class NMRSpectroscopyWorkflow(MoleculeWorkflow):
45
61
  conf_gen_settings: ConformerGenSettings | None = iMTDSettings(mode="careful")
46
62
  multistage_opt_settings: MultiStageOptSettings | None = MultiStageOptSettings(
47
63
  mode=Mode.MANUAL,
48
- optimization_settings=[Settings(method="aimnet2_wb97md3")],
64
+ optimization_settings=[Settings(method="aimnet2_wb97md3", tasks=["optimize"])],
49
65
  )
50
66
 
51
67
  conformers: list[UUID] = []
52
68
  boltzmann_weights: Annotated[list[float], AfterValidator(round_list(3))] = []
53
- per_conformer_isotropic_shieldings: list[Annotated[list[float], AfterValidator(round_list(3))]] = []
54
- isotropic_shieldings: Annotated[list[float], AfterValidator(round_list(3))] = []
69
+ per_conformer_chemical_shifts: list[Annotated[list[float | None], AfterValidator(round_optional_list(3))]] = []
70
+ chemical_shifts: Annotated[list[float | None], AfterValidator(round_optional_list(3))] = []
71
+ symmetry_equivalent_nuclei: set[set[int]] = set()
72
+
73
+ predicted_peaks: dict[int, list[NMRPeak]] = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.95
3
+ Version: 0.0.97
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
@@ -51,7 +51,7 @@ stjames/workflows/irc.py,sha256=ZP7icylW8rgo_Uh7h3bmyumn0ru1IyF-61nP5Jnmq3M,3402
51
51
  stjames/workflows/macropka.py,sha256=KRIyk4gsSYL3eqyzCDndStGLwjWSo60cgCAzvAoD1Nk,3754
52
52
  stjames/workflows/molecular_dynamics.py,sha256=kxugE73Ntzpj-xpJSoQ1EwGzXXdvi_NTyeP4913EVwE,3173
53
53
  stjames/workflows/multistage_opt.py,sha256=SpbA8hNvktnlLS7C-9mBNGluBSrdVS8ygHl1C4TzWcI,16499
54
- stjames/workflows/nmr.py,sha256=mSmBl_kp5sWKExO-2xxfcqGtf-cot3YTcGpzBfoh68g,2023
54
+ stjames/workflows/nmr.py,sha256=MMj91jAfq5J7AE9-eP4eiaP1GxF9r_-3AFv-SGGQXiQ,2710
55
55
  stjames/workflows/pka.py,sha256=j3vBh2YM3nJzJ1XJKPsmYahRCeaU9n3P-G-u9_moaFw,2065
56
56
  stjames/workflows/pose_analysis_md.py,sha256=ES0XlzaLpTjhLrNvcB0zFZa1b1ZHXekN72EbLsx0Skw,4723
57
57
  stjames/workflows/protein_cofolding.py,sha256=6WWbVOGzFjIRgQLMmMVODfIxo1jYFmRS1xnJmN0kOBw,3016
@@ -61,8 +61,8 @@ stjames/workflows/solubility.py,sha256=kGfVyPPGDLRpf2j6dSY7woCkfsoXSbUzdSImA4mcM
61
61
  stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
62
62
  stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
63
63
  stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
64
- stjames-0.0.95.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
65
- stjames-0.0.95.dist-info/METADATA,sha256=q5rJgbtmQrLOVntdIyE6pAkA3LPaKAmLyCrqZ3FUCkI,1724
66
- stjames-0.0.95.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
- stjames-0.0.95.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
68
- stjames-0.0.95.dist-info/RECORD,,
64
+ stjames-0.0.97.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
65
+ stjames-0.0.97.dist-info/METADATA,sha256=l2nJS6OssSW6Dk28HIQsfD1cPKOePXAP8Tqy2FUngCs,1724
66
+ stjames-0.0.97.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
+ stjames-0.0.97.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
68
+ stjames-0.0.97.dist-info/RECORD,,