torchspin 0.6.6__tar.gz → 0.6.7__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.
- {torchspin-0.6.6 → torchspin-0.6.7}/CHANGELOG.md +20 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/CITATION.cff +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/PKG-INFO +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/pyproject.toml +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/__init__.py +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham.py +12 -6
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/hamsymm.py +1 -3
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/spinsystem.py +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin.egg-info/PKG-INFO +1 -1
- {torchspin-0.6.6 → torchspin-0.6.7}/LICENSE.md +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/MANIFEST.in +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/README.md +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/setup.cfg +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_cardamom_istos.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_cardamom_propagatedm.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_cardamom_utils.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_compile.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_linalg.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_omp.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_resources.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/_rng.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/angmom.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/autograd.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/autoguess.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/batch.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/blochsteady.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/cardamom.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/chili.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/chili_sle.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/constants.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/convspec.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ctafft.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/curry.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/data/FourierSeriesCoefficients.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/data/GaussianCascadeCoefficients.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/data/isotopedata.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/data/spacegroups.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/dataproc.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/dipbackground.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/dipkernel.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/diptensor.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/endorfrq.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/endorfrq_perturb.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/eprload.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/eprsave.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/esfit.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/evolve.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ewrls.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/excitation.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/exciteprofile.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/experiment.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/exponfit.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/fastmotion.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/fdaxis.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/fitgui.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/garlic.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/gridcheck.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_cf.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_ee.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_ez.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_ezho.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_hf.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_nn.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_nq.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_nz.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_oz.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_so.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ham_zf.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/initstate.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/isotopologues.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/levels.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/levelsplot.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/lineshape.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/lpsvd.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/makespec.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/mdhmm.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/mdload.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/mdtraj2oripot.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ml.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/mlpsvd.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/nucdata.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/nucfrq2d.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/orca2torchspin.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/ordering.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/oripotentialplot.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/orisel.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/pepper.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/pepper_autograd.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/photoselect.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/plegendre.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/propint.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/pulse.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/py.typed +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/rapidscan2spc.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfields.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfields_batch.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfields_eig.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfields_hybrid.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfields_perturb.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfreqs_matrix.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resfreqs_perturb.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resonator.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/resonatorprofile.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/rfmixer.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/rotations.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/rotutils.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/saffron.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/saffron_pathways.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/saffron_peaks.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/saffron_thyme.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/salt.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/sigeq.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/signalprocessing.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/sitetransforms.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/sphgrid.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/spidyan.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/spinladder.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/spinops.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/stackplot.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/stev.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/stochtraj_diffusion.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/stochtraj_jump.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/strainwidth.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/transmitter.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin/utils.py +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin.egg-info/SOURCES.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin.egg-info/dependency_links.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin.egg-info/requires.txt +0 -0
- {torchspin-0.6.6 → torchspin-0.6.7}/torchspin.egg-info/top_level.txt +0 -0
|
@@ -6,6 +6,26 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.6.7] — 2026-11-09
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Linear higher-order Zeeman terms (`Sys.Ham1xx`) had opposite signs in
|
|
14
|
+
`ham(Sys)` and `ham(Sys, B0)`** (all public releases, 0.3.0–0.6.6). The moment operators of `ham(Sys)` carried
|
|
15
|
+
+dH/dB, but torchspin's convention is H = H0 − μ·B, so the field-free
|
|
16
|
+
decomposition (used by pepper's resonance search, `levels`, `endorfrq`,
|
|
17
|
+
`salt`, `curry`, `nucfrq2d`) had these terms with the opposite sign to
|
|
18
|
+
`ham(Sys, B0)` and to the nuclear Zeeman interaction. Without nuclei this
|
|
19
|
+
does not change spectra (time reversal); with nuclei it changed ENDOR and
|
|
20
|
+
nuclear frequencies and forbidden-transition intensities. EasySpin's
|
|
21
|
+
`ham.m` has the same inconsistency; torchspin now deliberately deviates
|
|
22
|
+
from it (see KNOWN_LIMITATIONS.md, "Higher-order Zeeman terms").
|
|
23
|
+
- `hamsymm` added the higher-order Zeeman Hamiltonian twice when probing for
|
|
24
|
+
symmetry (`ham(Sys, B0)` already includes it).
|
|
25
|
+
- `SpinSystem(g=[2.0])` (a one-element list, which EasySpin treats like
|
|
26
|
+
`g=2`) crashed `ham` with an IndexError; it now means isotropic g, like a
|
|
27
|
+
scalar.
|
|
28
|
+
|
|
9
29
|
## [0.6.6] — 2026-11-09
|
|
10
30
|
|
|
11
31
|
### Fixed
|
|
@@ -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.
|
|
5
|
+
version: "0.6.7"
|
|
6
6
|
date-released: "2026-11-09"
|
|
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.
|
|
3
|
+
Version: 0.6.7
|
|
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>
|
|
@@ -25,7 +25,7 @@ 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.
|
|
28
|
+
__version__ = "0.6.7+dev"
|
|
29
29
|
|
|
30
30
|
# Idle OpenMP threads must sleep, not spin-wait (see torchspin/_omp.py and
|
|
31
31
|
# docs/pitfalls.md, "Threads and performance"). This has to run before anything
|
|
@@ -115,9 +115,15 @@ def ham(
|
|
|
115
115
|
muy = muy + muy_oz
|
|
116
116
|
muz = muz + muz_oz
|
|
117
117
|
|
|
118
|
-
# Higher-order Zeeman terms (Sys.Ham*):
|
|
119
|
-
#
|
|
120
|
-
#
|
|
118
|
+
# Higher-order Zeeman terms (Sys.Ham*): the zero-field part goes into H0 and
|
|
119
|
+
# the linear-in-B part into the moment operators; at a given field the
|
|
120
|
+
# complete ham_ezho(Sys,B0) is added instead. ham_ezho's G1 is dH/dB, and
|
|
121
|
+
# H = H0 - mu.B, so the linear part enters the moments as -G1. EasySpin's
|
|
122
|
+
# ham.m adds +G1, which flips the sign of these terms relative to
|
|
123
|
+
# ham(Sys,B0) and to every other Zeeman term; torchspin deliberately does
|
|
124
|
+
# not follow it (KNOWN_LIMITATIONS.md, "Higher-order Zeeman terms").
|
|
125
|
+
# Quadratic and cubic terms (G2, G3) are not representable as H0 - mu.B and
|
|
126
|
+
# are included only by ham(Sys, B0).
|
|
121
127
|
ho_zeeman = sys.Ham is not None and any(
|
|
122
128
|
bool(torch.any(v != 0)) for v in sys.Ham.values()
|
|
123
129
|
)
|
|
@@ -127,9 +133,9 @@ def ham(
|
|
|
127
133
|
from torchspin.ham_ezho import ham_ezho
|
|
128
134
|
G0, G1, _, _ = ham_ezho(sys, B0=None, dtype=dtype, device=device)
|
|
129
135
|
H0 = H0 + G0
|
|
130
|
-
mux = mux
|
|
131
|
-
muy = muy
|
|
132
|
-
muz = muz
|
|
136
|
+
mux = mux - G1[0]
|
|
137
|
+
muy = muy - G1[1]
|
|
138
|
+
muz = muz - G1[2]
|
|
133
139
|
return H0, mux, muy, muz
|
|
134
140
|
|
|
135
141
|
# Full Hamiltonian
|
|
@@ -275,11 +275,9 @@ def _hamsymm_eigs(
|
|
|
275
275
|
FieldVecs = _probe_field_vectors()
|
|
276
276
|
|
|
277
277
|
if higher_zeeman:
|
|
278
|
-
from torchspin.ham_ezho import ham_ezho
|
|
279
|
-
|
|
280
278
|
def eig_at(Bvec: torch.Tensor) -> torch.Tensor:
|
|
281
279
|
B = Bvec.tolist()
|
|
282
|
-
H = ham(sys, B0=B)
|
|
280
|
+
H = ham(sys, B0=B) # already includes ham_ezho(sys, B0=B)
|
|
283
281
|
return torch.linalg.eigvalsh(H)
|
|
284
282
|
else:
|
|
285
283
|
H0, mux, muy, muz = ham(sys)
|
|
@@ -295,7 +295,7 @@ class SpinSystem:
|
|
|
295
295
|
# Scalar: isotropic g for all electrons
|
|
296
296
|
self.g = self.g.expand(n_e, 3).clone()
|
|
297
297
|
elif self.g.ndim == 1:
|
|
298
|
-
if
|
|
298
|
+
if self.g.shape[0] == n_e:
|
|
299
299
|
# [g1, g2, ...]: one isotropic g per electron (EasySpin column form)
|
|
300
300
|
self.g = self.g.unsqueeze(1).expand(n_e, 3).clone()
|
|
301
301
|
elif self.g.shape[0] == 3:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: torchspin
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.7
|
|
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
|
|
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
|
|
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
|