NeuralMag is a micromagnetic GPU code implementing the nodal FD discretization
Project description
NeuralMag
NeuralMag is a micromagnetic simulation software using the nodal finite-difference discretization scheme, designed specifically with inverse problems in mind. It uses either JAX or PyTorch as a numerical backend for tensor operations and automatic differentiation, enabling computations on both CPU and GPU systems. At the moment NeuralMag implements the most common micromagnetic effective-field contributions
- external field
- exchange field
- demagnetization field
- uniaxial/cubic anisotropy
- DMI (interface and bulk)
- interlayer exchange
as well as a differentiable time-domain solver for the Landau-Lifshitz-Gilbert equation.
NeuralMag is designed in a modular fashion resulting in a very high flexibility for the problem definition. For instance, all simulation parameters (e.g. material parameters) can be functions of space, time or any other simulation parameter.
At the heart of NeuralMag is a form compiler powered by SymPy that translates arbitrary functionals and linear weak forms into vectorized PyTorch code. This allows to easily add new effective-field contributions by simply stating the corresponding energy as a sympy expression.
Documentation
The documentation of NeuralMag including a reference to all classes as well as several examples can found here.
NeuralMag in the cloud
Experience NeuralMag without installing it locally by accessing it directly in the cloud
via Binder. Simply click the badge to get started:
Using NeuralMag on Binder allows you to experience its features, without the hassle of setting up your local environment. It provides a quick and accessible way to test and experiment with the software from any device with a web browser. It is important to note that the Binder-hosted version is a CPU-only JAX implementation, and it will run slower than a local installation. Sessions are temporary and may time out after a period of inactivity, and any files created or modified during your session will not be saved. To avoid losing your work, please remember to download any files you create or edit before your session ends.
Download and Install
NeuralMag is a Python package and requires Python >=3.8 (>=3.10 for JAX backend). To install the latest version with pip either run
pip install "neuralmag[jax]"
to install NeuralMag with JAX as a backend or
pip install "neuralmag[torch]"
to install NeuralMag with PyTorch as a backend. You can also install NeuralMag with both backends and choose the backend at runtime.
Contribute
Thank you for considering contributing to our project! We welcome any contributions, whether they are in the form of bug fixes, feature enhancements, documentation improvements, or any other kind of enhancement. NeuralMag is licensed under the MIT License. By contributing to this project, you agree to license your contributions under the terms of the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neuralmag-0.9.3.tar.gz.
File metadata
- Download URL: neuralmag-0.9.3.tar.gz
- Upload date:
- Size: 35.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6074fcc7eecfa8a028927c575224cc0db83aa2280792747c02084465637781c3
|
|
| MD5 |
5ec8945b6924c726ab4568e283d030a0
|
|
| BLAKE2b-256 |
e832cc934621df8b2e2c515fb4ae68e52fa7fac728144b7ba0a01cc23d06a2d9
|
File details
Details for the file neuralmag-0.9.3-py3-none-any.whl.
File metadata
- Download URL: neuralmag-0.9.3-py3-none-any.whl
- Upload date:
- Size: 51.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
443592275e3e5d4d336e39f94b13c360bb0949f1f443d6c443c0a7cac613d361
|
|
| MD5 |
cd102369d254d99a384171457c7304f8
|
|
| BLAKE2b-256 |
369bd6ef4109f28ec3c9a124056bc4358d2b6a71e0c4eb4620259aac1ee424a7
|