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