Skip to main content

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


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)

Uploaded Source

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

Hashes for PyRandomLoop-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d36d51ca40c513b713602ccb308b8415a0dbd6d657d0d94f1ce33658f95dabae
MD5 dbed5f89c40484e97a2549ef30af42f6
BLAKE2b-256 9dd1dc7d8d26c9622a56b0aab9a2bfe9f46007f8b69bb4090bf4cb081883b7d5

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