Abstract
Efficient methods for computing derivatives with respect to the parameters of scientific models are crucial for applications in machine learning. These methods are important when training is done using gradient-based optimization algorithms or when the model is integrated with deep learning, as they help speed up calculations during the backpropagation pass. In the present work, we applied the Hellmann-Feynman theorem to calculate the derivatives of the Kohn-Sham DFT energies with respect to the parameters of the exchange-correlation functional. This approach was implemented in a prototype program on the basis of Python package PySCF. Using the LDA and GGA functionals as examples, we have shown that this approach scales approximately linear with the system size for a series of n-alkanes (CnH2n+2, n=4...64) with a double-zeta basis set. We demonstrated a significant speedup in the derivative calculations in comparison with the widely used automatic differentiation approach such as pytorch based DQC, which has a computational complexity of O(n^2.0) - O(n^2.5).
Supplementary materials
Title
Supporting information
Description
This supporting information contains details related to the implicit differentiation method that was used to compare with the Hellmann-Feynman theorem and to calculate the derivative of the electron density with respect to the parameters of the exchange-correlation functional.
Actions
Supplementary weblinks
Title
Prototype of RKS-LDA and RKS-GGA Hellmann-Feynman prototype program
Description
Jupyter notebook containing prototype program for RKS-LDA and RKS-GGA calculations.
Actions
View