LCOV - code coverage report
Current view: top level - src - gw.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:1be8651) Lines: 92.3 % 13 12
Test Date: 2026-11-24 01:22:08 Functions: 100.0 % 1 1

            Line data    Source code
       1              : !--------------------------------------------------------------------------------------------------!
       2              : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3              : !   Copyright 2000-2026 CP2K developers group <https://cp2k.org>                                   !
       4              : !                                                                                                  !
       5              : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6              : !--------------------------------------------------------------------------------------------------!
       7              : 
       8              : ! **************************************************************************************************
       9              : !> \brief
      10              : !> \author Jan Wilhelm
      11              : !> \date 07.2023
      12              : ! **************************************************************************************************
      13              : MODULE gw
      14              :    USE gw_ri_rs_large_cell_Gamma,       ONLY: gw_calc_ri_rs_large_cell_Gamma
      15              :    USE gw_ri_rs_non_periodic,           ONLY: gw_calc_ri_rs_non_periodic
      16              :    USE gw_ri_rs_small_cell_full_kp,     ONLY: gw_calc_ri_rs_small_cell_full_kp
      17              :    USE gw_tensor_large_cell_Gamma,      ONLY: gw_calc_tensor_large_cell_Gamma
      18              :    USE gw_tensor_large_cell_Gamma_static_cohsex,ONLY: gw_calc_tensor_large_cell_Gamma_static_cohsex
      19              :    USE gw_tensor_small_cell_full_kp,    ONLY: gw_calc_tensor_small_cell_full_kp
      20              :    USE gw_utils,                        ONLY: create_and_init_bs_env_for_gw
      21              :    USE input_constants,                 ONLY: ri_rs_large_cell_Gamma,&
      22              :                                               ri_rs_non_periodic,&
      23              :                                               ri_rs_small_cell_full_kp,&
      24              :                                               tensor_large_cell_Gamma,&
      25              :                                               tensor_small_cell_full_kp,&
      26              :                                               tensor_static_cohsex
      27              :    USE input_section_types,             ONLY: section_vals_type
      28              :    USE post_scf_bandstructure_types,    ONLY: post_scf_bandstructure_type
      29              :    USE qs_environment_types,            ONLY: qs_environment_type
      30              : #include "./base/base_uses.f90"
      31              : 
      32              :    IMPLICIT NONE
      33              : 
      34              :    PRIVATE
      35              : 
      36              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'gw'
      37              : 
      38              :    PUBLIC :: run_gw
      39              : 
      40              : CONTAINS
      41              : 
      42              : ! **************************************************************************************************
      43              : !> \brief Perform GW band structure calculation
      44              : !> \param qs_env ...
      45              : !> \param bs_env ...
      46              : !> \param post_scf_bandstructure_section ...
      47              : !> \par History
      48              : !>    * 04.2026 Added GW RI-RS module [Ritaj Tyagi]
      49              : !>    * 07.2023 created [Jan Wilhelm]
      50              : ! **************************************************************************************************
      51          156 :    SUBROUTINE run_gw(qs_env, bs_env, post_scf_bandstructure_section)
      52              :       TYPE(qs_environment_type), POINTER                 :: qs_env
      53              :       TYPE(post_scf_bandstructure_type), POINTER         :: bs_env
      54              :       TYPE(section_vals_type), POINTER                   :: post_scf_bandstructure_section
      55              : 
      56              :       CHARACTER(LEN=*), PARAMETER                        :: routineN = 'run_gw'
      57              : 
      58              :       INTEGER                                            :: handle
      59              : 
      60          156 :       CALL timeset(routineN, handle)
      61              : 
      62          156 :       CALL create_and_init_bs_env_for_gw(qs_env, bs_env, post_scf_bandstructure_section)
      63              : 
      64          172 :       SELECT CASE (bs_env%gw_implementation)
      65              : 
      66              :       CASE (tensor_small_cell_full_kp)
      67              : 
      68           16 :          CALL gw_calc_tensor_small_cell_full_kp(qs_env, bs_env)
      69              : 
      70              :       CASE (tensor_large_cell_Gamma)
      71              : 
      72           76 :          CALL gw_calc_tensor_large_cell_Gamma(qs_env, bs_env)
      73              : 
      74              :       CASE (ri_rs_large_cell_Gamma)
      75              : 
      76            0 :          CALL gw_calc_ri_rs_large_cell_Gamma(qs_env, bs_env)
      77              : 
      78              :       CASE (ri_rs_non_periodic)
      79              : 
      80           42 :          CALL gw_calc_ri_rs_non_periodic(qs_env, bs_env)
      81              : 
      82              :       CASE (tensor_static_cohsex)
      83              : 
      84            8 :          CALL gw_calc_tensor_large_cell_Gamma_static_cohsex(qs_env, bs_env)
      85              : 
      86              :       CASE (ri_rs_small_cell_full_kp)
      87              : 
      88           14 :          CALL gw_calc_ri_rs_small_cell_full_kp(qs_env, bs_env)
      89              : 
      90              :       CASE DEFAULT
      91              : 
      92          156 :          CPABORT("Unknown GW implementation.")
      93              : 
      94              :       END SELECT
      95              : 
      96          156 :       CALL timestop(handle)
      97              : 
      98          156 :    END SUBROUTINE run_gw
      99              : 
     100              : END MODULE gw
        

Generated by: LCOV version 2.0-1