LCOV - code coverage report
Current view: top level - src - gw_main.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:06f838d) Lines: 100.0 % 9 9
Test Date: 2026-06-05 07:04:50 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_main
      14              :    USE gw_large_cell_Gamma,             ONLY: gw_calc_large_cell_Gamma
      15              :    USE gw_large_cell_Gamma_ri_rs,       ONLY: gw_calc_large_cell_Gamma_ri_rs
      16              :    USE gw_small_cell_full_kp,           ONLY: gw_calc_small_cell_full_kp
      17              :    USE gw_utils,                        ONLY: create_and_init_bs_env_for_gw
      18              :    USE input_constants,                 ONLY: large_cell_Gamma,&
      19              :                                               large_cell_Gamma_ri_rs,&
      20              :                                               small_cell_full_kp
      21              :    USE input_section_types,             ONLY: section_vals_type
      22              :    USE post_scf_bandstructure_types,    ONLY: post_scf_bandstructure_type
      23              :    USE qs_environment_types,            ONLY: qs_environment_type
      24              : #include "./base/base_uses.f90"
      25              : 
      26              :    IMPLICIT NONE
      27              : 
      28              :    PRIVATE
      29              : 
      30              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'gw_main'
      31              : 
      32              :    PUBLIC :: gw
      33              : 
      34              : CONTAINS
      35              : 
      36              : ! **************************************************************************************************
      37              : !> \brief Perform GW band structure calculation
      38              : !> \param qs_env ...
      39              : !> \param bs_env ...
      40              : !> \param post_scf_bandstructure_section ...
      41              : !> \par History
      42              : !>    * 04.2026 Added GW RI-RS module
      43              : !>    * 07.2023 created [Jan Wilhelm]
      44              : ! **************************************************************************************************
      45           42 :    SUBROUTINE gw(qs_env, bs_env, post_scf_bandstructure_section)
      46              :       TYPE(qs_environment_type), POINTER                 :: qs_env
      47              :       TYPE(post_scf_bandstructure_type), POINTER         :: bs_env
      48              :       TYPE(section_vals_type), POINTER                   :: post_scf_bandstructure_section
      49              : 
      50              :       CHARACTER(LEN=*), PARAMETER                        :: routineN = 'gw'
      51              : 
      52              :       INTEGER                                            :: handle
      53              : 
      54           42 :       CALL timeset(routineN, handle)
      55              : 
      56           42 :       CALL create_and_init_bs_env_for_gw(qs_env, bs_env, post_scf_bandstructure_section)
      57              : 
      58           50 :       SELECT CASE (bs_env%small_cell_full_kp_or_large_cell_Gamma)
      59              : 
      60              :       CASE (small_cell_full_kp)
      61              : 
      62            8 :          CALL gw_calc_small_cell_full_kp(qs_env, bs_env)
      63              : 
      64              :       CASE (large_cell_Gamma)
      65              : 
      66           24 :          CALL gw_calc_large_cell_Gamma(qs_env, bs_env)
      67              : 
      68              :       CASE (large_cell_Gamma_ri_rs)
      69              : 
      70           42 :          CALL gw_calc_large_cell_Gamma_ri_rs(qs_env, bs_env)
      71              : 
      72              :       END SELECT
      73              : 
      74           42 :       CALL timestop(handle)
      75              : 
      76           42 :    END SUBROUTINE gw
      77              : 
      78              : END MODULE gw_main
      79              : 
        

Generated by: LCOV version 2.0-1