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

#60 in Simulation

Download history 187/week @ 2024-08-14 44/week @ 2024-08-21 108/week @ 2024-08-28 30/week @ 2024-09-04 282/week @ 2024-09-11 19/week @ 2024-09-18 7/week @ 2024-09-25 4/week @ 2024-10-02

238 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