Skip to main content

mamonca - interactive Magnetic Monte Carlo code

Project description

mamonca - interactive Magnetic Monte Carlo

This code allows you to launch Metropolis Monte Carlo simulations via Heisenberg Landau models (with various polynomial degrees) from a jupyter notebook.

How to compile

Download all files and run python setup.py build_ext --inplace.

First steps:

In the following simple (but complete) example, we create a bcc Fe system using pyiron and launch a Metropolis Monte Carlo simulation with a Heisenberg coefficient J=0.1 (eV) for the first nearest neighbor pairs:

from pyiron import Project
from mc import MC

structure = Project('.').create.structure.bulk(
    name='Fe',
    cubic=True
)

structure.set_repeat(10)
J = 0.1 # eV
neighbors = structure.get_neighbors()
first_shell_tensor = neighbors.get_shell_matrix()[0]

mc = MC(len(structure))
mc.set_heisenberg_coeff(J*first_shell_tensor.toarray())

mc.run(temperature=300, number_of_iterations=1000)

How to set inputs and get outputs

As a rule of thumb, you can set all input parameters via functions starting with set_. Similarly, output values can be obtained via functions whose names start with get_. Take a look at the list of auto-complete and see their docstrings

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

mamonca-0.0.7.tar.gz (69.6 kB view details)

Uploaded Source

File details

Details for the file mamonca-0.0.7.tar.gz.

File metadata

  • Download URL: mamonca-0.0.7.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for mamonca-0.0.7.tar.gz
Algorithm Hash digest
SHA256 c1c928a3542ffb65c233b517d4c4e9e84683f27b0548353792c594cb0cc4ea9d
MD5 dff5f118122d6cc2b33347bf823cb3e4
BLAKE2b-256 5c78eab4c10cd1fb5d206646b27fc6eaa1f9418c934723d33dcbdb055771da8e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page