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
    • Group-wise (sublattice) Absolute 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.2.0.tar.gz (144.2 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.2.0-cp313-cp313t-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13tWindows x86-64

spinmc-0.2.0-cp313-cp313t-win32.whl (3.4 MB view details)

Uploaded CPython 3.13tWindows x86

spinmc-0.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

spinmc-0.2.0-cp313-cp313t-musllinux_1_2_i686.whl (2.2 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ i686

spinmc-0.2.0-cp313-cp313t-musllinux_1_2_armv7l.whl (2.3 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARMv7l

spinmc-0.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARM64

spinmc-0.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ i686

spinmc-0.2.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.0 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARMv7l

spinmc-0.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

spinmc-0.2.0-cp313-cp313t-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

spinmc-0.2.0-cp313-cp313t-macosx_10_12_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

spinmc-0.2.0-cp39-abi3-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

spinmc-0.2.0-cp39-abi3-win32.whl (3.4 MB view details)

Uploaded CPython 3.9+Windows x86

spinmc-0.2.0-cp39-abi3-musllinux_1_2_x86_64.whl (2.2 MB view details)

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

spinmc-0.2.0-cp39-abi3-musllinux_1_2_i686.whl (2.2 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

spinmc-0.2.0-cp39-abi3-musllinux_1_2_armv7l.whl (2.3 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

spinmc-0.2.0-cp39-abi3-musllinux_1_2_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

spinmc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

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

spinmc-0.2.0-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.2.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

spinmc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

spinmc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

spinmc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for spinmc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 53f6853bf1973fc1a90124267f95fe02bb9f71521e40b1f432561de9ec01206d
MD5 b7822f26c609af300f45f70f185a3b4b
BLAKE2b-256 d21aec79a4f0288aa7c112294d336d0a6c4493cf963fb8782cee9077023d2fce

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 37ba9d0d911353afcfde4959f316b8d7349d8426127f67e670689d67cc544e9e
MD5 7bd6188aa566194e0c9ebfe43c5f21e2
BLAKE2b-256 d5e1851a63491aadf020ca538137dabdb53d5f9fb8d6009673a7f07ab8da5ccb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.2.0-cp313-cp313t-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.13t, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-win32.whl
Algorithm Hash digest
SHA256 90392cbaff8a6cff8a6707ccf31897d55922f85a27408d7fa0c892b69a9c8561
MD5 6ef1a6740ed93bf211fc54803168a531
BLAKE2b-256 682e0997f29566ddf2e816557b3a21052ccfd1582ef9143e3b062ab660da90e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7c7c4168d8b80aa4e4bcd4e1dc1515744b681362847f23b54c2d54b24a11abad
MD5 82c6970265a8cd2232a3fa590ef95fbe
BLAKE2b-256 a20e556d1e13843d5977fe983a09f615ad005e482ffce50e3540c0be030ab1e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 1d4a6df61eb0bf4d2a5bd9a0cab02f33404dd6d745e5cd302f0283e4615eef1c
MD5 eb92fb9ee625e6f9705aa76d1d1597d8
BLAKE2b-256 6a0a31acbad9b1a83a6becdcd9a243eee80a48412848429039bf370f52ba29c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 dcb1ad13e2e75570b70cfbc18a8b397ac2b6aa3123fd2ce6a454e59ff4f2eadb
MD5 bf7696491650ec5cfc1071257dd2d373
BLAKE2b-256 59f918e5d5273b6a06723cc3598040580dd42b9bcad6726b62778093d119ebf1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d2d242cbe708042d86bf9215da99265fe623f9551efbf1c9e77876be5ed06ee8
MD5 6f54dbe26d1a4c046b8dba9bc3907d62
BLAKE2b-256 13608484d4ac8f36a15f440a05dd1249ce188c5f0b20aa8ad1f719537b5450e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e42a470263a36e45de22fc41aa441343f47af3cc3392a9f9dfe58f906ce61c1b
MD5 8db1fcf4ff5b49bbe41406b5990e849e
BLAKE2b-256 19babeeb857f3c5500c7e084487a3b8bdc1fa4b39185751e3ea8ee18868b56d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f99d37198adb172de1d5c73bdb52a5296c2149ce3063100bdf9c472bf70bead7
MD5 663e5a29ae45378c677873c853a1b67f
BLAKE2b-256 0cbfea23d15ab59d0326988a5a574bdcd1badb2845a6e8531b4a9390885c766c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 7d7df6fd7e7fc512a053f7f5b736c8a78d55933aaa5173dfecbf97099acc0c9f
MD5 7697cde38da143cee30b3baefcc9261a
BLAKE2b-256 e785d6d8dabaf1c3e1e492c8936445dd99b0574b46c9a605ccd212a563ccf850

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 03d6d6068358a0ecb70029f15cdbdfc6f1ea1595cdccc827f1fc86248e00b61d
MD5 1d8f8e55d29235ac203e54cd6fe9bad5
BLAKE2b-256 a047e48b2c208f879af3a2fa3a6129c4b11b6abcdea3aca55a0a85b32675f0b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f19494a69a540163fba06cc9f815a766ec0752550c5db3ae1190a08ae827d34
MD5 a2af8e5718995c03b3a226f1c8ffa31a
BLAKE2b-256 8c944d2205f710b0c3344e66323c7dd53b3adf1e697820956afa118222a696ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bc4585f3f896cc0e393095526513f79ed7d6a281cfc26561735d5cbdc8c0c3a7
MD5 bf3e097270847b52e9e9e99993abdac9
BLAKE2b-256 402c2804e0b8fa2475129408494d101c1fbbd60abef97877ac125906acdbba69

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 93aef451c65966dc746bf69edc80bc166a071f02b07639c0bbb5e07e43513343
MD5 1782021d4a638eb8e634ec1ab0937626
BLAKE2b-256 009a7091d106350df17b2c30b6abd9a0a2cfba25308531cb68920dd6e188e294

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.2.0-cp39-abi3-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 f9d4e74979f98ad64774980f9e86b050752fd2f270a80e9e0aeaa94469ea55fa
MD5 12217b9efa275ddf56b6fdb2024ab8a0
BLAKE2b-256 b1be205e37308f24a6a210d675a396317c12ffdd769e209248099dbbf9445b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 129675b5be6b312c309af34607da4a8cd6b89ba436f277c8c27c5ce15cefce09
MD5 e21d4af160cbbb8382a349dfd590b987
BLAKE2b-256 858c6b31d41dc894d42247d15d3f2376ddb47011186a9cca17e84aeda52baf66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 71e0696f52643c8a04f8ae0db96b03af2c0b899e51af0f55ea02d2e5dc5ed23d
MD5 6011cf08b1ee2adfc62f794295ed978b
BLAKE2b-256 3558136fc533865ad8bcc099008cddfeae631a93ad2bf918c22463de6b093f56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 4adb77a19ef821ca8962a826582eb499e3e357576ec5d7a16cf4ffb78e0d74cb
MD5 41815322d4da4efa964c9f4d52b15375
BLAKE2b-256 9c24ccb515abefd4b8711a90c96309ab0731efb006a5abcd5e918637d78ffbb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b49086b9077b13b02f05d1fb4c81eb47f0bf2cd6756501642231560a5bf955ab
MD5 e03346b18254d41789bc734682dbfe67
BLAKE2b-256 f3a609fe14ca112aa5dc8fec9f201fce1cce2d3a9fb11f9d303baa09db322b06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ddd3ba306485954dfa21c3d20db2824c288ed7fb1f225120339c73530975818a
MD5 9274c81955fa6cfb37e0727ffb32d9b8
BLAKE2b-256 bc493211d33b958ae97dfe1affcb10b65cc196dca68b6017f04de2e236546eea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1aa4a753ad097f9bd83a299b1e025b928157c20e1b770353f32e9f1977399be0
MD5 6d1a1b95074f6c065e40fff9a302e5c0
BLAKE2b-256 958106e2be15fc87ad6cd5341b958e04f837d0302811d3bd0d951b8b75f104cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2456e7f7d46537584214d378052751fa89669570092c41a07c6c09bc88e13f36
MD5 2a5ab22e7b17e536bb90d34b38eed4ba
BLAKE2b-256 12947e6815049f276a83e80727ed63cb1e62fd144946cb144cce9c865180e34b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 97634f7f8467428f9553f6c0675908ccbcbedb2f11e590778355db6cbbdfeb2d
MD5 83a67f2c786cec47a41c7300cac02bee
BLAKE2b-256 9a74229c162ad73d8a7dc17d12e3c14f9b78dcf0d2aaf37a656945727d664bc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5cf0fb70618e1c4253ff86f5c67f868429c8a245bb50e8840216d4f5cea1624b
MD5 ea9b8ae8665c7cb097f8f1975596182f
BLAKE2b-256 af72997b227e9c666015b46e4ff6e40f945c19f6338bda33409db9b3a2c6a73e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dee30f64b83007146b2ea3936e3404a85ce34b87e25f5872cdb0fb6e49f24e8b
MD5 2d6e795c18522b60a40b6a8c63f2d0cb
BLAKE2b-256 926537e2ae427e4c193303f9f11ca82ccfc56aa62d7ee5c7285a14ed94975ebb

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