Skip to main content

This package is the implementation of the Ising Model on complex networks.

Project description

Ising Model on Networks

This is a python package which simulates the Ising model on complex networks.

Given any network built using the networkx package as input, this package runs Monte Carlo simulations on random source nodes and evaluates the model according to the Metropolis algorithm, and returns the magnetization and the energy of the system.

Version 1.0.2: This has an added visualizer to plot the output graphs.

Version 1.0.4: The Github repo has an added ipynb that can be referred to for instructions about usage.

Version 1.0.10: A new parallel implementation has been added.

Version 1.1.1: Two much faster functions have been added for both serial and parallel simulations.


Run the following to install:

pip install isingnetworks

Additional packages required:

pip install joblib


Import the class:

from isingnetworks import IsingModel

Create a graph (g) using networkx.

Create an intance of the IsingModel class:

model = IsingModel(g)

Using the viz function:

model.set_initial_state(0) # 0 or 1

# Serial Implementation

# Parallel Implementation

# Faster Implementations

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for isingnetworks, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size isingnetworks-1.1.1-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size isingnetworks-1.1.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page