Provides a simulation framework for a random loop model in statistical mechanics, including initialization, simulation, and visualization capabilities.
Project description
PyRandomLoop
PyRandomLoop is a Python package designed for simulating and visualizing a random loop model on a 2d grid.
The core of the simulation is the class stateSpace. Features include performance optimizations, execution logging, and statistics calculation, alongside visualization tools for detailed analysis. Ideal for researchers and students in physics and related fields.
Features
- Multiple Initialization Patterns: Choose from random, snake, or donut patterns to start your simulations.
- Flexible Simulation Algorithms: Supports both Metropolis and Glauber algorithms to drive the simulation process.
- Visualization: Easily plot the current state of the grid with support for highlighting color loops.
- State Management: Save and load simulation states, allowing for pause-resume functionality.
Quick Start
from PyRandomLoop import stateSpace
# Initialize and run the simulation
simulation = stateSpace(num_colors=3, grid_size=50, beta=0.5)
simulation.step(num_steps=1000)
# Visualization
simulation.plot_grid()
# Save/load the simulation state
simulation.save_data("simulation_state.json")
simulation.load_data("simulation_state.json")
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
PyRandomLoop-0.1.2.tar.gz
(11.2 kB
view details)
File details
Details for the file PyRandomLoop-0.1.2.tar.gz.
File metadata
- Download URL: PyRandomLoop-0.1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d36d51ca40c513b713602ccb308b8415a0dbd6d657d0d94f1ce33658f95dabae
|
|
| MD5 |
dbed5f89c40484e97a2549ef30af42f6
|
|
| BLAKE2b-256 |
9dd1dc7d8d26c9622a56b0aab9a2bfe9f46007f8b69bb4090bf4cb081883b7d5
|