{"id":48883637,"url":"https://github.com/alawein/maglogic","last_synced_at":"2026-04-16T04:05:42.238Z","repository":{"id":341376608,"uuid":"1167451050","full_name":"alawein/maglogic","owner":"alawein","description":"Magnetic logic simulation framework","archived":false,"fork":false,"pushed_at":"2026-04-16T02:26:21.000Z","size":284,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T03:30:20.265Z","etag":null,"topics":["magnetics","micromagnetics","mumax","oommf","python","simulation","spintronics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alawein.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-26T10:01:33.000Z","updated_at":"2026-04-16T01:58:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alawein/maglogic","commit_stats":null,"previous_names":["alawein/maglogic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alawein/maglogic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alawein%2Fmaglogic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alawein%2Fmaglogic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alawein%2Fmaglogic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alawein%2Fmaglogic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alawein","download_url":"https://codeload.github.com/alawein/maglogic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alawein%2Fmaglogic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["magnetics","micromagnetics","mumax","oommf","python","simulation","spintronics"],"created_at":"2026-04-16T04:05:41.485Z","updated_at":"2026-04-16T04:05:42.224Z","avatar_url":"https://github.com/alawein.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntype: canonical\nsource: none\nsync: none\nsla: none\n---\n\n# MagLogic\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n\n## About\n\nPython tools for simulating nanomagnetic logic devices using OOMMF and MuMax3 backends. Implements nanomagnetic logic simulations from Alawein et al. (IEEE Magnetics Letters, 2019) for triangular element logic gates and cellular automata—designed for reproducible research and teaching.\n\n## Features\n\n- Micromagnetic simulations via OOMMF and MuMax3\n- Reconfigurable logic gate analysis (NAND/NOR, majority gates)\n- Magnetization pattern analysis and domain structure detection\n- Energy landscape calculation and topological feature detection\n- Cross-platform Docker support\n- Automated truth-table verification\n\n## Installation\n\n### Docker\n\n```bash\ngit clone https://github.com/alawein/maglogic.git\ncd maglogic\ndocker compose up --build\n```\n\n### Local\n\n```bash\nconda env create -f environment.yml\nconda activate maglogic\npip install -e \".[dev]\"\npython scripts/validate-structure.py\nPYTHONPATH=python python -c \"import maglogic\"\n```\n\n## Quick Usage\n\n```bash\nPYTHONPATH=python python examples/demo_truth_table.py\n```\n\n```python\nfrom maglogic.demos import demo_nand_nor\nresult = demo_nand_nor.generate_truth_table()\nprint(result[\"truth_table\"])\n```\n\n## Layout Model\n\nMagLogic intentionally uses a **language-boundary layout**:\n\n- `python/maglogic/` is the canonical Python package\n- `python/tests/` is the canonical Python test surface\n- `oommf/` and `mumax3/` hold simulation assets and reference inputs\n- `matlab/` holds MATLAB reference implementations\n- `docs/` holds repo-local documentation\n- `scripts/` holds repo-local validation and maintenance helpers\n\nThis repo does **not** use `src/\u003cpackage\u003e` as its Python boundary.\n\nSee [docs/architecture/STRUCTURE_DECISION.md](docs/architecture/STRUCTURE_DECISION.md)\nfor the explicit structure decision.\n\n## Roadmap\n\n- **Near term:** modernize OOMMF/MuMax3 docker images, add reproducible seeds for demos.\n- **Mid term:** expand majority-gate library and energy landscape visualizations.\n- **Future:** add JAX-backed differentiable simulators and more CA examples.\n\n## TODO\n\n- [ ] Add CLI entry for batch truth-table generation\n- [ ] Provide minimal sample datasets for MuMax3 without large downloads\n- [ ] Write quickstart notebook in `examples/`\n\n## Usage\n\n```python\nfrom maglogic.demos import demo_nand_nor\n\n# NAND mode (clock = +60 degrees)\nresult_nand = demo_nand_nor.run_simulation(clock_angle=60, input_A=1, input_B=1)\nprint(f\"NAND(1,1) = {result_nand['logic_output']}\")\n\n# Generate a complete truth table\ntruth_table = demo_nand_nor.generate_truth_table()\n```\n\n## Project Structure\n\n```text\nmaglogic/\n├── python/\n│   ├── maglogic/       # Canonical Python package\n│   └── tests/          # Python test suite\n├── matlab/             # MATLAB reference implementations\n├── oommf/              # OOMMF simulation files\n├── mumax3/             # MuMax3 simulation files\n├── examples/           # Demo scripts and notebooks\n├── docker/             # Docker configuration\n├── docs/               # Documentation\n│   └── architecture/   # Structure decisions\n└── scripts/            # Repo-local validation and maintenance helpers\n```\n\n## Validation\n\n```bash\npython scripts/validate-structure.py\nPYTHONPATH=python python -c \"import maglogic\"\n```\n\nRepresentative tests, when dependencies are installed:\n\n```bash\nPYTHONPATH=python python -m pytest -s python/tests/test_constants.py python/tests/test_analysis.py\n```\n\n## Documentation\n\n- [docs/README.md](docs/README.md)\n- [docs/api.md](docs/api.md)\n- [docs/theory.md](docs/theory.md)\n- [docs/architecture/STRUCTURE_DECISION.md](docs/architecture/STRUCTURE_DECISION.md)\n\n## Citation\n\n```bibtex\n@article{alawein2019multistate,\n  title={Multistate nanomagnetic logic using equilateral permalloy triangles},\n  author={Alawein, Meshal and others},\n  journal={IEEE Magnetics Letters},\n  volume={10},\n  pages={1--5},\n  year={2019},\n  doi={10.1109/LMAG.2019.2912398}\n}\n```\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n\n## Ownership\n\n- **Maintainer:** @alawein\n- **Support:** [GitHub Issues](https://github.com/alawein/maglogic/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falawein%2Fmaglogic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falawein%2Fmaglogic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falawein%2Fmaglogic/lists"}