Skip to main content

The package provides a simulation framework for a random loop model in statistical mechanics, including initialization, simulation, and visualization capabilities. 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.

Project description

PyRandomLoop

PyRandomLoop is a Python package designed for simulating and visualizing a random loop model on a 2d grid. Ideal for researchers and hobbyists alike, this package offers an intuitive approach to exploring complex patterns and dynamics through simple and flexible APIs.

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.1.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file PyRandomLoop-0.1.1.tar.gz.

File metadata

  • Download URL: PyRandomLoop-0.1.1.tar.gz
  • Upload date:
  • Size: 1.9 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.1.tar.gz
Algorithm Hash digest
SHA256 1ad34da85caf03d8ff6b85fb8ad66a233e23438c17f4fabbafa60adfd6a70852
MD5 4b82a140209d49943e69ceff858d8087
BLAKE2b-256 8d6f904da7e6b93818d66de68fb272797d06a3580f0949e9953f3f3bfceaf524

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