GithubHelp home page GithubHelp logo

lemurpwned / pymag Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 613 KB

GUI and engine for magnetic simulations

Python 100.00%
condensed-matter condensed-matter-physics magnetics simulation spintronics

pymag's Introduction

Welcome to PyMag documentation

This is a frontend GUI for some of the cmtj functionalities. It's possible that you will be able to simulate most of your experiments here if you use:

  • SD-FMR
  • Harmonic Hall voltage
  • PIMM

techniques for your expeirments.

Requirements

  • Python 3.8 or higher
  • PyQt6 (pip install pyqt6) -- installing PyMag should automatically install PyQt6 as well
  • cmtj -- installing PyMag should automatically install cmtj as well

Recommended installation of PyQT6

Mac OS

brew install pyqt6

or

brew install pyqt@6

For M1/M2 architecures it sometimes works better to install:

python -m pip install pyqt6

Linux/Ubuntu

sudo apt install python3-pyqt6

and it sometimes requires additional manual installation (or some combination of the below):

sudo apt install pkg-config libgl1-mesa-dev libxcb*-dev libfontconfig1-dev libxkbcommon-x11-dev libgtk-3-dev

Quickstart

For quick installation you only need to install the package first:

It is highly recommended to install PyMag inside a python environment

  • From Github repository
git clone https://github.com/LemurPwned/PyMag
cd PyMag
python3 -m pip venv .pymag 
source .pymag/bin/activate
pip3 install --upgrade pip
pip3 install .

Example

You can find a sample simulation description in docs/example.md.

Running

You can launch anywhere with a simple command

python3 -m pymag run

It's possible to alias that for a quicker run:

alias pymag "python3 -m pymag run"

For persistence add this to your .bashrc if you're on Linux. On Windows you may simply create a shortcut.


Parameters

Here's an explanation of the parameters in the table:

Parameter Meaning
$\mu_0 M_\mathrm{s}$ Magnetisation saturation
$J_1$ IEC value
$J_2$ IEC value (quadratic term)
$K_{u}$ Anisotropy value
$\mathbf{K}_{dir}$ Anisotropy axis
$\alpha_\mathrm{G}$ Gilbert damping parameter
$\mathbf{N}_\mathrm{demag}$ diagonal of demagnetisation tensor
$t_\mathrm{FM}$ thickness of a FM layer
$w$ width of a sample
$l$ length of the sample
$H_\mathrm{DL}$ magnitude of the damping-like torque
$H_\mathrm{FL}$ magnitude of the field-like torque
$H_\mathrm{Oe}$ magnitude of the Oersted field in 1/m
$\mathbf{p}$ polarisation vector

The Oersted field value is multiplied by the current value in the code, hence the unit is 1/m (1/m * A = A/m).

Resistance

For the interpretation of the remaining resistance, please refer to the supplementary material of the paper Kim et al. (2016), Spin Hall Magnetoresistance in Metallic Bilayers, Phys. Rev. Let. 116, 9, 097201:

  • $R_\mathrm{XX0}$
  • $R_\mathrm{XY0}$
  • $R_\mathrm{AMR}$
  • $R_\mathrm{SMR}$
  • $R_\mathrm{AHE}$

pymag's People

Contributors

lemurpwned avatar szietek avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

drvasanthan

pymag's Issues

GUI bugs

When selecting multiple layers in the gui that want to be deleted, only the last selected layer was deleted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.