Using LibRPA driver with FHI-aims dataset

This tutorial will guide you through the process of setting up and running a calculation using FHI-aims for geometry and SCF computations and LibRPA for RPA energy computation. We will use an H2O molecule as the test case (the setup files can be found here).

1. Prerequisites

Before starting, ensure that you have:

  • FHI-aims installed for running geometry optimizations and generating inputs for LibRPA.

  • LibRPA installed and ready for use.

2. FHI-aims Input Files

These files are required to run the initial SCF and geometry optimization using FHI-aims:

  • control.in: This file contains control parameters for FHI-aims. Below is an example:

      xc    pbe
      total_energy_method rpa
      frequency_points 60
    
      k_grid 1 1 1
    
      output librpa binary
    
  • geometry.in: Contains the geometry of the system. For H2O:

      lattice_vector    20.00000     0.00000     0.00000
      lattice_vector     0.00000    20.00000     0.00000
      lattice_vector     0.00000     0.00000    20.00000
      atom        -0.07712649        0.00000000        1.49704522  O
      atom         0.82002231        0.00000000        1.86358518  H
      atom         0.07269418       -0.00000000        0.53972961  H
    

Run FHI-aims, and after the calculation is completed, the following files will be exported:

  stru_out
  band_out
  KS_eigenvector_<myid>.txt
  Cs_data_<myid>.txt
  coulomb_mat_<myid>.txt

3. LibRPA Input File

  • librpa.in: This file specifies the parameters for the RPA calculation. Example:

      task = rpa
      nfreq = 16
      binary_input = t
      use_scalapack_ecrpa = t
    

4. Running the RPA Calculation with LibRPA

After obtaining the output files from FHI-aims and setting up the parameters in librpa.in, you can use LibRPA to calculate the RPA correlation energy:

mpirun -np 4 /path/to/LibRPA/build/chi0_main.exe  >  LibRPA.out

5. LibRPA Output

After the LibRPA calculation is completed, an output file (LibRPA.out) will be generated, which contains the results of the RPA correlation energy as well as the contributions from each k-point (in Hartree).

RPA correlation energy (Hartree)
| Weighted contribution from each k:
| (         0,         0,         0): (-0.306259,0)
| Total EcRPA:       -0.306258516