LCOV - code coverage report
Current view: top level - src - qmmm_gaussian_input.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:2fce0f8) Lines: 796 798 99.7 %
Date: 2024-12-21 06:28:57 Functions: 3 3 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief Set the QMMM Gaussian Input Environment
      10             : !> \par History
      11             : !>      6.2004 created [tlaino]
      12             : !> \author Teodoro Laino
      13             : ! **************************************************************************************************
      14             : MODULE qmmm_gaussian_input
      15             :    USE cp_log_handling,                 ONLY: cp_logger_get_default_io_unit
      16             :    USE cp_parser_methods,               ONLY: parser_get_object,&
      17             :                                               parser_search_string
      18             :    USE cp_parser_types,                 ONLY: cp_parser_type,&
      19             :                                               parser_create,&
      20             :                                               parser_release
      21             :    USE input_section_types,             ONLY: section_vals_type,&
      22             :                                               section_vals_val_get
      23             :    USE kinds,                           ONLY: default_string_length,&
      24             :                                               dp
      25             :    USE mathconstants,                   ONLY: rootpi
      26             :    USE message_passing,                 ONLY: mp_para_env_type
      27             :    USE physcon,                         ONLY: bohr
      28             :    USE qmmm_gaussian_data,              ONLY: &
      29             :         g10_a1, g10_a10, g10_a2, g10_a3, g10_a4, g10_a5, g10_a6, g10_a7, g10_a8, g10_a9, g10_b1, &
      30             :         g10_b10, g10_b2, g10_b3, g10_b4, g10_b5, g10_b6, g10_b7, g10_b8, g10_b9, g10_rc, g11_a1, &
      31             :         g11_a10, g11_a11, g11_a2, g11_a3, g11_a4, g11_a5, g11_a6, g11_a7, g11_a8, g11_a9, g11_b1, &
      32             :         g11_b10, g11_b11, g11_b2, g11_b3, g11_b4, g11_b5, g11_b6, g11_b7, g11_b8, g11_b9, g11_rc, &
      33             :         g12_a1, g12_a10, g12_a11, g12_a12, g12_a2, g12_a3, g12_a4, g12_a5, g12_a6, g12_a7, g12_a8, &
      34             :         g12_a9, g12_b1, g12_b10, g12_b11, g12_b12, g12_b2, g12_b3, g12_b4, g12_b5, g12_b6, g12_b7, &
      35             :         g12_b8, g12_b9, g12_rc, g13_a1, g13_a10, g13_a11, g13_a12, g13_a13, g13_a2, g13_a3, &
      36             :         g13_a4, g13_a5, g13_a6, g13_a7, g13_a8, g13_a9, g13_b1, g13_b10, g13_b11, g13_b12, &
      37             :         g13_b13, g13_b2, g13_b3, g13_b4, g13_b5, g13_b6, g13_b7, g13_b8, g13_b9, g13_rc, g14_a1, &
      38             :         g14_a10, g14_a11, g14_a12, g14_a13, g14_a14, g14_a2, g14_a3, g14_a4, g14_a5, g14_a6, &
      39             :         g14_a7, g14_a8, g14_a9, g14_b1, g14_b10, g14_b11, g14_b12, g14_b13, g14_b14, g14_b2, &
      40             :         g14_b3, g14_b4, g14_b5, g14_b6, g14_b7, g14_b8, g14_b9, g14_rc, g15_a1, g15_a10, g15_a11, &
      41             :         g15_a12, g15_a13, g15_a14, g15_a15, g15_a2, g15_a3, g15_a4, g15_a5, g15_a6, g15_a7, &
      42             :         g15_a8, g15_a9, g15_b1, g15_b10, g15_b11, g15_b12, g15_b13, g15_b14, g15_b15, g15_b2, &
      43             :         g15_b3, g15_b4, g15_b5, g15_b6, g15_b7, g15_b8, g15_b9, g15_rc, g16_a1, g16_a10, g16_a11, &
      44             :         g16_a12, g16_a13, g16_a14, g16_a15, g16_a16, g16_a2, g16_a3, g16_a4, g16_a5, g16_a6, &
      45             :         g16_a7, g16_a8, g16_a9, g16_b1, g16_b10, g16_b11, g16_b12, g16_b13, g16_b14, g16_b15, &
      46             :         g16_b16, g16_b2, g16_b3, g16_b4, g16_b5, g16_b6, g16_b7, g16_b8, g16_b9, g16_rc, g17_a1, &
      47             :         g17_a10, g17_a11, g17_a12, g17_a13, g17_a14, g17_a15, g17_a16, g17_a17, g17_a2, g17_a3, &
      48             :         g17_a4, g17_a5, g17_a6, g17_a7, g17_a8, g17_a9, g17_b1, g17_b10, g17_b11, g17_b12, &
      49             :         g17_b13, g17_b14, g17_b15, g17_b16, g17_b17, g17_b2, g17_b3, g17_b4, g17_b5, g17_b6, &
      50             :         g17_b7, g17_b8, g17_b9, g18_a1, g18_a10, g18_a11, g18_a12, g18_a13, g18_a14, g18_a15, &
      51             :         g18_a16, g18_a17, g18_a18, g18_a2, g18_a3, g18_a4, g18_a5, g18_a6, g18_a7, g18_a8, g18_a9, &
      52             :         g18_b1, g18_b10, g18_b11, g18_b12, g18_b13, g18_b14, g18_b15, g18_b16, g18_b17, g18_b18, &
      53             :         g18_b2, g18_b3, g18_b4, g18_b5, g18_b6, g18_b7, g18_b8, g18_b9, g2_a1, g2_a2, g2_b1, &
      54             :         g2_b2, g2_rc, g3_a1, g3_a2, g3_a3, g3_b1, g3_b2, g3_b3, g3_rc, g4_a1, g4_a2, g4_a3, g4_a4, &
      55             :         g4_b1, g4_b2, g4_b3, g4_b4, g4_rc, g5_a1, g5_a2, g5_a3, g5_a4, g5_a5, g5_b1, g5_b2, g5_b3, &
      56             :         g5_b4, g5_b5, g5_rc, g6_a1, g6_a2, g6_a3, g6_a4, g6_a5, g6_a6, g6_b1, g6_b2, g6_b3, g6_b4, &
      57             :         g6_b5, g6_b6, g6_rc, g7_a1, g7_a2, g7_a3, g7_a4, g7_a5, g7_a6, g7_a7, g7_b1, g7_b2, g7_b3, &
      58             :         g7_b4, g7_b5, g7_b6, g7_b7, g7_rc, g8_a1, g8_a2, g8_a3, g8_a4, g8_a5, g8_a6, g8_a7, g8_a8, &
      59             :         g8_b1, g8_b2, g8_b3, g8_b4, g8_b5, g8_b6, g8_b7, g8_b8, g8_rc, g9_a1, g9_a2, g9_a3, g9_a4, &
      60             :         g9_a5, g9_a6, g9_a7, g9_a8, g9_a9, g9_b1, g9_b2, g9_b3, g9_b4, g9_b5, g9_b6, g9_b7, g9_b8, &
      61             :         g9_b9, g9_rc, s10_a1, s10_a10, s10_a2, s10_a3, s10_a4, s10_a5, s10_a6, s10_a7, s10_a8, &
      62             :         s10_a9, s10_b1, s10_b10, s10_b2, s10_b3, s10_b4, s10_b5, s10_b6, s10_b7, s10_b8, s10_b9, &
      63             :         s10_rc, s11_a1, s11_a10, s11_a11, s11_a2, s11_a3, s11_a4, s11_a5, s11_a6, s11_a7, s11_a8, &
      64             :         s11_a9, s11_b1, s11_b10, s11_b11, s11_b2, s11_b3, s11_b4, s11_b5, s11_b6, s11_b7, s11_b8, &
      65             :         s11_b9, s11_rc, s12_a1, s12_a10, s12_a11, s12_a12, s12_a2, s12_a3, s12_a4, s12_a5, s12_a6, &
      66             :         s12_a7, s12_a8, s12_a9, s12_b1, s12_b10, s12_b11, s12_b12, s12_b2, s12_b3, s12_b4, s12_b5, &
      67             :         s12_b6, s12_b7, s12_b8, s12_b9, s12_rc, s13_a1, s13_a10, s13_a11, s13_a12, s13_a13, &
      68             :         s13_a2, s13_a3, s13_a4, s13_a5, s13_a6, s13_a7, s13_a8, s13_a9, s13_b1, s13_b10, s13_b11, &
      69             :         s13_b12, s13_b13, s13_b2, s13_b3, s13_b4, s13_b5, s13_b6, s13_b7, s13_b8, s13_b9, s13_rc, &
      70             :         s14_a1, s14_a10, s14_a11, s14_a12, s14_a13, s14_a14, s14_a2, s14_a3, s14_a4, s14_a5, &
      71             :         s14_a6, s14_a7, s14_a8, s14_a9, s14_b1, s14_b10, s14_b11, s14_b12, s14_b13, s14_b14, &
      72             :         s14_b2, s14_b3, s14_b4, s14_b5, s14_b6, s14_b7, s14_b8, s14_b9, s14_rc, s15_a1, s15_a10, &
      73             :         s15_a11, s15_a12, s15_a13, s15_a14, s15_a15, s15_a2, s15_a3, s15_a4, s15_a5, s15_a6, &
      74             :         s15_a7, s15_a8, s15_a9, s15_b1, s15_b10, s15_b11, s15_b12, s15_b13, s15_b14, s15_b15, &
      75             :         s15_b2, s15_b3, s15_b4, s15_b5, s15_b6, s15_b7, s15_b8, s15_b9, s15_rc, s16_a1, s16_a10, &
      76             :         s16_a11, s16_a12, s16_a13, s16_a14, s16_a15, s16_a16, s16_a2, s16_a3, s16_a4, s16_a5, &
      77             :         s16_a6, s16_a7, s16_a8, s16_a9, s16_b1, s16_b10, s16_b11, s16_b12, s16_b13, s16_b14, &
      78             :         s16_b15, s16_b16, s16_b2, s16_b3, s16_b4, s16_b5, s16_b6, s16_b7, s16_b8, s16_b9, s16_rc, &
      79             :         s17_a1, s17_a10, s17_a11, s17_a12, s17_a13, s17_a14, s17_a15, s17_a16, s17_a17, s17_a2, &
      80             :         s17_a3, s17_a4, s17_a5, s17_a6, s17_a7, s17_a8, s17_a9, s17_b1, s17_b10, s17_b11, s17_b12, &
      81             :         s17_b13, s17_b14, s17_b15, s17_b16, s17_b17, s17_b2, s17_b3, s17_b4, s17_b5, s17_b6, &
      82             :         s17_b7, s17_b8, s17_b9, s17_rc, s18_a1, s18_a10, s18_a11, s18_a12, s18_a13, s18_a14, &
      83             :         s18_a15, s18_a16, s18_a17, s18_a18, s18_a2, s18_a3, s18_a4, s18_a5, s18_a6, s18_a7, &
      84             :         s18_a8, s18_a9, s18_b1, s18_b10, s18_b11, s18_b12, s18_b13, s18_b14, s18_b15, s18_b16, &
      85             :         s18_b17, s18_b18, s18_b2, s18_b3, s18_b4, s18_b5, s18_b6, s18_b7, s18_b8, s18_b9, s18_rc, &
      86             :         s2_a1, s2_a2, s2_b1, s2_b2, s2_rc, s3_a1, s3_a2, s3_a3, s3_b1, s3_b2, s3_b3, s3_rc, s4_a1, &
      87             :         s4_a2, s4_a3, s4_a4, s4_b1, s4_b2, s4_b3, s4_b4, s4_rc, s5_a1, s5_a2, s5_a3, s5_a4, s5_a5, &
      88             :         s5_b1, s5_b2, s5_b3, s5_b4, s5_b5, s5_rc, s6_a1, s6_a2, s6_a3, s6_a4, s6_a5, s6_a6, s6_b1, &
      89             :         s6_b2, s6_b3, s6_b4, s6_b5, s6_b6, s6_rc, s7_a1, s7_a2, s7_a3, s7_a4, s7_a5, s7_a6, s7_a7, &
      90             :         s7_b1, s7_b2, s7_b3, s7_b4, s7_b5, s7_b6, s7_b7, s7_rc, s8_a1, s8_a2, s8_a3, s8_a4, s8_a5, &
      91             :         s8_a6, s8_a7, s8_a8, s8_b1, s8_b2, s8_b3, s8_b4, s8_b5, s8_b6, s8_b7, s8_b8, s8_rc, s9_a1, &
      92             :         s9_a2, s9_a3, s9_a4, s9_a5, s9_a6, s9_a7, s9_a8, s9_a9, s9_b1, s9_b2, s9_b3, s9_b4, s9_b5, &
      93             :         s9_b6, s9_b7, s9_b8, s9_b9, s9_rc
      94             :    USE qmmm_gaussian_types,             ONLY: qmmm_gaussian_p_type
      95             :    USE string_utilities,                ONLY: uppercase
      96             : #include "./base/base_uses.f90"
      97             : 
      98             :    IMPLICIT NONE
      99             :    PRIVATE
     100             : 
     101             :    LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
     102             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qmmm_gaussian_input'
     103             : 
     104             :    PUBLIC  :: read_mm_potential, &
     105             :               set_mm_potential_swave, &
     106             :               set_mm_potential_erf
     107             : !***
     108             : CONTAINS
     109             : 
     110             : ! **************************************************************************************************
     111             : !> \brief read MM_POTENTIAL file
     112             : !> \param para_env ...
     113             : !> \param qmmm_gaussian_fns ...
     114             : !> \param compatibility ...
     115             : !> \param qmmm_section ...
     116             : !> \par History
     117             : !>      06.2004 created [tlaino]
     118             : !> \author Teodoro Laino
     119             : ! **************************************************************************************************
     120         188 :    SUBROUTINE read_mm_potential(para_env, qmmm_gaussian_fns, &
     121             :                                 compatibility, qmmm_section)
     122             :       TYPE(mp_para_env_type), POINTER                    :: para_env
     123             :       TYPE(qmmm_gaussian_p_type), DIMENSION(:), POINTER  :: qmmm_gaussian_fns
     124             :       LOGICAL, INTENT(IN)                                :: compatibility
     125             :       TYPE(section_vals_type), POINTER                   :: qmmm_section
     126             : 
     127             :       CHARACTER(LEN=240)                                 :: line
     128             :       CHARACTER(LEN=default_string_length)               :: Ftarget, mm_potential_file_name, Units
     129             :       INTEGER                                            :: IRad, istart, Ival, j, Nog, Nval, &
     130             :                                                             output_unit
     131             :       LOGICAL                                            :: Found, Found_Radius
     132             :       REAL(KIND=dp)                                      :: fconv, my_radius, Radius
     133             :       TYPE(cp_parser_type)                               :: parser
     134             : 
     135         188 :       output_unit = cp_logger_get_default_io_unit()
     136          94 :       Nval = SIZE(qmmm_gaussian_fns)
     137          94 :       Ival = 0
     138             :       CALL section_vals_val_get(qmmm_section, "MM_POTENTIAL_FILE_NAME", &
     139          94 :                                 c_val=mm_potential_file_name)
     140             : 
     141          94 :       CALL parser_create(parser, mm_potential_file_name, para_env=para_env)
     142             : 
     143             :       search_loop: DO
     144         326 :          Ftarget = "&MM_FIT_POT"
     145         326 :          IF (Ival .EQ. Nval) EXIT search_loop
     146         232 :          CALL parser_search_string(parser, Ftarget, .TRUE., found, line)
     147         326 :          IF (Found) THEN
     148             : !
     149             : ! Structure example of the MM fit potential file:
     150             : !
     151             : !           &MM_FIT_POT
     152             : !           RADIUS  0.4 Angstrom
     153             : !           7
     154             : !           0.223396   0.811453  Bohr
     155             : !           0.306814   1.01988   Bohr
     156             : !           0.254879   1.37404   Bohr
     157             : !           0.188293   1.87929   Bohr
     158             : !           0.136391   2.56745   Bohr
     159             : !           0.100305   3.50033   Bohr
     160             : !           0.0790169  4.82046   Bohr
     161             : !           &END
     162             : !
     163         232 :             CALL parser_get_object(parser, Ftarget, newline=.TRUE.)
     164         232 :             CPASSERT(TRIM(Ftarget) == "RADIUS")
     165         232 :             CALL parser_get_object(parser, radius)
     166         232 :             CALL parser_get_object(parser, units)
     167         232 :             CALL uppercase(units)
     168         232 :             fconv = 1.0_dp
     169         232 :             IF (TRIM(units) .EQ. "ANGSTROM") fconv = bohr
     170         232 :             Found_Radius = .FALSE.
     171         232 :             radius = radius*fconv
     172         408 :             Radius_Loop: DO J = 1, SIZE(qmmm_gaussian_fns)
     173         408 :                IF (ABS(radius - qmmm_gaussian_fns(J)%pgf%Elp_Radius) .LT. EPSILON(0.0_dp)) THEN
     174             :                   Found_Radius = .TRUE.
     175             :                   EXIT Radius_Loop
     176             :                END IF
     177             :             END DO Radius_Loop
     178         232 :             IF (.NOT. Found_Radius) THEN
     179             :                CYCLE search_loop
     180             :             END IF
     181         170 :             Ival = Ival + 1
     182         170 :             IRad = J
     183             :             ! Read  Rmin, Rmax
     184         170 :             CALL parser_get_object(parser, qmmm_gaussian_fns(J)%pgf%Number_of_Gaussians, newline=.TRUE.)
     185             :             ! Allocate Vectors
     186         170 :             istart = 1
     187         170 :             IF (compatibility) THEN
     188           8 :                qmmm_gaussian_fns(J)%pgf%Number_of_Gaussians = qmmm_gaussian_fns(J)%pgf%Number_of_Gaussians + 1
     189           8 :                istart = 2
     190             :             END IF
     191         170 :             NOG = qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians
     192         510 :             ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Ak(NOG))
     193         340 :             ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Gk(NOG))
     194         170 :             IF (compatibility) THEN
     195           8 :                my_radius = qmmm_gaussian_fns(J)%pgf%Elp_Radius_corr
     196           8 :                qmmm_gaussian_fns(IRad)%pgf%Ak(1) = 1.0_dp/radius - 2.0_dp/(rootpi*radius)
     197           8 :                qmmm_gaussian_fns(IRad)%pgf%Gk(1) = my_radius
     198             :             END IF
     199        1592 :             DO J = istart, qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians
     200        1190 :                CALL parser_get_object(parser, qmmm_gaussian_fns(IRad)%pgf%Ak(J), newline=.TRUE.)
     201        1190 :                CALL parser_get_object(parser, qmmm_gaussian_fns(IRad)%pgf%Gk(J))
     202        1190 :                CALL parser_get_object(parser, units)
     203        1190 :                CALL uppercase(units)
     204        1190 :                fconv = 1.0_dp
     205        1190 :                IF (TRIM(units) .EQ. "ANGSTROM") fconv = bohr
     206        1190 :                qmmm_gaussian_fns(IRad)%pgf%Ak(J) = qmmm_gaussian_fns(IRad)%pgf%Ak(J)*fconv
     207        1360 :                qmmm_gaussian_fns(IRad)%pgf%Gk(J) = qmmm_gaussian_fns(IRad)%pgf%Gk(J)*fconv
     208             :             END DO
     209             :          ELSE
     210             : !       *** Stop program, if the end of file is reached ***
     211           0 :             IF (output_unit > 0) WRITE (output_unit, '(A,F12.6,A)') "Discrepancies in Radius: ", Radius, " definition."
     212           0 :             CPABORT("Radius Value not found in MM_POTENTIAL file")
     213             :          END IF
     214             : 
     215             :       END DO search_loop
     216             : 
     217          94 :       CALL parser_release(parser)
     218             : 
     219         282 :    END SUBROUTINE read_mm_potential
     220             : 
     221             : ! **************************************************************************************************
     222             : !> \brief set the GEEP information for Erf(r/rc)/r
     223             : !> \param qmmm_gaussian_fns ...
     224             : !> \param compatibility ...
     225             : !> \param num_geep_gauss ...
     226             : !> \par History
     227             : !>      07.2005 created [tlaino]
     228             : !> \author Teodoro Laino
     229             : ! **************************************************************************************************
     230         130 :    SUBROUTINE set_mm_potential_erf(qmmm_gaussian_fns, &
     231             :                                    compatibility, num_geep_gauss)
     232             :       TYPE(qmmm_gaussian_p_type), DIMENSION(:), POINTER  :: qmmm_gaussian_fns
     233             :       LOGICAL, INTENT(IN)                                :: compatibility
     234             :       INTEGER, INTENT(IN)                                :: num_geep_gauss
     235             : 
     236             :       INTEGER                                            :: IRad, istart, Nog, Nval
     237             :       REAL(KIND=dp)                                      :: my_radius, radius, rc
     238             : 
     239         130 :       Nval = SIZE(qmmm_gaussian_fns)
     240         320 :       DO IRad = 1, Nval
     241         190 :          qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians = num_geep_gauss
     242         190 :          radius = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius
     243         190 :          istart = 0
     244             :          ! Allocate Vectors
     245         190 :          IF (compatibility) THEN
     246           2 :             qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians = qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians + 1
     247           2 :             istart = 1
     248             :          END IF
     249           8 :          SELECT CASE (num_geep_gauss)
     250             :          CASE (2)
     251           8 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g2_rc*bohr)
     252             :          CASE (3)
     253           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g3_rc*bohr)
     254             :          CASE (4)
     255          42 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g4_rc*bohr)
     256             :          CASE (5)
     257           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g5_rc*bohr)
     258             :          CASE (6)
     259          74 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g6_rc*bohr)
     260             :          CASE (7)
     261           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g7_rc*bohr)
     262             :          CASE (8)
     263           8 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g8_rc*bohr)
     264             :          CASE (9)
     265           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g9_rc*bohr)
     266             :          CASE (10)
     267           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g10_rc*bohr)
     268             :          CASE (11)
     269           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g11_rc*bohr)
     270             :          CASE (12)
     271          10 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g12_rc*bohr)
     272             :          CASE (13)
     273           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g13_rc*bohr)
     274             :          CASE (14)
     275           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g14_rc*bohr)
     276             :          CASE (15)
     277           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g15_rc*bohr)
     278             :          CASE (16)
     279           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g16_rc*bohr)
     280             :          CASE (17)
     281           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g16_rc*bohr)
     282             :          CASE (18)
     283         190 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(g16_rc*bohr)
     284             :          END SELECT
     285         190 :          NOG = qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians
     286         570 :          ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Ak(NOG))
     287         570 :          ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Gk(NOG))
     288         190 :          IF (compatibility) THEN
     289           2 :             my_radius = qmmm_gaussian_fns(IRad)%pgf%Elp_Radius_corr
     290           2 :             qmmm_gaussian_fns(IRad)%pgf%Ak(1) = 1.0_dp/radius - 2.0_dp/(rootpi*radius)
     291           2 :             qmmm_gaussian_fns(IRad)%pgf%Gk(1) = my_radius
     292             :          END IF
     293           8 :          SELECT CASE (num_geep_gauss)
     294             :          CASE (2)
     295           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g2_a1
     296           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g2_b1
     297           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g2_a2
     298           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g2_b2
     299             :          CASE (3)
     300           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g3_a1
     301           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g3_b1
     302           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g3_a2
     303           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g3_b2
     304           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g3_a3
     305           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g3_b3
     306             :          CASE (4)
     307          42 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g4_a1
     308          42 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g4_b1
     309          42 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g4_a2
     310          42 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g4_b2
     311          42 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g4_a3
     312          42 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g4_b3
     313          42 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g4_a4
     314          42 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g4_b4
     315             :          CASE (5)
     316           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g5_a1
     317           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g5_b1
     318           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g5_a2
     319           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g5_b2
     320           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g5_a3
     321           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g5_b3
     322           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g5_a4
     323           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g5_b4
     324           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g5_a5
     325           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g5_b5
     326             :          CASE (6)
     327          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g6_a1
     328          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g6_b1
     329          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g6_a2
     330          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g6_b2
     331          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g6_a3
     332          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g6_b3
     333          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g6_a4
     334          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g6_b4
     335          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g6_a5
     336          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g6_b5
     337          74 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g6_a6
     338          74 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g6_b6
     339             :          CASE (7)
     340           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g7_a1
     341           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g7_b1
     342           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g7_a2
     343           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g7_b2
     344           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g7_a3
     345           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g7_b3
     346           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g7_a4
     347           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g7_b4
     348           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g7_a5
     349           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g7_b5
     350           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g7_a6
     351           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g7_b6
     352           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g7_a7
     353           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g7_b7
     354             :          CASE (8)
     355           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g8_a1
     356           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g8_b1
     357           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g8_a2
     358           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g8_b2
     359           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g8_a3
     360           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g8_b3
     361           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g8_a4
     362           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g8_b4
     363           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g8_a5
     364           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g8_b5
     365           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g8_a6
     366           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g8_b6
     367           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g8_a7
     368           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g8_b7
     369           8 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g8_a8
     370           8 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g8_b8
     371             :          CASE (9)
     372           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g9_a1
     373           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g9_b1
     374           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g9_a2
     375           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g9_b2
     376           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g9_a3
     377           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g9_b3
     378           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g9_a4
     379           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g9_b4
     380           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g9_a5
     381           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g9_b5
     382           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g9_a6
     383           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g9_b6
     384           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g9_a7
     385           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g9_b7
     386           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g9_a8
     387           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g9_b8
     388           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g9_a9
     389           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g9_b9
     390             :          CASE (10)
     391           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g10_a1
     392           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g10_b1
     393           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g10_a2
     394           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g10_b2
     395           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g10_a3
     396           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g10_b3
     397           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g10_a4
     398           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g10_b4
     399           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g10_a5
     400           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g10_b5
     401           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g10_a6
     402           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g10_b6
     403           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g10_a7
     404           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g10_b7
     405           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g10_a8
     406           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g10_b8
     407           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g10_a9
     408           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g10_b9
     409           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g10_a10
     410           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g10_b10
     411             :          CASE (11)
     412           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g11_a1
     413           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g11_b1
     414           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g11_a2
     415           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g11_b2
     416           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g11_a3
     417           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g11_b3
     418           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g11_a4
     419           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g11_b4
     420           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g11_a5
     421           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g11_b5
     422           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g11_a6
     423           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g11_b6
     424           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g11_a7
     425           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g11_b7
     426           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g11_a8
     427           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g11_b8
     428           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g11_a9
     429           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g11_b9
     430           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g11_a10
     431           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g11_b10
     432           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g11_a11
     433           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g11_b11
     434             :          CASE (12)
     435          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g12_a1
     436          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g12_b1
     437          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g12_a2
     438          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g12_b2
     439          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g12_a3
     440          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g12_b3
     441          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g12_a4
     442          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g12_b4
     443          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g12_a5
     444          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g12_b5
     445          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g12_a6
     446          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g12_b6
     447          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g12_a7
     448          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g12_b7
     449          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g12_a8
     450          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g12_b8
     451          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g12_a9
     452          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g12_b9
     453          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g12_a10
     454          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g12_b10
     455          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g12_a11
     456          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g12_b11
     457          10 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g12_a12
     458          10 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g12_b12
     459             :          CASE (13)
     460           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g13_a1
     461           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g13_b1
     462           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g13_a2
     463           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g13_b2
     464           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g13_a3
     465           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g13_b3
     466           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g13_a4
     467           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g13_b4
     468           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g13_a5
     469           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g13_b5
     470           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g13_a6
     471           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g13_b6
     472           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g13_a7
     473           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g13_b7
     474           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g13_a8
     475           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g13_b8
     476           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g13_a9
     477           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g13_b9
     478           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g13_a10
     479           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g13_b10
     480           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g13_a11
     481           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g13_b11
     482           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g13_a12
     483           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g13_b12
     484           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g13_a13
     485           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g13_b13
     486             :          CASE (14)
     487           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g14_a1
     488           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g14_b1
     489           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g14_a2
     490           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g14_b2
     491           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g14_a3
     492           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g14_b3
     493           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g14_a4
     494           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g14_b4
     495           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g14_a5
     496           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g14_b5
     497           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g14_a6
     498           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g14_b6
     499           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g14_a7
     500           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g14_b7
     501           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g14_a8
     502           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g14_b8
     503           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g14_a9
     504           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g14_b9
     505           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g14_a10
     506           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g14_b10
     507           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g14_a11
     508           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g14_b11
     509           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g14_a12
     510           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g14_b12
     511           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g14_a13
     512           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g14_b13
     513           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = g14_a14
     514           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = g14_b14
     515             :          CASE (15)
     516           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g15_a1
     517           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g15_b1
     518           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g15_a2
     519           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g15_b2
     520           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g15_a3
     521           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g15_b3
     522           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g15_a4
     523           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g15_b4
     524           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g15_a5
     525           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g15_b5
     526           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g15_a6
     527           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g15_b6
     528           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g15_a7
     529           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g15_b7
     530           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g15_a8
     531           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g15_b8
     532           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g15_a9
     533           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g15_b9
     534           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g15_a10
     535           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g15_b10
     536           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g15_a11
     537           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g15_b11
     538           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g15_a12
     539           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g15_b12
     540           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g15_a13
     541           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g15_b13
     542           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = g15_a14
     543           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = g15_b14
     544           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = g15_a15
     545           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = g15_b15
     546             :          CASE (16)
     547           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g16_a1
     548           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g16_b1
     549           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g16_a2
     550           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g16_b2
     551           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g16_a3
     552           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g16_b3
     553           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g16_a4
     554           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g16_b4
     555           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g16_a5
     556           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g16_b5
     557           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g16_a6
     558           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g16_b6
     559           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g16_a7
     560           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g16_b7
     561           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g16_a8
     562           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g16_b8
     563           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g16_a9
     564           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g16_b9
     565           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g16_a10
     566           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g16_b10
     567           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g16_a11
     568           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g16_b11
     569           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g16_a12
     570           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g16_b12
     571           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g16_a13
     572           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g16_b13
     573           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = g16_a14
     574           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = g16_b14
     575           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = g16_a15
     576           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = g16_b15
     577           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = g16_a16
     578           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = g16_b16
     579             :          CASE (17)
     580           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g17_a1
     581           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g17_b1
     582           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g17_a2
     583           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g17_b2
     584           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g17_a3
     585           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g17_b3
     586           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g17_a4
     587           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g17_b4
     588           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g17_a5
     589           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g17_b5
     590           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g17_a6
     591           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g17_b6
     592           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g17_a7
     593           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g17_b7
     594           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g17_a8
     595           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g17_b8
     596           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g17_a9
     597           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g17_b9
     598           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g17_a10
     599           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g17_b10
     600           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g17_a11
     601           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g17_b11
     602           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g17_a12
     603           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g17_b12
     604           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g17_a13
     605           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g17_b13
     606           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = g17_a14
     607           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = g17_b14
     608           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = g17_a15
     609           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = g17_b15
     610           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = g17_a16
     611           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = g17_b16
     612           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 17) = g17_a17
     613           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 17) = g17_b17
     614             :          CASE (18)
     615           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = g18_a1
     616           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = g18_b1
     617           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = g18_a2
     618           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = g18_b2
     619           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = g18_a3
     620           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = g18_b3
     621           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = g18_a4
     622           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = g18_b4
     623           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = g18_a5
     624           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = g18_b5
     625           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = g18_a6
     626           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = g18_b6
     627           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = g18_a7
     628           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = g18_b7
     629           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = g18_a8
     630           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = g18_b8
     631           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = g18_a9
     632           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = g18_b9
     633           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = g18_a10
     634           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = g18_b10
     635           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = g18_a11
     636           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = g18_b11
     637           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = g18_a12
     638           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = g18_b12
     639           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = g18_a13
     640           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = g18_b13
     641           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = g18_a14
     642           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = g18_b14
     643           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = g18_a15
     644           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = g18_b15
     645           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = g18_a16
     646           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = g18_b16
     647           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 17) = g18_a17
     648           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 17) = g18_b17
     649           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 18) = g18_a18
     650         190 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 18) = g18_b18
     651             :          END SELECT
     652        1554 :          qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1:) = qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1:)/rc
     653        1684 :          qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1:) = qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1:)*rc
     654             :       END DO
     655         130 :    END SUBROUTINE set_mm_potential_erf
     656             : 
     657             : ! **************************************************************************************************
     658             : !> \brief set the GEEP information for the S-WAVE expansion
     659             : !> \param qmmm_gaussian_fns ...
     660             : !> \param num_geep_gauss ...
     661             : !> \par History
     662             : !>      02.2007 created [tlaino]
     663             : !> \author Teodoro Laino
     664             : ! **************************************************************************************************
     665          34 :    SUBROUTINE set_mm_potential_swave(qmmm_gaussian_fns, &
     666             :                                      num_geep_gauss)
     667             :       TYPE(qmmm_gaussian_p_type), DIMENSION(:), POINTER  :: qmmm_gaussian_fns
     668             :       INTEGER, INTENT(IN)                                :: num_geep_gauss
     669             : 
     670             :       INTEGER                                            :: IRad, istart, Nog, Nval
     671             :       REAL(KIND=dp)                                      :: radius, rc
     672             : 
     673          34 :       Nval = SIZE(qmmm_gaussian_fns)
     674         102 :       DO IRad = 1, Nval
     675          68 :          qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians = num_geep_gauss
     676          68 :          radius = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius
     677          68 :          istart = 0
     678             :          ! Allocate Vectors
     679           4 :          SELECT CASE (num_geep_gauss)
     680             :          CASE (2)
     681           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s2_rc*bohr)
     682             :          CASE (3)
     683           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s3_rc*bohr)
     684             :          CASE (4)
     685           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s4_rc*bohr)
     686             :          CASE (5)
     687           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s5_rc*bohr)
     688             :          CASE (6)
     689           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s6_rc*bohr)
     690             :          CASE (7)
     691           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s7_rc*bohr)
     692             :          CASE (8)
     693           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s8_rc*bohr)
     694             :          CASE (9)
     695           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s9_rc*bohr)
     696             :          CASE (10)
     697           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s10_rc*bohr)
     698             :          CASE (11)
     699           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s11_rc*bohr)
     700             :          CASE (12)
     701           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s12_rc*bohr)
     702             :          CASE (13)
     703           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s13_rc*bohr)
     704             :          CASE (14)
     705           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s14_rc*bohr)
     706             :          CASE (15)
     707           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s15_rc*bohr)
     708             :          CASE (16)
     709           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s16_rc*bohr)
     710             :          CASE (17)
     711           4 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s17_rc*bohr)
     712             :          CASE (18)
     713          68 :             rc = qmmm_gaussian_fns(Irad)%pgf%Elp_Radius/(s18_rc*bohr)
     714             :          END SELECT
     715          68 :          NOG = qmmm_gaussian_fns(IRad)%pgf%Number_of_Gaussians
     716         204 :          ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Ak(NOG))
     717         204 :          ALLOCATE (qmmm_gaussian_fns(IRad)%pgf%Gk(NOG))
     718           4 :          SELECT CASE (num_geep_gauss)
     719             :          CASE (2)
     720           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s2_a1
     721           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s2_b1
     722           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s2_a2
     723           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s2_b2
     724             :          CASE (3)
     725           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s3_a1
     726           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s3_b1
     727           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s3_a2
     728           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s3_b2
     729           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s3_a3
     730           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s3_b3
     731             :          CASE (4)
     732           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s4_a1
     733           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s4_b1
     734           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s4_a2
     735           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s4_b2
     736           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s4_a3
     737           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s4_b3
     738           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s4_a4
     739           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s4_b4
     740             :          CASE (5)
     741           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s5_a1
     742           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s5_b1
     743           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s5_a2
     744           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s5_b2
     745           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s5_a3
     746           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s5_b3
     747           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s5_a4
     748           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s5_b4
     749           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s5_a5
     750           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s5_b5
     751             :          CASE (6)
     752           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s6_a1
     753           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s6_b1
     754           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s6_a2
     755           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s6_b2
     756           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s6_a3
     757           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s6_b3
     758           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s6_a4
     759           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s6_b4
     760           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s6_a5
     761           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s6_b5
     762           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s6_a6
     763           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s6_b6
     764             :          CASE (7)
     765           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s7_a1
     766           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s7_b1
     767           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s7_a2
     768           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s7_b2
     769           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s7_a3
     770           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s7_b3
     771           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s7_a4
     772           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s7_b4
     773           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s7_a5
     774           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s7_b5
     775           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s7_a6
     776           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s7_b6
     777           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s7_a7
     778           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s7_b7
     779             :          CASE (8)
     780           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s8_a1
     781           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s8_b1
     782           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s8_a2
     783           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s8_b2
     784           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s8_a3
     785           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s8_b3
     786           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s8_a4
     787           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s8_b4
     788           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s8_a5
     789           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s8_b5
     790           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s8_a6
     791           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s8_b6
     792           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s8_a7
     793           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s8_b7
     794           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s8_a8
     795           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s8_b8
     796             :          CASE (9)
     797           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s9_a1
     798           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s9_b1
     799           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s9_a2
     800           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s9_b2
     801           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s9_a3
     802           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s9_b3
     803           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s9_a4
     804           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s9_b4
     805           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s9_a5
     806           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s9_b5
     807           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s9_a6
     808           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s9_b6
     809           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s9_a7
     810           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s9_b7
     811           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s9_a8
     812           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s9_b8
     813           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s9_a9
     814           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s9_b9
     815             :          CASE (10)
     816           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s10_a1
     817           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s10_b1
     818           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s10_a2
     819           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s10_b2
     820           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s10_a3
     821           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s10_b3
     822           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s10_a4
     823           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s10_b4
     824           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s10_a5
     825           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s10_b5
     826           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s10_a6
     827           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s10_b6
     828           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s10_a7
     829           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s10_b7
     830           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s10_a8
     831           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s10_b8
     832           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s10_a9
     833           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s10_b9
     834           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s10_a10
     835           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s10_b10
     836             :          CASE (11)
     837           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s11_a1
     838           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s11_b1
     839           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s11_a2
     840           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s11_b2
     841           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s11_a3
     842           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s11_b3
     843           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s11_a4
     844           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s11_b4
     845           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s11_a5
     846           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s11_b5
     847           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s11_a6
     848           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s11_b6
     849           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s11_a7
     850           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s11_b7
     851           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s11_a8
     852           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s11_b8
     853           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s11_a9
     854           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s11_b9
     855           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s11_a10
     856           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s11_b10
     857           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s11_a11
     858           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s11_b11
     859             :          CASE (12)
     860           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s12_a1
     861           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s12_b1
     862           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s12_a2
     863           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s12_b2
     864           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s12_a3
     865           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s12_b3
     866           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s12_a4
     867           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s12_b4
     868           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s12_a5
     869           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s12_b5
     870           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s12_a6
     871           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s12_b6
     872           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s12_a7
     873           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s12_b7
     874           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s12_a8
     875           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s12_b8
     876           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s12_a9
     877           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s12_b9
     878           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s12_a10
     879           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s12_b10
     880           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s12_a11
     881           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s12_b11
     882           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s12_a12
     883           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s12_b12
     884             :          CASE (13)
     885           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s13_a1
     886           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s13_b1
     887           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s13_a2
     888           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s13_b2
     889           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s13_a3
     890           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s13_b3
     891           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s13_a4
     892           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s13_b4
     893           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s13_a5
     894           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s13_b5
     895           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s13_a6
     896           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s13_b6
     897           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s13_a7
     898           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s13_b7
     899           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s13_a8
     900           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s13_b8
     901           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s13_a9
     902           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s13_b9
     903           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s13_a10
     904           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s13_b10
     905           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s13_a11
     906           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s13_b11
     907           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s13_a12
     908           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s13_b12
     909           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s13_a13
     910           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s13_b13
     911             :          CASE (14)
     912           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s14_a1
     913           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s14_b1
     914           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s14_a2
     915           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s14_b2
     916           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s14_a3
     917           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s14_b3
     918           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s14_a4
     919           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s14_b4
     920           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s14_a5
     921           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s14_b5
     922           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s14_a6
     923           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s14_b6
     924           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s14_a7
     925           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s14_b7
     926           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s14_a8
     927           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s14_b8
     928           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s14_a9
     929           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s14_b9
     930           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s14_a10
     931           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s14_b10
     932           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s14_a11
     933           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s14_b11
     934           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s14_a12
     935           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s14_b12
     936           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s14_a13
     937           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s14_b13
     938           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = s14_a14
     939           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = s14_b14
     940             :          CASE (15)
     941           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s15_a1
     942           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s15_b1
     943           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s15_a2
     944           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s15_b2
     945           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s15_a3
     946           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s15_b3
     947           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s15_a4
     948           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s15_b4
     949           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s15_a5
     950           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s15_b5
     951           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s15_a6
     952           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s15_b6
     953           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s15_a7
     954           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s15_b7
     955           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s15_a8
     956           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s15_b8
     957           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s15_a9
     958           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s15_b9
     959           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s15_a10
     960           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s15_b10
     961           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s15_a11
     962           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s15_b11
     963           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s15_a12
     964           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s15_b12
     965           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s15_a13
     966           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s15_b13
     967           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = s15_a14
     968           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = s15_b14
     969           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = s15_a15
     970           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = s15_b15
     971             :          CASE (16)
     972           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s16_a1
     973           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s16_b1
     974           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s16_a2
     975           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s16_b2
     976           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s16_a3
     977           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s16_b3
     978           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s16_a4
     979           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s16_b4
     980           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s16_a5
     981           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s16_b5
     982           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s16_a6
     983           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s16_b6
     984           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s16_a7
     985           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s16_b7
     986           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s16_a8
     987           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s16_b8
     988           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s16_a9
     989           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s16_b9
     990           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s16_a10
     991           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s16_b10
     992           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s16_a11
     993           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s16_b11
     994           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s16_a12
     995           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s16_b12
     996           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s16_a13
     997           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s16_b13
     998           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = s16_a14
     999           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = s16_b14
    1000           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = s16_a15
    1001           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = s16_b15
    1002           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = s16_a16
    1003           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = s16_b16
    1004             :          CASE (17)
    1005           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s17_a1
    1006           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s17_b1
    1007           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s17_a2
    1008           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s17_b2
    1009           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s17_a3
    1010           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s17_b3
    1011           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s17_a4
    1012           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s17_b4
    1013           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s17_a5
    1014           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s17_b5
    1015           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s17_a6
    1016           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s17_b6
    1017           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s17_a7
    1018           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s17_b7
    1019           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s17_a8
    1020           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s17_b8
    1021           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s17_a9
    1022           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s17_b9
    1023           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s17_a10
    1024           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s17_b10
    1025           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s17_a11
    1026           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s17_b11
    1027           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s17_a12
    1028           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s17_b12
    1029           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s17_a13
    1030           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s17_b13
    1031           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = s17_a14
    1032           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = s17_b14
    1033           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = s17_a15
    1034           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = s17_b15
    1035           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = s17_a16
    1036           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = s17_b16
    1037           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 17) = s17_a17
    1038           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 17) = s17_b17
    1039             :          CASE (18)
    1040           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1) = s18_a1
    1041           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1) = s18_b1
    1042           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 2) = s18_a2
    1043           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 2) = s18_b2
    1044           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 3) = s18_a3
    1045           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 3) = s18_b3
    1046           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 4) = s18_a4
    1047           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 4) = s18_b4
    1048           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 5) = s18_a5
    1049           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 5) = s18_b5
    1050           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 6) = s18_a6
    1051           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 6) = s18_b6
    1052           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 7) = s18_a7
    1053           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 7) = s18_b7
    1054           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 8) = s18_a8
    1055           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 8) = s18_b8
    1056           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 9) = s18_a9
    1057           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 9) = s18_b9
    1058           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 10) = s18_a10
    1059           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 10) = s18_b10
    1060           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 11) = s18_a11
    1061           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 11) = s18_b11
    1062           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 12) = s18_a12
    1063           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 12) = s18_b12
    1064           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 13) = s18_a13
    1065           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 13) = s18_b13
    1066           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 14) = s18_a14
    1067           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 14) = s18_b14
    1068           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 15) = s18_a15
    1069           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 15) = s18_b15
    1070           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 16) = s18_a16
    1071           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 16) = s18_b16
    1072           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 17) = s18_a17
    1073           4 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 17) = s18_b17
    1074           4 :             qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 18) = s18_a18
    1075          68 :             qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 18) = s18_b18
    1076             :          END SELECT
    1077         748 :          qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1:) = qmmm_gaussian_fns(IRad)%pgf%Ak(istart + 1:)/rc
    1078         782 :          qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1:) = qmmm_gaussian_fns(IRad)%pgf%Gk(istart + 1:)*rc
    1079             :       END DO
    1080          34 :    END SUBROUTINE set_mm_potential_swave
    1081             : 
    1082             : END MODULE qmmm_gaussian_input
    1083             : 

Generated by: LCOV version 1.15