MLatom software ecosystem for surface hopping dynamics in Python with quantum mechanical and machine learning methods

Lina Zhang,Sebastian V. Pios,Mikołaj Martyka,Fuchun Ge,Yi-Fan Hou,Yuxinxin Chen,Lipeng Chen,Joanna Jankowska,Mario Barbatti,Pavlo O. Dral
2024-04-09
Abstract:We present an open-source MLatom@XACS software ecosystem for on-the-fly surface hopping nonadiabatic dynamics based on the Landau-Zener-Belyaev-Lebedev (LZBL) algorithm. The dynamics can be performed via Python API with a wide range of quantum mechanical (QM) and machine learning (ML) methods, including ab initio QM (CASSCF and ADC(2)), semi-empirical QM methods (e.g., AM1, PM3, OMx, and ODMx), and many types of machine learning potentials (e.g., KREG, ANI, and MACE). Combinations of QM and ML methods can also be used. While the user can build their own combinations, we provide AIQM1, which is based on {\Delta}-learning and can be used out of the box. We showcase how AIQM1 reproduces the isomerization quantum yield of trans-azobenzene at a low cost. We provide example scripts that, in a dozen lines, enable the user to obtain the final population plots by simply providing the initial geometry of a molecule. Thus, those scripts perform geometry optimization, normal mode calculations, initial condition sampling, parallel trajectories propagation, population analysis, and final result plotting. Given the capabilities of MLatom to be used for training different ML models, this ecosystem can be seamlessly integrated into the protocols building ML models for nonadiabatic dynamics. In the future, a deeper and more efficient integration of MLatom with Newton-X will enable vast range of functionalities for surface hopping dynamics, such as fewest-switches surface hopping, to facilitate similar workflows via the Python API.
Chemical Physics
What problem does this paper attempt to address?
This paper introduces an open-source software ecosystem MLatom@XACS specifically designed for surface hopping non-adiabatic dynamics simulations based on the Landau-Zener-Belyaev-Lebedev (LZBL) algorithm. This system allows the use of various quantum mechanics (QM) and machine learning (ML) methods in a Python environment, including ab initio QM methods such as CASSCF and ADC(2), semi-empirical QM methods such as AM1 and PM3, as well as various types of machine learning potentials such as KREG, ANI, and MACE. Users can also customize combinations of QM and ML methods, and the paper provides an AIQM1 method based on Δ-learning that can be directly used. The software ecosystem provides a complete workflow from molecular geometry optimization, normal mode computation, initial condition sampling, parallel trajectory propagation, population analysis to final result visualization, and simplifies user operations through example scripts. MLatom is not only suitable for training different ML models, but also seamlessly integrates into ML model protocols for building non-adiabatic dynamics. In the future, it will be more deeply and efficiently integrated with Newton-X to support more features, such as the minimal switching surface hopping algorithm, and implement similar workflows through the Python API. The paper also discusses the importance of non-adiabatic dynamics simulations, particularly for understanding photo-physical and photo-chemical processes. The LZBL algorithm is favored for its avoidance of direct calculations of non-adiabatic coupling, although it is reliable only for two closely spaced energy levels, it has shown good consistency with more accurate minimal switching surface hopping dynamics in multiple practical systems. Furthermore, the implementation of data formats is described in the paper, allowing standard communication between different sections, and demonstrates how to use MLatom for single-point excited-state calculations and methods for generating initial conditions, including sampling from harmonic oscillator Wigner distribution. Finally, the paper showcases specific Python script examples on how to use the MLatom ecosystem for end-to-end surface hopping dynamics simulations.