DimSpin 0.1.0__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 (60) hide show
  1. dimspin-0.1.0/LICENSE +21 -0
  2. dimspin-0.1.0/PKG-INFO +142 -0
  3. dimspin-0.1.0/README.md +106 -0
  4. dimspin-0.1.0/pyproject.toml +76 -0
  5. dimspin-0.1.0/setup.cfg +4 -0
  6. dimspin-0.1.0/src/DimSpin.egg-info/PKG-INFO +142 -0
  7. dimspin-0.1.0/src/DimSpin.egg-info/SOURCES.txt +58 -0
  8. dimspin-0.1.0/src/DimSpin.egg-info/dependency_links.txt +1 -0
  9. dimspin-0.1.0/src/DimSpin.egg-info/requires.txt +16 -0
  10. dimspin-0.1.0/src/DimSpin.egg-info/top_level.txt +1 -0
  11. dimspin-0.1.0/src/dimspin/Adaptive_Grid_Method.py +212 -0
  12. dimspin-0.1.0/src/dimspin/AutoSim.py +113 -0
  13. dimspin-0.1.0/src/dimspin/Class_Spec.py +270 -0
  14. dimspin-0.1.0/src/dimspin/Class_Spin.py +462 -0
  15. dimspin-0.1.0/src/dimspin/Crystal_Rotation.py +74 -0
  16. dimspin-0.1.0/src/dimspin/ETeam_Hyperfine.py +25 -0
  17. dimspin-0.1.0/src/dimspin/ETeam_ZFS.py +24 -0
  18. dimspin-0.1.0/src/dimspin/ETeam_Zeeman.py +27 -0
  19. dimspin-0.1.0/src/dimspin/Eigenfield_Method.py +114 -0
  20. dimspin-0.1.0/src/dimspin/Eular2Rot.py +52 -0
  21. dimspin-0.1.0/src/dimspin/Fibonacci_Orientation.py +19 -0
  22. dimspin-0.1.0/src/dimspin/High_Field_Method.py +133 -0
  23. dimspin-0.1.0/src/dimspin/Levels_Plot.py +119 -0
  24. dimspin-0.1.0/src/dimspin/Line_Broadening.py +178 -0
  25. dimspin-0.1.0/src/dimspin/Orientation_Switch.py +27 -0
  26. dimspin-0.1.0/src/dimspin/Parallel.py +92 -0
  27. dimspin-0.1.0/src/dimspin/Pointsnum_Optimise.py +17 -0
  28. dimspin-0.1.0/src/dimspin/Powder.py +118 -0
  29. dimspin-0.1.0/src/dimspin/Rodrigues_Rotation.py +11 -0
  30. dimspin-0.1.0/src/dimspin/Root_Finder.py +220 -0
  31. dimspin-0.1.0/src/dimspin/Show_Spectra.py +48 -0
  32. dimspin-0.1.0/src/dimspin/Space_Group.py +6451 -0
  33. dimspin-0.1.0/src/dimspin/Space_Group_Expand.py +140 -0
  34. dimspin-0.1.0/src/dimspin/Space_Group_L.py +135 -0
  35. dimspin-0.1.0/src/dimspin/Spec_Oneside.py +68 -0
  36. dimspin-0.1.0/src/dimspin/Spin_Operators.py +89 -0
  37. dimspin-0.1.0/src/dimspin/Steven_Operator.py +161 -0
  38. dimspin-0.1.0/src/dimspin/Team_Hyperfine.py +23 -0
  39. dimspin-0.1.0/src/dimspin/Team_ZFS.py +24 -0
  40. dimspin-0.1.0/src/dimspin/Team_ZFS_HighOrder.py +48 -0
  41. dimspin-0.1.0/src/dimspin/Team_Zeeman.py +22 -0
  42. dimspin-0.1.0/src/dimspin/Tensor.py +71 -0
  43. dimspin-0.1.0/src/dimspin/Truncate_Observable.py +34 -0
  44. dimspin-0.1.0/src/dimspin/Vec_normalize.py +9 -0
  45. dimspin-0.1.0/src/dimspin/__init__.py +28 -0
  46. dimspin-0.1.0/tests/test_adaptive_grid.py +118 -0
  47. dimspin-0.1.0/tests/test_autosim.py +247 -0
  48. dimspin-0.1.0/tests/test_hamiltonian.py +164 -0
  49. dimspin-0.1.0/tests/test_high_field.py +130 -0
  50. dimspin-0.1.0/tests/test_import.py +42 -0
  51. dimspin-0.1.0/tests/test_levels_plot.py +72 -0
  52. dimspin-0.1.0/tests/test_line_broadening.py +79 -0
  53. dimspin-0.1.0/tests/test_orientation.py +35 -0
  54. dimspin-0.1.0/tests/test_parallel.py +39 -0
  55. dimspin-0.1.0/tests/test_pointsnum.py +19 -0
  56. dimspin-0.1.0/tests/test_rotation.py +48 -0
  57. dimspin-0.1.0/tests/test_space_group.py +169 -0
  58. dimspin-0.1.0/tests/test_spin.py +231 -0
  59. dimspin-0.1.0/tests/test_spin_operators.py +54 -0
  60. dimspin-0.1.0/tests/test_tensor.py +56 -0
