Recent developments in the P<scp>y</scp>SCF program package

Qiming Sun, Xing Zhang, Samragni Banerjee, Peng Bao, Marc Barbry, Nick S. Blunt, Nikolay A. Bogdanov, George H. Booth, Jia Chen, Zhi‐Hao Cui, Janus J. Eriksen, Yang Gao, Sheng Guo, Jan Hermann, Matthew R. Hermes, Kevin J. Koh, Peter Koval, Susi Lehtola, Zhendong Li, Junzi Liu, Narbe Mardirossian, James McClain, Mário Motta, Bastien Mussard, Hung Q. Pham, Artem Pulkin, Wirawan Purwanto, Paul J. Robinson, Enrico Ronca, Elvira R. Sayfutyarova, Maximilian Scheurer, Henry F. Schurkus, James E. T. Smith, Chong Sun, Shi-Ning Sun, Shiv Upadhyay, Lucas K. Wagner, Xiao Wang, Alec F. White, James Whitfield, Mark J. Williamson, Sebastian Wouters, Jun Yang, Jason M. Yu, Tianyu Zhu, Timothy C. Berkelbach, Sandeep Sharma, Alexander Yu. Sokolov, Garnet Kin‐Lic ChanThe Journal of Chemical Physics 2020 · DOI

TL;DR

PySCF is a powerful, open-source Python library for electronic structure calculations, designed to be both a robust simulation tool and a flexible development platform. This paper details its architecture, philosophy, and recent advancements, highlighting its growing impact across quantum chemistry, materials science, and machine learning.

What Problem Does This Paper Address?

Developing new computational methods in quantum chemistry and materials science often requires significant programming effort. Existing software packages, while excellent for specific tasks, can be rigid and difficult to extend or modify. Researchers need a platform that not only performs complex simulations but also empowers them to easily implement, test, and integrate their own novel algorithms and workflows, bridging the gap between cutting-edge research and practical application.

Methods

PySCF is built on a modular, object-oriented Python framework, with performance-critical components written in C. Key design principles include:

  • Development Platform Focus: Providing extensive Python APIs for individual sub-operations, allowing users to rebuild or modify algorithms without deep code changes.
  • Unified Framework: Supporting both molecular and crystalline material simulations within the same numerical framework and theoretical approximations.
  • Accessibility: Enabling users from fields like machine learning and quantum information theory to perform quantum chemistry simulations.

The paper highlights the use of a unified density fitting API for both molecular and crystalline systems, leveraging three-center integrals as a central computational intermediate. It also emphasizes the dual implementation strategy: providing both simple, readable versions of algorithms and highly optimized, C-based implementations.

Datasets

Not discussed in the paper. The paper focuses on the software package itself and its capabilities, rather than specific datasets used for training or evaluation.

Key Insights and Ideas

  • Empowering Researchers: PySCF's design philosophy prioritizes user empowerment, allowing for easy customization and modification of computational workflows, which is crucial for rapid research and development.
  • Bridging Disciplines: The unified framework and Python-based API make advanced quantum chemistry accessible to researchers in fields like machine learning and quantum information science, fostering interdisciplinary collaboration.
  • Modularity is Key: The library's success stems from its highly modular structure, enabling users to pick and choose components or even replace them with their own implementations.
  • Performance Without Sacrifice: PySCF achieves competitive performance by leveraging optimized C libraries and Python's dynamic nature, allowing for both ease of use and computational efficiency.
  • Ecosystem Growth: The paper showcases a thriving ecosystem of external projects and research built upon PySCF, demonstrating its broad impact and utility.

Key Results

The paper details the extensive capabilities of PySCF, including:

  • Broad Methodological Support: Implementation of Hartree-Fock, DFT, various post-HF methods (MP2, CCSD, CCSD(T), FCI), multi-reference methods (MCSCF, MRPT), and relativistic treatments.
  • Scalability: The ability to handle large systems, with estimates suggesting capabilities for over 10,000 AO basis functions for molecular calculations and efficient treatment of systems with thousands of basis functions for periodic calculations.
  • Efficiency: Demonstrated performance improvements through techniques like density fitting, pseudopotentials, and parallelization (MPI/OpenMP).
  • Flexibility: Numerous case studies illustrate how users can easily modify Hamiltonians, optimize orbitals for arbitrary methods, implement embedding models, and customize functionals.
  • Growing Community: A large user base and over 60 code contributors highlight the active development and widespread adoption of PySCF.

Limitations and Future Work

  • Experimental Support for Lattice Symmetries: While additional crystal lattice symmetries are supported, the paper notes this is currently experimental.
  • Limited Functionality for QM/MM: PySCF currently offers "some limited functionality" for QM/MM calculations.
  • Future Directions: The authors anticipate building upon the current version (1.7.1) with innovations in faster methods for very large systems, enhanced integration with machine learning and quantum computing, improved high-performance computing support, and potentially extensions into dynamics and classical simulations. They also emphasize continued efforts in documentation, quality assurance, and testing.

Summary updated

Abstract

PySCF is a Python-based general-purpose electronic structure platform that supports first-principles simulations of molecules and solids as well as accelerates the development of new methodology and complex computational workflows. This paper explains the design and philosophy behind PySCF that enables it to meet these twin objectives. With several case studies, we show how users can easily implement their own methods using PySCF as a development environment. We then summarize the capabilities of PySCF for molecular and solid-state simulations. Finally, we describe the growing ecosystem of projects that use PySCF across the domains of quantum chemistry, materials science, machine learning, and quantum information science.
BibTeX
@article{sun2020recent,
  author = {Qiming Sun and Xing Zhang and Samragni Banerjee and Peng Bao and Marc Barbry and Nick S. Blunt and Nikolay A. Bogdanov and George H. Booth and Jia Chen and Zhi‐Hao Cui and Janus J. Eriksen and Yang Gao and Sheng Guo and Jan Hermann and Matthew R. Hermes and Kevin J. Koh and Peter Koval and Susi Lehtola and Zhendong Li and Junzi Liu and Narbe Mardirossian and James McClain and Mário Motta and Bastien Mussard and Hung Q. Pham and Artem Pulkin and Wirawan Purwanto and Paul J. Robinson and Enrico Ronca and Elvira R. Sayfutyarova and Maximilian Scheurer and Henry F. Schurkus and James E. T. Smith and Chong Sun and Shi-Ning Sun and Shiv Upadhyay and Lucas K. Wagner and Xiao Wang and Alec F. White and James Whitfield and Mark J. Williamson and Sebastian Wouters and Jun Yang and Jason M. Yu and Tianyu Zhu and Timothy C. Berkelbach and Sandeep Sharma and Alexander Yu. Sokolov and Garnet Kin‐Lic Chan},
  title = {{Recent developments in the P<scp>y</scp>SCF program package}},
  journal = {The Journal of Chemical Physics},
  year = {2020},
  doi = {10.1063/5.0006074},
}
Figure