New widgets and extensions expand the OSSCAR platform for educational notebooks in materials science
By Nicola Nosengo/NCCR MARVEL
Interactive notebooks are very popular as a tool for teaching computer science and all scientific subjects that have a strong mathematical and computational component. In many universities, including EPFL and ETH Zurich, the Jupyter development environment is widely used to create interactive textbooks that combine images, equations, different media and executable code, allowing teachers to use data visualization to illustrate challenging concepts and to create engaging problems for their students to solve. But adapting these tools to each specific discipline and course takes a lot of work, and until recently there were not many dedicated notebooks for the field of materials theory and simulation.
The Open Software Services for Classrooms and Research project (OSSCAR) was launched in 2019 as an open platform including a repertoire of interactive notebooks in quantum mechanics and computational materials science, as well as a set of tools for further expanding them. OSSCAR runs on the computational infrastructure developed for the Materials Cloud.
In a new article published in Computer Physics Communications, the OSSCAR team describes how to create custom Jupyter widgets (the graphical components that allow for user interaction within Jupyter notebooks) and extensions (the software components that extend the functionality of the JupyterLab interface, the recommended web-based development environment for Jupyter notebooks). The article is by Dou Du (from CECAM and the THEOS laboratory at EPFL), CECAM's Taylor Baird, THEOS's Krirstjan Eimre, CECAM Deputy Director Sara Bonella and Giovanni Pizzi of the Laboratory for Materials Simulations at the Paul Scherrer Institute. All are members of MARVEL.
In particular, they introduce two new entries in OSSCAR: a widget to display an interactive periodic table that allows users to group elements into different states, and one to plot and visualize electronic band structures and density of states. The article also presents examples of how these widgets can be used in a notebook. For example, in the OSSCAR Quantum Mechanics notebooks, a notebook using the electronic band structures widget is devoted to investigation of the band structure of a free-electron gas
in periodic boundary conditions. As for JupyterLab extensions, the article introduces a bespoke one to visualize molecules and molecular orbitals.
All the OSSCAR widgets can be incorporated in individual teachers’ notebooks, and the groups hopes the repertoire will keep expanding with new widgets and expansions from other collaborators.
“They can be used to create exercises that allow students to test their understanding of theory, for example showing how the solutions to the Schrödinger equation behave when one changes its parameters” says Bonella. “Or, they can be used to provide students with visualizations that will help them prepare for classes and make the most of them. In fact, we are conducting an experiment at EPFL to study how to use them most effectively”.
These notebooks are useful also for researchers and can be integrated with other tools to facilitate scientific tasks. An example is the periodic table, recently integrated in the OPTIMADE API client to interrogate databases of materials properties.
Reference
Dou Du, Taylor J. Baird, Kristjan Eimre, Sara Bonella, Giovanni Pizzi, Jupyter widgets and extensions for education and research in computational physics and chemistry, Computer Physics Communications, 305, 109353 (2024). doi: https://doi.org/10.1016/j.cpc.2024.109353.
Low-volume newsletters, targeted to the scientific and industrial communities.
Subscribe to our newsletter