Skip to content

Srlive1201/LibRPA

Repository files navigation

LibRPA

LibRPA is a library for efficient and accurate first-principles calculations based on many-body perturbation theory with numerical atomic orbitals (NAOs). It currently supports random-phase approximation (RPA) correlation-energy calculations and one-shot GW quasiparticle calculations for periodic systems.

By leveraging the localized resolution-of-identity (LRI) technique, LibRPA achieves low-scaling algorithms suitable for large-scale systems. It is implemented in C++ with MPI/OpenMP parallelism, provides C and Fortran interfaces, and can be integrated with density functional theory (DFT) codes through both file-based and API-based workflows.

Features

  • RPA correlation-energy calculations and one-shot GW quasiparticle calculations
  • Low-scaling algorithms based on the localized resolution-of-identity (LRI) technique
  • Hybrid MPI/OpenMP parallelism
  • Driver-based and API-based interfaces for integration with external DFT codes

Requirements

LibRPA requires:

  • a C++ compiler with MPI support
  • a Fortran compiler
  • BLAS and LAPACK libraries
  • a ScaLAPACK library
  • CMake

LibRPA uses the bundled GreenX library by default for minimax time-frequency grids.

For GW calculations, the following libraries are additionally required:

These libraries are bundled with LibRPA by default, but external versions may also be provided.

Download

Clone the repository and initialize submodules:

git clone https://github.com/Srlive1201/LibRPA
cd LibRPA
git submodule update --init --recursive

Build

A minimal out-of-source build can be done with:

cmake -B build
cmake --build build -j4

To enable GW-related functionality, configure with:

cmake -B build -DLIBRPA_USE_LIBRI=ON
cmake --build build -j4

More example build scripts are provided under examples/build.

Usage

LibRPA supports two main workflows:

  • Driver-based workflow: LibRPA reads data generated by an external DFT code and performs post-processing calculations such as RPA or GW
  • API-based workflow: LibRPA is called directly from within the host code through its C, C++, or Fortran interfaces

For the driver workflow, runtime parameters are read from librpa.in, for example:

task = g0w0_band
input_dir = dataset/
nfreq = 16
parallel_routing = libri

More details can be found in the documentation for driver usage and API usage

Documentation

Comprehensive documentation, including installation instructions, user guides, examples, and tutorials, is available here: https://srlive1201.github.io/LibRPA/

How to cite

If you use LibRPA in published work, please consider citing the following papers:

  • R. Shi, P. Lin, M.-Y. Zhang, L. He, and X. Ren, Phys. Rev. B 109, 035103 (2024).
  • R. Shi, M.-Y. Zhang, P. Lin, L. He, and X. Ren, Comput. Phys. Commun. 309, 109496 (2025).

Licensing

LibRPA is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0).

The bundled or included third-party components are licensed as follows:

About

LibRPA is a library offering access to physical properties computed using many-body perturbation theory.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors