torchspin 0.6.2__tar.gz → 0.6.3__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.
Files changed (127) hide show
  1. {torchspin-0.6.2 → torchspin-0.6.3}/CHANGELOG.md +22 -0
  2. {torchspin-0.6.2 → torchspin-0.6.3}/CITATION.cff +1 -1
  3. {torchspin-0.6.2 → torchspin-0.6.3}/PKG-INFO +1 -1
  4. {torchspin-0.6.2 → torchspin-0.6.3}/pyproject.toml +1 -1
  5. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/__init__.py +11 -1
  6. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin.egg-info/PKG-INFO +1 -1
  7. {torchspin-0.6.2 → torchspin-0.6.3}/LICENSE.md +0 -0
  8. {torchspin-0.6.2 → torchspin-0.6.3}/MANIFEST.in +0 -0
  9. {torchspin-0.6.2 → torchspin-0.6.3}/README.md +0 -0
  10. {torchspin-0.6.2 → torchspin-0.6.3}/setup.cfg +0 -0
  11. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_cardamom_istos.py +0 -0
  12. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_cardamom_propagatedm.py +0 -0
  13. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_cardamom_utils.py +0 -0
  14. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_compile.py +0 -0
  15. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_linalg.py +0 -0
  16. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/_rng.py +0 -0
  17. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/angmom.py +0 -0
  18. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/autograd.py +0 -0
  19. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/autoguess.py +0 -0
  20. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/batch.py +0 -0
  21. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/blochsteady.py +0 -0
  22. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/cardamom.py +0 -0
  23. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/chili.py +0 -0
  24. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/chili_sle.py +0 -0
  25. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/constants.py +0 -0
  26. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/convspec.py +0 -0
  27. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ctafft.py +0 -0
  28. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/curry.py +0 -0
  29. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/data/FourierSeriesCoefficients.txt +0 -0
  30. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/data/GaussianCascadeCoefficients.txt +0 -0
  31. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/data/isotopedata.txt +0 -0
  32. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/data/spacegroups.txt +0 -0
  33. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/dataproc.py +0 -0
  34. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/dipbackground.py +0 -0
  35. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/dipkernel.py +0 -0
  36. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/diptensor.py +0 -0
  37. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/endorfrq.py +0 -0
  38. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/endorfrq_perturb.py +0 -0
  39. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/eprload.py +0 -0
  40. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/eprsave.py +0 -0
  41. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/esfit.py +0 -0
  42. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/evolve.py +0 -0
  43. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ewrls.py +0 -0
  44. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/excitation.py +0 -0
  45. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/exciteprofile.py +0 -0
  46. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/experiment.py +0 -0
  47. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/exponfit.py +0 -0
  48. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/fastmotion.py +0 -0
  49. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/fdaxis.py +0 -0
  50. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/fitgui.py +0 -0
  51. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/garlic.py +0 -0
  52. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/gridcheck.py +0 -0
  53. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham.py +0 -0
  54. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_cf.py +0 -0
  55. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_ee.py +0 -0
  56. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_ez.py +0 -0
  57. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_ezho.py +0 -0
  58. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_hf.py +0 -0
  59. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_nn.py +0 -0
  60. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_nq.py +0 -0
  61. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_nz.py +0 -0
  62. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_oz.py +0 -0
  63. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_so.py +0 -0
  64. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ham_zf.py +0 -0
  65. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/hamsymm.py +0 -0
  66. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/initstate.py +0 -0
  67. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/isotopologues.py +0 -0
  68. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/levels.py +0 -0
  69. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/levelsplot.py +0 -0
  70. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/lineshape.py +0 -0
  71. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/lpsvd.py +0 -0
  72. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/makespec.py +0 -0
  73. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/mdhmm.py +0 -0
  74. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/mdload.py +0 -0
  75. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/mdtraj2oripot.py +0 -0
  76. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ml.py +0 -0
  77. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/mlpsvd.py +0 -0
  78. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/nucdata.py +0 -0
  79. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/nucfrq2d.py +0 -0
  80. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/orca2torchspin.py +0 -0
  81. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/ordering.py +0 -0
  82. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/oripotentialplot.py +0 -0
  83. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/orisel.py +0 -0
  84. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/pepper.py +0 -0
  85. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/pepper_autograd.py +0 -0
  86. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/photoselect.py +0 -0
  87. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/plegendre.py +0 -0
  88. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/propint.py +0 -0
  89. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/pulse.py +0 -0
  90. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/py.typed +0 -0
  91. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/rapidscan2spc.py +0 -0
  92. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfields.py +0 -0
  93. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfields_batch.py +0 -0
  94. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfields_eig.py +0 -0
  95. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfields_hybrid.py +0 -0
  96. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfields_perturb.py +0 -0
  97. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfreqs_matrix.py +0 -0
  98. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resfreqs_perturb.py +0 -0
  99. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resonator.py +0 -0
  100. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/resonatorprofile.py +0 -0
  101. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/rfmixer.py +0 -0
  102. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/rotations.py +0 -0
  103. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/rotutils.py +0 -0
  104. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/saffron.py +0 -0
  105. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/saffron_pathways.py +0 -0
  106. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/saffron_peaks.py +0 -0
  107. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/saffron_thyme.py +0 -0
  108. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/salt.py +0 -0
  109. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/sigeq.py +0 -0
  110. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/signalprocessing.py +0 -0
  111. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/sitetransforms.py +0 -0
  112. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/sphgrid.py +0 -0
  113. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/spidyan.py +0 -0
  114. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/spinladder.py +0 -0
  115. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/spinops.py +0 -0
  116. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/spinsystem.py +0 -0
  117. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/stackplot.py +0 -0
  118. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/stev.py +0 -0
  119. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/stochtraj_diffusion.py +0 -0
  120. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/stochtraj_jump.py +0 -0
  121. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/strainwidth.py +0 -0
  122. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/transmitter.py +0 -0
  123. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin/utils.py +0 -0
  124. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin.egg-info/SOURCES.txt +0 -0
  125. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin.egg-info/dependency_links.txt +0 -0
  126. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin.egg-info/requires.txt +0 -0
  127. {torchspin-0.6.2 → torchspin-0.6.3}/torchspin.egg-info/top_level.txt +0 -0
@@ -6,6 +6,28 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.3] — 2026-11-08
10
+
11
+ ### Fixed
12
+
13
+ - **Fits got slower when threads were added on many-core Linux machines.**
14
+ After each parallel region torch's OpenMP threads spin-wait, and a fit runs
15
+ many small spectra, so the Python thread and torchspin's worker threads
16
+ competed with spinning threads for the cores. On a 224-core Linux node one
17
+ fit-model call (nitroxide, GridSize 31×4) took 84 ms on 1 thread and 554 ms
18
+ on 8; the 4-parameter levmar fit benchmark took 3.6 s on 1 thread and 11.0 s
19
+ on 8. `import torchspin` now sets `OMP_WAIT_POLICY=PASSIVE` (idle threads
20
+ sleep), which brings the 8-thread call to 93 ms. The OpenMP runtime reads the
21
+ variable once, when torch loads, so this takes effect only when torchspin is
22
+ imported before torch; an explicit user setting is never changed. See
23
+ `docs/pitfalls.md`, "Threads and performance".
24
+
25
+ Measured with paired A/B runs (default vs PASSIVE, interleaved, pinned) on
26
+ all 13 benchmark workloads at 1–64 threads, on a 224-core cluster node and
27
+ a 64-core workstation. At 8 threads the 20-call fit loop went from 9.5 to
28
+ 2.4 s and from 3.3 to 2.2 s, and the levmar fit from 13.2 to 4.1 s and from
29
+ 5.8 to 3.4 s. No workload became measurably slower at any thread count.
30
+
9
31
  ## [0.6.2] — 2026-11-08
10
32
 
11
33
  Bug fixes found while running the GPU tests on a CUDA host.
@@ -2,7 +2,7 @@ cff-version: 1.2.0
2
2
  message: "If you use torchspin in your research, please cite both torchspin and the upstream EasySpin paper."
3
3
  title: "torchspin: Differentiable PyTorch port of EasySpin for EPR spectroscopy"
4
4
  type: software
5
- version: "0.6.2"
5
+ version: "0.6.3"
6
6
  date-released: "2026-11-08"
7
7
  license: MIT
8
8
  authors:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: torchspin
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Differentiable PyTorch port of EasySpin - EPR/ESR spin Hamiltonian and spectrum simulation
5
5
  Author-email: Alec Follmer <ahfollmer@ucdavis.edu>
6
6
  Maintainer-email: Alec Follmer <ahfollmer@ucdavis.edu>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "torchspin"
7
- version = "0.6.2"
7
+ version = "0.6.3"
8
8
  description = "Differentiable PyTorch port of EasySpin - EPR/ESR spin Hamiltonian and spectrum simulation"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -25,7 +25,17 @@ try:
25
25
  __version__ = _pkg_version("torchspin")
26
26
  except _PkgNotFound:
27
27
  # Editable install during development, or version metadata unavailable.
28
- __version__ = "0.6.2+dev"
28
+ __version__ = "0.6.3+dev"
29
+
30
+ # OpenMP threads that spin-wait after every parallel region starve the Python thread
31
+ # and torchspin's own worker threads; on many-core Linux nodes this made fits several
32
+ # times slower with 8 threads than with 1. The OpenMP runtime reads OMP_WAIT_POLICY
33
+ # once, when torch loads it, so this works only if torchspin is imported before torch.
34
+ # An explicit user setting always wins. See docs/pitfalls.md, "Threads and performance".
35
+ import os as _os
36
+ import sys as _sys
37
+ if 'torch' not in _sys.modules:
38
+ _os.environ.setdefault('OMP_WAIT_POLICY', 'PASSIVE')
29
39
 
30
40
  from torchspin._compile import maybe_compile, set_compile_enabled, is_compile_available
31
41
  from torchspin.autograd import differentiable_spectrum
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: torchspin
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Differentiable PyTorch port of EasySpin - EPR/ESR spin Hamiltonian and spectrum simulation
5
5
  Author-email: Alec Follmer <ahfollmer@ucdavis.edu>
6
6
  Maintainer-email: Alec Follmer <ahfollmer@ucdavis.edu>
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes