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.1.3.tar.gz (142.4 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.3-cp313-cp313t-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13tWindows x86-64

spinmc-0.1.3-cp313-cp313t-win32.whl (3.3 MB view details)

Uploaded CPython 3.13tWindows x86

spinmc-0.1.3-cp313-cp313t-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

spinmc-0.1.3-cp313-cp313t-musllinux_1_2_i686.whl (2.1 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ i686

spinmc-0.1.3-cp313-cp313t-musllinux_1_2_armv7l.whl (2.2 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARM64

spinmc-0.1.3-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.3-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.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.9 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARMv7l

spinmc-0.1.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.13tmacOS 11.0+ ARM64

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

Uploaded CPython 3.13tmacOS 10.12+ x86-64

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

Uploaded CPython 3.9+Windows x86-64

spinmc-0.1.3-cp39-abi3-win32.whl (3.3 MB view details)

Uploaded CPython 3.9+Windows x86

spinmc-0.1.3-cp39-abi3-musllinux_1_2_x86_64.whl (2.1 MB view details)

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

spinmc-0.1.3-cp39-abi3-musllinux_1_2_i686.whl (2.1 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

spinmc-0.1.3-cp39-abi3-musllinux_1_2_armv7l.whl (2.2 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

spinmc-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

spinmc-0.1.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for spinmc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c6b3996b94e01166b041e8cd2aafaafffe1fede282901aa0ea35644cb61f1de2
MD5 1036f442a7ffe4f814dd85592b676dfe
BLAKE2b-256 d2dbd3d1e92ad3b563ed0b1266a121a71c926928f72db70b8a40a19bd992e120

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.3-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.1.3-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 54d1c82abf266e3115f3b548cc3b51e1d0ae46d8bb3a1c124ae0d67c6af06999
MD5 c7898e627795141959f222314cc7097a
BLAKE2b-256 fb69e24eaa10d1c868bb67142da1aa78b3bf85491ea436573627d14366020c3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-win32.whl
Algorithm Hash digest
SHA256 6f22f2b54be0a57e5eec0b82e1c40eebd0ebb6f1d64f6ea435bd8d1a492d565c
MD5 55ac53a8293b1f1ac4d85d4bd0758178
BLAKE2b-256 a0a2340c0979dfa7bd488dac41c253c8627361bfe2c98704406cb1be9f1bde88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e9ce2f24093b0032e7799f5dfa94b3b7b519229fcc058947fe3099603052512b
MD5 13a33c80907ecf69cd97789b3ab3c4fa
BLAKE2b-256 ae13408222ef086781cf39a6a62cf3d034fcbe6cb36f49da35362923974248a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b6517c3b8354c4689da9e0b5276b8353932fb23425ec9101073e1a6763d7cba1
MD5 8abc3d7102fb782af288a6fd4fd758f7
BLAKE2b-256 db36673c8982932ddd8f1f551175e831c80eef69b1985ed17c7e036d16e04e78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 f8184d530de54f38cdf26069bb5bb09f07393095b27a9e48d990ec372faf0571
MD5 3744e7ce910199be4036a59c4ca4edc5
BLAKE2b-256 f11ffe4b4f228e7da141776df852418fdc80d5511eb43477ef7e3bcbace027a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a295afcb51e7c313154298232d792d32bd0d1eaeac4a690a30224bb13196e559
MD5 a09d80234007aea206712dd710fdd51b
BLAKE2b-256 cc3519c943aeb055ac130416b0dd111a0a02cf15234379b08fb7dcae9e4d0556

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be81eef056f9de8156a49f4ae4b6353fd73dbbb0bf8ccf5bccb14cdf4592fb7b
MD5 4a371c537c1f83403a063b064c532212
BLAKE2b-256 4c868977ba0e3b2720840f185beea55190f7e790b8916191bbe3b4609238fcf2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 57ffcb421a4ab8cb16eecd70406f7f457857709a092ff39f25d80c4911f34b06
MD5 c1dae8f991e65c94f2a8ff867eedf583
BLAKE2b-256 e6ade6ed348ba3f1a6f50fa9731903d0e663ff33189bc620d32b46af324a428a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 fcc7668fe8b1c601ece96d46f22f3042d81ecb6e4e04299676d189e8f893dcd5
MD5 af7cffba1ab21edd6b511cc53506fa29
BLAKE2b-256 af56df7a288c6c8bf4eeb9291c018fdf8ab113a40ca636d669a160d234814142

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0206df2ed5e876d1314ea5b2f1223158d0f26aef289586c315cb3817cda2e3dc
MD5 b90dd10cbe2363073fbe6dd02ec6c30e
BLAKE2b-256 151be20e4f9a47c65e933c84255fba392840dc489d24c2f95dbcd52d462231ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e979cfa5b8151f394e95cf63b0be9f04c587bd196fdc9c54e89672e2859aa60
MD5 10a121e41dbff31ab50d8db96e61b1c1
BLAKE2b-256 7cdafeda01750b04b94941dc1b10cd84ceace2c7a7e08193a6da718767356e71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d830b5503bbd3890b63ede85bbc7563486dd1fc05bee128de030ebd1fbf6e9ed
MD5 f52c730b13225120c7b0570ab35ba040
BLAKE2b-256 fad35c414f6be2d6af2a9fbac6cf1a2d48da31b70ef88e03402777ee80edcf72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.3-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.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 71e988c49aa98a301a8312a3ee50efed2269dc754decbc3cd971641932044efa
MD5 a45c59e6ac9f5401b83ddb2a68f89132
BLAKE2b-256 e538d22ea8343acfc2ea7eaf6888f076d90314bebdc16e674fda2203aebf63e4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 829a6e3eda0f96a43cf73666df7bc1f23f015262e405622867db5a8276e180ac
MD5 04796ddc6c0585ba2cd28b3998aedcd0
BLAKE2b-256 2c8cf9717120fd4da5df644cbf1d3035c65564eb010f31338324f80db1d9117d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35f16cd50329472bc9b255426171f77314e9c1232fe5e09cd0fcfd301bd767aa
MD5 16bbb2ef3cd7cf74d232dd0d20849033
BLAKE2b-256 6ee58e179db43249c47ce240d40ed4f6929f6495f0c39e4ba393ae455afb1785

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5a498293a8d7beba4ee8a7627c0385859cd0d7f233fae40bdfd1f4b464d8b189
MD5 4e6916c6543081d31173d0d5e669ea73
BLAKE2b-256 4ad33daaee001eb55441993e22bdb7b8bc4cb24093461a3e6ec3406c919932f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 a8ad23ff5c70f5975cabc6c2e8973a5df0283f271589a8b138cc856647161ae3
MD5 fd643b40be5f80c7347ee3a2c30fbcce
BLAKE2b-256 5bdf84a3add25b6bf0b9f136c9158fc1be3945b3dc0c0db647cb774f4085670f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ff0bb6177f2ccb82ce571f5e04c2c5f9ac7b970baf56d5b5f03c96dfd27ea9e8
MD5 e7f4c66393fefc15b2873af1e197c388
BLAKE2b-256 26ecc00625b28d0145919cbebd3b9f13fa384d356eae427b38cee4e7529bf942

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db17d12c9ac4e20842e6701064f13dc610c6011db09cd21f8fd03c1e77c06719
MD5 d191ad48ea770b8356d9f7b3e4abcce1
BLAKE2b-256 35a3b7ae8555606c80ac398148dc3dd5db07d91ce86414c1dda7de7b49f14fc9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b35308222e11df2c719df67d4e7c3b2189003594c92e00aea5cf70baf1b73e1e
MD5 5137ea0b13e7814e848a2a25fff4bbfc
BLAKE2b-256 36bfb52d7710ebaecc31de89ca368de4eae8bc7d3f2ff28ef3c0c8d32f4f7bff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d8c5e2b311c133a9bf44a4fc3a5bf17e99f1daa9802006d88047843af8319d50
MD5 38eac931a5ec0d5cf7215999a51cf4df
BLAKE2b-256 17e182c10a462c3056514fe6be3b5adc6007d9fc81d34ac07018807e4077e4ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 690077eda107ddb7c308c120508a9eaa573dbb0aa499b071ee26aabb538e7a1b
MD5 ec00463d87084bf66377f879abcc0153
BLAKE2b-256 36a4531c78cfbca5eb721615586fd00e5db6dcdb9f60d2522ebf79dd97578809

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ed9b3957b2aacdb566f6e6c2aa4715b6880d7eb181b45410ff521bfdef6bd23
MD5 81ef16b8277258caea327f9e6804eaef
BLAKE2b-256 b188041df99bc85a16a2a7d43723052c91b313689cbdab041d13cb67c172e7f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e0a628ec52f2a45beeed34fe2fb857526e2b94edd6c9e940dc5980014f7ddfa4
MD5 e5c897868d9ad8e30cb0d859dfff80da
BLAKE2b-256 876c69daa0681115fc22019b867b2160bf2a491a67d8bf4338ee374ea245448a

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