Skip to main content

eChem: Computational Chemistry from Laptop to HPC

Thomas Fransson, Mickael Delcey, Iulia Brumboiu, Xin Li, Manuel Hodecker, & Patrick Norman, Department of Theoretical Chemistry and Biology (TCB), KTH Royal Institute of Technology

Higher education in natural sciences has a long and honourable tradition with course curricula and textbook literature that are mature and well established. This is certainly the case at undergraduate and master’s degree levels, and it is also often so at the level of doctoral studies. This is highly advantageous since it provides a common ground for communication between students and researchers from different parts of the world in their respective scientific sub-disciplines. We would argue, however, that to reach deep levels of understanding, it is beneficial to blend in components of exploration by students themselves and, being computational scientists, we advocate the use of an interactive framework such as Jupyter Notebook. With these modern, flexible software packages and frameworks, we are more capable than ever of providing platforms for interactive and easily adaptable computational workflows, allowing a deep exploration of scientific concepts and theories. In this way, students can create their own algorithms and solutions for the physical processes at hand, reaching an understanding in line with Feynman’s quip:

“What I cannot create, I do not understand.”

At the Department of Theoretical Chemistry and Biology (TCB) at the KTH Royal Institute of Technology, we are developing an electronic book suitable for such explorations titled “eChem: Computational Chemistry from Laptop to HPC” ( kthpanor.github.io/echem ). This e-book is published as a web page and collects a repository of Jupyter notebooks developed with the dual purpose of explaining and exploring the underlying theory behind computational chemistry in a highly interactive manner, as well as providing tutorials and workflows for solving specific chemistry-related questions. The theory parts are intertwined with explicit numerical examples, as well as suggested reading and exercises. With this learning environment, we aim to attract the interest of a wide audience, ranging from graduate students just getting into the field to experienced users and developers who want to see how we would address specific questions.

Central to our e-book project is the VeloxChem software [1] ( veloxchem.org ). In 2018, the VeloxChem program started its development at TCB, and it has since positioned itself as the leading European quantum chemical software for contemporary and future supercomputer architectures. The project owes its success to the giant leap of starting from scratch and introducing a modern, sustainable, strictly object-oriented, code design that features a hybrid Python/C++ language, hybrid MPI/OpenMP parallelism, and auto-generated and highly optimised source-code kernels. In accordance with requests from users, data structures in the C++ layer are exposed as NumPy arrays by means of the header-only pybind11 library and these are thereby made available for exploration and integration in modules written for educational purposes. The eChem book and teaching material leverage this feature of the VeloxChem software design.

Participants and instructors at the eChem workshop, 2-4 May 2022, KTH, Stockholm

During May this year, we held a first workshop based on the eChem book. The workshop was carried out over three days, and we had 13 students with very different backgrounds and skills. While some were well versed in software development, others had no prior experience in coding. The participants turned out to be very receptive to the strategy of combining lectures with explicit numerical examples, and in the future, we plan to give the workshop in the format of a five-day event to allow for it to be even more interactive. The topics covered were very varied, including tutorials designed to explore the intricacies of different electronic structure methods, as well as tutorials focused on the application of implemented routines to probe particular chemistry problems.

eChem workshop class, May 2022

For the outcome of a workshop like this to be successful, it is essential that participants do not lose time and interest due to software installation issues. As trivial as this may sound, it becomes a challenge when everyone brings his or her own laptop to the event, which could be running any one of the three main operating systems that in turn have been customised according to personal preferences. On this occasion, to resolve that challenge, we used Conda; it is an open-source package and environment management system that works on any of the three main operating systems, and it can be used to install, run, and update packages. Before the event, we guided the participants to perform a Conda installation of a predefined and tested Conda environment. To make it feasible to study more realistic chemistry problems, however, it will be important for future workshops to offer a more powerful computer backend. In collaboration with experts at PDC, we will look into alternatives such as JupyterHub to let the Dardel cluster serve in this capacity and thereby truly live up to the title “Computational Chemistry from Laptop to HPC”.

References

  1. Z. Rinkevicius, X. Li, O. Vahtras, K. Ahmadzadeh, M. Brand, M. Ringholm, N. H. List, M. Scheurer, M. Scott, A. Dreuw, P. Norman, VeloxChem: A Python-driven Density-functional Theory Program for Spectroscopy Simulations in High-performance Computing Environments. WIREs Comput. Mol. Sci. 2020, 10 (5), e1457. doi.org/10.1002/wcms.1457 .