Code Monkey home page Code Monkey logo

mumax3c's Introduction

mumax3c

Marijan Beg1,2, Samuel Holt2,3, Swapneel Amit Pathak2,4, Martin Lang2, Jeroen Mulkers5, Jonathan Leliaert5, Vanessa Nehruji2, Gary Downing2, Ryan A. Pepper6, Martin Lang2, Thomas Kluyver7, and Hans Fangohr2,4,8

1 Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, UK
2 Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, UK
3 Department of Physics, University of Warwick, Coventry CV4 7AL, UK
4 Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany
5 Faculty of Sciences, Ghent University, Krijgslaan 281, S12, 9000 Ghent, Belgium
6 Research Software Group, University of Birmingham, Birmingham B15 2TT, UK
7 European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany
8 Center for Free-Electron Laser Science, Luruper Chaussee 149, 22761 Hamburg, Germany

Description Badge
Tests Build status
Linting pre-commit.ci status
Code style: black
Releases PyPI version
Anaconda-Server Badge
Coverage codecov
Documentation Documentation
YouTube YouTube
Binder Binder
Platforms Platforms
Downloads Downloads
License License
DOI DOI

About

mumax3c is a Python package, integrated with Jupyter, providing:

It is available on Windows, MacOS, and Linux. It requires Python 3.8+.

Documentation

APIs and tutorials are available in the documentation. To access the documentation, use the badge in the table above.

Installation, testing, and upgrade

We recommend installation using conda package manager. Instructions can be found in the documentation.

Binder

This package can be used in the cloud via Binder. To access Binder, use the badge in the table above.

YouTube

YouTube video tutorials are available on the Ubermag channel.

Support

If you require support, have questions, want to report a bug, or want to suggest an improvement, please raise an issue in ubermag/help repository.

Contributions

All contributions are welcome, however small they are. If you would like to contribute, please fork the repository and create a pull request. If you are not sure how to contribute, please contact us by raising an issue in ubermag/help repository, and we are going to help you get started and assist you on the way.

Contributors:

License

Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please refer to the LICENSE file.

How to cite

  1. M. Beg, M. Lang, and H. Fangohr. Ubermag: Towards more effective micromagnetic workflows. IEEE Transactions on Magnetics 58, 7300205 (2022).

  2. M. Beg, R. A. Pepper, and H. Fangohr. User interfaces for computational science: A domain specific language for OOMMF embedded in Python. AIP Advances 7, 56025 (2017).

  3. Marijan Beg, Samuel Holt, Swapneel Amit Pathak, Martin Lang, Jeroen Mulkers, Jonathan Leliaert, Vanessa Nehruji, Gary Downing, Ryan A. Pepper, Martin Lang, Thomas Kluyver, and Hans Fangohr. mumax3c: Python interface to mumax3 integrated into Jupyter notebook. DOI: 10.5281/zenodo.3539461 (2023).

Acknowledgements

  • OpenDreamKit โ€“ Horizon 2020 European Research Infrastructure project (676541)

  • EPSRC Programme Grant on Skyrmionics (EP/N032128/1)

mumax3c's People

Contributors

gamdow avatar jeroenmulkers avatar jleliaert avatar kzqureshi avatar lang-m avatar marijanbeg avatar pre-commit-ci[bot] avatar rpep avatar samjrholt avatar seregakr avatar slel avatar swapneelap avatar vanessanehruji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mumax3c's Issues

Activate all tests

We currently only use a small subset of the tests in micromagnetictests because we only import a few test.

from micromagnetictests.calculatortests import ( # noqa: F401
TestDemag,
TestDMI,
TestExchange,
TestZeeman,
)

In oommfc we import all tests (from micromagnetictests.calculatortests import *). It would be good if we could use the same here.

`RunWhile` Support

@SeregaKR suggested adding support for RunWhile in mumax3c in #81. We have a few questions on this topic.

  1. What conditions (and how many) does mumax3 support in RunWhile?
  2. Are any of these conditions already present in any way in micrimagneticmodel?
  3. Is it worth making this part of the TimeDriver rather than a separate driver?
  4. Can mumax3 combine multiple conditions with logic operators?

We do in general like the following suggestion:

td = mc.<...Driver>()
td.drive(system, condition="MaxTorque > 0.005")

Add text to mx3

Incorporate the ability to add text directly to the mx3 file as a catch all for methods that are not currently implemented and advanced users.

Calculate mumax3 subregions

  • Add code to mumax3c
  • Add Ms to mx3 files
  • Add region_relator to system
  • Informative error message
  • Use mesh to create slices

Runners for mumax3

Review runner in mumax3c and oommfc to remove potential code duplication.

Subregion zero Ms leads to nan in output .mx3 file

Hi,
thanks for creating this great tool.

I think found an issue when there's a nan Ms set in the output .mx3 file:

Msat.setregion(2, nan) 

This line:

array_max = np.max(array)

returns 0 for a region with a zero Ms set, which then in division leads to a nan. This nan propagates to the output .mx3 file. The function should probably return 0 if the array_max value is zero, assuming that the user did not set the Ms to a negative number.

Thanks!

`NotImplementedError` for missing features

Users currently don't notice that certain features (e.g. spin currents) are not supported and not added to the mx3 files. It would be good if we could raise NotImplementedErrors for the features that are currently missing.

Skip tests if mumax3 is not available

In the ubermag meta-package we execute all unit tests from all subpackages. We generally cannot assume that mumax3 is installed on a system. We could have a second fixture to skip all tests if mumax3 is not available.

Update energy terms

  • Change to using mumax3 regions
  • Relate ubermag regions to mumax3 regions
  • Deal with energies between mumax3 regions
    - [ ] Check available energies in mumax3
  • Compatible with micromagneticmodel

Mumax questions

  • Which equation is used for DMI type Dind (interfacial Cnv type)? [My guess would be it is equivalent to Cnv_z in OOMMF].
  • Can we fix the spins in one of the regions?
  • Can we save multiple steps for mindriver, relaxdriver?
  • What type of data can we use in compute?
  • Can there be a need to have multiple subregions in the Ms = 0 part (outside the sample)?
  • Proper definition of boundary conditions.

First release

  • Update repository metadata
  • Update devtools
  • Update Ubermag

ZhangLi `u` from `df.Field`

Mumax3 expects a vector field for J, OOMMF a scalar field for u (hard-coded in x direction). mumax3c should check whether the field u is a scalar or vector field. For best compatibility I would convert a scalar field to a vector field and add 0 for the additional two directions.

if system.dynamics.get(type=mm.ZhangLi):
(zh_li_term,) = system.dynamics.get(type=mm.ZhangLi)
u = (
zh_li_term.u
if isinstance(zh_li_term.u, df.Field)

Advanced Functionality To do

  • Time-dependent energy terms
  • Check compute for mumax3
  • Can Ms=0 all be the same region?
  • Check available energies in mumax3
  • PBC more than 1 repeat
  • Spatially dependent Zeeman Field
  • Magnetoelastic coupling
  • Advanced running e.g. RunWhile, steps, and SetSolver
  • Fixed Magnetisation Subregions
  • Output step mumax3 equivilent?
  • Add evolvers, i.e. spin currents
  • Global DMI and subregions of A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.