(git:f56c6e3)
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
20 USE kinds, ONLY: default_path_length,&
22 dp
36#include "./base/base_uses.f90"
37
38 IMPLICIT NONE
39
40 PRIVATE
41
42!***************************************************************************************************
43!\brief Control parameters for hairy-probes DFT
44!***************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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
261
262! **************************************************************************************************
263! \brief Control parameters for GAPW method within QUICKSTEP ***
264! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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()
325
326! **************************************************************************************************
327! \brief some parameters useful for ddapc_restraints
328! **************************************************************************************************
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! **************************************************************************************************
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
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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()
436 POINTER :: mulliken_restraint_control => null()
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()
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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! **************************************************************************************************
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 !> target accuracy
541 REAL(kind=dp) :: conv = 0.0_dp
542 !> the smallest excitation amplitude to print
543 REAL(kind=dp) :: min_excitation_amplitude = 0.0_dp
544 !> threshold which controls when two wave functions considered to be orthogonal:
545 !> maxabs(Ci^T * S * Cj) <= orthogonal_eps
546 REAL(kind=dp) :: orthogonal_eps = 0.0_dp
547 !> read guess wave functions from restart file if exists
548 LOGICAL :: is_restart = .false.
549 !> compute triplet excited states using spin-unpolarised molecular orbitals
550 LOGICAL :: rks_triplets = .false.
551 !> local resolution of identity for Coulomb contribution
552 LOGICAL :: do_lrigpw = .false.
553 !> smeared occupation
554 LOGICAL :: do_smearing = .false.
555 !> dynamical correlation
556 LOGICAL :: do_bse = .false.
557 ! automatic generation of auxiliary basis for LRI-TDDFT
558 INTEGER :: auto_basis_p_lri_aux = 1
559 !> use symmetric definition of ADMM Kernel correction
560 LOGICAL :: admm_symm = .false.
561 !> Use/Ignore possible ADMM Kernel XC correction
562 LOGICAL :: admm_xc_correction = .false.
563 ! Compute exciton descriptors
564 LOGICAL :: do_exciton_descriptors = .false.
565 LOGICAL :: do_directional_exciton_descriptors = .false.
566 !
567 ! DIPOLE_MOMENTS subsection
568 !
569 ! form of the dipole operator used to compute oscillator strengths
570 INTEGER :: dipole_form = 0
571 !> type of the reference point used for calculation of electrostatic dipole moments
572 INTEGER :: dipole_reference = 0
573 !> user-defined reference point
574 REAL(kind=dp), DIMENSION(:), POINTER :: dipole_ref_point => null()
575 !
576 ! SOC subsection
577 LOGICAL :: do_soc = .false.
578 !
579 ! MGRID subsection
580 !
581 !> number of plain-wave grids
582 INTEGER :: mgrid_ngrids = 0
583 !> create commensurate grids (progression factor and cutoff values of sub-grids will be ignored)
584 LOGICAL :: mgrid_commensurate_mgrids = .false.
585 !> signals that MGRID section has been explicitly given. Other mgrid_* variables
586 !> are not initialised when it is equal to .FALSE. as in this case the default
587 !> set of plain-wave grids will be used
588 LOGICAL :: mgrid_is_explicit = .false.
589 !> same as qs_control%realspace_mgrids
590 LOGICAL :: mgrid_realspace_mgrids = .false.
591 !> do not perform load balancing
592 LOGICAL :: mgrid_skip_load_balance = .false.
593 !> cutoff value at the finest grid level
594 REAL(kind=dp) :: mgrid_cutoff = 0.0_dp
595 !> cutoff at the next grid level will be smaller then the cutoff
596 !> at the current grid by this number of times
597 REAL(kind=dp) :: mgrid_progression_factor = 0.0_dp
598 !> cutoff that determines to which grid a particular Gaussian function will be mapped
599 REAL(kind=dp) :: mgrid_relative_cutoff = 0.0_dp
600 !> manually provided the list of cutoff values for each grid level
601 !> (when it is null(), the cutoff values will be assigned automatically)
602 REAL(kind=dp), DIMENSION(:), POINTER :: mgrid_e_cutoff => null()
603 !> Parameter for smeared occupation TDA
604 TYPE(smeared_type), DIMENSION(:), POINTER :: smeared_occup => null()
605 END TYPE tddfpt2_control_type
606
607! **************************************************************************************************
608!> \brief
609! **************************************************************************************************
611
612 TYPE(tddfpt2_control_type), POINTER :: tddfpt2_control => null()
613 TYPE(xas_tdp_control_type), POINTER :: xas_tdp_control => null()
614
615 END TYPE rixs_control_type
616
617! **************************************************************************************************
618! \brief Control parameters for a DFT calculation
619! \par History
620! 10.2019 added variables related to surface dipole correction [Soumya Ghosh]
621! **************************************************************************************************
623 TYPE(admm_control_type), POINTER :: admm_control => null()
624 TYPE(period_efield_type), POINTER :: period_efield => null()
625 TYPE(qs_control_type), POINTER :: qs_control => null()
626 TYPE(rtp_control_type), POINTER :: rtp_control => null()
627 TYPE(sccs_control_type), POINTER :: sccs_control => null()
628 TYPE(tddfpt2_control_type), POINTER :: tddfpt2_control => null()
629 TYPE(rixs_control_type), POINTER :: rixs_control => null()
630 TYPE(xas_control_type), POINTER :: xas_control => null()
631 TYPE(expot_control_type), POINTER :: expot_control => null()
632 TYPE(maxwell_control_type), POINTER :: maxwell_control => null()
633 TYPE(smeagol_control_type), POINTER :: smeagol_control => null()
634 TYPE(efield_p_type), POINTER, &
635 DIMENSION(:) :: efield_fields => null()
636 TYPE(hairy_probes_type), POINTER, &
637 DIMENSION(:) :: probe => null()
638 INTEGER :: nspins = 0, &
639 charge = 0, &
640 multiplicity = 0, &
641 sic_method_id = 0, &
642 plus_u_method_id = 0, &
643 dir_surf_dip = 0, &
644 nimages = 1
645 INTEGER :: sic_list_id = 0
646 INTEGER :: auto_basis_ri_aux = 1, &
647 auto_basis_aux_fit = 1, &
648 auto_basis_lri_aux = 1, &
649 auto_basis_p_lri_aux = 1, &
650 auto_basis_ri_hxc = 1, &
651 auto_basis_ri_xas = 1, &
652 auto_basis_ri_hfx = 1
653 REAL(kind=dp) :: relax_multiplicity = 0.0_dp, &
654 sic_scaling_a = 0.0_dp, &
655 sic_scaling_b = 0.0_dp, &
656 pos_dir_surf_dip = 0.0_dp
657 LOGICAL :: do_xas_calculation = .false., &
658 do_xas_tdp_calculation = .false., &
659 drho_by_collocation = .false., &
660 use_kinetic_energy_density = .false., &
661 restricted = .false., &
662 roks = .false., &
663 uks = .false., &
664 lsd = .false., &
665 dft_plus_u = .false., &
666 apply_efield = .false., &
667 apply_efield_field = .false., &
668 apply_vector_potential = .false., &
669 apply_period_efield = .false., &
670 apply_external_potential = .false., &
671 eval_external_potential = .false., &
672 do_admm = .false., &
673 do_admm_dm = .false., &
674 do_admm_mo = .false., &
675 smear = .false., &
676 low_spin_roks = .false., &
677 apply_external_density = .false., &
678 read_external_density = .false., &
679 apply_external_vxc = .false., &
680 read_external_vxc = .false., &
681 correct_surf_dip = .false., &
682 surf_dip_correct_switch = .false., &
683 switch_surf_dip = .false., &
684 correct_el_density_dip = .false., &
685 do_sccs = .false., &
686 apply_embed_pot = .false., &
687 apply_dmfet_pot = .false., &
688 hairy_probes = .false.
689 END TYPE dft_control_type
690
691 CHARACTER(len=*), PARAMETER, PRIVATE :: modulen = 'cp_control_types'
692
693 ! Public data types
694
695 PUBLIC :: dft_control_type, &
700 proj_mo_type, &
701 efield_type, &
714 smeared_type, &
716
717 ! Public subroutines
718
719 PUBLIC :: dft_control_release, &
728
729CONTAINS
730
731! **************************************************************************************************
732!> \brief create the mulliken_restraint_type
733!> \param mulliken_restraint_control ...
734!> \par History
735!> 02.2005 created [Joost VandeVondele]
736! **************************************************************************************************
737 SUBROUTINE mulliken_control_create(mulliken_restraint_control)
738 TYPE(mulliken_restraint_type), INTENT(OUT) :: mulliken_restraint_control
739
740 mulliken_restraint_control%strength = 0.1_dp
741 mulliken_restraint_control%target = 1.0_dp
742 mulliken_restraint_control%natoms = 0
743 NULLIFY (mulliken_restraint_control%atoms)
744 END SUBROUTINE mulliken_control_create
745
746! **************************************************************************************************
747!> \brief release the mulliken_restraint_type
748!> \param mulliken_restraint_control ...
749!> \par History
750!> 02.2005 created [Joost VandeVondele]
751! **************************************************************************************************
752 SUBROUTINE mulliken_control_release(mulliken_restraint_control)
753 TYPE(mulliken_restraint_type), INTENT(INOUT) :: mulliken_restraint_control
754
755 IF (ASSOCIATED(mulliken_restraint_control%atoms)) &
756 DEALLOCATE (mulliken_restraint_control%atoms)
757 mulliken_restraint_control%strength = 0.0_dp
758 mulliken_restraint_control%target = 0.0_dp
759 mulliken_restraint_control%natoms = 0
760 END SUBROUTINE mulliken_control_release
761
762! **************************************************************************************************
763!> \brief create the ddapc_restraint_type
764!> \param ddapc_restraint_control ...
765!> \par History
766!> 02.2006 created [Joost VandeVondele]
767! **************************************************************************************************
768 SUBROUTINE ddapc_control_create(ddapc_restraint_control)
769 TYPE(ddapc_restraint_type), INTENT(OUT) :: ddapc_restraint_control
770
771 ddapc_restraint_control%density_type = do_full_density
772 ddapc_restraint_control%strength = 0.1_dp
773 ddapc_restraint_control%ddapc_order_p = 0.0_dp
774 ddapc_restraint_control%functional_form = -1
775 ddapc_restraint_control%target = 1.0_dp
776 ddapc_restraint_control%natoms = 0
777 NULLIFY (ddapc_restraint_control%atoms)
778 NULLIFY (ddapc_restraint_control%coeff)
779
780 END SUBROUTINE ddapc_control_create
781
782! **************************************************************************************************
783!> \brief release the ddapc_restraint_type
784!> \param ddapc_restraint_control ...
785!> \par History
786!> 02.2006 created [Joost VandeVondele]
787! **************************************************************************************************
788 SUBROUTINE ddapc_control_release(ddapc_restraint_control)
789 TYPE(ddapc_restraint_type), INTENT(INOUT) :: ddapc_restraint_control
790
791 IF (ASSOCIATED(ddapc_restraint_control%atoms)) &
792 DEALLOCATE (ddapc_restraint_control%atoms)
793 IF (ASSOCIATED(ddapc_restraint_control%coeff)) &
794 DEALLOCATE (ddapc_restraint_control%coeff)
795 ddapc_restraint_control%strength = 0.0_dp
796 ddapc_restraint_control%target = 0.0_dp
797 ddapc_restraint_control%natoms = 0
798 END SUBROUTINE ddapc_control_release
799
800! **************************************************************************************************
801!> \brief create the s2_restraint_type
802!> \param s2_restraint_control ...
803!> \par History
804!> 03.2006 created [Joost VandeVondele]
805! **************************************************************************************************
806 SUBROUTINE s2_control_create(s2_restraint_control)
807 TYPE(s2_restraint_type), INTENT(OUT) :: s2_restraint_control
808
809 s2_restraint_control%strength = 0.1_dp
810 s2_restraint_control%s2_order_p = 0.0_dp
811 s2_restraint_control%functional_form = -1
812 s2_restraint_control%target = 1.0_dp
813 END SUBROUTINE s2_control_create
814
815! **************************************************************************************************
816!> \brief release the s2_restraint_type
817!> \param s2_restraint_control ...
818!> \par History
819!> 03.2006 created [Joost VandeVondele]
820! **************************************************************************************************
821 SUBROUTINE s2_control_release(s2_restraint_control)
822 TYPE(s2_restraint_type), INTENT(INOUT) :: s2_restraint_control
823
824 s2_restraint_control%strength = 0.0_dp
825 s2_restraint_control%target = 0.0_dp
826 END SUBROUTINE s2_control_release
827
828! **************************************************************************************************
829!> \brief allocates and perform a very basic initialization
830!> \param dft_control the object to create
831!> \par History
832!> 02.2003 created [fawzi]
833!> \author fawzi
834! **************************************************************************************************
835 SUBROUTINE dft_control_create(dft_control)
836 TYPE(dft_control_type), INTENT(OUT) :: dft_control
837
838 NULLIFY (dft_control%xas_control)
839 NULLIFY (dft_control%qs_control)
840 NULLIFY (dft_control%tddfpt2_control)
841 NULLIFY (dft_control%rixs_control)
842 NULLIFY (dft_control%efield_fields)
843 NULLIFY (dft_control%period_efield)
844 NULLIFY (dft_control%admm_control)
845 NULLIFY (dft_control%expot_control)
846 NULLIFY (dft_control%maxwell_control)
847 NULLIFY (dft_control%smeagol_control)
848 NULLIFY (dft_control%rtp_control)
849 NULLIFY (dft_control%sccs_control)
850 NULLIFY (dft_control%probe)
851 dft_control%do_sccs = .false.
852 dft_control%apply_embed_pot = .false.
853 dft_control%apply_dmfet_pot = .false.
854 dft_control%hairy_probes = .false.
855 CALL qs_control_create(dft_control%qs_control)
856 CALL tddfpt2_control_create(dft_control%tddfpt2_control)
857 CALL rixs_control_create(dft_control%rixs_control)
858 CALL smeagol_control_create(dft_control%smeagol_control)
859 END SUBROUTINE dft_control_create
860
861! **************************************************************************************************
862!> \brief ...
863!> \param dft_control ...
864!> \par History
865!> 02.2003 created [fawzi]
866!> \author fawzi
867! **************************************************************************************************
868 SUBROUTINE dft_control_release(dft_control)
869 TYPE(dft_control_type), INTENT(INOUT) :: dft_control
870
871 INTEGER :: i
872
873 CALL qs_control_release(dft_control%qs_control)
874 CALL tddfpt2_control_release(dft_control%tddfpt2_control)
875 CALL rixs_control_release(dft_control%rixs_control) ! maybe check first if allocated
876 IF (ASSOCIATED(dft_control%xas_control)) THEN
877 CALL xas_control_release(dft_control%xas_control)
878 DEALLOCATE (dft_control%xas_control)
879 END IF
880 CALL admm_control_release(dft_control%admm_control)
881 CALL expot_control_release(dft_control%expot_control)
882 CALL maxwell_control_release(dft_control%maxwell_control)
883 CALL smeagol_control_release(dft_control%smeagol_control)
884 CALL efield_fields_release(dft_control%efield_fields)
885 IF (ASSOCIATED(dft_control%probe)) THEN
886 DO i = 1, SIZE(dft_control%probe)
887 DEALLOCATE (dft_control%probe(i)%atom_ids)
888 END DO
889 DEALLOCATE (dft_control%probe)
890 END IF
891 IF (ASSOCIATED(dft_control%sccs_control)) DEALLOCATE (dft_control%sccs_control)
892 IF (ASSOCIATED(dft_control%period_efield)) THEN
893 DEALLOCATE (dft_control%period_efield)
894 END IF
895 IF (ASSOCIATED(dft_control%rtp_control)) THEN
896 CALL proj_mo_list_release(dft_control%rtp_control%proj_mo_list)
897 DEALLOCATE (dft_control%rtp_control)
898 END IF
899
900 END SUBROUTINE dft_control_release
901
902! **************************************************************************************************
903!> \brief ...
904!> \param qs_control ...
905! **************************************************************************************************
906 SUBROUTINE qs_control_create(qs_control)
907 TYPE(qs_control_type), POINTER :: qs_control
908
909 cpassert(.NOT. ASSOCIATED(qs_control))
910 ALLOCATE (qs_control)
911
912 NULLIFY (qs_control%e_cutoff)
913 NULLIFY (qs_control%gapw_control)
914 NULLIFY (qs_control%mulliken_restraint_control)
915 NULLIFY (qs_control%ddapc_restraint_control)
916 NULLIFY (qs_control%s2_restraint_control)
917 NULLIFY (qs_control%se_control)
918 NULLIFY (qs_control%dftb_control)
919 NULLIFY (qs_control%xtb_control)
920 NULLIFY (qs_control%cdft_control)
921 NULLIFY (qs_control%ddapc_restraint_control)
922
923 ALLOCATE (qs_control%mulliken_restraint_control)
924 CALL mulliken_control_create(qs_control%mulliken_restraint_control)
925 ALLOCATE (qs_control%s2_restraint_control)
926 CALL s2_control_create(qs_control%s2_restraint_control)
927 ALLOCATE (qs_control%gapw_control)
928 CALL se_control_create(qs_control%se_control)
929 CALL dftb_control_create(qs_control%dftb_control)
930 CALL xtb_control_create(qs_control%xtb_control)
931 ALLOCATE (qs_control%cdft_control)
932 CALL cdft_control_create(qs_control%cdft_control)
933 END SUBROUTINE qs_control_create
934
935! **************************************************************************************************
936!> \brief ...
937!> \param qs_control ...
938! **************************************************************************************************
939 SUBROUTINE qs_control_release(qs_control)
940 TYPE(qs_control_type), POINTER :: qs_control
941
942 INTEGER :: i
943
944 IF (ASSOCIATED(qs_control)) THEN
945 CALL mulliken_control_release(qs_control%mulliken_restraint_control)
946 DEALLOCATE (qs_control%mulliken_restraint_control)
947 CALL s2_control_release(qs_control%s2_restraint_control)
948 DEALLOCATE (qs_control%s2_restraint_control)
949 CALL se_control_release(qs_control%se_control)
950 CALL dftb_control_release(qs_control%dftb_control)
951 CALL xtb_control_release(qs_control%xtb_control)
952 IF (ASSOCIATED(qs_control%cdft_control)) THEN
953 CALL cdft_control_release(qs_control%cdft_control)
954 DEALLOCATE (qs_control%cdft_control)
955 END IF
956
957 IF (ASSOCIATED(qs_control%e_cutoff)) THEN
958 DEALLOCATE (qs_control%e_cutoff)
959 END IF
960 IF (ASSOCIATED(qs_control%gapw_control)) THEN
961 DEALLOCATE (qs_control%gapw_control)
962 END IF
963 IF (ASSOCIATED(qs_control%ddapc_restraint_control)) THEN
964 DO i = 1, SIZE(qs_control%ddapc_restraint_control)
965 CALL ddapc_control_release(qs_control%ddapc_restraint_control(i))
966 END DO
967 DEALLOCATE (qs_control%ddapc_restraint_control)
968 END IF
969 DEALLOCATE (qs_control)
970 END IF
971 END SUBROUTINE qs_control_release
972
973! **************************************************************************************************
974!> \brief allocate control options for Time-Dependent Density Functional Theory calculation
975!> \param tddfpt_control an object to create
976!> \par History
977!> * 05.2016 created [Sergey Chulkov]
978! **************************************************************************************************
979 SUBROUTINE tddfpt2_control_create(tddfpt_control)
980 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
981
982 CHARACTER(len=*), PARAMETER :: routinen = 'tddfpt2_control_create'
983
984 INTEGER :: handle
985
986 cpassert(.NOT. ASSOCIATED(tddfpt_control))
987 CALL timeset(routinen, handle)
988
989 ALLOCATE (tddfpt_control)
990 tddfpt_control%do_soc = .false.
991
992 CALL timestop(handle)
993 END SUBROUTINE tddfpt2_control_create
994
995! **************************************************************************************************
996!> \brief release memory allocated for TDDFT control options
997!> \param tddfpt_control an object to release
998!> \par History
999!> * 05.2016 created [Sergey Chulkov]
1000! **************************************************************************************************
1001 SUBROUTINE tddfpt2_control_release(tddfpt_control)
1002 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
1003
1004 CHARACTER(len=*), PARAMETER :: routinen = 'tddfpt2_control_release'
1005
1006 INTEGER :: handle
1007
1008 CALL timeset(routinen, handle)
1009
1010 IF (ASSOCIATED(tddfpt_control)) THEN
1011 DEALLOCATE (tddfpt_control)
1012 END IF
1013
1014 CALL timestop(handle)
1015 END SUBROUTINE tddfpt2_control_release
1016
1017! **************************************************************************************************
1018!> \brief Creates and initializes the rixs_control_type
1019!> \param rixs_control the type to initialize
1020! **************************************************************************************************
1021 SUBROUTINE rixs_control_create(rixs_control)
1022 TYPE(rixs_control_type), POINTER :: rixs_control
1023
1024 cpassert(.NOT. ASSOCIATED(rixs_control))
1025 ALLOCATE (rixs_control)
1026
1027 NULLIFY (rixs_control%tddfpt2_control)
1028 CALL tddfpt2_control_create(rixs_control%tddfpt2_control)
1029 NULLIFY (rixs_control%xas_tdp_control)
1030 CALL xas_tdp_control_create(rixs_control%xas_tdp_control)
1031
1032 END SUBROUTINE rixs_control_create
1033
1034! **************************************************************************************************
1035!> \brief Releases the rixs_control_type
1036!> \param rixs_control ...
1037! **************************************************************************************************
1038 SUBROUTINE rixs_control_release(rixs_control)
1039 TYPE(rixs_control_type), POINTER :: rixs_control
1040
1041 IF (ASSOCIATED(rixs_control)) THEN
1042 CALL tddfpt2_control_release(rixs_control%tddfpt2_control)
1043 CALL xas_tdp_control_release(rixs_control%xas_tdp_control)
1044
1045 DEALLOCATE (rixs_control)
1046 END IF
1047
1048 END SUBROUTINE rixs_control_release
1049
1050! **************************************************************************************************
1051!> \brief ...
1052!> \param proj_mo_list ...
1053! **************************************************************************************************
1054 SUBROUTINE proj_mo_list_release(proj_mo_list)
1055 TYPE(proj_mo_p_type), DIMENSION(:), POINTER :: proj_mo_list
1056
1057 INTEGER :: i, mo_ref_nbr
1058
1059 IF (ASSOCIATED(proj_mo_list)) THEN
1060 DO i = 1, SIZE(proj_mo_list)
1061 IF (ASSOCIATED(proj_mo_list(i)%proj_mo)) THEN
1062 IF (ALLOCATED(proj_mo_list(i)%proj_mo%ref_mo_index)) &
1063 DEALLOCATE (proj_mo_list(i)%proj_mo%ref_mo_index)
1064 IF (ALLOCATED(proj_mo_list(i)%proj_mo%mo_ref)) THEN
1065 DO mo_ref_nbr = 1, SIZE(proj_mo_list(i)%proj_mo%mo_ref)
1066 CALL cp_fm_release(proj_mo_list(i)%proj_mo%mo_ref(mo_ref_nbr))
1067 END DO
1068 DEALLOCATE (proj_mo_list(i)%proj_mo%mo_ref)
1069 END IF
1070 IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_index)) &
1071 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_index)
1072 IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_occ)) &
1073 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_occ)
1074 DEALLOCATE (proj_mo_list(i)%proj_mo)
1075 END IF
1076 END DO
1077 DEALLOCATE (proj_mo_list)
1078 END IF
1079 END SUBROUTINE proj_mo_list_release
1080
1081! **************************************************************************************************
1082!> \brief ...
1083!> \param efield_fields ...
1084! **************************************************************************************************
1085 SUBROUTINE efield_fields_release(efield_fields)
1086 TYPE(efield_p_type), DIMENSION(:), POINTER :: efield_fields
1087
1088 INTEGER :: i
1089
1090 IF (ASSOCIATED(efield_fields)) THEN
1091 DO i = 1, SIZE(efield_fields)
1092 IF (ASSOCIATED(efield_fields(i)%efield)) THEN
1093 IF (ASSOCIATED(efield_fields(i)%efield%envelop_r_vars)) THEN
1094 DEALLOCATE (efield_fields(i)%efield%envelop_r_vars)
1095 END IF
1096 IF (ASSOCIATED(efield_fields(i)%efield%envelop_i_vars)) THEN
1097 DEALLOCATE (efield_fields(i)%efield%envelop_i_vars)
1098 END IF
1099 IF (ASSOCIATED(efield_fields(i)%efield%polarisation)) &
1100 DEALLOCATE (efield_fields(i)%efield%polarisation)
1101 DEALLOCATE (efield_fields(i)%efield)
1102 END IF
1103 END DO
1104 DEALLOCATE (efield_fields)
1105 END IF
1106 END SUBROUTINE efield_fields_release
1107
1108! **************************************************************************************************
1109!> \brief ...
1110!> \param dftb_control ...
1111! **************************************************************************************************
1112 SUBROUTINE dftb_control_create(dftb_control)
1113 TYPE(dftb_control_type), POINTER :: dftb_control
1114
1115 cpassert(.NOT. ASSOCIATED(dftb_control))
1116 ALLOCATE (dftb_control)
1117
1118 NULLIFY (dftb_control%sk_pair_list)
1119 END SUBROUTINE dftb_control_create
1120
1121! **************************************************************************************************
1122!> \brief ...
1123!> \param dftb_control ...
1124! **************************************************************************************************
1125 SUBROUTINE dftb_control_release(dftb_control)
1126 TYPE(dftb_control_type), POINTER :: dftb_control
1127
1128 IF (ASSOCIATED(dftb_control)) THEN
1129 IF (ASSOCIATED(dftb_control%sk_pair_list)) THEN
1130 DEALLOCATE (dftb_control%sk_pair_list)
1131 END IF
1132 DEALLOCATE (dftb_control)
1133 END IF
1134 END SUBROUTINE dftb_control_release
1135
1136! **************************************************************************************************
1137!> \brief ...
1138!> \param xtb_control ...
1139! **************************************************************************************************
1140 SUBROUTINE xtb_control_create(xtb_control)
1141 TYPE(xtb_control_type), POINTER :: xtb_control
1142
1143 cpassert(.NOT. ASSOCIATED(xtb_control))
1144 ALLOCATE (xtb_control)
1145
1146 NULLIFY (xtb_control%kab_param)
1147 NULLIFY (xtb_control%kab_vals)
1148 NULLIFY (xtb_control%kab_types)
1149 NULLIFY (xtb_control%nonbonded)
1150 NULLIFY (xtb_control%rcpair)
1151
1152 END SUBROUTINE xtb_control_create
1153
1154! **************************************************************************************************
1155!> \brief ...
1156!> \param xtb_control ...
1157! **************************************************************************************************
1158 SUBROUTINE xtb_control_release(xtb_control)
1159 TYPE(xtb_control_type), POINTER :: xtb_control
1160
1161 IF (ASSOCIATED(xtb_control)) THEN
1162 IF (ASSOCIATED(xtb_control%kab_param)) THEN
1163 DEALLOCATE (xtb_control%kab_param)
1164 END IF
1165 IF (ASSOCIATED(xtb_control%kab_vals)) THEN
1166 DEALLOCATE (xtb_control%kab_vals)
1167 END IF
1168 IF (ASSOCIATED(xtb_control%kab_types)) THEN
1169 DEALLOCATE (xtb_control%kab_types)
1170 END IF
1171 IF (ASSOCIATED(xtb_control%rcpair)) THEN
1172 DEALLOCATE (xtb_control%rcpair)
1173 END IF
1174 IF (ASSOCIATED(xtb_control%nonbonded)) THEN
1175 CALL pair_potential_p_release(xtb_control%nonbonded)
1176 END IF
1177 DEALLOCATE (xtb_control)
1178 END IF
1179 END SUBROUTINE xtb_control_release
1180
1181! **************************************************************************************************
1182!> \brief ...
1183!> \param se_control ...
1184! **************************************************************************************************
1185 SUBROUTINE se_control_create(se_control)
1186 TYPE(semi_empirical_control_type), POINTER :: se_control
1187
1188 cpassert(.NOT. ASSOCIATED(se_control))
1189 ALLOCATE (se_control)
1190 END SUBROUTINE se_control_create
1191
1192! **************************************************************************************************
1193!> \brief ...
1194!> \param se_control ...
1195! **************************************************************************************************
1196 SUBROUTINE se_control_release(se_control)
1197 TYPE(semi_empirical_control_type), POINTER :: se_control
1198
1199 IF (ASSOCIATED(se_control)) THEN
1200 DEALLOCATE (se_control)
1201 END IF
1202 END SUBROUTINE se_control_release
1203
1204! **************************************************************************************************
1205!> \brief ...
1206!> \param admm_control ...
1207! **************************************************************************************************
1208 SUBROUTINE admm_control_create(admm_control)
1209 TYPE(admm_control_type), POINTER :: admm_control
1210
1211 cpassert(.NOT. ASSOCIATED(admm_control))
1212 ALLOCATE (admm_control)
1213
1214 END SUBROUTINE admm_control_create
1215
1216! **************************************************************************************************
1217!> \brief ...
1218!> \param admm_control ...
1219! **************************************************************************************************
1220 SUBROUTINE admm_control_release(admm_control)
1221 TYPE(admm_control_type), POINTER :: admm_control
1222
1223 IF (ASSOCIATED(admm_control)) THEN
1224 DEALLOCATE (admm_control)
1225 END IF
1226 END SUBROUTINE admm_control_release
1227
1228! **************************************************************************************************
1229!> \brief ...
1230!> \param expot_control ...
1231! **************************************************************************************************
1232 SUBROUTINE expot_control_create(expot_control)
1233 TYPE(expot_control_type), POINTER :: expot_control
1234
1235 cpassert(.NOT. ASSOCIATED(expot_control))
1236 ALLOCATE (expot_control)
1237 expot_control%read_from_cube = .false.
1238 expot_control%maxwell_solver = .false.
1239 expot_control%static = .true.
1240 expot_control%scaling_factor = 1.0_dp
1241
1242 END SUBROUTINE expot_control_create
1243
1244! **************************************************************************************************
1245!> \brief ...
1246!> \param expot_control ...
1247! **************************************************************************************************
1248 SUBROUTINE expot_control_release(expot_control)
1249 TYPE(expot_control_type), POINTER :: expot_control
1250
1251 IF (ASSOCIATED(expot_control)) THEN
1252 DEALLOCATE (expot_control)
1253 END IF
1254
1255 END SUBROUTINE expot_control_release
1256
1257! **************************************************************************************************
1258!> \brief ...
1259!> \param maxwell_control ...
1260! **************************************************************************************************
1261 SUBROUTINE maxwell_control_create(maxwell_control)
1262 TYPE(maxwell_control_type), POINTER :: maxwell_control
1263
1264 cpassert(.NOT. ASSOCIATED(maxwell_control))
1265 ALLOCATE (maxwell_control)
1266
1267 END SUBROUTINE maxwell_control_create
1268
1269! **************************************************************************************************
1270!> \brief ...
1271!> \param maxwell_control ...
1272! **************************************************************************************************
1273 SUBROUTINE maxwell_control_release(maxwell_control)
1274 TYPE(maxwell_control_type), POINTER :: maxwell_control
1275
1276 IF (ASSOCIATED(maxwell_control)) THEN
1277 DEALLOCATE (maxwell_control)
1278 END IF
1279
1280 END SUBROUTINE maxwell_control_release
1281
1282END 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 use_mom_ref_coac
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.