Skip to main content

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.

Model

mamonca is based on the Heisenberg Landau model of the format:

$$\mathcal H = -\frac{1}{2}\sum_{ij,\kappa}J_{ij,\kappa}m_i^{2\kappa+1}m_j^{2\kappa+1} + \sum_{i,\kappa} A_{i,\kappa} m_i^{2\kappa}$$

where $i$ and $j$ go over all atoms and $\kappa$ is the exponent ($\kappa=1$ and $A_{i,\kappa}=0$ for all $i$ and $\kappa$ for the classical Heisenberg model). The evaluation takes place either via Metropolis Monte Carlo (MC) method or spindynamics (SD). MC has the advantage of converging very fast, while SD also delivers the kinetics.

How to compile

mamonca can be installed directly from conda:

conda install -c conda-forge mamonca

In order to use build it from the repository, run

git clone https://github.com/samwaseda/mamonca
cd mamonca
python setup.py build_ext --user

First steps:

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

from pyiron_atomistics import Project
from mamonca import MC

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

# Repeat the structure 10 times in each direction
structure = basis.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)

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

More complete list of examples can be found in notebooks/first_steps.ipynb

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_. Most notably, you can get all basic output values via get_output() in a dictionary. Otherwise, take a look at the list of auto-complete and see their docstrings

Dependencies

  • Cython
  • numpy

Notes

  • Currently only Linux installation is supported
  • You can run tests located in the tests folder

Metadata

Release files for mamonca 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mamonca 0.0.8
File Size Uploaded
mamonca-0.0.8.tar.gz 17.9 kB Details

Release files / mamonca-0.0.8.tar.gz

Download URL mamonca-0.0.8.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f238b958604f49934fbe72638864ed89dcc2e3909750c5de51dd47c28948ada8
BLAKE2b-256 checksum
How to use checksums
6978223324f1bb83af870ba067353b514d9dfe83cf5a852e9d36cc37a500a012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

1 release file

0.0.5

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page