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
[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
  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.1.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.1-cp313-cp313t-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.13tWindows x86-64

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

Uploaded CPython 3.13tWindows x86

spinmc-0.1.1-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.1-cp313-cp313t-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ i686

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

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARM64

spinmc-0.1.1-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.1-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.1-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.1-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.1-cp313-cp313t-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

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

Uploaded CPython 3.13tmacOS 10.12+ x86-64

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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+Windows x86

spinmc-0.1.1-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.1-cp39-abi3-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

spinmc-0.1.1-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.1-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.1-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.1-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.1-cp39-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

spinmc-0.1.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for spinmc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 41a8d82fc0e854021746d6fec8f5e7f777f8374a416bfbe7fbb4c7df357360ab
MD5 6be9717e35cd3876834d675c38edc5ea
BLAKE2b-256 bc8cbed719fee0428f3a5866e9ed4d2194a9cbd6846ea8681662e9aa6243a955

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.1-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.3

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 9b8496d0db86f4bb8e4c33fda1324711ab9557f7e65d2bfa73dfee23d784ac56
MD5 aadbdee60f809bf7edf20474988b8eab
BLAKE2b-256 8eaf71fb761165e662bfcf39b1e33ef2869cc9d11cc47626101019e08dae8319

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.1-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

Hashes for spinmc-0.1.1-cp313-cp313t-win32.whl
Algorithm Hash digest
SHA256 c5f1a76b5b87268cf705ea488c48ad713702863dc74e35feafe4243aec40b5bd
MD5 6ea9b20e5b30eb10ec3a95a6e0734bfc
BLAKE2b-256 850311c91d843f5015e4a171aa577dc1cfe40b86b74a0f3e23349c4dceda207c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 faa052c53fc01c4a4e78f95316999b38dd1e18f4dfe48c227de21687fb758fd2
MD5 5aed0d4f8de590740ed9e1e136ac1198
BLAKE2b-256 13050b732cb7efff7ec993e6ba850513d9e4f12eab6b64095955465d0035b8cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 111c8a66dfba9382f58863808e2caa82ff7ff2631b26ed7bba3d45642969c598
MD5 1b2a9cea77125fe1be6fc26a4a1bc1c6
BLAKE2b-256 ef4a5211a82d1d19c2c01d648aeba59d456d86e492a14f993dde967bbffa5f8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 556fcb367971854f39f03cc9fcf5395a480376b3523bac2bfd1f2495fb146750
MD5 0afe7bd433931286006bcfed459fffbb
BLAKE2b-256 516246ac07326d3f5643646fcd6e65e882ea916bb159e8238a51747aea6d715c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 471609b74cd413e6d7f18877eab46d1a1daeae3a43427f4913b9b58d9f4719e8
MD5 3f610719ad863a16db11d6e07b4c64ee
BLAKE2b-256 129bf4598d40aed3c3869fcf8303cc310cf4a517d49a6e3618bfc196314a3d9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15be56f2b81f4d90b0129638bcb94ec2fe0cb59d0f1e7e53202de85f1491dc28
MD5 58e44d76d8dd86d7fd659b4f8bdd264b
BLAKE2b-256 dd4f0268ccd4f54c774cd7ba8dd42161086e78108ea26d03c4519491bbb51bcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d83a7ff26d4740e345a75a58668266c2579bbf69e94c3452cfa8b95de1425df7
MD5 d2c70958e4ce62be11009fbbaaffb236
BLAKE2b-256 4799011e11dbcf34249272f7c10960fd5c608f8f88e883312491fce9cf992283

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 48b40336373fe56074358cae062eafd41712b7095f81830b9d793e119e0b0f50
MD5 5b5b5f16a8322cbadebc33ebe788f5a8
BLAKE2b-256 6caa92e678b98bbc6d2d08b821d7d2b58a11cc87af70d2d9401b0e06debdca49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4ac2a1d081d77e352b2561ce20c6a71d882a2f77c9ffc05daeb1cc4be720aa1b
MD5 d6993bcbb15e1f84df82c3244cdb9beb
BLAKE2b-256 c47e59a3fefba6071675a130ade0c0ddfc89ad43a61dd199ad573cad8f65287b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 364df1691803dd33599ad2605b1a73b3b8a8ceadeb83622b6889ca1fccf575f7
MD5 879a236afd88a7e7711435fb620e3097
BLAKE2b-256 b0ebedb5ea57058877d840c5b983e865002b98247718452d1b219d6ec1750e82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f40eb75e4733121b8a5c23839d9c3d9e1f12b0a450cb93f5314c700d2f0d0c85
MD5 c75361fd753ae1eb4668c63bbc53c226
BLAKE2b-256 9546b41ab4b8b75d49ef12b89ca4c5d273758e2d612dd80b85b8e373108ef579

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.1-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.3

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c1824d1d6e9a42afaf5bfaa75e2941d639c25ce0cca2cdc33bd6fb87a1d18750
MD5 ad558280eec4a74a72577e0115ac3b2c
BLAKE2b-256 3d62b55e4922aca3b39399e21e7662adb10c7ee312d7f60a51a8714779d2abf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spinmc-0.1.1-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

Hashes for spinmc-0.1.1-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 ad6b45e9a53c7a1ae863bfb0500ccd206d396f788e0923124225270c8552952f
MD5 d1603621058adf3ba0add8f5115dd37f
BLAKE2b-256 efc89e85f6805b458d8c75be30ea39566005684046675c4b9188e9711b224bff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c9cec87e6854bbbda6b952d1915471af947fa3711d78bdf90ec130ed0ceb8596
MD5 fac1f374278a87bc6abde5b3e676ef21
BLAKE2b-256 4d392e05bdc3291509559502a5233d02a7f53d8a9f2c75ebf5301859013bffe1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 a35bfbce28643531868dbc24966268bc47fb81308138cdbcaf1601450f6845b5
MD5 8630b47d0ff70e3c5a5dc74a49283af2
BLAKE2b-256 f330309b56049e2bb1e36eaf3e16a722dfb011fa2751717634cca43045b80878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 1058d9be46eda497718259cd88e6816f510be8a8ece208994b0449512a0131bd
MD5 7afb5c7bb35fe1d24119ac9e87aca033
BLAKE2b-256 7653fa8357d6f0f1ded5d203ba488c473a10d89e250c29f5c0d7521de2f07640

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 79a1eb48e68b2fd271d8f8ca19cb66167ab4b4f131457cb96b2877477b666a7e
MD5 903145c6d5eb0f29f657ad2ebb286f66
BLAKE2b-256 55087de2614ee2b4d53bc57d95d9a114de2fc8872332dbba1b32bbc51b9126c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceeda65a0897d6bcb92a9d02766d90ed857060e94dad4e4585a1c4e3aa1ddefd
MD5 2bc6efcca037aec3913d0ae7b40a3476
BLAKE2b-256 bc1a384163755d37013acc908082ad75d2a3f774bfcb26652db6f1a38af418d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 273e752696ab37de7b2e7be8add505b88dd3b53804ed2116f0a3de6653ebb9c2
MD5 bad838c9f7d81a2864cd434c8e5a9bcd
BLAKE2b-256 0e788a2e02ff032ad50b81cbab38e71aefe0c6d138af1a103262a075914657ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 1b992aa92137ccc130c95c62eea7ff6c1d8ced3fe54432e182efc2a3ad4db3ed
MD5 e5d05f96503bfeab72ab091660e33427
BLAKE2b-256 2c8ef1fae88f1e404f6ec8007014901a1bc422a7f3aeb1f318a39b8fb01a4fbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9b1283698b2ed3a65c542aa9b80fbe7f9234349235e35ca40270573ef2b59a15
MD5 6b6563c732d5004ade414669e61d6583
BLAKE2b-256 d49da0b2596378c94c71c411ec41b054170d4fdcbbc38217411d69292a33c5b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81d1c42136be261a790070d440518d239266862f39b49541a0c7b269ab085262
MD5 7953ad4d00a7683e1c7172980c364930
BLAKE2b-256 52a0705619a4a9304343fe4f3246fd26c856e1c561cc5e776136f00dd9df3e3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spinmc-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 25cebe0735540bcbe3fd8d55ea9dd590e359529bf2a15f1f0c64de338c9cf8a3
MD5 ad335843ee8d00b41666f12654c7ce6d
BLAKE2b-256 864c98b4e7718f5a843ec18b2ab385265b3cc8db5834736d5a53d85e320f4177

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