Skip to content

Commit

Permalink
Merge pull request #47 from LemurPwned/experiments/noise-v2
Browse files Browse the repository at this point in the history
Experiments/noise v2
  • Loading branch information
LemurPwned authored Apr 30, 2024
2 parents 1d6e807 + cd8b4a0 commit 5d6a7fc
Show file tree
Hide file tree
Showing 48 changed files with 6,501 additions and 1,086 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Login to GH container registry
uses: docker/login-action@v1
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python wheels manylinux stable build
uses: RalfG/python-wheels-manylinux-build@v0.5.0
with:
Expand All @@ -53,7 +55,9 @@ jobs:
os: [macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand All @@ -57,6 +59,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/kissfft"]
path = third_party/kissfft
url = https://github.com/mborgerding/kissfft
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ repos:
- id: prettier
files: \.(html|json|markdown|md|yaml|yml)$
exclude: (^docs/api/.*)

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

# 1.5.0 (WIP)

- Dipole interaction added to the `SB Model`
- Kasdin 1/f noise generator added to the `noise` module and to the solvers
- reworking the solvers for better performance and stability
- added a simple noise model to the `utils` class. It exists outside standard simulation procedures.
- added LLGB bindings and code. The solver is still WIP and doesn't integrate with more advanced features yet.
- added aliases for `ScalarDriver` -- for example, instead of calling `ScalarDriver.getConstantDriver`, you can now call `constantDriver` directly to create a constant driver.

# 1.4.1

- Adding a basic optimisation script in the `optimization` module.
Expand Down
61 changes: 34 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img style="float: right; max-width: 50px;" src="docs/assets/icon.svg">
<img style="float: right; max-width: 50px;" src="assets/icon.svg">

# CMTJ

Expand All @@ -9,15 +9,34 @@
[![Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](http://cmtj-simulations.streamlit.app/)
![Downloads](https://img.shields.io/pypi/dm/cmtj.svg)

## Table of contents

- [CMTJ](#cmtj)
- [Table of contents](#table-of-contents)
- [Short description](#short-description)
- [Web GUI](#web-gui)
- [Quickstart](#quickstart)
- [Installation :rocket:](#installation-rocket)
- [Extra dependencies](#extra-dependencies)
- [Documentation and examples](#documentation-and-examples)
- [Extensions](#extensions)
- [Citing](#citing)
- [Development](#development)
- [Acknowledgements](#acknowledgements)
- [Contributions](#contributions)
- [Docker](#docker)
- [Precommit](#precommit)
- [Documentation builds](#documentation-builds)

## Short description

The `cmtj` 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
## Web GUI

Check out the [streamlit hosted demo here](http://cmtj-simulations.streamlit.app/).
Check out the [streamlit hosted demo here](http://cmtj-simulations.streamlit.app/). You can simulate PIMM spectra and Spin-Diode spectra there. Let us know if you have any issues with the demo.

## Quickstart

Expand Down Expand Up @@ -63,31 +82,10 @@ The package requires (if `utils` subpackage is used):
- matplotlib
```

## Subpackages
```mermaid
graph TD;
cmtj --> models
cmtj --> utils
models --> domain_dynamics
models --> drivers
models --> ensemble
models --> general_sb
models --> oersted
utils --> optimization
utils --> parallel
utils --> plotting
utils --> procedures
utils --> resistance
utils --> solvers
utils --> linear
utils --> energy
utils --> filters
```


## Read the docs
## Documentation and examples

Documentation: [https://lemurpwned.github.io/cmtj](https://lemurpwned.github.io/cmtj)
There are many examples available, check out the [examples section in the docs](https://lemurpwned.github.io/cmtj/experimental-methods/introduction/)

## Extensions

Expand Down Expand Up @@ -155,10 +153,19 @@ There are couple of stages to building the documentation
This is mostly for the C++ documentation. Furture changes may couple C++ and Python docs.
2. Build stubs
The stubgen is `pybind11-stubgen` or `mypy stubgen` with the latter being preferred now.
E.g. to generate `Stack` module stubs we can go:
Before running the stubgen, make sure to install the package with:
```
python3 -m pip install .
```
avoid using `-e` flag as it may cause issues with the stubgen.
Then to generate, for instance, `Stack` module stubs we can do:
```
stubgen -m cmtj.stack -o target-stub-dir/
```
or
```
python3 -c "import mypy.stubgen; mypy.stubgen.main(['-p', 'cmtj.stack', '-o', 'target-stub-dir/'])"
```
More info here: https://mypy.readthedocs.io/en/stable/stubgen.html.
3. Parse stubs to Markdown.
This stage is done by running:
Expand Down
Loading

0 comments on commit 5d6a7fc

Please sign in to comment.