New widgets and extensions expand the OSSCAR platform for educational notebooks in materials science

In a new article published in Computer Physics Communications, the team of the Open Software Services for Classrooms and Research project (OSSCAR) describes how to create custom widgets and extensions that can be used in interactive notebooks to teach computational materials science. The article also introduces 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.

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 (including Giovanni Pizzi, group leader in the Laboratory for Materials Simulations at PSI) 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).

In particular, the authors 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.

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. 

You can read the full scientific highlight article on the NCCR MARVEL website.

Paper referenceDou 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). https://doi.org/10.1016/j.cpc.2024.109353