Crate vegas

Source
Expand description

vegas is a library that allows you to run atomistic simulations of magnetic materials.

§Table of Contentsble

§Installation

Install the vegas library by adding the following to your Cargo.toml:

[dependencies]
vegas = "*"

§Spins

Spins are the basic building blocks of the library. They represent the spin of an atom in a magnetic material. The library provides a Spin trait that you can implement for your own spin types.

The library provides a HeisenbergSpin type that represents a spin in a Heisenberg model. The HeisenbergSpin type is a three-dimensional vector that represents the spin of an atom.

Furthermore, the library provides an IsingSpin type that represents a spin in an Ising model. The IsingSpin type implemented as an enum that can take the up or down variants.

§Hamiltonians

A hamiltonian is a function that calculates the energy of a spin system.

This library provides a EnergyComponent trait that you can implement for your own hamiltonians.

Among others this library provides the following hamiltonians:

  • Exchange - A hamiltonian that calculates the exchange energy of a spin system.
  • Gauge - A hamiltonian that calculates the gauge energy of a spin system.
  • UniaxialAnisotropy - A hamiltonian that calculates the uniaxial anisotropy energy of a spin system.
  • ZeemanEnergy - A hamiltonian that calculates the Zeeman energy of a spin system.
  • Compound - A hamiltonian that combines multiple hamiltonians.

Modules§

error
Errors for the vegas package
hamiltonian
This module contains the energy components of the system.
input
Input for a generic simulation.
integrator
Integrators for Monte Carlo simulations.
machine
A machine to measure samples.
observables
Observables module.
program
Programs to run on samples.
state
This little library should have traits and routines to build a generic atomistic Monte Carlo simulation program to deal with magnetic properties of materials.

Macros§

hamiltonian
A macro to easily build complex hamiltonians.