dimspin-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jia-Xin Chen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dimspin-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: DimSpin
3
+ Version: 0.1.0
4
+ Summary: EPR/ESR spectrum simulator for spin Hamiltonians and spin-electric coupling (SEC) tensors, featuring EFM, MFM and 2D angle-dependent single-crystal analysis
5
+ Author: Jia-Xin Chen
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/deservecjx/DimSpin
8
+ Project-URL: Repository, https://github.com/deservecjx/DimSpin
9
+ Keywords: EPR,ESR,electron paramagnetic resonance,spin Hamiltonian,spin-electric coupling,electric-field modulation,spectroscopy
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
18
+ Classifier: Topic :: Scientific/Engineering :: Physics
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy>=1.23
23
+ Requires-Dist: scipy>=1.9
24
+ Provides-Extra: plot
25
+ Requires-Dist: matplotlib>=3.6; extra == "plot"
26
+ Provides-Extra: docs
27
+ Requires-Dist: sphinx>=7; extra == "docs"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=8; extra == "dev"
30
+ Requires-Dist: pytest-cov>=5; extra == "dev"
31
+ Requires-Dist: ruff>=0.6; extra == "dev"
32
+ Requires-Dist: build>=1.2; extra == "dev"
33
+ Requires-Dist: twine>=5; extra == "dev"
34
+ Requires-Dist: matplotlib>=3.6; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # DimSpin
38
+
39
+ DimSpin is an EPR/ESR spectrum simulator for spin Hamiltonians and
40
+ spin-electric coupling (SEC) tensors (T, R, F), featuring electric-field
41
+ modulation (EFM), magnetic-field modulation (MFM), and 2D angle-dependent
42
+ single-crystal analysis.
43
+
44
+ > **Status:** 0.1.0. Core modules, public API, documentation and examples are
45
+ > in place.
46
+
47
+ ## Planned scope
48
+
49
+ - Spin systems with electron spin `S` and nuclear spin `I`
50
+ - Zeeman, zero-field splitting, hyperfine and high-order zero-field terms
51
+ - Magnetic-field modulation, electric-field modulation and parameter modulation
52
+ - Single-crystal one-side, single-crystal rotation and powder modes
53
+ - Resonance search with `High_Field_Method` and `Adaptive_Grid_Method`
54
+ - Voigt/Lorentzian/Gaussian line broadening, parallel evaluation and energy-level plots
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ from dimspin import Spec, Spin, autosim
60
+
61
+ spin = Spin(1/2, 0)
62
+ spin.g = [2.009, 2.006, 2.002]
63
+
64
+ spec = Spec()
65
+ spec.mwfreq = 9560.0
66
+ spec.fieldrange = [3300.0, 3600.0]
67
+ spec.specpoints = 800
68
+ spec.lw_lorentzian = 0.5
69
+ spec.Bmod = 1.0
70
+
71
+ spectrum = autosim(spin, spec)
72
+ ```
73
+
74
+ More complete scripts are in [`examples/`](examples).
75
+
76
+ ## Installation
77
+
78
+ ```bash
79
+ pip install DimSpin
80
+ ```
81
+
82
+ Plotting needs the optional extra:
83
+
84
+ ```bash
85
+ pip install "DimSpin[plot]"
86
+ ```
87
+
88
+ ## Units and conventions
89
+
90
+ Magnetic fields are in gauss, energies in MHz and temperatures in kelvin.
91
+ Euler angles and rotation matrices use radians, while crystal-rotation ranges
92
+ are in degrees. Line shapes are area-normalized. See the
93
+ [documentation](docs/index.rst) for the Hamiltonian terms, frame conventions
94
+ and method descriptions.
95
+
96
+ ## Development setup
97
+
98
+ ```bash
99
+ python -m venv .venv
100
+ # Windows: .venv\Scripts\activate
101
+ # Linux/macOS: source .venv/bin/activate
102
+ python -m pip install --upgrade pip
103
+ pip install -e ".[dev]"
104
+ ```
105
+
106
+ ## Tests
107
+
108
+ ```bash
109
+ pytest
110
+ ```
111
+
112
+ ## License
113
+
114
+ MIT. See [LICENSE](LICENSE).
115
+
116
+ ## Citation
117
+
118
+ If you use DimSpin in your work, please cite the associated article:
119
+
120
+ > Jia-Xin Chen, You-Chao Liu, Qing-Song Deng, Ji-Min Song, Meng-Qi Zhong,
121
+ > Meng-Xiang Wu, Zheng-Chuan Lin, Zheng Zhang, Song Gao, Ye-Xin Wang,
122
+ > Zheng Liu and Shang-Da Jiang,
123
+ > *Quantification of the Molecular Spin-Electric Coupling Tensors: An
124
+ > EPR-Based Approach*, 2026 (in preparation).
125
+
126
+ Until the article is published, please cite this repository and its version.
127
+ Full citation metadata is provided in [CITATION.cff](CITATION.cff).
128
+
129
+ ## References
130
+
131
+ The adaptive-grid resonance search follows ideas from EasySpin:
132
+
133
+ > S. Stoll and A. Schweiger, *EasySpin, a comprehensive software package for
134
+ > spectral simulation and analysis in EPR*, J. Magn. Reson. **178** (2006)
135
+ > 42-55, doi:10.1016/j.jmr.2005.08.013.
136
+
137
+ ## Third-party data
138
+
139
+ The space-group operations in `dimspin.Space_Group` are generated with
140
+ [spglib](https://spglib.readthedocs.io) (BSD-3 license). Please cite
141
+ A. Togo, K. Shinohara and I. Tanaka, *Sci. Technol. Adv. Mater. Methods* 4,
142
+ 2384822 (2024), doi:10.1080/27660400.2024.2384822.
@@ -0,0 +1,106 @@
1
+ # DimSpin
2
+
3
+ DimSpin is an EPR/ESR spectrum simulator for spin Hamiltonians and
4
+ spin-electric coupling (SEC) tensors (T, R, F), featuring electric-field
5
+ modulation (EFM), magnetic-field modulation (MFM), and 2D angle-dependent
6
+ single-crystal analysis.
7
+
8
+ > **Status:** 0.1.0. Core modules, public API, documentation and examples are
9
+ > in place.
10
+
11
+ ## Planned scope
12
+
13
+ - Spin systems with electron spin `S` and nuclear spin `I`
14
+ - Zeeman, zero-field splitting, hyperfine and high-order zero-field terms
15
+ - Magnetic-field modulation, electric-field modulation and parameter modulation
16
+ - Single-crystal one-side, single-crystal rotation and powder modes
17
+ - Resonance search with `High_Field_Method` and `Adaptive_Grid_Method`
18
+ - Voigt/Lorentzian/Gaussian line broadening, parallel evaluation and energy-level plots
19
+
20
+ ## Quick start
21
+
22
+ ```python
23
+ from dimspin import Spec, Spin, autosim
24
+
25
+ spin = Spin(1/2, 0)
26
+ spin.g = [2.009, 2.006, 2.002]
27
+
28
+ spec = Spec()
29
+ spec.mwfreq = 9560.0
30
+ spec.fieldrange = [3300.0, 3600.0]
31
+ spec.specpoints = 800
32
+ spec.lw_lorentzian = 0.5
33
+ spec.Bmod = 1.0
34
+
35
+ spectrum = autosim(spin, spec)
36
+ ```
37
+
38
+ More complete scripts are in [`examples/`](examples).
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install DimSpin
44
+ ```
45
+
46
+ Plotting needs the optional extra:
47
+
48
+ ```bash
49
+ pip install "DimSpin[plot]"
50
+ ```
51
+
52
+ ## Units and conventions
53
+
54
+ Magnetic fields are in gauss, energies in MHz and temperatures in kelvin.
55
+ Euler angles and rotation matrices use radians, while crystal-rotation ranges
56
+ are in degrees. Line shapes are area-normalized. See the
57
+ [documentation](docs/index.rst) for the Hamiltonian terms, frame conventions
58
+ and method descriptions.
59
+
60
+ ## Development setup
61
+
62
+ ```bash
63
+ python -m venv .venv
64
+ # Windows: .venv\Scripts\activate
65
+ # Linux/macOS: source .venv/bin/activate
66
+ python -m pip install --upgrade pip
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+ ## Tests
71
+
72
+ ```bash
73
+ pytest
74
+ ```
75
+
76
+ ## License
77
+
78
+ MIT. See [LICENSE](LICENSE).
79
+
80
+ ## Citation
81
+
82
+ If you use DimSpin in your work, please cite the associated article:
83
+
84
+ > Jia-Xin Chen, You-Chao Liu, Qing-Song Deng, Ji-Min Song, Meng-Qi Zhong,
85
+ > Meng-Xiang Wu, Zheng-Chuan Lin, Zheng Zhang, Song Gao, Ye-Xin Wang,
86
+ > Zheng Liu and Shang-Da Jiang,
87
+ > *Quantification of the Molecular Spin-Electric Coupling Tensors: An
88
+ > EPR-Based Approach*, 2026 (in preparation).
89
+
90
+ Until the article is published, please cite this repository and its version.
91
+ Full citation metadata is provided in [CITATION.cff](CITATION.cff).
92
+
93
+ ## References
94
+
95
+ The adaptive-grid resonance search follows ideas from EasySpin:
96
+
97
+ > S. Stoll and A. Schweiger, *EasySpin, a comprehensive software package for
98
+ > spectral simulation and analysis in EPR*, J. Magn. Reson. **178** (2006)
99
+ > 42-55, doi:10.1016/j.jmr.2005.08.013.
100
+
101
+ ## Third-party data
102
+
103
+ The space-group operations in `dimspin.Space_Group` are generated with
104
+ [spglib](https://spglib.readthedocs.io) (BSD-3 license). Please cite
105
+ A. Togo, K. Shinohara and I. Tanaka, *Sci. Technol. Adv. Mater. Methods* 4,
106
+ 2384822 (2024), doi:10.1080/27660400.2024.2384822.
@@ -0,0 +1,76 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "DimSpin"
7
+ dynamic = ["version"]
8
+ description = "EPR/ESR spectrum simulator for spin Hamiltonians and spin-electric coupling (SEC) tensors, featuring EFM, MFM and 2D angle-dependent single-crystal analysis"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Jia-Xin Chen" }]
14
+ keywords = [
15
+ "EPR",
16
+ "ESR",
17
+ "electron paramagnetic resonance",
18
+ "spin Hamiltonian",
19
+ "spin-electric coupling",
20
+ "electric-field modulation",
21
+ "spectroscopy",
22
+ ]
23
+ classifiers = [
24
+ "Development Status :: 3 - Alpha",
25
+ "Intended Audience :: Science/Research",
26
+ "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Topic :: Scientific/Engineering :: Chemistry",
32
+ "Topic :: Scientific/Engineering :: Physics",
33
+ ]
34
+ dependencies = [
35
+ "numpy>=1.23",
36
+ "scipy>=1.9",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ plot = ["matplotlib>=3.6"]
41
+ docs = ["sphinx>=7"]
42
+ dev = [
43
+ "pytest>=8",
44
+ "pytest-cov>=5",
45
+ "ruff>=0.6",
46
+ "build>=1.2",
47
+ "twine>=5",
48
+ "matplotlib>=3.6",
49
+ ]
50
+
51
+ [project.urls]
52
+ Homepage = "https://github.com/deservecjx/DimSpin"
53
+ Repository = "https://github.com/deservecjx/DimSpin"
54
+
55
+ [tool.setuptools.packages.find]
56
+ where = ["src"]
57
+ include = ["dimspin*"]
58
+
59
+ [tool.setuptools.dynamic]
60
+ version = { attr = "dimspin.__version__" }
61
+
62
+ [tool.pytest.ini_options]
63
+ testpaths = ["tests"]
64
+ addopts = "-ra"
65
+
66
+ [tool.coverage.run]
67
+ source = ["dimspin"]
68
+
69
+ [tool.ruff]
70
+ line-length = 120
71
+ target-version = "py310"
72
+ exclude = [".git", "build", "dist", ".venv", "venv", "docs"]
73
+
74
+ [tool.ruff.lint]
75
+ select = ["E", "F", "W", "I"]
76
+ ignore = ["E741"] # I is the conventional symbol for nuclear spin.
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: DimSpin
3
+ Version: 0.1.0
4
+ Summary: EPR/ESR spectrum simulator for spin Hamiltonians and spin-electric coupling (SEC) tensors, featuring EFM, MFM and 2D angle-dependent single-crystal analysis
5
+ Author: Jia-Xin Chen
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/deservecjx/DimSpin
8
+ Project-URL: Repository, https://github.com/deservecjx/DimSpin
9
+ Keywords: EPR,ESR,electron paramagnetic resonance,spin Hamiltonian,spin-electric coupling,electric-field modulation,spectroscopy
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
18
+ Classifier: Topic :: Scientific/Engineering :: Physics
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy>=1.23
23
+ Requires-Dist: scipy>=1.9
24
+ Provides-Extra: plot
25
+ Requires-Dist: matplotlib>=3.6; extra == "plot"
26
+ Provides-Extra: docs
27
+ Requires-Dist: sphinx>=7; extra == "docs"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=8; extra == "dev"
30
+ Requires-Dist: pytest-cov>=5; extra == "dev"
31
+ Requires-Dist: ruff>=0.6; extra == "dev"
32
+ Requires-Dist: build>=1.2; extra == "dev"
33
+ Requires-Dist: twine>=5; extra == "dev"
34
+ Requires-Dist: matplotlib>=3.6; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # DimSpin
38
+
39
+ DimSpin is an EPR/ESR spectrum simulator for spin Hamiltonians and
40
+ spin-electric coupling (SEC) tensors (T, R, F), featuring electric-field
41
+ modulation (EFM), magnetic-field modulation (MFM), and 2D angle-dependent
42
+ single-crystal analysis.
43
+
44
+ > **Status:** 0.1.0. Core modules, public API, documentation and examples are
45
+ > in place.
46
+
47
+ ## Planned scope
48
+
49
+ - Spin systems with electron spin `S` and nuclear spin `I`
50
+ - Zeeman, zero-field splitting, hyperfine and high-order zero-field terms
51
+ - Magnetic-field modulation, electric-field modulation and parameter modulation
52
+ - Single-crystal one-side, single-crystal rotation and powder modes
53
+ - Resonance search with `High_Field_Method` and `Adaptive_Grid_Method`
54
+ - Voigt/Lorentzian/Gaussian line broadening, parallel evaluation and energy-level plots
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ from dimspin import Spec, Spin, autosim
60
+
61
+ spin = Spin(1/2, 0)
62
+ spin.g = [2.009, 2.006, 2.002]
63
+
64
+ spec = Spec()
65
+ spec.mwfreq = 9560.0
66
+ spec.fieldrange = [3300.0, 3600.0]
67
+ spec.specpoints = 800
68
+ spec.lw_lorentzian = 0.5
69
+ spec.Bmod = 1.0
70
+
71
+ spectrum = autosim(spin, spec)
72
+ ```
73
+
74
+ More complete scripts are in [`examples/`](examples).
75
+
76
+ ## Installation
77
+
78
+ ```bash
79
+ pip install DimSpin
80
+ ```
81
+
82
+ Plotting needs the optional extra:
83
+
84
+ ```bash
85
+ pip install "DimSpin[plot]"
86
+ ```
87
+
88
+ ## Units and conventions
89
+
90
+ Magnetic fields are in gauss, energies in MHz and temperatures in kelvin.
91
+ Euler angles and rotation matrices use radians, while crystal-rotation ranges
92
+ are in degrees. Line shapes are area-normalized. See the
93
+ [documentation](docs/index.rst) for the Hamiltonian terms, frame conventions
94
+ and method descriptions.
95
+
96
+ ## Development setup
97
+
98
+ ```bash
99
+ python -m venv .venv
100
+ # Windows: .venv\Scripts\activate
101
+ # Linux/macOS: source .venv/bin/activate
102
+ python -m pip install --upgrade pip
103
+ pip install -e ".[dev]"
104
+ ```
105
+
106
+ ## Tests
107
+
108
+ ```bash
109
+ pytest
110
+ ```
111
+
112
+ ## License
113
+
114
+ MIT. See [LICENSE](LICENSE).
115
+
116
+ ## Citation
117
+
118
+ If you use DimSpin in your work, please cite the associated article:
119
+
120
+ > Jia-Xin Chen, You-Chao Liu, Qing-Song Deng, Ji-Min Song, Meng-Qi Zhong,
121
+ > Meng-Xiang Wu, Zheng-Chuan Lin, Zheng Zhang, Song Gao, Ye-Xin Wang,
122
+ > Zheng Liu and Shang-Da Jiang,
123
+ > *Quantification of the Molecular Spin-Electric Coupling Tensors: An
124
+ > EPR-Based Approach*, 2026 (in preparation).
125
+
126
+ Until the article is published, please cite this repository and its version.
127
+ Full citation metadata is provided in [CITATION.cff](CITATION.cff).
128
+
129
+ ## References
130
+
131
+ The adaptive-grid resonance search follows ideas from EasySpin:
132
+
133
+ > S. Stoll and A. Schweiger, *EasySpin, a comprehensive software package for
134
+ > spectral simulation and analysis in EPR*, J. Magn. Reson. **178** (2006)
135
+ > 42-55, doi:10.1016/j.jmr.2005.08.013.
136
+
137
+ ## Third-party data
138
+
139
+ The space-group operations in `dimspin.Space_Group` are generated with
140
+ [spglib](https://spglib.readthedocs.io) (BSD-3 license). Please cite
141
+ A. Togo, K. Shinohara and I. Tanaka, *Sci. Technol. Adv. Mater. Methods* 4,
142
+ 2384822 (2024), doi:10.1080/27660400.2024.2384822.
@@ -0,0 +1,58 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/DimSpin.egg-info/PKG-INFO
5
+ src/DimSpin.egg-info/SOURCES.txt
6
+ src/DimSpin.egg-info/dependency_links.txt
7
+ src/DimSpin.egg-info/requires.txt
8
+ src/DimSpin.egg-info/top_level.txt
9
+ src/dimspin/Adaptive_Grid_Method.py
10
+ src/dimspin/AutoSim.py
11
+ src/dimspin/Class_Spec.py
12
+ src/dimspin/Class_Spin.py
13
+ src/dimspin/Crystal_Rotation.py
14
+ src/dimspin/ETeam_Hyperfine.py
15
+ src/dimspin/ETeam_ZFS.py
16
+ src/dimspin/ETeam_Zeeman.py
17
+ src/dimspin/Eigenfield_Method.py
18
+ src/dimspin/Eular2Rot.py
19
+ src/dimspin/Fibonacci_Orientation.py
20
+ src/dimspin/High_Field_Method.py
21
+ src/dimspin/Levels_Plot.py
22
+ src/dimspin/Line_Broadening.py
23
+ src/dimspin/Orientation_Switch.py
24
+ src/dimspin/Parallel.py
25
+ src/dimspin/Pointsnum_Optimise.py
26
+ src/dimspin/Powder.py
27
+ src/dimspin/Rodrigues_Rotation.py
28
+ src/dimspin/Root_Finder.py
29
+ src/dimspin/Show_Spectra.py
30
+ src/dimspin/Space_Group.py
31
+ src/dimspin/Space_Group_Expand.py
32
+ src/dimspin/Space_Group_L.py
33
+ src/dimspin/Spec_Oneside.py
34
+ src/dimspin/Spin_Operators.py
35
+ src/dimspin/Steven_Operator.py
36
+ src/dimspin/Team_Hyperfine.py
37
+ src/dimspin/Team_ZFS.py
38
+ src/dimspin/Team_ZFS_HighOrder.py
39
+ src/dimspin/Team_Zeeman.py
40
+ src/dimspin/Tensor.py
41
+ src/dimspin/Truncate_Observable.py
42
+ src/dimspin/Vec_normalize.py
43
+ src/dimspin/__init__.py
44
+ tests/test_adaptive_grid.py
45
+ tests/test_autosim.py
46
+ tests/test_hamiltonian.py
47
+ tests/test_high_field.py
48
+ tests/test_import.py
49
+ tests/test_levels_plot.py
50
+ tests/test_line_broadening.py
51
+ tests/test_orientation.py
52
+ tests/test_parallel.py
53
+ tests/test_pointsnum.py
54
+ tests/test_rotation.py
55
+ tests/test_space_group.py
56
+ tests/test_spin.py
57
+ tests/test_spin_operators.py
58
+ tests/test_tensor.py
@@ -0,0 +1,16 @@
1
+ numpy>=1.23
2
+ scipy>=1.9
3
+
4
+ [dev]
5
+ pytest>=8
6
+ pytest-cov>=5
7
+ ruff>=0.6
8
+ build>=1.2
9
+ twine>=5
10
+ matplotlib>=3.6
11
+
12
+ [docs]
13
+ sphinx>=7
14
+
15
+ [plot]
16
+ matplotlib>=3.6
@@ -0,0 +1 @@
1
+ dimspin