maglogic
OOMMF/MuMax3-based scalable micromagnetic simulation suite for reconfigurable spintronic logic and multistate device analysis
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.2%) to scientific vocabulary
Repository
OOMMF/MuMax3-based scalable micromagnetic simulation suite for reconfigurable spintronic logic and multistate device analysis
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
MagLogic: Nanomagnetic Logic Simulation Suite
Python tools for simulating nanomagnetic logic devices. Supports OOMMF and MuMax3 backends.
Features: - Micromagnetic simulations via OOMMF and MuMax3 - Reconfigurable logic gate analysis - Magnetization pattern analysis - Cross-platform Docker support
Author: Meshal Alawein (meshal@berkeley.edu) Institution: University of California, Berkeley License: MIT © 2025 Meshal Alawein — All rights reserved
Project Overview
Implements nanomagnetic logic simulations from Alawein et al. (IEEE Mag. Letters, 2019). Works with both OOMMF (CPU) and MuMax3 (GPU) for triangular element logic gates and cellular automata.
Quick Start
Docker Installation (Recommended)
bash
git clone https://github.com/alaweimm90/MagLogic.git
cd MagLogic
docker-compose up --build
Local Installation
```bash
Install dependencies
conda env create -f environment.yml conda activate maglogic pip install -e .
Run demonstration
python examples/runbasictriangle.py ```
Example Usage
```python from maglogic.demos import demonandnor
NAND mode (clock = +60°)
resultnand = demonandnor.runsimulation(clockangle=60, inputA=1, inputB=1) print(f"NAND(1,1) = {resultnand['logic_output']}") # Expected: 0
Generate complete truth table
truthtable = demonandnor.generatetruth_table() ```
Scientific Modules
Simulation backends
- OOMMF integration with .mif scripting
- MuMax3 GPU acceleration
Logic gates
- Type-I: NAND/NOR with clock control
- Type-II: Three-input majority gates
- Automated truth table verification
Analysis tools
- Domain structure analysis
- Energy landscape calculation
- Topological feature detection
Performance Benchmarks
| Platform | OOMMF | MuMax3 | Speedup | |----------|-------|--------|---------| | CPU (16 cores) | 45 min | 15 min | 3.0× | | GPU (RTX 3080) | N/A | 3 min | 15.0× | | Cluster (64 cores) | 8 min | 2 min | 22.5× |
Scales to 1000×1000 element arrays with 10⁶+ timesteps
Testing
Run the full test suite:
bash
pytest --cov=maglogic --cov-report=html
Includes unit tests, OOMMF/MuMax3 cross-validation, and CI across Python 3.8-3.12.
```bash
Run test suite
pytest --cov=maglogic --cov-report=html ```
Documentation
Build docs locally:
bash
cd docs && sphinx-build -b html . _build/html
Online docs: https://alaweimm90.github.io/MagLogic/
Examples
See examples/ for Jupyter notebooks and demo scripts. Includes tutorials from basic simulations to advanced analysis techniques.
Development
Contributing
```bash
Development setup
git clone https://github.com/alaweimm90/MagLogic.git cd MagLogic conda env create -f environment_dev.yml conda activate maglogic-dev pip install -e ".[dev,all]" pre-commit install
Run full test suite
pytest --cov=maglogic --cov-report=html ```
Use Black formatting, add tests for new code, update docs as needed.
Citation
If you use MagLogic in your research, please cite:
```bibtex @article{alawein2019multistate, title={Multistate nanomagnetic logic using equilateral permalloy triangles}, author={Alawein, Meshal and others}, journal={IEEE Magnetics Letters}, volume={10}, pages={1--5}, year={2019}, doi={10.1109/LMAG.2019.2912398} }
@software{alawein2025maglogic, title={MagLogic: Nanomagnetic Logic Simulation Suite}, author={Alawein, Meshal}, year={2025}, version={1.0.0}, url={https://github.com/alaweimm90/MagLogic}, doi={10.5281/zenodo.XXXXXXX} } ```
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright © 2025 Meshal Alawein — All rights reserved.
Connect & Collaborate
Contact
Meshal Alawein
University of California, Berkeley
meshal@berkeley.edu
Owner
- Login: alaweimm90
- Kind: user
- Repositories: 1
- Profile: https://github.com/alaweimm90
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
title: "MagLogic: Nanomagnetic Logic Simulation Suite"
abstract: >
MagLogic is a comprehensive computational framework for simulating and analyzing
nanomagnetic logic devices. It provides integrated tools for micromagnetic
simulations using OOMMF and MuMax3, advanced magnetization analysis, and
specialized demonstrations of reconfigurable logic gates based on triangular
nanomagnetic elements.
authors:
- family-names: "Alawein"
given-names: "Dr. Meshal"
email: "meshal@berkeley.edu"
affiliation: "University of California, Berkeley"
website: "https://malawein.com"
repository-code: "https://github.com/alaweimm90/MagLogic"
url: "https://maglogic.berkeley.edu"
repository-artifact: "https://pypi.org/project/maglogic/"
keywords:
- "micromagnetism"
- "nanomagnetic logic"
- "computational physics"
- "spintronics"
- "OOMMF"
- "MuMax3"
- "magnetic simulation"
- "cellular automata"
- "beyond-CMOS"
- "UC Berkeley"
license: MIT
license-url: "https://github.com/alaweimm90/MagLogic/blob/main/LICENSE"
version: "1.0.0"
date-released: "2025-01-15"
references:
- type: article
title: "Reconfigurable Nanomagnetic Logic Gates Using Triangular Elements"
authors:
- given-names: "Dr. Meshal"
family-names: "Alawein"
journal: "IEEE Magnetics Letters"
volume: 10
year: 2019
doi: "10.1109/LMAG.2019.2912398"
- type: conference-paper
title: "Cellular Automata Implementation of Nanomagnetic Logic"
authors:
- given-names: "Dr. Meshal"
family-names: "Alawein"
conference: "International Conference on Magnetism"
year: 2018
preferred-citation:
type: software
title: "MagLogic: Nanomagnetic Logic Simulation Suite"
authors:
- given-names: "Dr. Meshal"
family-names: "Alawein"
email: "meshal@berkeley.edu"
affiliation: "University of California, Berkeley"
version: "1.0.0"
year: 2025
url: "https://github.com/alaweimm90/MagLogic"
GitHub Events
Total
- Push event: 5
- Create event: 4
Last Year
- Push event: 5
- Create event: 4
Dependencies
- meshalalawein/maglogic oommf-${VERSION
- meshalalawein/maglogic mumax3-${VERSION
- meshalalawein/maglogic analysis-${VERSION
- meshalalawein/maglogic docs-${VERSION
- postgres 13-alpine
- prom/prometheus latest
- redis 7-alpine
- bandit >=1.7.0
- colorama >=0.4.0
- fastapi >=0.70.0
- flask >=2.0.0
- lmfit >=1.0.0
- mayavi >=4.7.0
- meshio >=5.0.0
- myst-parser >=0.15.0
- nbsphinx >=0.8.0
- pyqtgraph >=0.12.0
- pyvista >=0.32.0
- requests >=2.25.0
- safety >=1.10.0
- scikit-image >=0.18.0
- sphinx-autodoc-typehints >=1.12.0
- click >=8.0.0
- h5py >=3.2.0
- ipywidgets >=7.6.0
- jupyter >=1.0.0
- matplotlib >=3.5.0
- numpy >=1.21.0
- pandas >=1.3.0
- pillow >=8.3.0
- plotly >=5.0.0
- pyyaml >=5.4.0
- scipy >=1.7.0
- tqdm >=4.61.0
- PyQt5 >=5.15.0,<6.0.0
- astropy >=4.3.0,<7.0.0
- black >=21.0.0,<25.0.0
- bokeh >=2.3.0,<4.0.0
- click >=8.0.0,<9.0.0
- colorama >=0.4.0,<1.0.0
- dask >=2021.6.0,<2025.0.0
- fastapi >=0.70.0,<1.0.0
- flake8 >=3.9.0,<8.0.0
- flask >=2.0.0,<4.0.0
- h5py >=3.2.0,<4.0.0
- imageio >=2.9.0,<3.0.0
- ipympl >=0.8.0,<1.0.0
- ipywidgets >=7.6.0,<9.0.0
- joblib >=1.0.0,<2.0.0
- jupyter >=1.0.0,<2.0.0
- jupyterlab >=3.0.0,<5.0.0
- lmfit >=1.0.0,<2.0.0
- matplotlib >=3.5.0,<4.0.0
- mayavi >=4.7.0,<5.0.0
- memory-profiler >=0.60.0,<1.0.0
- meshio >=5.0.0,<6.0.0
- mpi4py >=3.1.0,<4.0.0
- mypy >=0.910,<2.0.0
- myst-parser >=0.15.0,<3.0.0
- netcdf4 >=1.5.0,<2.0.0
- networkx >=2.6.0,<4.0.0
- notebook >=6.4.0,<8.0.0
- numba >=0.54.0,<1.0.0
- numpy >=1.21.0,<2.0.0
- pandas >=1.3.0,<3.0.0
- pillow >=8.3.0,<11.0.0
- pip >=21.0.0
- plotly >=5.0.0,<6.0.0
- pre-commit >=2.13.0,<4.0.0
- psutil >=5.8.0,<6.0.0
- pytest >=6.2.0,<9.0.0
- pytest-cov >=2.12.0,<5.0.0
- pyvista >=0.32.0,<1.0.0
- pyyaml >=5.4.0,<7.0.0
- requests >=2.25.0,<3.0.0
- scikit-image >=0.18.0,<1.0.0
- scikit-learn >=1.0.0,<2.0.0
- scipy >=1.7.0,<2.0.0
- seaborn >=0.11.0,<1.0.0
- setuptools >=45.0.0
- sphinx >=4.0.0,<8.0.0
- sphinx-autodoc-typehints >=1.12.0,<2.0.0
- sphinx-rtd-theme >=0.5.0,<3.0.0
- sympy >=1.8.0,<2.0.0
- tensorflow >=2.6.0,<3.0.0
- tifffile >=2021.7.2,<2025.0.0
- tkinter-page >=0.1.0
- toml >=0.10.0,<1.0.0
- torch >=1.9.0,<3.0.0
- tqdm >=4.61.0,<5.0.0
- vtk >=9.0.0,<10.0.0
- wheel >=0.36.0