Hans Fangohr is a computational scientist and open source advocate. He is
heading the scientific support unit Computational Science at the Max Planck
Institute for Structure and Dynamics of Matter in Hamburg, Germany, and is
Professor of Computational Modelling at the University of Southampton in the
United Kingdom. He is working on research software engineering, including high
performance computing, data analysis and appropriate software engineering
methods in computational science.
He has created a number of open source scientific simulation and data analysis
packages, in particular in the area of micromagnetic modelling. To support the
effective use of computational methods for scientific research, Hans has
authored an Introduction to Python for Computational
for the training of engineers and scientists.
Further details are available on his homepage, blog, GitHub page and Mastodon handle https://fosstodon.org/@ProfCompMod .
Scientist, engineers and researchers more widely. Our example project is based on Python, but key points are independent from the programming language used. It is not necessary to know anything about materials simulation.
We have developed a Python library  that acts as an interface to two existing research simulation tools (OOMMF and mumax3, which are based on Tcl/C++ and Go/CUDA, respectively) and which have comparable functionality. Through the Python interface, simulations can be conducted from Jupyter notebooks. Each simulation can use either tool through the uniform Python interface.
The whole project, bringing together the Python interface with additional analysis tools, is known as Ubermag , and available as open source . The software allows to simulate magnetic materials at the micrometre scale, but many of the concepts should be transferable to other domains.
The contribution will describe the design ideas behind the Python library and describe typical use cases of the computational simulation studies which are orchestrated through Jupyter notebooks. Data analysis is also conducted from the Jupyter notebook. For many problems, an iterative and explorative cycle is possible and effective.
We discuss how the setup can help scientists to move to more reproducible workflows and publications . This includes the one-study one-document nature of the approach to capture the steps that have been carried out.
For more reproducible publications, we propose to publish a set of Jupyter notebooks with each publication, where the notebooks are used to compute central figures and statements of the paper .
A challenge is the preservation and creation of software environments in which the notebooks can be executed (potentially using software outside the notebook, which might be called from the notebook). We mention Binder  as a possible option here.
We discuss other benefits of the notebook-based approach to computational science, including no-install creation of software environment via Binder, easy documentation of software using notebooks as sphinx input, executable tutorials (with Binder) and automatic testing of documentation and reproducibility using nbval .
 Marijan Beg, Ryan A. Pepper, Hans Fangohr, "User interfaces for computational science: a domain specific language for OOMMF embedded in Python", AIP Advances 7, 056025 (2017) https://doi.org/10.1063/1.4977225
 Marijan Beg, Martin Lang, Hans Fangohr, "Ubermag: Towards more effective micromagnetic workflows", IEEE Transactions on Magnetics 58, 7300205 (2021) https://doi.org/10.1109/TMAG.2021.3078896
 Ubermag home page https://ubermag.github.io and sources (2022) https://github.com/ubermag
 Marijan Beg, Juliette Belin, Thomas Kluyver, Alexander Konovalov, Min Ragan-Kelley, Nicolas Thiery, Hans Fangohr, "Using Jupyter for reproducible scientific workflows", Computing in Science & Engineering 23, 36-46 (2021) https://doi.org/10.1109/MCSE.2021.3052101
 Project Jupyter, M. Bussonnier, J. Forde, J. Freeman, B. Granger, T. Head, C. Holdgraf, K. Kelley, G. Nalvarte, A. Osheroff, M. Pacer, Y. Panda, F. Perez, B. Ragan Kelley, and C. Willing, “Binder 2.0 - Reproducible, interactive, shareable environments for science at scale”, Proceedings of the 17th Python in Science Conference, pp. 113 – 120 (2018) https://jupyter.org/binder
 Hans Fangohr, Vidar Fauske, Thomas Kluyver, Maximilian Albert, Oliver Laslett, David Cortes-Ortuno, Marijan Beg, Min Ragan-Kelly. "Testing with Jupyter notebooks: NoteBook VALidation (nbval) plug-in for pytest" https://arxiv.org/abs/2001.04808 (2020) https://github.com/computationalmodelling/nbval