Abstract
We present a novel, flexible framework for electronic structure interfaces designed for nonadiabatic dynamics simulations, implemented in Python 3 using concepts of object-oriented programming. This framework streamlines the development of new interfaces by providing a reusable and extendable code base. It supports the computation of energies, gradients, various couplings—like spin-orbit couplings, nonadiabatic couplings, and transition dipole moments—and other properties for an arbitrary number of states with any multiplicity and charge. A key innovation within this framework is the introduction of hybrid interfaces, which can use other interfaces in a general hierarchical manner. Hybrid interfaces are capable of using one or more child interfaces to implement hybrid methods, such as quantum mechanics/molecular mechanics (QM/MM), where different child interfaces are assigned to different regions of a system. This concept can be extended through nesting, where hybrid parent interfaces use hybrid child interfaces to easily setup complex workflows without the need for additional coding. We demonstrate the potential of hybrid interfaces with two examples: one method and one workflow. The presented method is numerical differentiation of wave function overlaps implemented as a hybrid interface, used to optimize a minimum-energy conical intersection with numerical nonadiabatic couplings. For the workflow, an adaptive learning setup using nested hybrid interfaces is used to iteratively refine a machine learning model.