spintropy 2.13.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.
@@ -0,0 +1,37 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.so
4
+
5
+ # Distribution / packaging
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .eggs/
10
+ wheels/
11
+
12
+ # Scratch space. scripts/build_dists.py points TMPDIR and the uv cache here.
13
+ tmp/
14
+
15
+ # Test and type-checker caches
16
+ .pytest_cache/
17
+ .mypy_cache/
18
+ .ruff_cache/
19
+ .coverage
20
+ htmlcov/
21
+
22
+ # Environments
23
+ .venv/
24
+ venv/
25
+ env/
26
+
27
+ # Editors
28
+ .vscode/
29
+ .idea/
30
+ *.swp
31
+ .DS_Store
32
+
33
+ # Generated cache records. Two are SHIPPED by upstream, precomputed, and are
34
+ # tracked deliberately. Every other .npz under kernel/cache/ is a runtime artefact.
35
+ src/spintropy/kernel/cache/*.npz
36
+ !src/spintropy/kernel/cache/st_product_table_2.npz
37
+ !src/spintropy/kernel/cache/bos_product_table_2.npz
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Angus J. Robertson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,78 @@
1
+ Spintropy is a derivative work of MATLAB Spinach.
2
+
3
+ Spinach is distributed under the MIT licence, reproduced in full below and
4
+ retained here as that licence requires: "The above copyright notice and this
5
+ permission notice shall be included in all copies or substantial portions of
6
+ the Software."
7
+
8
+ Spintropy as a whole is distributed under the MIT licence as well, with its
9
+ own copyright notice (see LICENSE). The MIT licence permits this — it allows
10
+ the Software to be modified and sublicensed. Distributing Spintropy under its
11
+ own notice does not, and cannot, remove the obligation to carry the notice
12
+ below, nor does it alter the authorship of the original work.
13
+
14
+ Upstream: https://spindynamics.org
15
+
16
+ ----------------------------------------------------------------------
17
+ MATLAB Spinach
18
+ ----------------------------------------------------------------------
19
+
20
+ Copyright (c) 2005-2025 ILYA KUPROV
21
+
22
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
23
+ this software and associated documentation files (the "Software"), to deal in
24
+ the Software without restriction, including without limitation the rights to
25
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
26
+ of the Software, and to permit persons to whom the Software is furnished to do
27
+ so, subject to the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be included in all
30
+ copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
+ SOFTWARE.
39
+
40
+ ----------------------------------------------------------------------
41
+ Attribution
42
+ ----------------------------------------------------------------------
43
+
44
+ Spinach is the work of Ilya Kuprov and contributors. Every ported module in
45
+ Spintropy names the authors of the MATLAB function it was translated from, in
46
+ its docstring header, under "MATLAB implementation author(s)".
47
+
48
+ The list of developers and contributors for the 2008-2024 period is maintained
49
+ upstream at
50
+ https://spindynamics.org/wiki/index.php?title=Spinach_developer_team
51
+
52
+ If Spintropy is used in published work, cite Spinach. The software paper is:
53
+
54
+ H.J. Hogben, M. Krzystyniak, G.T.P. Charnock, P.J. Hore, I. Kuprov,
55
+ "Spinach - a software library for simulation of spin dynamics in large
56
+ spin systems", Journal of Magnetic Resonance 208 (2011) 179-194.
57
+ https://doi.org/10.1016/j.jmr.2010.11.008
58
+
59
+ Upstream's own README additionally points to notes on the library's
60
+ development history at https://doi.org/10.1016/j.jmr.2019.07.031
61
+
62
+ ----------------------------------------------------------------------
63
+ Third-party data
64
+ ----------------------------------------------------------------------
65
+
66
+ The demonstration data distributions carry files with their own licences and
67
+ their own copyright holders. Those notices ship beside the files they cover:
68
+
69
+ spintropy/demodata/phantoms/ MRI phantoms from the MRiLab 1.2.1 package,
70
+ by Fang Liu. 3-clause BSD; the full notice is
71
+ in mri_lab_copyright.txt in that directory,
72
+ and it asks that Fang Liu's papers be cited if
73
+ the phantoms are used in production
74
+ simulations.
75
+
76
+ Data derived from third-party structural or spectroscopic databases (PDB,
77
+ BMRB) retains whatever terms those sources impose; the accession codes are in
78
+ the file names.
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.5
2
+ Name: spintropy
3
+ Version: 2.13.0
4
+ Summary: Python spin dynamics simulation library — a translation of MATLAB Spinach
5
+ Project-URL: Homepage, https://github.com/angusRobertson/spintropy
6
+ Project-URL: Repository, https://github.com/angusRobertson/spintropy
7
+ Project-URL: Upstream (MATLAB Spinach), https://spindynamics.org
8
+ Author-email: "Angus J. Robertson" <angus.robertson@chem.lu.se>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ License-File: LICENSE.spinach
12
+ Keywords: DNP,EPR,ESR,MRI,NMR,magnetic resonance,optimal control,spin dynamics
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
18
+ Classifier: Topic :: Scientific/Engineering :: Physics
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: spintropy-demodata==2.13.0
21
+ Requires-Dist: spintropy-lite==2.13.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: spintropy-lite[dev]==2.13.0; extra == 'dev'
24
+ Provides-Extra: gpu
25
+ Requires-Dist: spintropy-lite[gpu]==2.13.0; extra == 'gpu'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # spintropy
29
+
30
+ [Spintropy](https://github.com/angusRobertson/spintropy) is a Python
31
+ translation of the MATLAB [Spinach](https://spindynamics.org) spin dynamics
32
+ library — NMR, ESR/EPR, MRI, DNP, quantum optimal control.
33
+
34
+ This distribution is a **metapackage**: it carries no code or data of its own.
35
+ It installs two distributions, each pinned to the same version as this one:
36
+
37
+ - `spintropy-lite`, the library, which is everything you need to simulate
38
+ something new;
39
+ - `spintropy-demodata`, the demonstration data the examples read: spin systems
40
+ and structures, Gaussian output, recorded spectra and MD trajectories.
41
+
42
+ ```bash
43
+ pip install spintropy # the library and every data group
44
+ pip install 'spintropy[gpu]' # ... plus cupy and the CUDA 12 runtime wheels
45
+ pip install spintropy-lite # the library only, about 10 MiB
46
+ ```
47
+
48
+ Either way the import name is `spintropy`. The extras are those of
49
+ `spintropy-lite`, passed through: `gpu` adds CuPy and the CUDA 12 runtime
50
+ wheels, and `dev` the development tools (pytest, pytest-cov, ruff, mypy and
51
+ beartype).
52
+
53
+ The library is documented in the README of its repository,
54
+ <https://github.com/angusRobertson/spintropy>, and `packaging/README.md` there
55
+ explains why Spintropy ships as these distributions.
56
+
57
+ Some data carries its own upstream licence and copyright notice; those notices
58
+ travel with the files. Everything else is MIT, matching Spintropy.
@@ -0,0 +1,31 @@
1
+ # spintropy
2
+
3
+ [Spintropy](https://github.com/angusRobertson/spintropy) is a Python
4
+ translation of the MATLAB [Spinach](https://spindynamics.org) spin dynamics
5
+ library — NMR, ESR/EPR, MRI, DNP, quantum optimal control.
6
+
7
+ This distribution is a **metapackage**: it carries no code or data of its own.
8
+ It installs two distributions, each pinned to the same version as this one:
9
+
10
+ - `spintropy-lite`, the library, which is everything you need to simulate
11
+ something new;
12
+ - `spintropy-demodata`, the demonstration data the examples read: spin systems
13
+ and structures, Gaussian output, recorded spectra and MD trajectories.
14
+
15
+ ```bash
16
+ pip install spintropy # the library and every data group
17
+ pip install 'spintropy[gpu]' # ... plus cupy and the CUDA 12 runtime wheels
18
+ pip install spintropy-lite # the library only, about 10 MiB
19
+ ```
20
+
21
+ Either way the import name is `spintropy`. The extras are those of
22
+ `spintropy-lite`, passed through: `gpu` adds CuPy and the CUDA 12 runtime
23
+ wheels, and `dev` the development tools (pytest, pytest-cov, ruff, mypy and
24
+ beartype).
25
+
26
+ The library is documented in the README of its repository,
27
+ <https://github.com/angusRobertson/spintropy>, and `packaging/README.md` there
28
+ explains why Spintropy ships as these distributions.
29
+
30
+ Some data carries its own upstream licence and copyright notice; those notices
31
+ travel with the files. Everything else is MIT, matching Spintropy.
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ # `pip install spintropy` -- the name a user reaches for first, and it gets
7
+ # them everything: the library and every data group.
8
+ #
9
+ # It is a metapackage carrying no files. The alternative, shipping this as a
10
+ # second full wheel beside spintropy-lite, would mean two distributions both
11
+ # owning spintropy/__init__.py: install both and pip silently leaves whichever
12
+ # landed last, with no error and no way to tell. A metapackage cannot collide
13
+ # with anything.
14
+ name = "spintropy"
15
+ version = "2.13.0"
16
+ description = "Python spin dynamics simulation library — a translation of MATLAB Spinach"
17
+ readme = "README.md"
18
+ requires-python = ">=3.11"
19
+ license = "MIT"
20
+ license-files = ["LICENSE", "LICENSE.spinach"]
21
+ authors = [{ name = "Angus J. Robertson", email = "angus.robertson@chem.lu.se" }]
22
+ keywords = ["NMR", "EPR", "ESR", "MRI", "DNP", "spin dynamics", "magnetic resonance", "optimal control"]
23
+ classifiers = [
24
+ "Development Status :: 3 - Alpha",
25
+ "Intended Audience :: Science/Research",
26
+ "License :: OSI Approved :: MIT License",
27
+ "Programming Language :: Python :: 3",
28
+ "Topic :: Scientific/Engineering :: Chemistry",
29
+ "Topic :: Scientific/Engineering :: Physics",
30
+ ]
31
+ dependencies = [
32
+ "spintropy-lite==2.13.0",
33
+ "spintropy-demodata==2.13.0",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ # Forwarded so that `spintropy[gpu]` means what a reader expects it to. Without
38
+ # these, the extras would be reachable only as `spintropy-lite[gpu]`, which is
39
+ # the distribution name a user of this one never has to know.
40
+ gpu = ["spintropy-lite[gpu]==2.13.0"]
41
+ dev = ["spintropy-lite[dev]==2.13.0"]
42
+
43
+ [project.urls]
44
+ Homepage = "https://github.com/angusRobertson/spintropy"
45
+ Repository = "https://github.com/angusRobertson/spintropy"
46
+ "Upstream (MATLAB Spinach)" = "https://spindynamics.org"
47
+
48
+ [tool.hatch.build.targets.wheel]
49
+ bypass-selection = true
50
+
51
+ [tool.hatch.build.targets.sdist]
52
+ only-include = []