5 releases (3 breaking)

0.3.0 Sep 13, 2024
0.2.0 Sep 11, 2024
0.1.0 Sep 2, 2024
0.0.3 Aug 19, 2024
0.0.2 Aug 19, 2024

#47 in Simulation

Download history 206/week @ 2024-08-16 25/week @ 2024-08-23 121/week @ 2024-08-30 130/week @ 2024-09-06 180/week @ 2024-09-13 9/week @ 2024-09-20 8/week @ 2024-09-27 2/week @ 2024-10-04

220 downloads per month

MIT license

52KB
1.5K SLoC

vegas-rs

Crates.io Build Status Documentation DOI

Introduction

This is an experimental implementation of an atomistic simulation package for magnetic systems. vegas-rs's main goal is to determine how performant is the rust language for this kind of application.

Installation

To install vegas-rs you need to have the rust installed. Then, you can install vegas-rs by running the following command:

cargo install vegas

If you want to install vegas-rs as a library, you can add it via cargo:

cargo add vegas

lib.rs:

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.

Dependencies

~12MB
~189K SLoC