Skip to main content

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

  1. Visit the Releases page
  2. Download the package for your OS
  3. Unpack the archive and run the executable

From source:

git clone https://github.com/mxmf/spinmc.git
cd spinmc
cargo build --release

🚀 Quick Start

  1. 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
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
  1. Run the simulation:
spinmc run -i ising.toml
  1. Results will be saved in result.txt with the requested measurements.

  2. If spinmc is installed via Python, you can plot the results with:

spinmc plot -i result.txt

📚 See more examples in the examples folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spinmc-0.1.2.tar.gz (149.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spinmc-0.1.2-cp313-cp313t-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.13tWindows x86-64

spinmc-0.1.2-cp313-cp313t-win32.whl (3.2 MB view details)

Uploaded CPython 3.13tWindows x86

spinmc-0.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

spinmc-0.1.2-cp313-cp313t-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ i686

spinmc-0.1.2-cp313-cp313t-musllinux_1_2_armv7l.whl (2.1 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARMv7l

spinmc-0.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARM64

spinmc-0.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

spinmc-0.1.2-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl (1.8 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ i686

spinmc-0.1.2-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.8 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARMv7l

spinmc-0.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

spinmc-0.1.2-cp313-cp313t-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

spinmc-0.1.2-cp313-cp313t-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

spinmc-0.1.2-cp39-abi3-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

spinmc-0.1.2-cp39-abi3-win32.whl (3.2 MB view details)

Uploaded CPython 3.9+Windows x86

spinmc-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

spinmc-0.1.2-cp39-abi3-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

spinmc-0.1.2-cp39-abi3-musllinux_1_2_armv7l.whl (2.1 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

spinmc-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

spinmc-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

spinmc-0.1.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (1.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

spinmc-0.1.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

spinmc-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

spinmc-0.1.2-cp39-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

spinmc-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file spinmc-0.1.2.tar.gz.

File metadata

  • Download URL: spinmc-0.1.2.tar.gz
  • Upload date:
  • Size: 149.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for spinmc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d64fcfeeaa398f8837b53d4624aee65749b37ff88ecb29c72cb366f68a0ee0e5
MD5 345e3924118e93e4efa15a890afbafa5
BLAKE2b-256 345dc1cb1daa2c11f96366cc41c62dc29323a0a60b3315a9a2cacd77cbaef168

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-win_amd64.whl.

File metadata

  • Download URL: spinmc-0.1.2-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.13t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 5b9e73b8e13fa2fec1539cb725ccb477fa1b97ce5d37f478951a05b9761641f9
MD5 1cd0aaa707938ab5e3fb2a3ae91420da
BLAKE2b-256 1681408a525658c0b690dd2781ef028a49b71c1f7966be6d27d27b2c31d392d1

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-win32.whl.

File metadata

  • Download URL: spinmc-0.1.2-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.4

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-win32.whl
Algorithm Hash digest
SHA256 d20ca08eaa2428e0274e9052ed18b97ca41f34c034f51e61a56d6f80166546dd
MD5 8b9d122d7203b7daef1fe07a29e3e77d
BLAKE2b-256 0cff1754c00350503e7b5fed5ebd02fa95aab5a9e3951409bedbfb4382d5dd41

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f376922d8b46a6de4a3a7fbce20c557f16ec68d5643e925f586a68247d70ef5c
MD5 6255dd01be4487bd0d2aaca86b72ae74
BLAKE2b-256 a50a62967a442b15b54acd4f9d15604e0d375e46a847949ac6772dd86d6fb48a

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ab230ccb948db248fa94a9c035184093e65f5ff084215921e25a615a85ea8255
MD5 1fdaa1659c8035649a945b8bc1d56624
BLAKE2b-256 02aeb104a954c0d8145f3ce8bd841f3091db050df39e10257ec74d7f9ea2d11f

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 dcd503e85d1a42434d37d25f33c429bd6ac964d47225e783a73fcd199c528cc2
MD5 cbaf2b608d4895211169835c2b510737
BLAKE2b-256 633fda82567bc33343e5993e54eb9ca58513d096319c1f31ccb5ba0ce7d3674c

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 08fb2e823637a357ca2ae54a9f97f6e818eeb415e8923c3ffb267d58e8d31b0c
MD5 204900808a27d08883eb4561accbebcc
BLAKE2b-256 dcb93cadfa4fb8ed0f57b37310dcb528042516c5215ceac0307caf94afeecedf

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8a73180bc998c3d00e563fed990acd269c20986fd564756a1beb48425aa5586
MD5 e5d82fe6dbee92f66c61caa3aa4fbdf9
BLAKE2b-256 7ea3c1f5ff25e61b1d0d4c88ccd42cc813f227a222eb721de79dd648ccbe25d7

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c366bd917d474062768164615f8085fdb77937e706a5d32d4616fc406f8a8826
MD5 cac6c4a7d0cb69ce45f481fe3c78c3c8
BLAKE2b-256 d3a29b80ab83378b3d392e1e85877c9b9375c210a504ba0d41d94738ee68eeec

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 49274c1491d5239837f24652879585dcf456354f9a59786fa76da9c740551d19
MD5 93434d45023d1fb56ea0796b9ebd5521
BLAKE2b-256 373a2d99e6ded65ed8e816f5d1991f76261854028271ded0059cad337eb3fa5c

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3b1f9e69c107893a618c382f3f24cc1daa4516582ce49a5a30af4563da6526c1
MD5 79ff518c32bcd165e559aafa2ef0bc6e
BLAKE2b-256 f9f3eb7871f54fd3e547fffc199d1ec7018893acfd1e89c440ef687724634e1d

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c289aab423df6683b20c974ee1ef6283c5c227b4aae01300230b16811c8cd280
MD5 e03543435dc9d971fb3c9052f0438fe0
BLAKE2b-256 6bea8713410b95e202e0e03efc86e29344fbd228944cc07edfdebd6ba660cd0f

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp313-cp313t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d022b0f7079d256960ae9cf9e0b1a4e246bce45ed08e67857064d5bd1c4e032c
MD5 7697eef8c81a8d171493a48c57cff4ef
BLAKE2b-256 a0a7426fa2c54fe9a1085872d3d2d5e757bd4d2675e8230e9826969a1357dfaf

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: spinmc-0.1.2-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 711a0f63066af9f1b6518fa918411b05d249cbd37e91c5cda3550ef13a6a55db
MD5 889b76f05675e16ea00d23ef2962ce06
BLAKE2b-256 06ad44a667a0e7d9b78f8fec0d63c831e5704df53d278136299d2733663501e8

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-win32.whl.

File metadata

  • Download URL: spinmc-0.1.2-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.4

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 69c3e14e7a3108ff264155ec4c6f00c4babef25d98126e05c1d880f86fa3b45b
MD5 2465c5342fd9e70119b39b2dd93e726e
BLAKE2b-256 3b63717995cc19d79321e0a060aff4e58ef99753ac5deb3f1385799ed00d9ac5

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b90ae31a859cc017654d847b6a2610fe58f695af09e0b3d252bcde46d2d9e49
MD5 29a35df2ab19cee4ae418b6e420e2b85
BLAKE2b-256 56570227f1724d048f5169bf2de3c74b59992f0dd9d97738706c02ace68f9efc

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4e591f0f7717551a22606f9199eeee5b763c408adf8a869934262f0e8e78e543
MD5 ee582a36154508ba9fb32ced5f7c431a
BLAKE2b-256 75948bc61123c3e63ecdad3e09fedfcf61b2e8a627da0c03f374272beb11d912

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 4b776b2a1ca2d587c18139bccf4cf1d433f52cab524d04dab254c9c98cb94efd
MD5 b0ae8c3339e0c387c93e0585873ed9b6
BLAKE2b-256 3a1ce32c8688278c0de279af34185c26f9a09278c8f1d44496f8fbfed2ef5081

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d2e16982476e0f8dc7863227f6c745573a495b914ba851fe67d7552aa5f7486f
MD5 b4586009cf1e89459bb69c553864dfc7
BLAKE2b-256 0354d5fff0cc1a5c0a2572344b56b365b6e523bd34a33e120ab5119420408f32

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 617c2dc0fcf89628a6e9a1902e0f65b41491444f281dc21ae01b268c0dfaf9ac
MD5 7bd6e68cd87d082033454eec3d95172c
BLAKE2b-256 4ab336c026c8613d43e1ed9ff97319432cf70ecaf9dd868e95ccb9ff0884571f

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7c6eb24f79c86ac94e3cd8f99ebbf25e6825caf80b22b0dbbcd4380e0c591c14
MD5 428913d23f47713450b3a6d42f2e4335
BLAKE2b-256 f206d317101016680ab9be0b4f7b47a11422dc1fb6a896aa89209ff80d88d14c

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 1f0ce3ef33192e23f9f29bbc6714d5628255e972a2959c52e26594931ce0d8d2
MD5 0333be184c9da7d76550010ad8613aa4
BLAKE2b-256 eb421e1e4e5010de4b536164be675e2c522555c4605595c8e8366e0c4607607d

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d9486c48bccd1e44fa71dfad5e41003064d1ab271a9fc5b85a5e684300d9ebb
MD5 267d07367b4fba1e3696f8ae712af536
BLAKE2b-256 3bfa92f163e7ce94fe4d24cc565d3fe893ca59391842ee06da2ad3aac94706c8

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0a5630cd6a0eb9368832b3b73014e39af38bf6c45b97ff375b857efa5d434127
MD5 f3b17601bc09eb6657267e9051a01491
BLAKE2b-256 584b50a708ebd272c6df219e6027f413ba11a9639e4ac5c35ee1aa9efdbd839b

See more details on using hashes here.

File details

Details for the file spinmc-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for spinmc-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7084186e2521c0e077fa9bf0985ba9bc4c89b1a6804f13b2d676e333a1a86102
MD5 e3889eed0e0fdc61b6d20bb6dca9e30f
BLAKE2b-256 f68a8a63a8aca573b03feea35887b6fdea7b96f83075c9b07d4be63d5ac8b779

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page