spinmc
Project description
SpinMC
SpinMC is an open-source Monte Carlo simulation package for classical spin models, designed for studying magnetic systems and phase transitions in statistical physics.
✨ Features
-
Multiple Spin Models:
- Ising model
- XY model
- Heisenberg model
-
Support Interactions:
- Exchange coupling (isotropic)
- Single-ion anisotropy
- [Planned] Anisotropic exchange coupling
- [Planned] External magnetic field
-
Support Algorithms:
- Metropolis
- Wolff cluster algorithm
- [Planned] Parallel Tempering (Replica Exchange)
-
Simulation Capabilities:
- Energy, Heat capacity
- Magnetization, Susceptibility
- Absolute magnetization, absolute susceptibility
- Group-wise (sublattice) magnetization & susceptibility
- [planned] magnetic hysteresis loop
- [planned] binder cumulant (u4)
📦 Installation
Requirements
- Python 3.9+ (for pip installation)
- Rust 1.88+ (for source compilation)
From PyPI
pip install spinmc
From Pre-built Releases
- Visit the Releases page
- Download the package for your OS
- Unpack the archive and run the executable
From source:
git clone https://github.com/mxmf/spinmc.git
cd spinmc
cargo build --release
🚀 Quick Start
- Create a configuration file (e.g.,
ising.toml):
[grid]
dimensions = [50, 50, 1]
sublattices = 1
spin_magnitudes = [1.0]
periodic_boundary = [true, true, false]
[simulation]
initial_state = "random"
boltzmann_constant = 1
model = "ising"
equilibration_steps = 10000
measurement_steps = 100000
algorithm = "wolff"
num_threads = 10
[simulation.temperature_range]
start = 1
end = 3
step = 0.1
[output]
outfile = "result.txt"
energy = true
heat_capacity = true
magnetization = true
susceptibility = true
magnetization_abs = true
susceptibility_abs = true
[[exchange]]
from_sublattice = 0
to_sublattice = 0
offsets = [[0, -1, 0], [0, 1, 0], [-1, 0, 0], [1, 0, 0]]
strength = 1.0
- Run the simulation:
spinmc -i ising.toml
-
Results will be saved in
result.txtwith the requested measurements. -
If
spinmcis installed via Python, you can plot the results with:
spinmc plot -i result.txt
📚 See more examples in the examples folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spinmc-0.1.0.tar.gz.
File metadata
- Download URL: spinmc-0.1.0.tar.gz
- Upload date:
- Size: 149.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8de222b333e2c249f3c905aa218ad212bdd769eef94b34ecae377e2d1ca23184
|
|
| MD5 |
2118a30bdc565feb673c543fe5dac221
|
|
| BLAKE2b-256 |
852d9a97f2c8390f87111b2724c6e097c104f88be82d96b5a88fb74f15d4e576
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-win_amd64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-win_amd64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.13t, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32bacf75aac5e41c6fe1d0e37bf261f698f0e67ebe83d3d4ca7d338fc3a27622
|
|
| MD5 |
adf70c8adee6510f253f58c03ec93a9a
|
|
| BLAKE2b-256 |
7bcfed5f9a3330a6214a96492491bf18e3188d1a3228a6a053a9cc1ee387d327
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-win32.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-win32.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.13t, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fdc95174ebc94be5d70513ff75ddab78541cb3d574f993de0a3584e97fa0c1e
|
|
| MD5 |
1ee7a20f59db1dc2c7933255f344cca9
|
|
| BLAKE2b-256 |
7ebef210de8aa9b77d3bdc2b409d2f32c67aaa47f4d94b96ca3d50220153eec5
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.13t, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90d86bb10e32105cd02145b153004a87ed77d4f33bd3bfbc38815d7f47e67adf
|
|
| MD5 |
f313af86a426ff4e423105fdb7774da9
|
|
| BLAKE2b-256 |
9f91c99be37b43c0e9a6187e61c85e46561c92dc8e56e21d54abc6228d1ea5ea
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-musllinux_1_2_i686.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-musllinux_1_2_i686.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.13t, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c66cd6204dfe1b1845b40d9d6da0f91459b18238d55831618aa889d4d9e6a886
|
|
| MD5 |
06e7ae67ef2119b63572562c53419113
|
|
| BLAKE2b-256 |
1967cd32fca7f030e1e951fd780c283f9c06df2463d53ab7c212891e8174f637
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.13t, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64465de22e84be96e94fce954d752f63cafb1bd91fe63a20ab7ab019418655ce
|
|
| MD5 |
275b2d11e85b6b425eb9a1c5858f1214
|
|
| BLAKE2b-256 |
7e40d313292dac2999cbd95b2235b4336f6e3b3335e4592381820dd3a1879b72
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.13t, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5f6d5aec75dbe850644906f0ca76ad4c7e56a64ee9042a220e2e12738907b9
|
|
| MD5 |
5b998b27409ac703e7fa974879c8f982
|
|
| BLAKE2b-256 |
4ec473635f961101fcd4b96ca39fe5e7858340c091788d5bc22d9b1659451a56
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13t, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e474227ca15c87ec5efd8ae62512d739f0c8033f1e88699bac28de0d26c7bbf
|
|
| MD5 |
3137920b7c7f3259ca61afbba79faa07
|
|
| BLAKE2b-256 |
5fc9b9b1e5a56dbbc44e3701be8de2f225630f50b70c9e3200e25cf9e94eccef
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13t, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cabed1658a67a7ba737ad9a82e7ccdc246151a7b4e4162555929d236e62e5be2
|
|
| MD5 |
db4f41c48c1a079f966510d3c0cec88e
|
|
| BLAKE2b-256 |
635dde39f6750ea649221226e219c4f583f98f1c2a7c1e0f9a92038a300cee9a
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13t, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a3891090a46efd7dffd5109098e9f9a4cf88b1ec01cbd4823f8726f4048a348
|
|
| MD5 |
0df4c9c546d7535530c8f3274edf9b5e
|
|
| BLAKE2b-256 |
0de6583c59e3cfb9fdf995ff32e4cc1d662bed3e05e7f39a36866b4cb77e498c
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13t, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c0c3a03ee2d14bff4c859a44c234cef98da6e7d96f7719a80d6ccf6b402d0eb
|
|
| MD5 |
8035f5c8da884fcaa9ebe351b072a8ee
|
|
| BLAKE2b-256 |
4dbe89c912a3d0236be7742c41f87aa33bfdb55747119ade778b42139d972cb7
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d291a88360f7c61175c36c144d42f519cc13417e109b7274bf8ee7ba4617c8b4
|
|
| MD5 |
dd5826e5fdf71c37a3a5d7b0f694021c
|
|
| BLAKE2b-256 |
4011aa1e11951ee764ef6b9b7ff5ae5d6208776a8e31eaf4d19b86087c2d6376
|
File details
Details for the file spinmc-0.1.0-cp313-cp313t-macosx_10_12_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp313-cp313t-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13t, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7939a5c21fedea7f2bbcd82bc5d36cdb8ab85251ce299da8afa80f0177983c47
|
|
| MD5 |
aa61891a048d51da4278d3517b332766
|
|
| BLAKE2b-256 |
5554dab5718cf302470e1c7173dec1f2eb60b7781a5a11f28c8287cafb32bb74
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7d4112439eb82eb8ea368ca332a5dfdd57a4b9c3faf7ae9458d81c27017867
|
|
| MD5 |
aba76e0826dd5644d738550952a9b98b
|
|
| BLAKE2b-256 |
c986431085b4dc1172fb07c0e51bafd15b639f2793450aa56fe6f2dbfb75721d
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-win32.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-win32.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed49fd68dacd582a7b91e5ce1c9e9a006b894f035864c2b709bd2413f2002028
|
|
| MD5 |
3640cae2fc079a2aa66c45dca1d36680
|
|
| BLAKE2b-256 |
4729ccb0139d9f7aad3c5e0f30e29b5b668bed28b8c72be19ee2362145202dc3
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
314516e56d03424e024591a127cc5e761cd18b4b498a874de77ae1c5c2625aa9
|
|
| MD5 |
77f8e80a8b7703d4ea7bc798aadf7289
|
|
| BLAKE2b-256 |
28e034f5fd27c99af059eb108bc6e8cc99682642b01ddc85c51f6b8231690ca3
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d38e7f6e30cb7c6e7fb4afc0d54f5591bd6f3a33b9fb393bfc7a8dec83ffba65
|
|
| MD5 |
52497f0fab2e67efd86f8ec1548e8a99
|
|
| BLAKE2b-256 |
d4f9bee1fe7da607eab7a1541aca6045a8dce01c9fbdbc71c9612b2b2bef4a58
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8263de78891014b572764696f46a97a2052ae087204721d6dad4770eab8f652
|
|
| MD5 |
ffa4e55028d1e6865aac347823118433
|
|
| BLAKE2b-256 |
363cca370efe4326588104c7ef747b0632e69e81fb677f0460b2a6178df9e862
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
905770871e8530dbe89de179aed5daf5a6c51d194ff3dc7d92acad620194fd5b
|
|
| MD5 |
718215dafc1e98d22f6b72b16f716500
|
|
| BLAKE2b-256 |
0972a6b6375bc9e89a8985d751963586509b7f05afac6ab043fd1475946b7a67
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8cfcae258348ed301bf40f14b22ea72ecb78fe05f4c511dc521c44af5ee2950
|
|
| MD5 |
9b62e6b6b82fbbe8e34464ac13cd703d
|
|
| BLAKE2b-256 |
2fa5a5d23674167cdf3c42795e45e9fd9c4bd4590a7877aa56e3f22a339054d5
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2cfae2b723af5c26f29be4fa01af99110dde2df27655b8c8ae31f1754b6a504
|
|
| MD5 |
219e687702242dd62c74aae7b368bab3
|
|
| BLAKE2b-256 |
8305ff5aa946609b16924e220a181f2fd9d0786e02ea4dc33d2b9db5623f1fba
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4896f21705671ae8804636b410d9e73891ba47521ac491d56d50d116b5311465
|
|
| MD5 |
bcb44177e845f5ec7621d94e5c1e2c14
|
|
| BLAKE2b-256 |
0ec370ce9c22951463ebd2254c1a010f1b1f71011c4b536991b52be5d27ee44c
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c76b0e7db4525f69542d5c94de1bacfbc09b27113c7896288f0391cf130bf2aa
|
|
| MD5 |
63f1bf992331b6370382c032fc21e2c0
|
|
| BLAKE2b-256 |
a88cd6810ece2a871c5c35bf2f22bd8041905081016ded457e685c17a63535bb
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
579973d0b86643ff51702e7a8dc903a984780ffa5fd5b6743b63753fc3d89e4e
|
|
| MD5 |
a2db16b7d7f90a227de06b1b691a9d14
|
|
| BLAKE2b-256 |
152e442bc2efbcdcfc393196f32d38bf1abc524400120cc7f76301b48a9ab992
|
File details
Details for the file spinmc-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: spinmc-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6245216f744137e3b7b82e6275b4ac7c15d9d2c37c8a68fdf6d817a479ca76aa
|
|
| MD5 |
1c3069a240a22629b3d6252f3f5620cf
|
|
| BLAKE2b-256 |
94fe00a5aa7641ce1a02884a2b8497b4c3a38d2e3709173f885e5c0faeac0073
|