.+------+-------+-------+-------+-------+-------+-------+
.' .' .' .' .' .' .' .'|
+---+--+'------+'------+'------+'------+'------+'------+' -
| | | | | | | | |
| O + O + M + M + F + P + Y + +
| | | | | | | | .'
+------+'------+'------+'------+-------+-------+-------+'
OOMMFPy
A very minimal and simple Python library to read and extract data from OOMMF
magnetisation files omf, which are also used in MuMax3. In addition to this
library we provide tools to plot omf files and convert them to vtk files.
Highlights:
- Read
omffiles in any format - Can also read
ovffiles and MuMax3 files - Painless conversion of the data in an
omffile into Numpy arrays for data analysis - Fast calculation (using Numpy) of the skyrmion number in a slice of the
system in any plane orientation (
xy,xz,yz) - Fast reading of
omffiles in binary format (using Numpy'sfromfile) - Minimal and super fast tool to convert
omffiles to VTK format - Plot functions
- Early support for Paraview plugin: read
omffiles directly!
Install
The easiest is to use pip or poetry to install the package from
PyPI
pip install oommfpy
The Github address can also be directly used to install the package via pip
pip install git+https://github.com/davidcortesortuno/oommfpy
Alternatively, a setup.py file is provided to install this library
git clone https://github.com/davidcortesortuno/oommfpy
cd oommfpy
pip install ./
If successful, the plot_omf and omf2vtk tools are installed in the
corresponding bin directory and can be called from the command line.
A C library is built with the installation process, thus the setup file tries to install Cython if is not present in the system.
Paraview plugin
A first version of a reader for Paraview is added in this last version. For now the installation is a bit of a hack:
-
After installing the
oommfpylibrary, locate theoommfpyfolder from thesite-packagesdirectory -
Download the latest version of Paraview with Python > 3.8 support
-
Copy the
oommfpydirectory into the Paraview Pythonsite-packagesfolder. For example, for Paraview 5.9.0 installed in thehomefolder:cp -r oommfpy $HOME/ParaView-5.9.0-MPI-Linux-Python3.8-64bit/lib/python3.8/site-packages/ -
Open Paraview and go to
Tools -> Manage Plugins -> Load Newand select the Python file in thetools/folder ofoommfpy(you can clone the repository) -
Now you can open any
omffile without converting to VTK!
Documentation
For now check the doc/ipynb folder which contains a tutorial with basic
functionality. To load a file with a magnetisation field, which is found more
commonly in simulations, use the MagnetisationData class. To load any field,
such as the dipolar field, use the FieldData class.
Scripts to convert omf to VTK can be called directly as, for example,
omf2vtk -i omfs/my_oommf_output.omf -o test.vtk
The input path can also be a directory or a path with a wildcard, e.g.
omfs/*.omf. This method assumes the files in the path come from the same
simulation as the tool loads the mesh from the first file in the path and then
only updates the magnetisation fields.
Similar options are provided for the plot_omf function. Use the --help for
details.
TODO
- More tests
- Add pyproject.toml file to avoid manual installation of Cython in setup.py
- More options to plotting library
- Print
zcoordinate when computing sk number - Allow Periodic boundaries for the skyrmion number calculation
- Add typing check
- Support for multiple OS
Citation
If you find this library useful, please cite this repository as:
@Misc{Cortes2019,
author = {David Cort{\'e}s-Ortu{\~n}o},
title = {OOMMFPy},
howpublished = {Zenodo doi:10.5281/zenodo.2611194. Github: https://github.com/davidcortesortuno/oommfpy},
year = {2019},
doi = {10.5281/zenodo.2611194},
url = {https://doi.org/10.5281/zenodo.2611194},
}
Release files for oommfpy 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| oommfpy-1.4-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| oommfpy-1.4-cp312-cp312-manylinux_2_35_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.35+ x86-64 | Details |
| oommfpy-1.4-cp312-cp312-macosx_14_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 14.0+ ARM64 | Details |
| oommfpy-1.4-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| oommfpy-1.4-cp311-cp311-manylinux_2_35_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.35+ x86-64 | Details |
| oommfpy-1.4-cp311-cp311-macosx_14_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 14.0+ ARM64 | Details |
| oommfpy-1.4-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| oommfpy-1.4-cp310-cp310-manylinux_2_35_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.35+ x86-64 | Details |
| oommfpy-1.4-cp310-cp310-macosx_14_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 14.0+ ARM64 | Details |
Total release size: 3.6 MB
Release files / oommfpy-1.4-cp312-cp312-win_amd64.whl
| Download URL | oommfpy-1.4-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 238.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e41ebcf1477b959386d0baad67cfdf2bd19942b06b90fccfb4f738f40e9e57cd
|
|
BLAKE2b-256 checksum How to use checksums |
df59da4a17d8697f8a61aea8d1abbef2b879bd4d7f0e23a511d5b61161466d56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp312-cp312-manylinux_2_35_x86_64.whl
| Download URL | oommfpy-1.4-cp312-cp312-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 642.6 kB |
| Tags | CPython 3.12 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
cac62089525505c94d9932674e7c7da486925c12027c90ddbc9542c88491539c
|
|
BLAKE2b-256 checksum How to use checksums |
239ac750abbe5ce4aa624985adc6114d29f1686a837250bb1d7e2efa2358b178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | oommfpy-1.4-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 319.7 kB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dc786febcc25298ea8c5d6f57a163ba6fc3d8a7c2489c43f6263c4c2e911b2c6
|
|
BLAKE2b-256 checksum How to use checksums |
21deb6955d2f577b185c0b611d952f113ab4668a314b149ccb3cad3390159dd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp311-cp311-win_amd64.whl
| Download URL | oommfpy-1.4-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 237.3 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1bd6885f8192a86977746699d2297d4fb680bd6d23cab4b7f73f0e3ce54b7699
|
|
BLAKE2b-256 checksum How to use checksums |
9c431d3c26be4453d263b7def10048e809006534b53ad72c94b7313a802b4c20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp311-cp311-manylinux_2_35_x86_64.whl
| Download URL | oommfpy-1.4-cp311-cp311-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 654.0 kB |
| Tags | CPython 3.11 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
29064d3d6f2feb6b3b78b271af547a145c17bad0b3a305366647b588b1901d79
|
|
BLAKE2b-256 checksum How to use checksums |
96970d35d6682c9569f48bfcc3f54409ec1202899db825e9436325421d41fd8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | oommfpy-1.4-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 316.5 kB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e5aa67f624f119e11cf552710905c90e74fc7ddb1f93f91de7c3956efa9ce476
|
|
BLAKE2b-256 checksum How to use checksums |
dcbdac49d69f4eb50ab1190d9d302580334a88eb57ebf7a0e59a8edc599cf254
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp310-cp310-win_amd64.whl
| Download URL | oommfpy-1.4-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 237.2 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
44a34b31d8b521a9068ae278dc90a949c80894e2ffb039578cfd8d3833c893b8
|
|
BLAKE2b-256 checksum How to use checksums |
7ccf7bdea7dd5464980705969c698c8891352f12e942efaedcc170c5343aaec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp310-cp310-manylinux_2_35_x86_64.whl
| Download URL | oommfpy-1.4-cp310-cp310-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 619.6 kB |
| Tags | CPython 3.10 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c5849953f2c1e5b79db865b2a8d9edfa8899b1d11ef64850a900e1c1cf0719b
|
|
BLAKE2b-256 checksum How to use checksums |
fca89c591b6fb0a96b0e51819f78bea4fbd842d6f31d8d48e510a01333693994
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / oommfpy-1.4-cp310-cp310-macosx_14_0_arm64.whl
| Download URL | oommfpy-1.4-cp310-cp310-macosx_14_0_arm64.whl |
|---|---|
| Size | 316.6 kB |
| Tags | CPython 3.10 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
739ca097a0481c3f3e89b953182b20f3afeb2efbe08c580c8a2dc23451943152
|
|
BLAKE2b-256 checksum How to use checksums |
46dd20d63205c83dddb68a147cd1190204c40b41d7d3113e26d79db663b4059f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|