LCOV - code coverage report
Current view: top level - src - cp_control_types.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:ca6acae) Lines: 97.2 % 217 211
Test Date: 2026-01-02 06:29:53 Functions: 46.6 % 58 27

            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 Defines control structures, which contain the parameters and the
      10              : !>      settings for the DFT-based calculations.
      11              : ! **************************************************************************************************
      12              : MODULE cp_control_types
      13              :    USE cp_fm_types,                     ONLY: cp_fm_release,&
      14              :                                               cp_fm_type
      15              :    USE eeq_input,                       ONLY: eeq_solver_type
      16              :    USE input_constants,                 ONLY: do_full_density,&
      17              :                                               rtp_bse_ham_G0W0,&
      18              :                                               rtp_method_tddft,&
      19              :                                               use_mom_ref_coac
      20              :    USE kinds,                           ONLY: default_path_length,&
      21              :                                               default_string_length,&
      22              :                                               dp
      23              :    USE pair_potential_types,            ONLY: pair_potential_p_release,&
      24              :                                               pair_potential_p_type
      25              :    USE qs_cdft_types,                   ONLY: cdft_control_create,&
      26              :                                               cdft_control_release,&
      27              :                                               cdft_control_type
      28              :    USE smeagol_control_types,           ONLY: smeagol_control_create,&
      29              :                                               smeagol_control_release,&
      30              :                                               smeagol_control_type
      31              :    USE xas_control,                     ONLY: xas_control_release,&
      32              :                                               xas_control_type
      33              :    USE xas_tdp_types,                   ONLY: xas_tdp_control_create,&
      34              :                                               xas_tdp_control_release,&
      35              :                                               xas_tdp_control_type
      36              : #include "./base/base_uses.f90"
      37              : 
      38              :    IMPLICIT NONE
      39              : 
      40              :    PRIVATE
      41              : 
      42              : !***************************************************************************************************
      43              : !\brief Control parameters for hairy-probes DFT
      44              : !***************************************************************************************************
      45              :    TYPE hairy_probes_type
      46              :       REAL(KIND=dp)                        :: alpha = 0.0_dp     ! solution probes parameter
      47              :       REAL(KIND=dp)                        :: mu = 0.0_dp        ! chemical potenatial of electrons in reservoir
      48              :       REAL(KIND=dp)                        :: T = 0.0_dp         ! temperature of electrons in reservoir
      49              :       REAL(KIND=dp)                        :: eps_hp = 0.0_dp    ! tolerance for accuracy checks on occupation numbers
      50              :       INTEGER                              :: natoms = 0, &
      51              :                                               last_ao = 0, &
      52              :                                               first_ao = 0
      53              :       INTEGER, DIMENSION(:), POINTER       :: atom_ids => NULL() ! atom ids to which the probes are attached
      54              :    END TYPE hairy_probes_type
      55              : 
      56              : ! **************************************************************************************************
      57              : ! \brief Control parameters for pw grids
      58              : ! **************************************************************************************************
      59              :    TYPE pw_grid_option
      60              :       LOGICAL                              :: spherical = .FALSE.
      61              :       LOGICAL                              :: fullspace = .FALSE.
      62              :       INTEGER, DIMENSION(2)                :: distribution_layout = 0
      63              :       INTEGER                              :: blocked = 0
      64              :    END TYPE pw_grid_option
      65              : 
      66              : ! **************************************************************************************************
      67              : ! \brief parameters for EMD/RTP calculations involving MO projections
      68              : ! **************************************************************************************************
      69              :    TYPE proj_mo_type
      70              :       INTEGER, DIMENSION(:), ALLOCATABLE         :: ref_mo_index
      71              :       INTEGER                                    :: ref_mo_spin = 1
      72              :       INTEGER                                    :: ref_nlumo = 0
      73              :       LOGICAL                                    :: sum_on_all_ref = .FALSE.
      74              :       INTEGER, DIMENSION(:), ALLOCATABLE         :: td_mo_index
      75              :       REAL(dp), DIMENSION(:), ALLOCATABLE        :: td_mo_occ
      76              :       INTEGER                                    :: td_mo_spin = 1
      77              :       LOGICAL                                    :: sum_on_all_td = .FALSE.
      78              :       CHARACTER(LEN=default_path_length)         :: ref_mo_file_name = ""
      79              :       LOGICAL                                    :: propagate_ref = .FALSE.
      80              :       TYPE(cp_fm_type), DIMENSION(:), &
      81              :          ALLOCATABLE                       :: mo_ref
      82              :    END TYPE proj_mo_type
      83              : 
      84              :    TYPE proj_mo_p_type
      85              :       TYPE(proj_mo_type), POINTER                :: proj_mo => NULL()
      86              :    END TYPE proj_mo_p_type
      87              : 
      88              : ! **************************************************************************************************
      89              : ! \brief Control parameters for REAL_TIME_PROPAGATION calculations
      90              : ! **************************************************************************************************
      91              :    TYPE rtp_control_type
      92              :       LOGICAL                              :: converged = .FALSE.
      93              :       REAL(KIND=dp)                        :: eps_ener = 0.0_dp
      94              :       INTEGER                              :: max_iter = 0
      95              :       INTEGER                              :: mat_exp = 0
      96              :       INTEGER                              :: propagator = 0
      97              :       LOGICAL                              :: fixed_ions = .FALSE.
      98              :       INTEGER                              :: rtp_method = rtp_method_tddft
      99              :       INTEGER                              :: rtbse_ham = rtp_bse_ham_G0W0
     100              :       INTEGER                              :: initial_wfn = 0
     101              :       REAL(dp)                             :: eps_exp = 0.0_dp
     102              :       LOGICAL                              :: initial_step = .FALSE.
     103              :       LOGICAL                              :: hfx_redistribute = .FALSE.
     104              :       INTEGER                              :: aspc_order = 0
     105              :       INTEGER                              :: sc_check_start = 0
     106              :       LOGICAL                              :: apply_wfn_mix_init_restart = .FALSE.
     107              :       LOGICAL                              :: apply_delta_pulse = .FALSE.
     108              :       LOGICAL                              :: apply_delta_pulse_mag = .FALSE.
     109              :       LOGICAL                              :: periodic = .FALSE.
     110              :       LOGICAL                              :: linear_scaling = .FALSE.
     111              :       LOGICAL                              :: write_restart = .FALSE.
     112              :       INTEGER                              :: mcweeny_max_iter = 0
     113              :       INTEGER                              :: acc_ref = 0
     114              :       REAL(dp)                             :: mcweeny_eps = 0.0_dp
     115              :       INTEGER, DIMENSION(3)                :: delta_pulse_direction = 0
     116              :       REAL(KIND=dp)                        :: delta_pulse_scale = 0.0_dp
     117              :       LOGICAL                              :: velocity_gauge = .FALSE.
     118              :       REAL(KIND=dp), DIMENSION(3)          :: field = 0.0_dp
     119              :       REAL(KIND=dp), DIMENSION(3)          :: vec_pot = 0.0_dp
     120              :       LOGICAL                              :: nl_gauge_transform = .FALSE.
     121              :       LOGICAL                              :: is_proj_mo = .FALSE.
     122              :       TYPE(proj_mo_p_type), DIMENSION(:), &
     123              :          POINTER                :: proj_mo_list => NULL()
     124              :       ! Switch to turn on moments trace saving
     125              :       LOGICAL                              :: save_local_moments = .FALSE.
     126              :       INTEGER                              :: moment_trace_ref_type = use_mom_ref_coac
     127              :       REAL(dp), DIMENSION(:), POINTER      :: moment_trace_user_ref_point => NULL()
     128              :       REAL(dp)                             :: ft_damping = -1.0_dp
     129              :       REAL(dp)                             :: ft_t0 = 0.0_dp
     130              :       ! Index 1 : number of the element, Index 2 : coordinates
     131              :       ! e.g. if xx and xz elements are to be printed
     132              :       ! print_pol_elements(1,1) = 1
     133              :       ! print_pol_elements(1,2) = 1
     134              :       ! print_pol_elements(2,1) = 1
     135              :       ! print_pol_elements(2,2) = 3
     136              :       INTEGER, DIMENSION(:, :), POINTER    :: print_pol_elements => NULL()
     137              :       LOGICAL                              :: pade_requested = .FALSE.
     138              :       REAL(dp)                             :: pade_e_min = 0.0_dp
     139              :       REAL(dp)                             :: pade_e_step = 0.02_dp
     140              :       REAL(dp)                             :: pade_e_max = 100.0_dp
     141              :       REAL(dp)                             :: pade_fit_e_min = 0.0_dp
     142              :       REAL(dp)                             :: pade_fit_e_max = 300.0_dp
     143              :    END TYPE rtp_control_type
     144              : 
     145              : ! **************************************************************************************************
     146              : ! \brief Control parameters for DFTB calculations
     147              : ! **************************************************************************************************
     148              :    TYPE dftb_control_type
     149              :       LOGICAL                              :: self_consistent = .FALSE.
     150              :       LOGICAL                              :: orthogonal_basis = .FALSE.
     151              :       LOGICAL                              :: dispersion = .FALSE.
     152              :       INTEGER                              :: dispersion_type = 0
     153              :       LOGICAL                              :: dftb3_diagonal = .FALSE.
     154              :       LOGICAL                              :: hb_sr_damp = .FALSE.
     155              :       REAL(KIND=dp)                        :: hb_sr_para = 0.0_dp
     156              :       REAL(KIND=dp)                        :: eps_disp = 0.0_dp
     157              :       REAL(KIND=dp)                        :: epscn = 0.0_dp
     158              :       REAL(KIND=dp)                        :: exp_pre = 0.0_dp
     159              :       REAL(KIND=dp)                        :: scaling = 0.0_dp
     160              :       REAL(KIND=dp)                        :: rcdisp = 0.0_dp
     161              :       REAL(KIND=dp), DIMENSION(3)          :: sd3 = 0.0_dp
     162              :       REAL(KIND=dp), DIMENSION(4)          :: sd3bj = 0.0_dp
     163              :       LOGICAL                              :: do_ewald = .FALSE.
     164              :       CHARACTER(LEN=default_path_length)   :: sk_file_path = ""
     165              :       CHARACTER(LEN=default_path_length)   :: sk_file_list = ""
     166              :       CHARACTER(LEN=default_string_length), &
     167              :          DIMENSION(:, :), POINTER          :: sk_pair_list => NULL()
     168              :       CHARACTER(LEN=default_path_length)   :: uff_force_field = ""
     169              :       CHARACTER(LEN=default_path_length)   :: dispersion_parameter_file = ""
     170              :    END TYPE dftb_control_type
     171              : 
     172              : ! **************************************************************************************************
     173              : ! \brief Control parameters for xTB calculations
     174              : ! **************************************************************************************************
     175              :    TYPE xtb_control_type
     176              :       !
     177              :       INTEGER                              :: gfn_type = 1
     178              :       !
     179              :       LOGICAL                              :: do_ewald = .FALSE.
     180              :       LOGICAL                              :: do_tblite = .FALSE.
     181              :       !
     182              :       INTEGER                              :: sto_ng = 0
     183              :       INTEGER                              :: h_sto_ng = 0
     184              :       INTEGER                              :: tblite_method = 0
     185              :       !
     186              :       INTEGER                              :: vdw_type = -1
     187              :       CHARACTER(LEN=default_path_length)   :: parameter_file_path = ""
     188              :       CHARACTER(LEN=default_path_length)   :: parameter_file_name = ""
     189              :       !
     190              :       CHARACTER(LEN=default_path_length)   :: dispersion_parameter_file = ""
     191              :       REAL(KIND=dp)                        :: epscn = 0.0_dp
     192              :       REAL(KIND=dp)                        :: rcdisp = 0.0_dp
     193              :       REAL(KIND=dp)                        :: s6 = 0.0_dp, s8 = 0.0_dp
     194              :       REAL(KIND=dp)                        :: a1 = 0.0_dp, a2 = 0.0_dp
     195              :       !
     196              :       REAL(KIND=dp)                        :: ks = 0.0_dp, kp = 0.0_dp, kd = 0.0_dp, ksp = 0.0_dp, k2sh = 0.0_dp
     197              :       REAL(KIND=dp)                        :: kg = 0.0_dp, kf = 0.0_dp
     198              :       REAL(KIND=dp)                        :: kcns = 0.0_dp, kcnp = 0.0_dp, kcnd = 0.0_dp
     199              :       REAL(KIND=dp)                        :: ken = 0.0_dp
     200              :       REAL(KIND=dp)                        :: ksen = 0.0_dp, kpen = 0.0_dp, kden = 0.0_dp
     201              :       REAL(KIND=dp)                        :: ben = 0.0_dp
     202              :       REAL(KIND=dp)                        :: kxr = 0.0_dp, kx2 = 0.0_dp
     203              :       REAL(KIND=dp)                        :: enscale = 0.0_dp
     204              :       !
     205              :       LOGICAL                              :: xb_interaction = .FALSE.
     206              :       LOGICAL                              :: do_nonbonded = .FALSE.
     207              :       LOGICAL                              :: coulomb_interaction = .FALSE.
     208              :       LOGICAL                              :: coulomb_lr = .FALSE.
     209              :       LOGICAL                              :: tb3_interaction = .FALSE.
     210              :       LOGICAL                              :: check_atomic_charges = .FALSE.
     211              :       LOGICAL                              :: var_dipole = .FALSE.
     212              :       !
     213              :       REAL(KIND=dp)                        :: xb_radius = 0.0_dp
     214              :       REAL(KIND=dp)                        :: coulomb_sr_cut = 0.0_dp
     215              :       REAL(KIND=dp)                        :: coulomb_sr_eps = 0.0_dp
     216              :       !
     217              :       CHARACTER(LEN=default_string_length), &
     218              :          DIMENSION(:, :), POINTER          :: kab_param => NULL()
     219              :       INTEGER, DIMENSION(:, :), POINTER    :: kab_types => NULL()
     220              :       INTEGER                              :: kab_nval = 0
     221              :       REAL, DIMENSION(:), POINTER          :: kab_vals => NULL()
     222              :       !
     223              :       TYPE(pair_potential_p_type), POINTER :: nonbonded => NULL()
     224              :       REAL(KIND=dp)                        :: eps_pair = 0.0_dp
     225              :       REAL(KIND=dp), DIMENSION(:, :), &
     226              :          POINTER                           :: rcpair => NULL()
     227              :       !
     228              :       ! SRB terms
     229              :       REAL(KIND=dp)                        :: ksrb = 0.0_dp, esrb = 0.0_dp, gscal = 0.0_dp
     230              :       REAL(KIND=dp)                        :: c1srb = 0.0_dp, c2srb = 0.0_dp, shift = 0.0_dp
     231              :       !
     232              :       ! EN shift in EEQ (molecular=1 or crystaline=2)
     233              :       INTEGER                              :: enshift_type = 1
     234              :       TYPE(eeq_solver_type)                :: eeq_sparam ! parameters for EEQ solver
     235              :    END TYPE xtb_control_type
     236              : 
     237              : ! **************************************************************************************************
     238              : ! \brief Control parameters for semi empirical calculations
     239              : ! **************************************************************************************************
     240              :    TYPE semi_empirical_control_type
     241              :       LOGICAL                              :: orthogonal_basis = .FALSE.
     242              :       LOGICAL                              :: analytical_gradients = .FALSE.
     243              :       LOGICAL                              :: force_kdsod_EX = .FALSE.
     244              :       LOGICAL                              :: do_ewald = .FALSE., do_ewald_r3 = .FALSE., do_ewald_gks = .FALSE.
     245              :       INTEGER                              :: integral_screening = 0, periodic_type = 0
     246              :       INTEGER                              :: max_multipole = 0
     247              :       INTEGER                              :: ga_ncells = 0
     248              :       REAL(KIND=dp)                        :: delta = 0.0_dp
     249              :       ! Dispersion pair potential
     250              :       LOGICAL                              :: dispersion = .FALSE.
     251              :       REAL(KIND=dp)                        :: rcdisp = 0.0_dp
     252              :       REAL(KIND=dp)                        :: epscn = 0.0_dp
     253              :       REAL(KIND=dp), DIMENSION(3)          :: sd3 = 0.0_dp
     254              :       CHARACTER(LEN=default_path_length)   :: dispersion_parameter_file = ""
     255              :       ! Parameters controlling the evaluation of the integrals
     256              :       REAL(KIND=dp)                        :: cutoff_lrc = 0.0_dp, taper_lrc = 0.0_dp, range_lrc = 0.0_dp
     257              :       REAL(KIND=dp)                        :: cutoff_cou = 0.0_dp, taper_cou = 0.0_dp, range_cou = 0.0_dp
     258              :       REAL(KIND=dp)                        :: cutoff_exc = 0.0_dp, taper_exc = 0.0_dp, range_exc = 0.0_dp
     259              :       REAL(KIND=dp)                        :: taper_scr = 0.0_dp, range_scr = 0.0_dp
     260              :    END TYPE semi_empirical_control_type
     261              : 
     262              : ! **************************************************************************************************
     263              : ! \brief Control parameters for GAPW method within QUICKSTEP ***
     264              : ! **************************************************************************************************
     265              :    TYPE gapw_control_type
     266              :       INTEGER                              :: basis_1c = 0
     267              :       REAL(KIND=dp)                        :: eps_fit = 0.0_dp, &
     268              :                                               eps_iso = 0.0_dp, &
     269              :                                               eps_Vrho0 = 0.0_dp, &
     270              :                                               eps_svd = 0.0_dp, &
     271              :                                               eps_cpc = 0.0_dp
     272              :       INTEGER                              :: ladd_rho0 = 0, &
     273              :                                               lmax_rho0 = 0, &
     274              :                                               lmax_sphere = 0, &
     275              :                                               quadrature = 0
     276              :       LOGICAL                              :: alpha0_hard_from_input = .FALSE., &
     277              :                                               force_paw = .FALSE., &
     278              :                                               non_paw_atoms = .FALSE., &
     279              :                                               nopaw_as_gpw = .FALSE.
     280              :       REAL(KIND=dp)                        :: alpha0_hard = 0.0_dp
     281              :       REAL(KIND=dp)                        :: max_rad_local = 0.0_dp
     282              :    END TYPE gapw_control_type
     283              : 
     284              : ! **************************************************************************************************
     285              : ! \brief parameters for calculations involving a time dependent electric field
     286              : ! **************************************************************************************************
     287              :    TYPE efield_type
     288              :       REAL(KIND=dp)                        :: actual_time = 0.0_dp
     289              :       REAL(KIND=dp), DIMENSION(:), POINTER :: polarisation => NULL()
     290              :       INTEGER                              :: envelop_id = 0
     291              :       REAL(KIND=dp), DIMENSION(:), POINTER :: envelop_r_vars => NULL()
     292              :       INTEGER, DIMENSION(:), POINTER       :: envelop_i_vars => NULL()
     293              :       REAL(KIND=dp)                        :: strength = 0.0_dp
     294              :       REAL(KIND=dp)                        :: phase_offset = 0.0_dp
     295              :       REAL(KIND=dp)                        :: wavelength = 0.0_dp
     296              :       REAL(KIND=dp), DIMENSION(3)          :: vec_pot_initial = 0.0_dp
     297              :    END TYPE efield_type
     298              : 
     299              :    TYPE efield_p_type
     300              :       TYPE(efield_type), POINTER           :: efield => NULL()
     301              :    END TYPE efield_p_type
     302              : 
     303              : ! **************************************************************************************************
     304              : ! \brief parameters for calculations involving a time dependent electric field
     305              : ! **************************************************************************************************
     306              :    TYPE period_efield_type
     307              :       LOGICAL                              :: displacement_field = .FALSE.
     308              :       REAL(KIND=dp), DIMENSION(3)          :: polarisation = 0.0_dp
     309              :       REAL(KIND=dp), DIMENSION(3)          :: d_filter = 0.0_dp
     310              :       REAL(KIND=dp)                        :: strength = 0.0_dp
     311              :       REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: strength_list
     312              :       INTEGER                              :: start_frame = 0
     313              :       INTEGER                              :: end_frame = -1
     314              :    END TYPE period_efield_type
     315              : 
     316              : ! **************************************************************************************************
     317              : ! \brief some parameters useful for mulliken_restraints
     318              : ! **************************************************************************************************
     319              :    TYPE mulliken_restraint_type
     320              :       REAL(KIND=dp)                        :: strength = 0.0_dp
     321              :       REAL(KIND=dp)                        :: TARGET = 0.0_dp
     322              :       INTEGER                              :: natoms = 0
     323              :       INTEGER, POINTER, DIMENSION(:)       :: atoms => NULL()
     324              :    END TYPE mulliken_restraint_type
     325              : 
     326              : ! **************************************************************************************************
     327              : ! \brief some parameters useful for ddapc_restraints
     328              : ! **************************************************************************************************
     329              :    TYPE ddapc_restraint_type
     330              :       INTEGER                              :: ref_count = 0
     331              :       REAL(KIND=dp)                        :: strength = 0.0_dp
     332              :       REAL(KIND=dp)                        :: TARGET = 0.0_dp
     333              :       REAL(KIND=dp)                        :: ddapc_order_p = 0.0_dp
     334              :       INTEGER                              :: functional_form = 0
     335              :       INTEGER                              :: natoms = 0
     336              :       INTEGER, POINTER, DIMENSION(:)       :: atoms => NULL()
     337              :       REAL(KIND=dp), POINTER, DIMENSION(:) :: coeff => NULL()
     338              :       INTEGER                              :: density_type = 0
     339              :    END TYPE ddapc_restraint_type
     340              : 
     341              : ! **************************************************************************************************
     342              : ! \brief some parameters useful for s2_restraints
     343              : ! **************************************************************************************************
     344              :    TYPE s2_restraint_type
     345              :       REAL(KIND=dp)                        :: strength = 0.0_dp
     346              :       REAL(KIND=dp)                        :: TARGET = 0.0_dp
     347              :       REAL(KIND=dp)                        :: s2_order_p = 0.0_dp
     348              :       INTEGER                              :: functional_form = 0
     349              :    END TYPE s2_restraint_type
     350              : 
     351              : ! **************************************************************************************************
     352              : ! \brief some parameters useful for auxiliary density matrix method
     353              : ! **************************************************************************************************
     354              :    TYPE admm_block_type
     355              :       INTEGER, DIMENSION(:), ALLOCATABLE   :: list
     356              :    END TYPE admm_block_type
     357              : 
     358              :    TYPE admm_control_type
     359              :       REAL(KIND=dp)                        :: eps_filter = 0.0_dp
     360              :       INTEGER                              :: admm_type = 0
     361              :       INTEGER                              :: purification_method = 0
     362              :       INTEGER                              :: method = 0
     363              :       LOGICAL                              :: charge_constrain = .FALSE.
     364              :       INTEGER                              :: scaling_model = 0
     365              :       INTEGER                              :: aux_exch_func = 0
     366              :       LOGICAL                              :: aux_exch_func_param = .FALSE.
     367              :       REAL(KIND=dp), DIMENSION(3)          :: aux_x_param = 0.0_dp
     368              :       TYPE(admm_block_type), DIMENSION(:), &
     369              :          ALLOCATABLE                       :: blocks
     370              :    END TYPE admm_control_type
     371              : 
     372              : ! **************************************************************************************************
     373              : ! \brief Parameters for external potential
     374              : ! **************************************************************************************************
     375              :    TYPE expot_control_type
     376              :       LOGICAL                              :: read_from_cube = .FALSE.
     377              :       LOGICAL                              :: maxwell_solver = .FALSE.
     378              :       LOGICAL                              :: static = .FALSE.
     379              :       REAL(KIND=dp)                        :: scaling_factor = 0.0_dp
     380              :    END TYPE expot_control_type
     381              : 
     382              : ! **************************************************************************************************
     383              : ! \brief Parameters useful for Maxwell equation evaluation of external potential
     384              : ! **************************************************************************************************
     385              :    TYPE maxwell_control_type
     386              :       LOGICAL                              :: log_test = .FALSE.
     387              :       INTEGER                              :: int_test = 0
     388              :       REAL(KIND=dp)                        :: real_test = 0.0_dp
     389              :    END TYPE maxwell_control_type
     390              : 
     391              : ! **************************************************************************************************
     392              : ! \brief Control parameters for a QUICKSTEP and KIM-GORDON calculation ***
     393              : !        eps_pgf_orb: Cutoff value for the interaction of the primitive
     394              : !                     Gaussian-type functions (primitive basis functions).
     395              : ! **************************************************************************************************
     396              :    TYPE qs_control_type
     397              :       INTEGER                              :: method_id = 0
     398              :       REAL(KIND=dp)                        :: eps_core_charge = 0.0_dp, &
     399              :                                               eps_kg_orb = 0.0_dp, &
     400              :                                               eps_pgf_orb = 0.0_dp, &
     401              :                                               eps_ppl = 0.0_dp, &
     402              :                                               eps_ppnl = 0.0_dp, &
     403              :                                               eps_rho_gspace = 0.0_dp, &
     404              :                                               eps_rho_rspace = 0.0_dp, &
     405              :                                               eps_filter_matrix = 0.0_dp, &
     406              :                                               eps_gvg_rspace = 0.0_dp, &
     407              :                                               progression_factor = 0.0_dp, &
     408              :                                               relative_cutoff = 0.0_dp
     409              :       LOGICAL                              :: do_almo_scf = .FALSE.
     410              :       LOGICAL                              :: do_ls_scf = .FALSE.
     411              :       LOGICAL                              :: do_kg = .FALSE.
     412              :       LOGICAL                              :: commensurate_mgrids = .FALSE.
     413              :       LOGICAL                              :: realspace_mgrids = .FALSE.
     414              :       LOGICAL                              :: gapw = .FALSE., gapw_xc = .FALSE., gpw = .FALSE., pao = .FALSE.
     415              :       LOGICAL                              :: lrigpw = .FALSE., rigpw = .FALSE.
     416              :       LOGICAL                              :: lri_optbas = .FALSE.
     417              :       LOGICAL                              :: ofgpw = .FALSE.
     418              :       LOGICAL                              :: dftb = .FALSE.
     419              :       LOGICAL                              :: xtb = .FALSE.
     420              :       LOGICAL                              :: semi_empirical = .FALSE.
     421              :       LOGICAL                              :: mulliken_restraint = .FALSE.
     422              :       LOGICAL                              :: ddapc_restraint = .FALSE.
     423              :       LOGICAL                              :: ddapc_restraint_is_spin = .FALSE.
     424              :       LOGICAL                              :: ddapc_explicit_potential = .FALSE.
     425              :       LOGICAL                              :: cdft = .FALSE.
     426              :       LOGICAL                              :: et_coupling_calc = .FALSE.
     427              :       LOGICAL                              :: s2_restraint = .FALSE.
     428              :       INTEGER                              :: do_ppl_method = 0
     429              :       INTEGER                              :: wf_interpolation_method_nr = 0
     430              :       INTEGER                              :: wf_extrapolation_order = 0
     431              :       INTEGER                              :: periodicity = 0
     432              :       REAL(KIND=dp)                        :: pairlist_radius = 0.0_dp
     433              :       REAL(KIND=dp)                        :: cutoff = 0.0_dp
     434              :       REAL(KIND=dp), DIMENSION(:), POINTER :: e_cutoff => NULL()
     435              :       TYPE(mulliken_restraint_type), &
     436              :          POINTER                           :: mulliken_restraint_control => NULL()
     437              :       TYPE(ddapc_restraint_type), &
     438              :          DIMENSION(:), POINTER             :: ddapc_restraint_control => NULL()
     439              :       TYPE(cdft_control_type), POINTER     :: cdft_control => NULL()
     440              :       TYPE(s2_restraint_type), POINTER     :: s2_restraint_control => NULL()
     441              :       TYPE(dftb_control_type), POINTER     :: dftb_control => NULL()
     442              :       TYPE(xtb_control_type), POINTER      :: xtb_control => NULL()
     443              :       TYPE(semi_empirical_control_type), &
     444              :          POINTER                           :: se_control => NULL()
     445              :       TYPE(gapw_control_type), POINTER     :: gapw_control => NULL()
     446              :       TYPE(pw_grid_option)                 :: pw_grid_opt = pw_grid_option()
     447              :       LOGICAL                              :: skip_load_balance_distributed = .FALSE.
     448              :       ! Types of subsystems for embedding
     449              :       LOGICAL                              :: ref_embed_subsys = .FALSE.
     450              :       LOGICAL                              :: cluster_embed_subsys = .FALSE.
     451              :       LOGICAL                              :: high_level_embed_subsys = .FALSE.
     452              :       LOGICAL                              :: dfet_embedded = .FALSE.
     453              :       LOGICAL                              :: dmfet_embedded = .FALSE.
     454              :    END TYPE qs_control_type
     455              : 
     456              : ! **************************************************************************************************
     457              : ! \brief Control parameters for the SCCS models
     458              : ! **************************************************************************************************
     459              :    TYPE sccs_control_type
     460              :       LOGICAL                              :: sccs_activated = .FALSE.
     461              :       INTEGER                              :: derivative_method = 0, &
     462              :                                               max_iter = 0, &
     463              :                                               method_id = 0
     464              :       REAL(KIND=dp)                        :: alpha_solvent = 0.0_dp, &
     465              :                                               beta = 0.0_dp, &
     466              :                                               beta_solvent = 0.0_dp, &
     467              :                                               delta_rho = 0.0_dp, &
     468              :                                               eps_sccs = 0.0_dp, &
     469              :                                               eps_scf = 0.0_dp, &
     470              :                                               epsilon_solvent = 0.0_dp, &
     471              :                                               gamma_solvent = 0.0_dp, &
     472              :                                               mixing = 0.0_dp, &
     473              :                                               rho_zero = 0.0_dp, &
     474              :                                               rho_max = 0.0_dp, &
     475              :                                               rho_min = 0.0_dp
     476              :    END TYPE sccs_control_type
     477              : 
     478              : ! **************************************************************************************************
     479              : ! \brief Control parameters for simplified Tamm Dancoff approximation (sTDA)
     480              : ! \par  ATTRIBUTES
     481              : ! \par  NOTES
     482              : ! **************************************************************************************************
     483              :    TYPE stda_control_type
     484              :       LOGICAL                                :: do_ewald = .FALSE.
     485              :       LOGICAL                                :: do_exchange = .FALSE.
     486              :       REAL(KIND=dp)                          :: hfx_fraction = 0.0_dp
     487              :       REAL(KIND=dp)                          :: eps_td_filter = 0.0_dp
     488              :       REAL(KIND=dp)                          :: mn_alpha = 0.0_dp
     489              :       REAL(KIND=dp)                          :: mn_beta = 0.0_dp
     490              :       REAL(KIND=dp)                          :: coulomb_sr_cut = 0.0_dp
     491              :       REAL(KIND=dp)                          :: coulomb_sr_eps = 0.0_dp
     492              :    END TYPE stda_control_type
     493              : 
     494              : ! **************************************************************************************************
     495              : ! \brief Control parameters for smeared occupation
     496              : ! \par  ATTRIBUTES
     497              : ! \par  NOTES
     498              : ! **************************************************************************************************
     499              :    TYPE smeared_type
     500              :       REAL(KIND=dp), DIMENSION(:), POINTER :: fermia => NULL()
     501              :       REAL(KIND=dp), DIMENSION(:, :), POINTER :: fermib => NULL()
     502              :    END TYPE smeared_type
     503              : 
     504              : ! **************************************************************************************************
     505              : ! \brief Control parameters for a Time-Dependent DFT calculation.
     506              : ! **************************************************************************************************
     507              :    TYPE tddfpt2_control_type
     508              :       !> compute TDDFPT excitation energies and oscillator strengths
     509              :       LOGICAL                              :: enabled = .FALSE.
     510              :       !> number of excited states to converge
     511              :       INTEGER                              :: nstates = 0
     512              :       !> maximal number of iterations to be performed
     513              :       INTEGER                              :: niters = 0
     514              :       !> maximal number of Krylov space vectors
     515              :       INTEGER                              :: nkvs = 0
     516              :       !> number of unoccupied (virtual) molecular orbitals to consider
     517              :       INTEGER                              :: nlumo = 0
     518              :       !> minimal number of MPI processes to be used per excited state
     519              :       INTEGER                              :: nprocs = 0
     520              :       !> type of kernel function/approximation to use
     521              :       INTEGER                              :: kernel = 0
     522              :       !> type of spin excitations to compute
     523              :       INTEGER                              :: spinflip = 0
     524              :       !> for full kernel, do we have HFX/ADMM
     525              :       LOGICAL                              :: do_hfx = .FALSE.
     526              :       LOGICAL                              :: do_admm = .FALSE.
     527              :       !> for full kernel, do we have short-range/long-range HFX and/or Kxc potential
     528              :       LOGICAL                              :: do_hfxsr = .FALSE.
     529              :       LOGICAL                              :: hfxsr_re_int = .TRUE.
     530              :       INTEGER                              :: hfxsr_primbas = 0
     531              :       LOGICAL                              :: do_hfxlr = .FALSE.
     532              :       REAL(KIND=dp)                        :: hfxlr_rcut = 0.0_dp, hfxlr_scale = 0.0_dp
     533              :       LOGICAL                              :: do_exck = .FALSE.
     534              :       !> options used in sTDA calculation (Kernel)
     535              :       TYPE(stda_control_type)              :: stda_control = stda_control_type()
     536              :       !> algorithm to correct orbital energies
     537              :       INTEGER                              :: oe_corr = 0
     538              :       !> eigenvalue shifts
     539              :       REAL(KIND=dp)                        :: ev_shift = 0.0_dp, eos_shift = 0.0_dp
     540              :       !> active orbitals
     541              :       INTEGER, DIMENSION(2)                :: nactive = -1
     542              :       !> target accuracy
     543              :       REAL(kind=dp)                        :: conv = 0.0_dp
     544              :       !> the smallest excitation amplitude to print
     545              :       REAL(kind=dp)                        :: min_excitation_amplitude = 0.0_dp
     546              :       !> threshold which controls when two wave functions considered to be orthogonal:
     547              :       !> maxabs(Ci^T * S * Cj) <= orthogonal_eps
     548              :       REAL(kind=dp)                        :: orthogonal_eps = 0.0_dp
     549              :       !> read guess wave functions from restart file if exists
     550              :       LOGICAL                              :: is_restart = .FALSE.
     551              :       !> compute triplet excited states using spin-unpolarised molecular orbitals
     552              :       LOGICAL                              :: rks_triplets = .FALSE.
     553              :       !> local resolution of identity for Coulomb contribution
     554              :       LOGICAL                              :: do_lrigpw = .FALSE.
     555              :       !> smeared occupation
     556              :       LOGICAL                              :: do_smearing = .FALSE.
     557              :       !> dynamical correlation
     558              :       LOGICAL                              :: do_bse = .FALSE.
     559              :       ! automatic generation of auxiliary basis for LRI-TDDFT
     560              :       INTEGER                              :: auto_basis_p_lri_aux = 1
     561              :       !> use symmetric definition of ADMM Kernel correction
     562              :       LOGICAL                              :: admm_symm = .FALSE.
     563              :       !> Use/Ignore possible ADMM Kernel XC correction
     564              :       LOGICAL                              :: admm_xc_correction = .FALSE.
     565              :       ! Compute exciton descriptors
     566              :       LOGICAL                              :: do_exciton_descriptors = .FALSE.
     567              :       LOGICAL                              :: do_directional_exciton_descriptors = .FALSE.
     568              :       !
     569              :       ! DIPOLE_MOMENTS subsection
     570              :       !
     571              :       ! form of the dipole operator used to compute oscillator strengths
     572              :       INTEGER                              :: dipole_form = 0
     573              :       !> type of the reference point used for calculation of electrostatic dipole moments
     574              :       INTEGER                              :: dipole_reference = 0
     575              :       !> user-defined reference point
     576              :       REAL(kind=dp), DIMENSION(:), POINTER :: dipole_ref_point => NULL()
     577              :       !
     578              :       ! SOC subsection
     579              :       LOGICAL                              :: do_soc = .FALSE.
     580              :       !
     581              :       ! MGRID subsection
     582              :       !
     583              :       !> number of plain-wave grids
     584              :       INTEGER                              :: mgrid_ngrids = 0
     585              :       !> create commensurate grids (progression factor and cutoff values of sub-grids will be ignored)
     586              :       LOGICAL                              :: mgrid_commensurate_mgrids = .FALSE.
     587              :       !> signals that MGRID section has been explicitly given. Other mgrid_* variables
     588              :       !> are not initialised when it is equal to .FALSE. as in this case the default
     589              :       !> set of plain-wave grids will be used
     590              :       LOGICAL                              :: mgrid_is_explicit = .FALSE.
     591              :       !> same as qs_control%realspace_mgrids
     592              :       LOGICAL                              :: mgrid_realspace_mgrids = .FALSE.
     593              :       !> do not perform load balancing
     594              :       LOGICAL                              :: mgrid_skip_load_balance = .FALSE.
     595              :       !> cutoff value at the finest grid level
     596              :       REAL(kind=dp)                        :: mgrid_cutoff = 0.0_dp
     597              :       !> cutoff at the next grid level will be smaller then the cutoff
     598              :       !> at the current grid by this number of times
     599              :       REAL(kind=dp)                        :: mgrid_progression_factor = 0.0_dp
     600              :       !> cutoff that determines to which grid a particular Gaussian function will be mapped
     601              :       REAL(kind=dp)                        :: mgrid_relative_cutoff = 0.0_dp
     602              :       !> manually provided the list of cutoff values for each grid level
     603              :       !> (when it is null(), the cutoff values will be assigned automatically)
     604              :       REAL(kind=dp), DIMENSION(:), POINTER :: mgrid_e_cutoff => NULL()
     605              :       !> Parameter for smeared occupation TDA
     606              :       TYPE(smeared_type), DIMENSION(:), POINTER :: smeared_occup => NULL()
     607              :    END TYPE tddfpt2_control_type
     608              : 
     609              : ! **************************************************************************************************
     610              : !> \brief
     611              : ! **************************************************************************************************
     612              :    TYPE rixs_control_type
     613              : 
     614              :       LOGICAL                              :: enabled = .FALSE.
     615              :       INTEGER                              :: core_states = 0
     616              :       INTEGER                              :: valence_states = 0
     617              : 
     618              :       TYPE(tddfpt2_control_type), POINTER     :: tddfpt2_control => NULL()
     619              :       TYPE(xas_tdp_control_type), POINTER     :: xas_tdp_control => NULL()
     620              : 
     621              :    END TYPE rixs_control_type
     622              : 
     623              : ! **************************************************************************************************
     624              : ! \brief Control parameters for a DFT calculation
     625              : ! \par History
     626              : !      10.2019 added variables related to surface dipole correction [Soumya Ghosh]
     627              : ! **************************************************************************************************
     628              :    TYPE dft_control_type
     629              :       TYPE(admm_control_type), POINTER     :: admm_control => NULL()
     630              :       TYPE(period_efield_type), POINTER    :: period_efield => NULL()
     631              :       TYPE(qs_control_type), POINTER       :: qs_control => NULL()
     632              :       TYPE(rtp_control_type), POINTER      :: rtp_control => NULL()
     633              :       TYPE(sccs_control_type), POINTER     :: sccs_control => NULL()
     634              :       TYPE(tddfpt2_control_type), POINTER  :: tddfpt2_control => NULL()
     635              :       TYPE(rixs_control_type), POINTER     :: rixs_control => NULL()
     636              :       TYPE(xas_control_type), POINTER      :: xas_control => NULL()
     637              :       TYPE(expot_control_type), POINTER    :: expot_control => NULL()
     638              :       TYPE(maxwell_control_type), POINTER  :: maxwell_control => NULL()
     639              :       TYPE(smeagol_control_type), POINTER  :: smeagol_control => NULL()
     640              :       TYPE(efield_p_type), POINTER, &
     641              :          DIMENSION(:)                      :: efield_fields => NULL()
     642              :       TYPE(hairy_probes_type), POINTER, &
     643              :          DIMENSION(:)                      :: probe => NULL()
     644              :       INTEGER                              :: nspins = 0, &
     645              :                                               charge = 0, &
     646              :                                               multiplicity = 0, &
     647              :                                               sic_method_id = 0, &
     648              :                                               plus_u_method_id = 0, &
     649              :                                               dir_surf_dip = 0, &
     650              :                                               nimages = 1
     651              :       INTEGER                              :: sic_list_id = 0
     652              :       INTEGER                              :: auto_basis_ri_aux = 1, &
     653              :                                               auto_basis_aux_fit = 1, &
     654              :                                               auto_basis_lri_aux = 1, &
     655              :                                               auto_basis_p_lri_aux = 1, &
     656              :                                               auto_basis_ri_hxc = 1, &
     657              :                                               auto_basis_ri_xas = 1, &
     658              :                                               auto_basis_ri_hfx = 1
     659              :       REAL(KIND=dp)                        :: relax_multiplicity = 0.0_dp, &
     660              :                                               sic_scaling_a = 0.0_dp, &
     661              :                                               sic_scaling_b = 0.0_dp, &
     662              :                                               pos_dir_surf_dip = 0.0_dp
     663              :       LOGICAL                              :: do_xas_calculation = .FALSE., &
     664              :                                               do_xas_tdp_calculation = .FALSE., &
     665              :                                               drho_by_collocation = .FALSE., &
     666              :                                               use_kinetic_energy_density = .FALSE., &
     667              :                                               restricted = .FALSE., &
     668              :                                               roks = .FALSE., &
     669              :                                               uks = .FALSE., &
     670              :                                               lsd = .FALSE., &
     671              :                                               dft_plus_u = .FALSE., &
     672              :                                               apply_efield = .FALSE., &
     673              :                                               apply_efield_field = .FALSE., &
     674              :                                               apply_vector_potential = .FALSE., &
     675              :                                               apply_period_efield = .FALSE., &
     676              :                                               apply_external_potential = .FALSE., &
     677              :                                               eval_external_potential = .FALSE., &
     678              :                                               do_admm = .FALSE., &
     679              :                                               do_admm_dm = .FALSE., &
     680              :                                               do_admm_mo = .FALSE., &
     681              :                                               smear = .FALSE., &
     682              :                                               low_spin_roks = .FALSE., &
     683              :                                               apply_external_density = .FALSE., &
     684              :                                               read_external_density = .FALSE., &
     685              :                                               apply_external_vxc = .FALSE., &
     686              :                                               read_external_vxc = .FALSE., &
     687              :                                               correct_surf_dip = .FALSE., &
     688              :                                               surf_dip_correct_switch = .FALSE., &
     689              :                                               switch_surf_dip = .FALSE., &
     690              :                                               correct_el_density_dip = .FALSE., &
     691              :                                               do_sccs = .FALSE., &
     692              :                                               apply_embed_pot = .FALSE., &
     693              :                                               apply_dmfet_pot = .FALSE., &
     694              :                                               hairy_probes = .FALSE.
     695              :    END TYPE dft_control_type
     696              : 
     697              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_control_types'
     698              : 
     699              :    ! Public data types
     700              : 
     701              :    PUBLIC :: dft_control_type, &
     702              :              qs_control_type, &
     703              :              gapw_control_type, &
     704              :              tddfpt2_control_type, &
     705              :              rixs_control_type, &
     706              :              proj_mo_type, &
     707              :              efield_type, &
     708              :              mulliken_restraint_type, &
     709              :              ddapc_restraint_type, &
     710              :              dftb_control_type, &
     711              :              xtb_control_type, &
     712              :              semi_empirical_control_type, &
     713              :              s2_restraint_type, &
     714              :              admm_control_type, &
     715              :              maxwell_control_type, &
     716              :              expot_control_type, &
     717              :              rtp_control_type, &
     718              :              sccs_control_type, &
     719              :              stda_control_type, &
     720              :              smeared_type, &
     721              :              hairy_probes_type
     722              : 
     723              :    ! Public subroutines
     724              : 
     725              :    PUBLIC :: dft_control_release, &
     726              :              dft_control_create, &
     727              :              admm_control_create, &
     728              :              admm_control_release, &
     729              :              maxwell_control_create, &
     730              :              expot_control_create, &
     731              :              ddapc_control_create, &
     732              :              rixs_control_create, &
     733              :              rixs_control_release
     734              : 
     735              : CONTAINS
     736              : 
     737              : ! **************************************************************************************************
     738              : !> \brief create  the mulliken_restraint_type
     739              : !> \param mulliken_restraint_control ...
     740              : !> \par History
     741              : !>      02.2005 created [Joost VandeVondele]
     742              : ! **************************************************************************************************
     743         7452 :    SUBROUTINE mulliken_control_create(mulliken_restraint_control)
     744              :       TYPE(mulliken_restraint_type), INTENT(OUT)         :: mulliken_restraint_control
     745              : 
     746         7452 :       mulliken_restraint_control%strength = 0.1_dp
     747         7452 :       mulliken_restraint_control%target = 1.0_dp
     748              :       mulliken_restraint_control%natoms = 0
     749              :       NULLIFY (mulliken_restraint_control%atoms)
     750         7452 :    END SUBROUTINE mulliken_control_create
     751              : 
     752              : ! **************************************************************************************************
     753              : !> \brief release the mulliken_restraint_type
     754              : !> \param mulliken_restraint_control ...
     755              : !> \par History
     756              : !>      02.2005 created [Joost VandeVondele]
     757              : ! **************************************************************************************************
     758         7452 :    SUBROUTINE mulliken_control_release(mulliken_restraint_control)
     759              :       TYPE(mulliken_restraint_type), INTENT(INOUT)       :: mulliken_restraint_control
     760              : 
     761         7452 :       IF (ASSOCIATED(mulliken_restraint_control%atoms)) &
     762            2 :          DEALLOCATE (mulliken_restraint_control%atoms)
     763         7452 :       mulliken_restraint_control%strength = 0.0_dp
     764         7452 :       mulliken_restraint_control%target = 0.0_dp
     765         7452 :       mulliken_restraint_control%natoms = 0
     766         7452 :    END SUBROUTINE mulliken_control_release
     767              : 
     768              : ! **************************************************************************************************
     769              : !> \brief create the ddapc_restraint_type
     770              : !> \param ddapc_restraint_control ...
     771              : !> \par History
     772              : !>      02.2006 created [Joost VandeVondele]
     773              : ! **************************************************************************************************
     774           18 :    SUBROUTINE ddapc_control_create(ddapc_restraint_control)
     775              :       TYPE(ddapc_restraint_type), INTENT(OUT)            :: ddapc_restraint_control
     776              : 
     777              :       ddapc_restraint_control%density_type = do_full_density
     778           18 :       ddapc_restraint_control%strength = 0.1_dp
     779              :       ddapc_restraint_control%ddapc_order_p = 0.0_dp
     780           18 :       ddapc_restraint_control%functional_form = -1
     781           18 :       ddapc_restraint_control%target = 1.0_dp
     782              :       ddapc_restraint_control%natoms = 0
     783              :       NULLIFY (ddapc_restraint_control%atoms)
     784              :       NULLIFY (ddapc_restraint_control%coeff)
     785              : 
     786           18 :    END SUBROUTINE ddapc_control_create
     787              : 
     788              : ! **************************************************************************************************
     789              : !> \brief release the ddapc_restraint_type
     790              : !> \param ddapc_restraint_control ...
     791              : !> \par History
     792              : !>      02.2006 created [Joost VandeVondele]
     793              : ! **************************************************************************************************
     794           18 :    SUBROUTINE ddapc_control_release(ddapc_restraint_control)
     795              :       TYPE(ddapc_restraint_type), INTENT(INOUT)          :: ddapc_restraint_control
     796              : 
     797           18 :       IF (ASSOCIATED(ddapc_restraint_control%atoms)) &
     798           18 :          DEALLOCATE (ddapc_restraint_control%atoms)
     799           18 :       IF (ASSOCIATED(ddapc_restraint_control%coeff)) &
     800           18 :          DEALLOCATE (ddapc_restraint_control%coeff)
     801           18 :       ddapc_restraint_control%strength = 0.0_dp
     802           18 :       ddapc_restraint_control%target = 0.0_dp
     803           18 :       ddapc_restraint_control%natoms = 0
     804           18 :    END SUBROUTINE ddapc_control_release
     805              : 
     806              : ! **************************************************************************************************
     807              : !> \brief create the s2_restraint_type
     808              : !> \param s2_restraint_control ...
     809              : !> \par History
     810              : !>      03.2006 created [Joost VandeVondele]
     811              : ! **************************************************************************************************
     812         7452 :    SUBROUTINE s2_control_create(s2_restraint_control)
     813              :       TYPE(s2_restraint_type), INTENT(OUT)               :: s2_restraint_control
     814              : 
     815         7452 :       s2_restraint_control%strength = 0.1_dp
     816              :       s2_restraint_control%s2_order_p = 0.0_dp
     817         7452 :       s2_restraint_control%functional_form = -1
     818         7452 :       s2_restraint_control%target = 1.0_dp
     819         7452 :    END SUBROUTINE s2_control_create
     820              : 
     821              : ! **************************************************************************************************
     822              : !> \brief release the s2_restraint_type
     823              : !> \param s2_restraint_control ...
     824              : !> \par History
     825              : !>      03.2006 created [Joost VandeVondele]
     826              : ! **************************************************************************************************
     827         7452 :    SUBROUTINE s2_control_release(s2_restraint_control)
     828              :       TYPE(s2_restraint_type), INTENT(INOUT)             :: s2_restraint_control
     829              : 
     830         7452 :       s2_restraint_control%strength = 0.0_dp
     831         7452 :       s2_restraint_control%target = 0.0_dp
     832         7452 :    END SUBROUTINE s2_control_release
     833              : 
     834              : ! **************************************************************************************************
     835              : !> \brief allocates and perform a very basic initialization
     836              : !> \param dft_control the object to create
     837              : !> \par History
     838              : !>      02.2003 created [fawzi]
     839              : !> \author fawzi
     840              : ! **************************************************************************************************
     841         7452 :    SUBROUTINE dft_control_create(dft_control)
     842              :       TYPE(dft_control_type), INTENT(OUT)                :: dft_control
     843              : 
     844              :       NULLIFY (dft_control%xas_control)
     845              :       NULLIFY (dft_control%qs_control)
     846              :       NULLIFY (dft_control%tddfpt2_control)
     847              :       NULLIFY (dft_control%rixs_control)
     848              :       NULLIFY (dft_control%efield_fields)
     849              :       NULLIFY (dft_control%period_efield)
     850              :       NULLIFY (dft_control%admm_control)
     851              :       NULLIFY (dft_control%expot_control)
     852              :       NULLIFY (dft_control%maxwell_control)
     853              :       NULLIFY (dft_control%smeagol_control)
     854              :       NULLIFY (dft_control%rtp_control)
     855              :       NULLIFY (dft_control%sccs_control)
     856              :       NULLIFY (dft_control%probe)
     857              :       dft_control%do_sccs = .FALSE.
     858              :       dft_control%apply_embed_pot = .FALSE.
     859              :       dft_control%apply_dmfet_pot = .FALSE.
     860              :       dft_control%hairy_probes = .FALSE.
     861         7452 :       CALL qs_control_create(dft_control%qs_control)
     862         7452 :       CALL tddfpt2_control_create(dft_control%tddfpt2_control)
     863         7452 :       CALL rixs_control_create(dft_control%rixs_control)
     864         7452 :       CALL smeagol_control_create(dft_control%smeagol_control)
     865         7452 :    END SUBROUTINE dft_control_create
     866              : 
     867              : ! **************************************************************************************************
     868              : !> \brief ...
     869              : !> \param dft_control ...
     870              : !> \par History
     871              : !>      02.2003 created [fawzi]
     872              : !> \author fawzi
     873              : ! **************************************************************************************************
     874         7452 :    SUBROUTINE dft_control_release(dft_control)
     875              :       TYPE(dft_control_type), INTENT(INOUT)              :: dft_control
     876              : 
     877              :       INTEGER                                            :: i
     878              : 
     879         7452 :       CALL qs_control_release(dft_control%qs_control)
     880         7452 :       CALL tddfpt2_control_release(dft_control%tddfpt2_control)
     881         7452 :       CALL rixs_control_release(dft_control%rixs_control) ! maybe check first if allocated
     882         7452 :       IF (ASSOCIATED(dft_control%xas_control)) THEN
     883           42 :          CALL xas_control_release(dft_control%xas_control)
     884           42 :          DEALLOCATE (dft_control%xas_control)
     885              :       END IF
     886         7452 :       CALL admm_control_release(dft_control%admm_control)
     887         7452 :       CALL expot_control_release(dft_control%expot_control)
     888         7452 :       CALL maxwell_control_release(dft_control%maxwell_control)
     889         7452 :       CALL smeagol_control_release(dft_control%smeagol_control)
     890         7452 :       CALL efield_fields_release(dft_control%efield_fields)
     891         7452 :       IF (ASSOCIATED(dft_control%probe)) THEN
     892           12 :          DO i = 1, SIZE(dft_control%probe)
     893           12 :             DEALLOCATE (dft_control%probe(i)%atom_ids)
     894              :          END DO
     895            4 :          DEALLOCATE (dft_control%probe)
     896              :       END IF
     897         7452 :       IF (ASSOCIATED(dft_control%sccs_control)) DEALLOCATE (dft_control%sccs_control)
     898         7452 :       IF (ASSOCIATED(dft_control%period_efield)) THEN
     899           76 :          DEALLOCATE (dft_control%period_efield)
     900              :       END IF
     901         7452 :       IF (ASSOCIATED(dft_control%rtp_control)) THEN
     902          248 :          CALL proj_mo_list_release(dft_control%rtp_control%proj_mo_list)
     903          248 :          DEALLOCATE (dft_control%rtp_control)
     904              :       END IF
     905              : 
     906         7452 :    END SUBROUTINE dft_control_release
     907              : 
     908              : ! **************************************************************************************************
     909              : !> \brief ...
     910              : !> \param qs_control ...
     911              : ! **************************************************************************************************
     912         7452 :    SUBROUTINE qs_control_create(qs_control)
     913              :       TYPE(qs_control_type), POINTER                     :: qs_control
     914              : 
     915         7452 :       CPASSERT(.NOT. ASSOCIATED(qs_control))
     916        29808 :       ALLOCATE (qs_control)
     917              : 
     918              :       NULLIFY (qs_control%e_cutoff)
     919              :       NULLIFY (qs_control%gapw_control)
     920              :       NULLIFY (qs_control%mulliken_restraint_control)
     921              :       NULLIFY (qs_control%ddapc_restraint_control)
     922              :       NULLIFY (qs_control%s2_restraint_control)
     923              :       NULLIFY (qs_control%se_control)
     924              :       NULLIFY (qs_control%dftb_control)
     925              :       NULLIFY (qs_control%xtb_control)
     926              :       NULLIFY (qs_control%cdft_control)
     927              :       NULLIFY (qs_control%ddapc_restraint_control)
     928              : 
     929         7452 :       ALLOCATE (qs_control%mulliken_restraint_control)
     930         7452 :       CALL mulliken_control_create(qs_control%mulliken_restraint_control)
     931         7452 :       ALLOCATE (qs_control%s2_restraint_control)
     932         7452 :       CALL s2_control_create(qs_control%s2_restraint_control)
     933         7452 :       ALLOCATE (qs_control%gapw_control)
     934         7452 :       CALL se_control_create(qs_control%se_control)
     935         7452 :       CALL dftb_control_create(qs_control%dftb_control)
     936         7452 :       CALL xtb_control_create(qs_control%xtb_control)
     937        22356 :       ALLOCATE (qs_control%cdft_control)
     938         7452 :       CALL cdft_control_create(qs_control%cdft_control)
     939         7452 :    END SUBROUTINE qs_control_create
     940              : 
     941              : ! **************************************************************************************************
     942              : !> \brief ...
     943              : !> \param qs_control ...
     944              : ! **************************************************************************************************
     945         7452 :    SUBROUTINE qs_control_release(qs_control)
     946              :       TYPE(qs_control_type), POINTER                     :: qs_control
     947              : 
     948              :       INTEGER                                            :: i
     949              : 
     950         7452 :       IF (ASSOCIATED(qs_control)) THEN
     951         7452 :          CALL mulliken_control_release(qs_control%mulliken_restraint_control)
     952         7452 :          DEALLOCATE (qs_control%mulliken_restraint_control)
     953         7452 :          CALL s2_control_release(qs_control%s2_restraint_control)
     954         7452 :          DEALLOCATE (qs_control%s2_restraint_control)
     955         7452 :          CALL se_control_release(qs_control%se_control)
     956         7452 :          CALL dftb_control_release(qs_control%dftb_control)
     957         7452 :          CALL xtb_control_release(qs_control%xtb_control)
     958         7452 :          IF (ASSOCIATED(qs_control%cdft_control)) THEN
     959         7452 :             CALL cdft_control_release(qs_control%cdft_control)
     960         7452 :             DEALLOCATE (qs_control%cdft_control)
     961              :          END IF
     962              : 
     963         7452 :          IF (ASSOCIATED(qs_control%e_cutoff)) THEN
     964         7452 :             DEALLOCATE (qs_control%e_cutoff)
     965              :          END IF
     966         7452 :          IF (ASSOCIATED(qs_control%gapw_control)) THEN
     967         7452 :             DEALLOCATE (qs_control%gapw_control)
     968              :          END IF
     969         7452 :          IF (ASSOCIATED(qs_control%ddapc_restraint_control)) THEN
     970           32 :             DO i = 1, SIZE(qs_control%ddapc_restraint_control)
     971           32 :                CALL ddapc_control_release(qs_control%ddapc_restraint_control(i))
     972              :             END DO
     973           14 :             DEALLOCATE (qs_control%ddapc_restraint_control)
     974              :          END IF
     975         7452 :          DEALLOCATE (qs_control)
     976              :       END IF
     977         7452 :    END SUBROUTINE qs_control_release
     978              : 
     979              : ! **************************************************************************************************
     980              : !> \brief allocate control options for Time-Dependent Density Functional Theory calculation
     981              : !> \param tddfpt_control an object to create
     982              : !> \par History
     983              : !>    * 05.2016 created [Sergey Chulkov]
     984              : ! **************************************************************************************************
     985        29836 :    SUBROUTINE tddfpt2_control_create(tddfpt_control)
     986              :       TYPE(tddfpt2_control_type), POINTER                :: tddfpt_control
     987              : 
     988              :       CHARACTER(len=*), PARAMETER :: routineN = 'tddfpt2_control_create'
     989              : 
     990              :       INTEGER                                            :: handle
     991              : 
     992        14918 :       CPASSERT(.NOT. ASSOCIATED(tddfpt_control))
     993        14918 :       CALL timeset(routineN, handle)
     994              : 
     995        59672 :       ALLOCATE (tddfpt_control)
     996              :       tddfpt_control%do_soc = .FALSE.
     997              : 
     998        14918 :       CALL timestop(handle)
     999        14918 :    END SUBROUTINE tddfpt2_control_create
    1000              : 
    1001              : ! **************************************************************************************************
    1002              : !> \brief release memory allocated for TDDFT control options
    1003              : !> \param tddfpt_control an object to release
    1004              : !> \par History
    1005              : !>    * 05.2016 created [Sergey Chulkov]
    1006              : ! **************************************************************************************************
    1007        14918 :    SUBROUTINE tddfpt2_control_release(tddfpt_control)
    1008              :       TYPE(tddfpt2_control_type), POINTER                :: tddfpt_control
    1009              : 
    1010              :       CHARACTER(len=*), PARAMETER :: routineN = 'tddfpt2_control_release'
    1011              : 
    1012              :       INTEGER                                            :: handle
    1013              : 
    1014        14918 :       CALL timeset(routineN, handle)
    1015              : 
    1016        14918 :       IF (ASSOCIATED(tddfpt_control)) THEN
    1017        14918 :          DEALLOCATE (tddfpt_control)
    1018              :       END IF
    1019              : 
    1020        14918 :       CALL timestop(handle)
    1021        14918 :    END SUBROUTINE tddfpt2_control_release
    1022              : 
    1023              : ! **************************************************************************************************
    1024              : !> \brief Creates and initializes the rixs_control_type
    1025              : !> \param rixs_control the type to initialize
    1026              : ! **************************************************************************************************
    1027         7466 :    SUBROUTINE rixs_control_create(rixs_control)
    1028              :       TYPE(rixs_control_type), POINTER                   :: rixs_control
    1029              : 
    1030         7466 :       CPASSERT(.NOT. ASSOCIATED(rixs_control))
    1031         7466 :       ALLOCATE (rixs_control)
    1032              : 
    1033              :       NULLIFY (rixs_control%tddfpt2_control)
    1034         7466 :       CALL tddfpt2_control_create(rixs_control%tddfpt2_control)
    1035         7466 :       NULLIFY (rixs_control%xas_tdp_control)
    1036         7466 :       CALL xas_tdp_control_create(rixs_control%xas_tdp_control)
    1037              : 
    1038         7466 :    END SUBROUTINE rixs_control_create
    1039              : 
    1040              : ! **************************************************************************************************
    1041              : !> \brief Releases the rixs_control_type
    1042              : !> \param rixs_control ...
    1043              : ! **************************************************************************************************
    1044         7466 :    SUBROUTINE rixs_control_release(rixs_control)
    1045              :       TYPE(rixs_control_type), POINTER                   :: rixs_control
    1046              : 
    1047         7466 :       IF (ASSOCIATED(rixs_control)) THEN
    1048         7466 :          CALL tddfpt2_control_release(rixs_control%tddfpt2_control)
    1049         7466 :          CALL xas_tdp_control_release(rixs_control%xas_tdp_control)
    1050              : 
    1051         7466 :          DEALLOCATE (rixs_control)
    1052              :       END IF
    1053              : 
    1054         7466 :    END SUBROUTINE rixs_control_release
    1055              : 
    1056              : ! **************************************************************************************************
    1057              : !> \brief ...
    1058              : !> \param proj_mo_list ...
    1059              : ! **************************************************************************************************
    1060          248 :    SUBROUTINE proj_mo_list_release(proj_mo_list)
    1061              :       TYPE(proj_mo_p_type), DIMENSION(:), POINTER        :: proj_mo_list
    1062              : 
    1063              :       INTEGER                                            :: i, mo_ref_nbr
    1064              : 
    1065          248 :       IF (ASSOCIATED(proj_mo_list)) THEN
    1066           56 :          DO i = 1, SIZE(proj_mo_list)
    1067           56 :             IF (ASSOCIATED(proj_mo_list(i)%proj_mo)) THEN
    1068           52 :                IF (ALLOCATED(proj_mo_list(i)%proj_mo%ref_mo_index)) &
    1069           52 :                   DEALLOCATE (proj_mo_list(i)%proj_mo%ref_mo_index)
    1070           52 :                IF (ALLOCATED(proj_mo_list(i)%proj_mo%mo_ref)) THEN
    1071          204 :                   DO mo_ref_nbr = 1, SIZE(proj_mo_list(i)%proj_mo%mo_ref)
    1072          204 :                      CALL cp_fm_release(proj_mo_list(i)%proj_mo%mo_ref(mo_ref_nbr))
    1073              :                   END DO
    1074           52 :                   DEALLOCATE (proj_mo_list(i)%proj_mo%mo_ref)
    1075              :                END IF
    1076           52 :                IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_index)) &
    1077           52 :                   DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_index)
    1078           52 :                IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_occ)) &
    1079           52 :                   DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_occ)
    1080           52 :                DEALLOCATE (proj_mo_list(i)%proj_mo)
    1081              :             END IF
    1082              :          END DO
    1083            4 :          DEALLOCATE (proj_mo_list)
    1084              :       END IF
    1085          248 :    END SUBROUTINE proj_mo_list_release
    1086              : 
    1087              : ! **************************************************************************************************
    1088              : !> \brief ...
    1089              : !> \param efield_fields ...
    1090              : ! **************************************************************************************************
    1091         7452 :    SUBROUTINE efield_fields_release(efield_fields)
    1092              :       TYPE(efield_p_type), DIMENSION(:), POINTER         :: efield_fields
    1093              : 
    1094              :       INTEGER                                            :: i
    1095              : 
    1096         7452 :       IF (ASSOCIATED(efield_fields)) THEN
    1097          524 :          DO i = 1, SIZE(efield_fields)
    1098          524 :             IF (ASSOCIATED(efield_fields(i)%efield)) THEN
    1099          262 :                IF (ASSOCIATED(efield_fields(i)%efield%envelop_r_vars)) THEN
    1100            8 :                   DEALLOCATE (efield_fields(i)%efield%envelop_r_vars)
    1101              :                END IF
    1102          262 :                IF (ASSOCIATED(efield_fields(i)%efield%envelop_i_vars)) THEN
    1103          254 :                   DEALLOCATE (efield_fields(i)%efield%envelop_i_vars)
    1104              :                END IF
    1105          262 :                IF (ASSOCIATED(efield_fields(i)%efield%polarisation)) &
    1106          262 :                   DEALLOCATE (efield_fields(i)%efield%polarisation)
    1107          262 :                DEALLOCATE (efield_fields(i)%efield)
    1108              :             END IF
    1109              :          END DO
    1110          262 :          DEALLOCATE (efield_fields)
    1111              :       END IF
    1112         7452 :    END SUBROUTINE efield_fields_release
    1113              : 
    1114              : ! **************************************************************************************************
    1115              : !> \brief ...
    1116              : !> \param dftb_control ...
    1117              : ! **************************************************************************************************
    1118         7452 :    SUBROUTINE dftb_control_create(dftb_control)
    1119              :       TYPE(dftb_control_type), POINTER                   :: dftb_control
    1120              : 
    1121         7452 :       CPASSERT(.NOT. ASSOCIATED(dftb_control))
    1122        74520 :       ALLOCATE (dftb_control)
    1123              : 
    1124              :       NULLIFY (dftb_control%sk_pair_list)
    1125         7452 :    END SUBROUTINE dftb_control_create
    1126              : 
    1127              : ! **************************************************************************************************
    1128              : !> \brief ...
    1129              : !> \param dftb_control ...
    1130              : ! **************************************************************************************************
    1131         7452 :    SUBROUTINE dftb_control_release(dftb_control)
    1132              :       TYPE(dftb_control_type), POINTER                   :: dftb_control
    1133              : 
    1134         7452 :       IF (ASSOCIATED(dftb_control)) THEN
    1135         7452 :          IF (ASSOCIATED(dftb_control%sk_pair_list)) THEN
    1136          222 :             DEALLOCATE (dftb_control%sk_pair_list)
    1137              :          END IF
    1138         7452 :          DEALLOCATE (dftb_control)
    1139              :       END IF
    1140         7452 :    END SUBROUTINE dftb_control_release
    1141              : 
    1142              : ! **************************************************************************************************
    1143              : !> \brief ...
    1144              : !> \param xtb_control ...
    1145              : ! **************************************************************************************************
    1146         7452 :    SUBROUTINE xtb_control_create(xtb_control)
    1147              :       TYPE(xtb_control_type), POINTER                    :: xtb_control
    1148              : 
    1149         7452 :       CPASSERT(.NOT. ASSOCIATED(xtb_control))
    1150         7452 :       ALLOCATE (xtb_control)
    1151              : 
    1152              :       NULLIFY (xtb_control%kab_param)
    1153              :       NULLIFY (xtb_control%kab_vals)
    1154              :       NULLIFY (xtb_control%kab_types)
    1155              :       NULLIFY (xtb_control%nonbonded)
    1156              :       NULLIFY (xtb_control%rcpair)
    1157              : 
    1158         7452 :    END SUBROUTINE xtb_control_create
    1159              : 
    1160              : ! **************************************************************************************************
    1161              : !> \brief ...
    1162              : !> \param xtb_control ...
    1163              : ! **************************************************************************************************
    1164         7452 :    SUBROUTINE xtb_control_release(xtb_control)
    1165              :       TYPE(xtb_control_type), POINTER                    :: xtb_control
    1166              : 
    1167         7452 :       IF (ASSOCIATED(xtb_control)) THEN
    1168         7452 :          IF (ASSOCIATED(xtb_control%kab_param)) THEN
    1169            2 :             DEALLOCATE (xtb_control%kab_param)
    1170              :          END IF
    1171         7452 :          IF (ASSOCIATED(xtb_control%kab_vals)) THEN
    1172            2 :             DEALLOCATE (xtb_control%kab_vals)
    1173              :          END IF
    1174         7452 :          IF (ASSOCIATED(xtb_control%kab_types)) THEN
    1175            2 :             DEALLOCATE (xtb_control%kab_types)
    1176              :          END IF
    1177         7452 :          IF (ASSOCIATED(xtb_control%rcpair)) THEN
    1178          944 :             DEALLOCATE (xtb_control%rcpair)
    1179              :          END IF
    1180         7452 :          IF (ASSOCIATED(xtb_control%nonbonded)) THEN
    1181            6 :             CALL pair_potential_p_release(xtb_control%nonbonded)
    1182              :          END IF
    1183         7452 :          DEALLOCATE (xtb_control)
    1184              :       END IF
    1185         7452 :    END SUBROUTINE xtb_control_release
    1186              : 
    1187              : ! **************************************************************************************************
    1188              : !> \brief ...
    1189              : !> \param se_control ...
    1190              : ! **************************************************************************************************
    1191         7452 :    SUBROUTINE se_control_create(se_control)
    1192              :       TYPE(semi_empirical_control_type), POINTER         :: se_control
    1193              : 
    1194         7452 :       CPASSERT(.NOT. ASSOCIATED(se_control))
    1195        37260 :       ALLOCATE (se_control)
    1196         7452 :    END SUBROUTINE se_control_create
    1197              : 
    1198              : ! **************************************************************************************************
    1199              : !> \brief ...
    1200              : !> \param se_control ...
    1201              : ! **************************************************************************************************
    1202         7452 :    SUBROUTINE se_control_release(se_control)
    1203              :       TYPE(semi_empirical_control_type), POINTER         :: se_control
    1204              : 
    1205         7452 :       IF (ASSOCIATED(se_control)) THEN
    1206         7452 :          DEALLOCATE (se_control)
    1207              :       END IF
    1208         7452 :    END SUBROUTINE se_control_release
    1209              : 
    1210              : ! **************************************************************************************************
    1211              : !> \brief ...
    1212              : !> \param admm_control ...
    1213              : ! **************************************************************************************************
    1214          464 :    SUBROUTINE admm_control_create(admm_control)
    1215              :       TYPE(admm_control_type), POINTER                   :: admm_control
    1216              : 
    1217          464 :       CPASSERT(.NOT. ASSOCIATED(admm_control))
    1218         2320 :       ALLOCATE (admm_control)
    1219              : 
    1220          464 :    END SUBROUTINE admm_control_create
    1221              : 
    1222              : ! **************************************************************************************************
    1223              : !> \brief ...
    1224              : !> \param admm_control ...
    1225              : ! **************************************************************************************************
    1226         7456 :    SUBROUTINE admm_control_release(admm_control)
    1227              :       TYPE(admm_control_type), POINTER                   :: admm_control
    1228              : 
    1229         7456 :       IF (ASSOCIATED(admm_control)) THEN
    1230          504 :          DEALLOCATE (admm_control)
    1231              :       END IF
    1232         7456 :    END SUBROUTINE admm_control_release
    1233              : 
    1234              : ! **************************************************************************************************
    1235              : !> \brief ...
    1236              : !> \param expot_control ...
    1237              : ! **************************************************************************************************
    1238           16 :    SUBROUTINE expot_control_create(expot_control)
    1239              :       TYPE(expot_control_type), POINTER                  :: expot_control
    1240              : 
    1241           16 :       CPASSERT(.NOT. ASSOCIATED(expot_control))
    1242           16 :       ALLOCATE (expot_control)
    1243              :       expot_control%read_from_cube = .FALSE.
    1244              :       expot_control%maxwell_solver = .FALSE.
    1245           16 :       expot_control%static = .TRUE.
    1246           16 :       expot_control%scaling_factor = 1.0_dp
    1247              : 
    1248           16 :    END SUBROUTINE expot_control_create
    1249              : 
    1250              : ! **************************************************************************************************
    1251              : !> \brief ...
    1252              : !> \param expot_control ...
    1253              : ! **************************************************************************************************
    1254         7452 :    SUBROUTINE expot_control_release(expot_control)
    1255              :       TYPE(expot_control_type), POINTER                  :: expot_control
    1256              : 
    1257         7452 :       IF (ASSOCIATED(expot_control)) THEN
    1258           16 :          DEALLOCATE (expot_control)
    1259              :       END IF
    1260              : 
    1261         7452 :    END SUBROUTINE expot_control_release
    1262              : 
    1263              : ! **************************************************************************************************
    1264              : !> \brief ...
    1265              : !> \param maxwell_control ...
    1266              : ! **************************************************************************************************
    1267            0 :    SUBROUTINE maxwell_control_create(maxwell_control)
    1268              :       TYPE(maxwell_control_type), POINTER                :: maxwell_control
    1269              : 
    1270            0 :       CPASSERT(.NOT. ASSOCIATED(maxwell_control))
    1271            0 :       ALLOCATE (maxwell_control)
    1272              : 
    1273            0 :    END SUBROUTINE maxwell_control_create
    1274              : 
    1275              : ! **************************************************************************************************
    1276              : !> \brief ...
    1277              : !> \param maxwell_control ...
    1278              : ! **************************************************************************************************
    1279         7452 :    SUBROUTINE maxwell_control_release(maxwell_control)
    1280              :       TYPE(maxwell_control_type), POINTER                :: maxwell_control
    1281              : 
    1282         7452 :       IF (ASSOCIATED(maxwell_control)) THEN
    1283            0 :          DEALLOCATE (maxwell_control)
    1284              :       END IF
    1285              : 
    1286         7452 :    END SUBROUTINE maxwell_control_release
    1287              : 
    1288            0 : END MODULE cp_control_types
        

Generated by: LCOV version 2.0-1