CMTJ - C Magnetic Tunnel Junctions.
Project description
CMTJ
Short description
A name may be misleading -- the MTJ (Magnetic Tunnel Junctions) are not the only structures that may be simulated. The library allows for macromagnetic simulation of various multilayer spintronic structures. The package uses C++ implementation of (s)LLGS (stochastic Landau-Lifschitz-Gilbert-Slonczewski) equation with various field contributions included for instance: anisotropy, interlayer exchange coupling, demagnetisation, dipole fields etc. It is also possible to connect devices in parallel or in series to have electrically coupled arrays.
Demo
Check out the streamlit hosted demo here.
Quickstart
Installation :rocket:
Installation is as easy as doing:
A recommended way is to use the pip
package manager and virtualenv (or conda).
- With
virtualenv
(recommended):
$(bash) python -m venv .my-venv
$(bash) source .my-venv/bin/activate
$(.my-venv) python -m pip install cmtj
- Straight from
pip
:
python3 -m pip install cmtj
- Straight from source:
python3 -m pip install https://github.com/LemurPwned/cmtj.git
- Clone the repository:
git clone https://github.com/LemurPwned/cmtj.git
python3 -m pip install .
Extra dependencies
The package requires (if utils
subpackage is used):
- numpy
- scipy
- matplotlib
Read the docs
Documentation: https://lemurpwned.github.io/cmtj
Extensions
There's a GUI version available! If you wish to conduct a subset of simulations, mainly for experimental modelling, please see the PyMag project. It uses CMTJ as a backend for fast computation.
Citing
We would appreciate citing either of the listed work if you decide to use the project or using the cite button on the right hand side panel of the repository:
cmtj: Simulation package for analysis of multilayer spintronic devices
@article{mojsiejuk_cmtj_2023,
title = {cmtj: Simulation package for analysis of multilayer spintronic devices},
volume = {9},
issn = {2057-3960},
url = {https://www.nature.com/articles/s41524-023-01002-x},
doi = {10.1038/s41524-023-01002-x},
pages = {54},
number = {1},
journaltitle = {npj Comput Mater},
author = {Mojsiejuk, Jakub and Ziętek, Sławomir and Grochot, Krzysztof and Skowroński, Witold and Stobiecki, Tomasz},
date = {2023-04-06},
}
Development
Acknowledgements
Many thanks to professor Jack Sankey for his help with the development of thermal contributions, with inspiration from the macrospinmob project.
Contributions
All contributions are welcome, please leave an issue if you've encountered any trouble with setup or running the library.
Docker
In the docker
directory there's a Dockerfile
that can be used to build a docker image with the library installed.
Dockerfile.app
is used for streamlit development.
Precommit
There's a .pre-commit-config.yaml
that does some basic python and cpp lints and checks. More static analysis to come in the future.
This may be run with:
pre-commit run -v
or
pre-commit run -a (or --files core/* cmtj/*)
Documentation builds
There are couple of stages to building the documentation
- Build Doxygen documentation
This is mostly for the C++ documentation. Furture changes may couple C++ and Python docs.doxygen Doxyfile
- Build stubs
The stubgen is
pybind11-stubgen
ormypy stubgen
with the latter being preferred now. E.g. to generateStack
module stubs we can go:
More info here: https://mypy.readthedocs.io/en/stable/stubgen.html.stubgen -m cmtj.stack -o target-stub-dir/
- Parse stubs to Markdown.
This stage is done by running:
python3 docs/docgen.py
The deployment of the documentation is done via:mkdocs gh-deploy
But first, worth a check:mkdocs serve
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for cmtj-1.4.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c3aec9898ffc741303c0d1163dda9dcd76defef9a9ecab4ce5d05306f4fe1aa |
|
MD5 | 285521834650e7384b9ffda49084dfe5 |
|
BLAKE2b-256 | 1710b5544759de8cd1d043ed70ef05313a2fce843608605e01a4aac1f2e6bbf9 |
Hashes for cmtj-1.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42eae1ee7c3beed1ffcab6ec8b6c43ddeb7fc120d8ec8cfb14b32ae63333822c |
|
MD5 | c99b150d39dd278805d55e0c7fd83bb9 |
|
BLAKE2b-256 | 8f785550735c9156aa76cb4f659e383215de6b5e78c6b7a30a07731350dbf03c |
Hashes for cmtj-1.4.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c2937d48423bf73084ad3d2330be87b281345aaf5699bc3943a04cb57d21c2 |
|
MD5 | 919a9eb44df3f68e6908b0d58385068e |
|
BLAKE2b-256 | 82d23058f63b6e27df94b825b74c652fdf27b73d03698db20c32f167089f4de4 |
Hashes for cmtj-1.4.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41593c2c5ed61656395ed7a7d0e906be4c29a0a07f05d7d960f3e68374868251 |
|
MD5 | d78fe6bef2fb853fa92629bce52b6759 |
|
BLAKE2b-256 | d70319a7357e267fb8231e76efbfe92986fed7364030981d3b5a5b1b4ce02686 |
Hashes for cmtj-1.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a281bbc362a8844845c11e7254ec78ae4f05b796e2b94450b2f9213da606c7c0 |
|
MD5 | ccf2458cf60e70b8edefcb45488355bf |
|
BLAKE2b-256 | ed78c8fec80bd046f446732991fe37e783352447120ddec06737aa4d3dce448b |
Hashes for cmtj-1.4.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7753d31f94d7b1c43b36fa9ccc62ffe3189854ec8a5fc71438c08ced7509acd |
|
MD5 | 9bd247334ba150c604180fb279f08b94 |
|
BLAKE2b-256 | 79afa30f4a7840a6abf1b34aed6378a5781643890c783cbef744846d9aa93445 |
Hashes for cmtj-1.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd2d743f150e2d14148fd3da4c97d7e002abbc46e2a392e510910960d624148f |
|
MD5 | 6885552b4b4e516a8be7af74209c532b |
|
BLAKE2b-256 | 1006d5d52a22397e55aac5c26bb21d85aaa77a962159362078964a4e63179f5b |
Hashes for cmtj-1.4.0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf148ceb84f2614c50645b32d81a601632f7204aabb69d9039011fc61f5c7be5 |
|
MD5 | e63749bb54814d2e2826ae1336cadf98 |
|
BLAKE2b-256 | a40cded76da53a648c4d9577b60bf0aaf5e65abd47002e772ec7c95cd8b06991 |
Hashes for cmtj-1.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4487f3d17571c67a3ab115aab5a2771de3d90d1dc537978c6b231ac1729f4cc5 |
|
MD5 | ef27c914f671132fb87fb77a017606b1 |
|
BLAKE2b-256 | 4cc2e6860b645297919c4a15b6a9fb4e63a601d03296d01c2a75b9161fa057b1 |
Hashes for cmtj-1.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54d7a27ebf6ad134b8b92f5cecc665d6e62686c23115233b1831674fbe6b9854 |
|
MD5 | ad04e6f1c458ec4d66ad998e4e3f8255 |
|
BLAKE2b-256 | ea673e60f3752e4ab8eccc04d818cfff94b66bec676f88b26fd219ef2d417ccf |
Hashes for cmtj-1.4.0-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f32c9e1e46deddf4bd51d31ba9e41335da672962697dc341d93bfc8fd24b91ac |
|
MD5 | 00821f9773548f98ef2945ea97582665 |
|
BLAKE2b-256 | 6e474889801e73d5bfaed27878d6ab91cbed02ae8c3db28212156274484764ba |
Hashes for cmtj-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e887b359a27983fe220b75235faa67cf7a2abd633bb91ca93f4908355a571fdb |
|
MD5 | 4b19b04f156c53679dc62f1e522242d8 |
|
BLAKE2b-256 | 1797a295fc3f242e7e689022f2851a1ab4a50153ff985003754d6c2416f8c81c |
Hashes for cmtj-1.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5a0d629f42efb1be9c9bdff5f8f3d4741ebed48e865be23a867511b3737f61 |
|
MD5 | d977d32085591dc770d1a8d14ef00cfe |
|
BLAKE2b-256 | 5a50db5cda8810ae695f743eebc1243f5b6ca38545eeeb7a7fd4a30b5570f85c |
Hashes for cmtj-1.4.0-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaec96fc498f2423ee138bb6bacac1385d00d466042fc833df2817d940929596 |
|
MD5 | b1e8c1a6a63ee797ba1ebc5bf5d6b9d7 |
|
BLAKE2b-256 | 6f0e64a597cdc6090ae9f859e13bca00095d4a266ffc7a3c1e43205066329770 |
Hashes for cmtj-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06acc2291a5e983b6f56668b7ec02042693e0ead6c1eadb03d0c154f320debe5 |
|
MD5 | ed9fb012cf961411142d9c5a8a8a34a2 |
|
BLAKE2b-256 | 13b2e9cacffd17642998c57c1faea2495ed6119abf7b430519809d48f016da7f |
Hashes for cmtj-1.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556103302b307eaee297fcdd70e3d26be7b6435c5e4ac48f6c997ac9dfa0a248 |
|
MD5 | faef6084165856a6630e69129566a20e |
|
BLAKE2b-256 | 4e62fe51f36f82eea5b474e51698a6bcebb7d86e6232f590d9b9e62309f65c47 |
Hashes for cmtj-1.4.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190e2d90ba924239ae92ce45431ebf8aace57b575401b082c3993ae5bc2e773c |
|
MD5 | af2bb4228c4b03f0dea9650935c84f98 |
|
BLAKE2b-256 | 55c941eb6b07524484c179926fcd614ad64cecde7c1f87d43159a27d4b1245c8 |