Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
173 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
46 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Jupyter widgets and extensions for education and research in computational physics and chemistry (2401.06113v2)

Published 11 Jan 2024 in physics.ed-ph and cond-mat.mtrl-sci

Abstract: Interactive notebooks are a precious tool for creating graphical user interfaces and teaching materials. Python and Jupyter are becoming increasingly popular in this context, with Jupyter widgets at the core of the interactive functionalities. However, while packages and libraries which offer a broad range of general-purpose widgets exist, there is limited development of specialized widgets for computational physics, chemistry and materials science. This deficiency implies significant time investments for the development of effective Jupyter notebooks for research and education in these domains. Here, we present custom Jupyter widgets that we have developed to target the needs of these communities. These widgets constitute high-quality interactive graphical components and can be employed, for example, to visualize and manipulate data, or to explore different visual representations of concepts, clarifying the relationships existing between them. In addition, we discuss with one example how similar functionality can be exposed in the form of JupyterLab extensions, modifying the JupyterLab interface for an enhanced user experience when working with applications within the targeted scientific domains.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (36)
  1. doi:10.1016/J.CPC.2022.108546.
  2. Jupyter, https://docs.jupyter.org (2023).
  3. Jupyterlab, https://jupyterlab.readthedocs.io/en/stable/index.html (2023).
  4. Jupyter widgets, https://ipywidgets.readthedocs.io (2023).
  5. doi:10.1093/bioinformatics/btx789.
  6. Nglview widget, https://github.com/nglviewer/nglview (2023).
  7. Nglview, https://nglviewer.org/#page-top (2023).
  8. doi:10.1109/MCSE.2007.55.
  9. Webgl, http://www.khronos.org/webgl (2023).
  10. The three.js 3d javascript library, https://threejs.org/.
  11. doi:10.1016/J.COMMATSCI.2016.10.015.
  12. IPyWidgets Documentation, https://ipywidgets.readthedocs.io/en/stable/ (2023).
  13. Backbone.js, https://backbonejs.org/ (2023).
  14. doi:10.1109/EDOC.2001.950428.
  15. Traitlets, https://traitlets.readthedocs.io/en/stable/ (2023).
  16. widget-cookiecutter template, https://github.com/jupyter-widgets/widget-cookiecutter (2023).
  17. npm.js, https://www.npmjs.com/ (2023).
  18. doi:10.1038/s41597-020-00637-5.
  19. doi:10.1063/1.4812323.
  20. The Materials Project, https://next-gen.materialsproject.org/ (2023).
  21. OPTIMADE Client App, https://optimadeclient.materialscloud.io/ (2023).
  22. OPTIMADE, https://www.optimade.org/ (2023).
  23. doi:10.1038/s41597-021-00974-z.
  24. Chart.js Website, https://www.chartjs.org/ (2023).
  25. widget-bandsplot GitHub repository, https://github.com/aiidalab/widget-bandsplot (2023).
  26. doi:10.1088/0953-8984/21/39/395502.
  27. AiiDA Quantum ESPRESSO, https://aiida-quantumespresso.readthedocs.io/en/latest/ (2023).
  28. OSSCAR Notebooks: Quantum Mechanics, https://www.osscar.org/courses/quantum_mechanics.html (2023).
  29. The python package installer (pip), https://pypi.org/project/pip/ (2023).
  30. The Python Package Index (PyPI), https://pypi.org/ (2023).
  31. doi:10.1103/physrevb.54.11169.
  32. doi:10.1103/physrevb.59.1758.
  33. doi:10.1002/WCMS.1172.
  34. doi:10.1063/5.0004608.
  35. Pythreejs, https://pythreejs.readthedocs.io/en/stable/ (2023).
  36. JupyterHub, https://jupyter.org/hub (2023).

Summary

  • The paper introduces custom Jupyter widgets and extensions specifically designed to enhance computational education and research in fields like physics and chemistry.
  • Key interactive tools include widget-bzvisualizer for 3D Brillouin zone visualization, widget-periodictable for element selection, and widget-bandsplot for electronic band structure plotting within Jupyter notebooks.
  • A JupyterLab extension, jupyterlab-mol-visualizer, is presented to seamlessly integrate molecular structure visualization into workflows, lowering barriers for examining computational data and streamlining research.

Jupyter Widgets and Extensions for Computational Science Education and Research

The manuscript under discussion presents a concerted effort to enhance computational education and research through the development of specialized Jupyter widgets and extensions. These components are designed to meet specific requirements of disciplines such as computational physics, chemistry, and materials science, which are not adequately addressed by existing general-purpose widget libraries.

Context and Motivation

Jupyter notebooks have become an integral part of the computational research and educational landscape, facilitating interactive and reproducible research and offering an engaging medium for teaching complex scientific concepts. However, effectively leveraging these notebooks for specialized applications, particularly in computational science, often necessitates significant development of custom functionalities. This paper addresses this gap by introducing a suite of tailored widgets and extensions aimed at improving interactive visualization and data manipulation capabilities specifically for computational science fields.

Custom Widgets for Enhanced Interaction

The authors introduce several custom widgets that provide advanced visualization and interaction opportunities:

  1. widget-bzvisualizer: This widget visualizes the first Brillouin zone of a crystal, a crucial concept in solid-state physics. Unlike standard visualization tools, this widget provides 3D interactive capabilities directly within a Jupyter notebook, allowing users to manipulate lattice parameters and immediately observe their effects on the reciprocal space visualization.
  2. widget-periodictable: It offers an interactive periodic table that can be used to select and analyze elements in computational chemistry and materials databases. It enhances user interaction by allowing elements to be toggled between different states, facilitating complex search queries in database applications.
  3. widget-bandsplot: Essential for visualizing electronic band structures and densities of states, this widget supports interactive plotting and comparison of multiple datasets. It serves both educational and research purposes, offering insights into electronic properties of materials through immediate visual feedback in Jupyter notebooks.

JupyterLab Extensions

Beyond widgets, the authors extend functionality across the JupyterLab interface itself:

  • jupyterlab-mol-visualizer: This extension allows users to visualize molecular structures and orbitals by simply selecting cube files within JupyterLab, thus integrating molecular visualization seamlessly into the data analysis workflow. By eliminating the need for additional code or software, it significantly lowers the barrier for researchers to examine molecular data.

These tools illustrate a move towards a more integrated and domain-specific use of interactive notebooks, aligning with contemporary trends in digital education tools that emphasize usability and accessibility without compromising on functionality.

Implications and Future Directions

The implications of this work are notably practical. By facilitating rapid development and adoption of high-quality visualizations tailored for computational science, the paper addresses a critical bottleneck in both education and research. The authors effectively demonstrate the potential of combining Jupyter's interactive capabilities with custom-engineered solutions to enhance comprehension of complex concepts and streamline scientific workflows.

Theoretically, this research invites further exploration into the development of similar domain-specific interactive tools. As the Jupyter ecosystem continues to evolve, it becomes pertinent for researchers and educators to proactively develop and share open-source tools that address discipline-specific needs.

Conclusion

This paper underscores the importance and effectiveness of custom Jupyter widgets and extensions in advancing the educational and research capabilities in computational sciences. It demonstrates a model for future developments in the field, emphasizing user-friendly, interactive, and visually enriched digital tools that cater specifically to the unique needs of computational research and pedagogy. The authors have established a groundwork that greatly contributes to the accessibility and efficiency of computational education and research, encouraging further innovation in the development of tailored interactive educational technologies.

Youtube Logo Streamline Icon: https://streamlinehq.com