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