(git:97501a3)
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 :: lrho1_eq_lrho0 = .false.
257 LOGICAL :: alpha0_hard_from_input = .false., &
258 force_paw = .false., &
259 non_paw_atoms = .false., &
260 nopaw_as_gpw = .false.
261 REAL(kind=dp) :: alpha0_hard = 0.0_dp
262 REAL(kind=dp) :: max_rad_local = 0.0_dp
263 END TYPE gapw_control_type
264
265! **************************************************************************************************
266! \brief parameters for calculations involving a time dependent electric field
267! **************************************************************************************************
269 REAL(kind=dp) :: actual_time = 0.0_dp
270 REAL(kind=dp), DIMENSION(:), POINTER :: polarisation => null()
271 INTEGER :: envelop_id = 0
272 REAL(kind=dp), DIMENSION(:), POINTER :: envelop_r_vars => null()
273 INTEGER, DIMENSION(:), POINTER :: envelop_i_vars => null()
274 REAL(kind=dp) :: strength = 0.0_dp
275 REAL(kind=dp) :: phase_offset = 0.0_dp
276 REAL(kind=dp) :: wavelength = 0.0_dp
277 REAL(kind=dp), DIMENSION(3) :: vec_pot_initial = 0.0_dp
278 END TYPE efield_type
279
280 TYPE efield_p_type
281 TYPE(efield_type), POINTER :: efield => null()
282 END TYPE efield_p_type
283
284! **************************************************************************************************
285! \brief parameters for calculations involving a time dependent electric field
286! **************************************************************************************************
287 TYPE period_efield_type
288 LOGICAL :: displacement_field = .false.
289 REAL(kind=dp), DIMENSION(3) :: polarisation = 0.0_dp
290 REAL(kind=dp), DIMENSION(3) :: d_filter = 0.0_dp
291 REAL(kind=dp) :: strength = 0.0_dp
292 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: strength_list
293 INTEGER :: start_frame = 0
294 INTEGER :: end_frame = -1
295 END TYPE period_efield_type
296
297! **************************************************************************************************
298! \brief some parameters useful for mulliken_restraints
299! **************************************************************************************************
301 REAL(kind=dp) :: strength = 0.0_dp
302 REAL(kind=dp) :: TARGET = 0.0_dp
303 INTEGER :: natoms = 0
304 INTEGER, POINTER, DIMENSION(:) :: atoms => null()
306
307! **************************************************************************************************
308! \brief some parameters useful for ddapc_restraints
309! **************************************************************************************************
311 INTEGER :: ref_count = 0
312 REAL(kind=dp) :: strength = 0.0_dp
313 REAL(kind=dp) :: TARGET = 0.0_dp
314 REAL(kind=dp) :: ddapc_order_p = 0.0_dp
315 INTEGER :: functional_form = 0
316 INTEGER :: natoms = 0
317 INTEGER, POINTER, DIMENSION(:) :: atoms => null()
318 REAL(kind=dp), POINTER, DIMENSION(:) :: coeff => null()
319 INTEGER :: density_type = 0
320 END TYPE ddapc_restraint_type
321
322! **************************************************************************************************
323! \brief some parameters useful for s2_restraints
324! **************************************************************************************************
326 REAL(kind=dp) :: strength = 0.0_dp
327 REAL(kind=dp) :: TARGET = 0.0_dp
328 REAL(kind=dp) :: s2_order_p = 0.0_dp
329 INTEGER :: functional_form = 0
330 END TYPE s2_restraint_type
331
332! **************************************************************************************************
333! \brief some parameters useful for auxiliary density matrix method
334! **************************************************************************************************
335 TYPE admm_block_type
336 INTEGER, DIMENSION(:), ALLOCATABLE :: list
337 END TYPE admm_block_type
338
340 REAL(kind=dp) :: eps_filter = 0.0_dp
341 INTEGER :: admm_type = 0
342 INTEGER :: purification_method = 0
343 INTEGER :: method = 0
344 LOGICAL :: charge_constrain = .false.
345 INTEGER :: scaling_model = 0
346 INTEGER :: aux_exch_func = 0
347 LOGICAL :: aux_exch_func_param = .false.
348 REAL(kind=dp), DIMENSION(3) :: aux_x_param = 0.0_dp
349 TYPE(admm_block_type), DIMENSION(:), &
350 ALLOCATABLE :: blocks
351 END TYPE admm_control_type
352
353! **************************************************************************************************
354! \brief Parameters for external potential
355! **************************************************************************************************
357 LOGICAL :: read_from_cube = .false.
358 LOGICAL :: maxwell_solver = .false.
359 LOGICAL :: static = .false.
360 REAL(kind=dp) :: scaling_factor = 0.0_dp
361 END TYPE expot_control_type
362
363! **************************************************************************************************
364! \brief Parameters useful for Maxwell equation evaluation of external potential
365! **************************************************************************************************
367 LOGICAL :: log_test = .false.
368 INTEGER :: int_test = 0
369 REAL(kind=dp) :: real_test = 0.0_dp
370 END TYPE maxwell_control_type
371
372! **************************************************************************************************
373! \brief Control parameters for a QUICKSTEP and KIM-GORDON calculation ***
374! eps_pgf_orb: Cutoff value for the interaction of the primitive
375! Gaussian-type functions (primitive basis functions).
376! **************************************************************************************************
378 INTEGER :: method_id = 0
379 REAL(kind=dp) :: eps_core_charge = 0.0_dp, &
380 eps_kg_orb = 0.0_dp, &
381 eps_pgf_orb = 0.0_dp, &
382 eps_ppl = 0.0_dp, &
383 eps_ppnl = 0.0_dp, &
384 eps_rho_gspace = 0.0_dp, &
385 eps_rho_rspace = 0.0_dp, &
386 eps_filter_matrix = 0.0_dp, &
387 eps_gvg_rspace = 0.0_dp, &
388 progression_factor = 0.0_dp, &
389 relative_cutoff = 0.0_dp
390 LOGICAL :: do_almo_scf = .false.
391 LOGICAL :: do_ls_scf = .false.
392 LOGICAL :: do_kg = .false.
393 LOGICAL :: commensurate_mgrids = .false.
394 LOGICAL :: realspace_mgrids = .false.
395 LOGICAL :: gapw = .false., gapw_xc = .false., gpw = .false., pao = .false.
396 LOGICAL :: lrigpw = .false., rigpw = .false.
397 LOGICAL :: lri_optbas = .false.
398 LOGICAL :: ofgpw = .false.
399 LOGICAL :: dftb = .false.
400 LOGICAL :: xtb = .false.
401 LOGICAL :: semi_empirical = .false.
402 LOGICAL :: mulliken_restraint = .false.
403 LOGICAL :: ddapc_restraint = .false.
404 LOGICAL :: ddapc_restraint_is_spin = .false.
405 LOGICAL :: ddapc_explicit_potential = .false.
406 LOGICAL :: cdft = .false.
407 LOGICAL :: et_coupling_calc = .false.
408 LOGICAL :: s2_restraint = .false.
409 INTEGER :: do_ppl_method = 0
410 INTEGER :: wf_interpolation_method_nr = 0
411 INTEGER :: wf_extrapolation_order = 0
412 INTEGER :: periodicity = 0
413 REAL(kind=dp) :: pairlist_radius = 0.0_dp
414 REAL(kind=dp) :: cutoff = 0.0_dp
415 REAL(kind=dp), DIMENSION(:), POINTER :: e_cutoff => null()
417 POINTER :: mulliken_restraint_control => null()
419 DIMENSION(:), POINTER :: ddapc_restraint_control => null()
420 TYPE(cdft_control_type), POINTER :: cdft_control => null()
421 TYPE(s2_restraint_type), POINTER :: s2_restraint_control => null()
422 TYPE(dftb_control_type), POINTER :: dftb_control => null()
423 TYPE(xtb_control_type), POINTER :: xtb_control => null()
425 POINTER :: se_control => null()
426 TYPE(gapw_control_type), POINTER :: gapw_control => null()
427 TYPE(pw_grid_option) :: pw_grid_opt = pw_grid_option()
428 LOGICAL :: skip_load_balance_distributed = .false.
429 ! Types of subsystems for embedding
430 LOGICAL :: ref_embed_subsys = .false.
431 LOGICAL :: cluster_embed_subsys = .false.
432 LOGICAL :: high_level_embed_subsys = .false.
433 LOGICAL :: dfet_embedded = .false.
434 LOGICAL :: dmfet_embedded = .false.
435 END TYPE qs_control_type
436
437! **************************************************************************************************
438! \brief Control parameters for the SCCS models
439! **************************************************************************************************
441 LOGICAL :: sccs_activated = .false.
442 INTEGER :: derivative_method = 0, &
443 max_iter = 0, &
444 method_id = 0
445 REAL(kind=dp) :: alpha_solvent = 0.0_dp, &
446 beta = 0.0_dp, &
447 beta_solvent = 0.0_dp, &
448 delta_rho = 0.0_dp, &
449 eps_sccs = 0.0_dp, &
450 eps_scf = 0.0_dp, &
451 epsilon_solvent = 0.0_dp, &
452 gamma_solvent = 0.0_dp, &
453 mixing = 0.0_dp, &
454 rho_zero = 0.0_dp, &
455 rho_max = 0.0_dp, &
456 rho_min = 0.0_dp
457 END TYPE sccs_control_type
458
459! **************************************************************************************************
460! \brief Control parameters for simplified Tamm Dancoff approximation (sTDA)
461! \par ATTRIBUTES
462! \par NOTES
463! **************************************************************************************************
465 LOGICAL :: do_ewald = .false.
466 LOGICAL :: do_exchange = .false.
467 REAL(kind=dp) :: hfx_fraction = 0.0_dp
468 REAL(kind=dp) :: eps_td_filter = 0.0_dp
469 REAL(kind=dp) :: mn_alpha = 0.0_dp
470 REAL(kind=dp) :: mn_beta = 0.0_dp
471 REAL(kind=dp) :: coulomb_sr_cut = 0.0_dp
472 REAL(kind=dp) :: coulomb_sr_eps = 0.0_dp
473 END TYPE stda_control_type
474
475! **************************************************************************************************
476! \brief Control parameters for smeared occupation
477! \par ATTRIBUTES
478! \par NOTES
479! **************************************************************************************************
481 REAL(kind=dp), DIMENSION(:), POINTER :: fermia => null()
482 REAL(kind=dp), DIMENSION(:, :), POINTER :: fermib => null()
483 END TYPE smeared_type
484
485! **************************************************************************************************
486! \brief Control parameters for a Time-Dependent DFT calculation.
487! **************************************************************************************************
489 !> compute TDDFPT excitation energies and oscillator strengths
490 LOGICAL :: enabled = .false.
491 !> number of excited states to converge
492 INTEGER :: nstates = 0
493 !> maximal number of iterations to be performed
494 INTEGER :: niters = 0
495 !> maximal number of Krylov space vectors
496 INTEGER :: nkvs = 0
497 !> number of unoccupied (virtual) molecular orbitals to consider
498 INTEGER :: nlumo = 0
499 !> minimal number of MPI processes to be used per excited state
500 INTEGER :: nprocs = 0
501 !> type of kernel function/approximation to use
502 INTEGER :: kernel = 0
503 !> for full kernel, do we have HFX/ADMM
504 LOGICAL :: do_hfx = .false.
505 LOGICAL :: do_admm = .false.
506 !> for full kernel, do we have short-range/long-range HFX and/or Kxc potential
507 LOGICAL :: do_hfxsr = .false.
508 LOGICAL :: hfxsr_re_int = .true.
509 INTEGER :: hfxsr_primbas = 0
510 LOGICAL :: do_hfxlr = .false.
511 REAL(kind=dp) :: hfxlr_rcut = 0.0_dp, hfxlr_scale = 0.0_dp
512 LOGICAL :: do_exck = .false.
513 !> options used in sTDA calculation (Kernel)
514 TYPE(stda_control_type) :: stda_control = stda_control_type()
515 !> algorithm to correct orbital energies
516 INTEGER :: oe_corr = 0
517 !> eigenvalue shifts
518 REAL(kind=dp) :: ev_shift = 0.0_dp, eos_shift = 0.0_dp
519 !> target accuracy
520 REAL(kind=dp) :: conv = 0.0_dp
521 !> the smallest excitation amplitude to print
522 REAL(kind=dp) :: min_excitation_amplitude = 0.0_dp
523 !> threshold which controls when two wave functions considered to be orthogonal:
524 !> maxabs(Ci^T * S * Cj) <= orthogonal_eps
525 REAL(kind=dp) :: orthogonal_eps = 0.0_dp
526 !> read guess wave functions from restart file if exists
527 LOGICAL :: is_restart = .false.
528 !> compute triplet excited states using spin-unpolarised molecular orbitals
529 LOGICAL :: rks_triplets = .false.
530 !> local resolution of identity for Coulomb contribution
531 LOGICAL :: do_lrigpw = .false.
532 !> smeared occupation
533 LOGICAL :: do_smearing = .false.
534 ! automatic generation of auxiliary basis for LRI-TDDFT
535 INTEGER :: auto_basis_p_lri_aux = 1
536 !> use symmetric definition of ADMM Kernel correction
537 LOGICAL :: admm_symm = .false.
538 !> Use/Ignore possible ADMM Kernel XC correction
539 LOGICAL :: admm_xc_correction = .false.
540 ! Compute exciton descriptors
541 LOGICAL :: do_exciton_descriptors = .false.
542 LOGICAL :: do_directional_exciton_descriptors = .false.
543 !
544 ! DIPOLE_MOMENTS subsection
545 !
546 ! form of the dipole operator used to compute oscillator strengths
547 INTEGER :: dipole_form = 0
548 !> type of the reference point used for calculation of electrostatic dipole moments
549 INTEGER :: dipole_reference = 0
550 !> user-defined reference point
551 REAL(kind=dp), DIMENSION(:), POINTER :: dipole_ref_point => null()
552 !
553 ! SOC subsection
554 LOGICAL :: do_soc = .false.
555 !
556 ! MGRID subsection
557 !
558 !> number of plain-wave grids
559 INTEGER :: mgrid_ngrids = 0
560 !> create commensurate grids (progression factor and cutoff values of sub-grids will be ignored)
561 LOGICAL :: mgrid_commensurate_mgrids = .false.
562 !> signals that MGRID section has been explicitly given. Other mgrid_* variables
563 !> are not initialised when it is equal to .FALSE. as in this case the default
564 !> set of plain-wave grids will be used
565 LOGICAL :: mgrid_is_explicit = .false.
566 !> same as qs_control%realspace_mgrids
567 LOGICAL :: mgrid_realspace_mgrids = .false.
568 !> do not perform load balancing
569 LOGICAL :: mgrid_skip_load_balance = .false.
570 !> cutoff value at the finest grid level
571 REAL(kind=dp) :: mgrid_cutoff = 0.0_dp
572 !> cutoff at the next grid level will be smaller then the cutoff
573 !> at the current grid by this number of times
574 REAL(kind=dp) :: mgrid_progression_factor = 0.0_dp
575 !> cutoff that determines to which grid a particular Gaussian function will be mapped
576 REAL(kind=dp) :: mgrid_relative_cutoff = 0.0_dp
577 !> manually provided the list of cutoff values for each grid level
578 !> (when it is null(), the cutoff values will be assigned automatically)
579 REAL(kind=dp), DIMENSION(:), POINTER :: mgrid_e_cutoff => null()
580 !> Parameter for smeared occupation TDA
581 TYPE(smeared_type), DIMENSION(:), POINTER :: smeared_occup => null()
582 END TYPE tddfpt2_control_type
583
584! **************************************************************************************************
585!> \brief
586! **************************************************************************************************
588
589 TYPE(tddfpt2_control_type), POINTER :: tddfpt2_control => null()
590 TYPE(xas_tdp_control_type), POINTER :: xas_tdp_control => null()
591
592 END TYPE rixs_control_type
593
594! **************************************************************************************************
595! \brief Control parameters for a DFT calculation
596! \par History
597! 10.2019 added variables related to surface dipole correction [Soumya Ghosh]
598! **************************************************************************************************
600 TYPE(admm_control_type), POINTER :: admm_control => null()
601 TYPE(period_efield_type), POINTER :: period_efield => null()
602 TYPE(qs_control_type), POINTER :: qs_control => null()
603 TYPE(rtp_control_type), POINTER :: rtp_control => null()
604 TYPE(sccs_control_type), POINTER :: sccs_control => null()
605 TYPE(tddfpt2_control_type), POINTER :: tddfpt2_control => null()
606 TYPE(rixs_control_type), POINTER :: rixs_control => null()
607 TYPE(xas_control_type), POINTER :: xas_control => null()
608 TYPE(expot_control_type), POINTER :: expot_control => null()
609 TYPE(maxwell_control_type), POINTER :: maxwell_control => null()
610 TYPE(smeagol_control_type), POINTER :: smeagol_control => null()
611 TYPE(efield_p_type), POINTER, &
612 DIMENSION(:) :: efield_fields => null()
613 TYPE(hairy_probes_type), POINTER, &
614 DIMENSION(:) :: probe => null()
615 INTEGER :: nspins = 0, &
616 charge = 0, &
617 multiplicity = 0, &
618 sic_method_id = 0, &
619 plus_u_method_id = 0, &
620 dir_surf_dip = 0, &
621 nimages = 1
622 INTEGER :: sic_list_id = 0
623 INTEGER :: auto_basis_ri_aux = 1, &
624 auto_basis_aux_fit = 1, &
625 auto_basis_lri_aux = 1, &
626 auto_basis_p_lri_aux = 1, &
627 auto_basis_ri_hxc = 1, &
628 auto_basis_ri_xas = 1, &
629 auto_basis_ri_hfx = 1
630 REAL(kind=dp) :: relax_multiplicity = 0.0_dp, &
631 sic_scaling_a = 0.0_dp, &
632 sic_scaling_b = 0.0_dp, &
633 pos_dir_surf_dip = 0.0_dp
634 LOGICAL :: do_xas_calculation = .false., &
635 do_xas_tdp_calculation = .false., &
636 drho_by_collocation = .false., &
637 use_kinetic_energy_density = .false., &
638 restricted = .false., &
639 roks = .false., &
640 uks = .false., &
641 lsd = .false., &
642 dft_plus_u = .false., &
643 apply_efield = .false., &
644 apply_efield_field = .false., &
645 apply_vector_potential = .false., &
646 apply_period_efield = .false., &
647 apply_external_potential = .false., &
648 eval_external_potential = .false., &
649 do_admm = .false., &
650 do_admm_dm = .false., &
651 do_admm_mo = .false., &
652 smear = .false., &
653 low_spin_roks = .false., &
654 apply_external_density = .false., &
655 read_external_density = .false., &
656 apply_external_vxc = .false., &
657 read_external_vxc = .false., &
658 correct_surf_dip = .false., &
659 surf_dip_correct_switch = .false., &
660 switch_surf_dip = .false., &
661 correct_el_density_dip = .false., &
662 do_sccs = .false., &
663 apply_embed_pot = .false., &
664 apply_dmfet_pot = .false., &
665 hairy_probes = .false.
666 END TYPE dft_control_type
667
668 CHARACTER(len=*), PARAMETER, PRIVATE :: modulen = 'cp_control_types'
669
670 ! Public data types
671
672 PUBLIC :: dft_control_type, &
677 proj_mo_type, &
678 efield_type, &
691 smeared_type, &
693
694 ! Public subroutines
695
696 PUBLIC :: dft_control_release, &
705
706CONTAINS
707
708! **************************************************************************************************
709!> \brief create the mulliken_restraint_type
710!> \param mulliken_restraint_control ...
711!> \par History
712!> 02.2005 created [Joost VandeVondele]
713! **************************************************************************************************
714 SUBROUTINE mulliken_control_create(mulliken_restraint_control)
715 TYPE(mulliken_restraint_type), INTENT(OUT) :: mulliken_restraint_control
716
717 mulliken_restraint_control%strength = 0.1_dp
718 mulliken_restraint_control%target = 1.0_dp
719 mulliken_restraint_control%natoms = 0
720 NULLIFY (mulliken_restraint_control%atoms)
721 END SUBROUTINE mulliken_control_create
722
723! **************************************************************************************************
724!> \brief release the mulliken_restraint_type
725!> \param mulliken_restraint_control ...
726!> \par History
727!> 02.2005 created [Joost VandeVondele]
728! **************************************************************************************************
729 SUBROUTINE mulliken_control_release(mulliken_restraint_control)
730 TYPE(mulliken_restraint_type), INTENT(INOUT) :: mulliken_restraint_control
731
732 IF (ASSOCIATED(mulliken_restraint_control%atoms)) &
733 DEALLOCATE (mulliken_restraint_control%atoms)
734 mulliken_restraint_control%strength = 0.0_dp
735 mulliken_restraint_control%target = 0.0_dp
736 mulliken_restraint_control%natoms = 0
737 END SUBROUTINE mulliken_control_release
738
739! **************************************************************************************************
740!> \brief create the ddapc_restraint_type
741!> \param ddapc_restraint_control ...
742!> \par History
743!> 02.2006 created [Joost VandeVondele]
744! **************************************************************************************************
745 SUBROUTINE ddapc_control_create(ddapc_restraint_control)
746 TYPE(ddapc_restraint_type), INTENT(OUT) :: ddapc_restraint_control
747
748 ddapc_restraint_control%density_type = do_full_density
749 ddapc_restraint_control%strength = 0.1_dp
750 ddapc_restraint_control%ddapc_order_p = 0.0_dp
751 ddapc_restraint_control%functional_form = -1
752 ddapc_restraint_control%target = 1.0_dp
753 ddapc_restraint_control%natoms = 0
754 NULLIFY (ddapc_restraint_control%atoms)
755 NULLIFY (ddapc_restraint_control%coeff)
756
757 END SUBROUTINE ddapc_control_create
758
759! **************************************************************************************************
760!> \brief release the ddapc_restraint_type
761!> \param ddapc_restraint_control ...
762!> \par History
763!> 02.2006 created [Joost VandeVondele]
764! **************************************************************************************************
765 SUBROUTINE ddapc_control_release(ddapc_restraint_control)
766 TYPE(ddapc_restraint_type), INTENT(INOUT) :: ddapc_restraint_control
767
768 IF (ASSOCIATED(ddapc_restraint_control%atoms)) &
769 DEALLOCATE (ddapc_restraint_control%atoms)
770 IF (ASSOCIATED(ddapc_restraint_control%coeff)) &
771 DEALLOCATE (ddapc_restraint_control%coeff)
772 ddapc_restraint_control%strength = 0.0_dp
773 ddapc_restraint_control%target = 0.0_dp
774 ddapc_restraint_control%natoms = 0
775 END SUBROUTINE ddapc_control_release
776
777! **************************************************************************************************
778!> \brief create the s2_restraint_type
779!> \param s2_restraint_control ...
780!> \par History
781!> 03.2006 created [Joost VandeVondele]
782! **************************************************************************************************
783 SUBROUTINE s2_control_create(s2_restraint_control)
784 TYPE(s2_restraint_type), INTENT(OUT) :: s2_restraint_control
785
786 s2_restraint_control%strength = 0.1_dp
787 s2_restraint_control%s2_order_p = 0.0_dp
788 s2_restraint_control%functional_form = -1
789 s2_restraint_control%target = 1.0_dp
790 END SUBROUTINE s2_control_create
791
792! **************************************************************************************************
793!> \brief release the s2_restraint_type
794!> \param s2_restraint_control ...
795!> \par History
796!> 03.2006 created [Joost VandeVondele]
797! **************************************************************************************************
798 SUBROUTINE s2_control_release(s2_restraint_control)
799 TYPE(s2_restraint_type), INTENT(INOUT) :: s2_restraint_control
800
801 s2_restraint_control%strength = 0.0_dp
802 s2_restraint_control%target = 0.0_dp
803 END SUBROUTINE s2_control_release
804
805! **************************************************************************************************
806!> \brief allocates and perform a very basic initialization
807!> \param dft_control the object to create
808!> \par History
809!> 02.2003 created [fawzi]
810!> \author fawzi
811! **************************************************************************************************
812 SUBROUTINE dft_control_create(dft_control)
813 TYPE(dft_control_type), INTENT(OUT) :: dft_control
814
815 NULLIFY (dft_control%xas_control)
816 NULLIFY (dft_control%qs_control)
817 NULLIFY (dft_control%tddfpt2_control)
818 NULLIFY (dft_control%rixs_control)
819 NULLIFY (dft_control%efield_fields)
820 NULLIFY (dft_control%period_efield)
821 NULLIFY (dft_control%admm_control)
822 NULLIFY (dft_control%expot_control)
823 NULLIFY (dft_control%maxwell_control)
824 NULLIFY (dft_control%smeagol_control)
825 NULLIFY (dft_control%rtp_control)
826 NULLIFY (dft_control%sccs_control)
827 NULLIFY (dft_control%probe)
828 dft_control%do_sccs = .false.
829 dft_control%apply_embed_pot = .false.
830 dft_control%apply_dmfet_pot = .false.
831 dft_control%hairy_probes = .false.
832 CALL qs_control_create(dft_control%qs_control)
833 CALL tddfpt2_control_create(dft_control%tddfpt2_control)
834 CALL rixs_control_create(dft_control%rixs_control)
835 CALL smeagol_control_create(dft_control%smeagol_control)
836 END SUBROUTINE dft_control_create
837
838! **************************************************************************************************
839!> \brief ...
840!> \param dft_control ...
841!> \par History
842!> 02.2003 created [fawzi]
843!> \author fawzi
844! **************************************************************************************************
845 SUBROUTINE dft_control_release(dft_control)
846 TYPE(dft_control_type), INTENT(INOUT) :: dft_control
847
848 INTEGER :: i
849
850 CALL qs_control_release(dft_control%qs_control)
851 CALL tddfpt2_control_release(dft_control%tddfpt2_control)
852 CALL rixs_control_release(dft_control%rixs_control) ! maybe check first if allocated
853 IF (ASSOCIATED(dft_control%xas_control)) THEN
854 CALL xas_control_release(dft_control%xas_control)
855 DEALLOCATE (dft_control%xas_control)
856 END IF
857 CALL admm_control_release(dft_control%admm_control)
858 CALL expot_control_release(dft_control%expot_control)
859 CALL maxwell_control_release(dft_control%maxwell_control)
860 CALL smeagol_control_release(dft_control%smeagol_control)
861 CALL efield_fields_release(dft_control%efield_fields)
862 IF (ASSOCIATED(dft_control%probe)) THEN
863 DO i = 1, SIZE(dft_control%probe)
864 DEALLOCATE (dft_control%probe(i)%atom_ids)
865 END DO
866 DEALLOCATE (dft_control%probe)
867 END IF
868 IF (ASSOCIATED(dft_control%sccs_control)) DEALLOCATE (dft_control%sccs_control)
869 IF (ASSOCIATED(dft_control%period_efield)) THEN
870 DEALLOCATE (dft_control%period_efield)
871 END IF
872 IF (ASSOCIATED(dft_control%rtp_control)) THEN
873 CALL proj_mo_list_release(dft_control%rtp_control%proj_mo_list)
874 DEALLOCATE (dft_control%rtp_control)
875 END IF
876
877 END SUBROUTINE dft_control_release
878
879! **************************************************************************************************
880!> \brief ...
881!> \param qs_control ...
882! **************************************************************************************************
883 SUBROUTINE qs_control_create(qs_control)
884 TYPE(qs_control_type), POINTER :: qs_control
885
886 cpassert(.NOT. ASSOCIATED(qs_control))
887 ALLOCATE (qs_control)
888
889 NULLIFY (qs_control%e_cutoff)
890 NULLIFY (qs_control%gapw_control)
891 NULLIFY (qs_control%mulliken_restraint_control)
892 NULLIFY (qs_control%ddapc_restraint_control)
893 NULLIFY (qs_control%s2_restraint_control)
894 NULLIFY (qs_control%se_control)
895 NULLIFY (qs_control%dftb_control)
896 NULLIFY (qs_control%xtb_control)
897 NULLIFY (qs_control%cdft_control)
898 NULLIFY (qs_control%ddapc_restraint_control)
899
900 ALLOCATE (qs_control%mulliken_restraint_control)
901 CALL mulliken_control_create(qs_control%mulliken_restraint_control)
902 ALLOCATE (qs_control%s2_restraint_control)
903 CALL s2_control_create(qs_control%s2_restraint_control)
904 ALLOCATE (qs_control%gapw_control)
905 CALL se_control_create(qs_control%se_control)
906 CALL dftb_control_create(qs_control%dftb_control)
907 CALL xtb_control_create(qs_control%xtb_control)
908 ALLOCATE (qs_control%cdft_control)
909 CALL cdft_control_create(qs_control%cdft_control)
910 END SUBROUTINE qs_control_create
911
912! **************************************************************************************************
913!> \brief ...
914!> \param qs_control ...
915! **************************************************************************************************
916 SUBROUTINE qs_control_release(qs_control)
917 TYPE(qs_control_type), POINTER :: qs_control
918
919 INTEGER :: i
920
921 IF (ASSOCIATED(qs_control)) THEN
922 CALL mulliken_control_release(qs_control%mulliken_restraint_control)
923 DEALLOCATE (qs_control%mulliken_restraint_control)
924 CALL s2_control_release(qs_control%s2_restraint_control)
925 DEALLOCATE (qs_control%s2_restraint_control)
926 CALL se_control_release(qs_control%se_control)
927 CALL dftb_control_release(qs_control%dftb_control)
928 CALL xtb_control_release(qs_control%xtb_control)
929 IF (ASSOCIATED(qs_control%cdft_control)) THEN
930 CALL cdft_control_release(qs_control%cdft_control)
931 DEALLOCATE (qs_control%cdft_control)
932 END IF
933
934 IF (ASSOCIATED(qs_control%e_cutoff)) THEN
935 DEALLOCATE (qs_control%e_cutoff)
936 END IF
937 IF (ASSOCIATED(qs_control%gapw_control)) THEN
938 DEALLOCATE (qs_control%gapw_control)
939 END IF
940 IF (ASSOCIATED(qs_control%ddapc_restraint_control)) THEN
941 DO i = 1, SIZE(qs_control%ddapc_restraint_control)
942 CALL ddapc_control_release(qs_control%ddapc_restraint_control(i))
943 END DO
944 DEALLOCATE (qs_control%ddapc_restraint_control)
945 END IF
946 DEALLOCATE (qs_control)
947 END IF
948 END SUBROUTINE qs_control_release
949
950! **************************************************************************************************
951!> \brief allocate control options for Time-Dependent Density Functional Theory calculation
952!> \param tddfpt_control an object to create
953!> \par History
954!> * 05.2016 created [Sergey Chulkov]
955! **************************************************************************************************
956 SUBROUTINE tddfpt2_control_create(tddfpt_control)
957 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
958
959 CHARACTER(len=*), PARAMETER :: routinen = 'tddfpt2_control_create'
960
961 INTEGER :: handle
962
963 cpassert(.NOT. ASSOCIATED(tddfpt_control))
964 CALL timeset(routinen, handle)
965
966 ALLOCATE (tddfpt_control)
967 tddfpt_control%do_soc = .false.
968
969 CALL timestop(handle)
970 END SUBROUTINE tddfpt2_control_create
971
972! **************************************************************************************************
973!> \brief release memory allocated for TDDFT control options
974!> \param tddfpt_control an object to release
975!> \par History
976!> * 05.2016 created [Sergey Chulkov]
977! **************************************************************************************************
978 SUBROUTINE tddfpt2_control_release(tddfpt_control)
979 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
980
981 CHARACTER(len=*), PARAMETER :: routinen = 'tddfpt2_control_release'
982
983 INTEGER :: handle
984
985 CALL timeset(routinen, handle)
986
987 IF (ASSOCIATED(tddfpt_control)) THEN
988 DEALLOCATE (tddfpt_control)
989 END IF
990
991 CALL timestop(handle)
992 END SUBROUTINE tddfpt2_control_release
993
994! **************************************************************************************************
995!> \brief Creates and initializes the rixs_control_type
996!> \param rixs_control the type to initialize
997! **************************************************************************************************
998 SUBROUTINE rixs_control_create(rixs_control)
999 TYPE(rixs_control_type), POINTER :: rixs_control
1000
1001 cpassert(.NOT. ASSOCIATED(rixs_control))
1002 ALLOCATE (rixs_control)
1003
1004 NULLIFY (rixs_control%tddfpt2_control)
1005 CALL tddfpt2_control_create(rixs_control%tddfpt2_control)
1006 NULLIFY (rixs_control%xas_tdp_control)
1007 CALL xas_tdp_control_create(rixs_control%xas_tdp_control)
1008
1009 END SUBROUTINE rixs_control_create
1010
1011! **************************************************************************************************
1012!> \brief Releases the rixs_control_type
1013!> \param rixs_control ...
1014! **************************************************************************************************
1015 SUBROUTINE rixs_control_release(rixs_control)
1016 TYPE(rixs_control_type), POINTER :: rixs_control
1017
1018 IF (ASSOCIATED(rixs_control)) THEN
1019 CALL tddfpt2_control_release(rixs_control%tddfpt2_control)
1020 CALL xas_tdp_control_release(rixs_control%xas_tdp_control)
1021
1022 DEALLOCATE (rixs_control)
1023 END IF
1024
1025 END SUBROUTINE rixs_control_release
1026
1027! **************************************************************************************************
1028!> \brief ...
1029!> \param proj_mo_list ...
1030! **************************************************************************************************
1031 SUBROUTINE proj_mo_list_release(proj_mo_list)
1032 TYPE(proj_mo_p_type), DIMENSION(:), POINTER :: proj_mo_list
1033
1034 INTEGER :: i, mo_ref_nbr
1035
1036 IF (ASSOCIATED(proj_mo_list)) THEN
1037 DO i = 1, SIZE(proj_mo_list)
1038 IF (ASSOCIATED(proj_mo_list(i)%proj_mo)) THEN
1039 IF (ALLOCATED(proj_mo_list(i)%proj_mo%ref_mo_index)) &
1040 DEALLOCATE (proj_mo_list(i)%proj_mo%ref_mo_index)
1041 IF (ALLOCATED(proj_mo_list(i)%proj_mo%mo_ref)) THEN
1042 DO mo_ref_nbr = 1, SIZE(proj_mo_list(i)%proj_mo%mo_ref)
1043 CALL cp_fm_release(proj_mo_list(i)%proj_mo%mo_ref(mo_ref_nbr))
1044 END DO
1045 DEALLOCATE (proj_mo_list(i)%proj_mo%mo_ref)
1046 END IF
1047 IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_index)) &
1048 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_index)
1049 IF (ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_occ)) &
1050 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_occ)
1051 DEALLOCATE (proj_mo_list(i)%proj_mo)
1052 END IF
1053 END DO
1054 DEALLOCATE (proj_mo_list)
1055 END IF
1056 END SUBROUTINE proj_mo_list_release
1057
1058! **************************************************************************************************
1059!> \brief ...
1060!> \param efield_fields ...
1061! **************************************************************************************************
1062 SUBROUTINE efield_fields_release(efield_fields)
1063 TYPE(efield_p_type), DIMENSION(:), POINTER :: efield_fields
1064
1065 INTEGER :: i
1066
1067 IF (ASSOCIATED(efield_fields)) THEN
1068 DO i = 1, SIZE(efield_fields)
1069 IF (ASSOCIATED(efield_fields(i)%efield)) THEN
1070 IF (ASSOCIATED(efield_fields(i)%efield%envelop_r_vars)) THEN
1071 DEALLOCATE (efield_fields(i)%efield%envelop_r_vars)
1072 END IF
1073 IF (ASSOCIATED(efield_fields(i)%efield%envelop_i_vars)) THEN
1074 DEALLOCATE (efield_fields(i)%efield%envelop_i_vars)
1075 END IF
1076 IF (ASSOCIATED(efield_fields(i)%efield%polarisation)) &
1077 DEALLOCATE (efield_fields(i)%efield%polarisation)
1078 DEALLOCATE (efield_fields(i)%efield)
1079 END IF
1080 END DO
1081 DEALLOCATE (efield_fields)
1082 END IF
1083 END SUBROUTINE efield_fields_release
1084
1085! **************************************************************************************************
1086!> \brief ...
1087!> \param dftb_control ...
1088! **************************************************************************************************
1089 SUBROUTINE dftb_control_create(dftb_control)
1090 TYPE(dftb_control_type), POINTER :: dftb_control
1091
1092 cpassert(.NOT. ASSOCIATED(dftb_control))
1093 ALLOCATE (dftb_control)
1094
1095 NULLIFY (dftb_control%sk_pair_list)
1096 END SUBROUTINE dftb_control_create
1097
1098! **************************************************************************************************
1099!> \brief ...
1100!> \param dftb_control ...
1101! **************************************************************************************************
1102 SUBROUTINE dftb_control_release(dftb_control)
1103 TYPE(dftb_control_type), POINTER :: dftb_control
1104
1105 IF (ASSOCIATED(dftb_control)) THEN
1106 IF (ASSOCIATED(dftb_control%sk_pair_list)) THEN
1107 DEALLOCATE (dftb_control%sk_pair_list)
1108 END IF
1109 DEALLOCATE (dftb_control)
1110 END IF
1111 END SUBROUTINE dftb_control_release
1112
1113! **************************************************************************************************
1114!> \brief ...
1115!> \param xtb_control ...
1116! **************************************************************************************************
1117 SUBROUTINE xtb_control_create(xtb_control)
1118 TYPE(xtb_control_type), POINTER :: xtb_control
1119
1120 cpassert(.NOT. ASSOCIATED(xtb_control))
1121 ALLOCATE (xtb_control)
1122
1123 NULLIFY (xtb_control%kab_param)
1124 NULLIFY (xtb_control%kab_vals)
1125 NULLIFY (xtb_control%kab_types)
1126 NULLIFY (xtb_control%nonbonded)
1127 NULLIFY (xtb_control%rcpair)
1128
1129 END SUBROUTINE xtb_control_create
1130
1131! **************************************************************************************************
1132!> \brief ...
1133!> \param xtb_control ...
1134! **************************************************************************************************
1135 SUBROUTINE xtb_control_release(xtb_control)
1136 TYPE(xtb_control_type), POINTER :: xtb_control
1137
1138 IF (ASSOCIATED(xtb_control)) THEN
1139 IF (ASSOCIATED(xtb_control%kab_param)) THEN
1140 DEALLOCATE (xtb_control%kab_param)
1141 END IF
1142 IF (ASSOCIATED(xtb_control%kab_vals)) THEN
1143 DEALLOCATE (xtb_control%kab_vals)
1144 END IF
1145 IF (ASSOCIATED(xtb_control%kab_types)) THEN
1146 DEALLOCATE (xtb_control%kab_types)
1147 END IF
1148 IF (ASSOCIATED(xtb_control%rcpair)) THEN
1149 DEALLOCATE (xtb_control%rcpair)
1150 END IF
1151 IF (ASSOCIATED(xtb_control%nonbonded)) THEN
1152 CALL pair_potential_p_release(xtb_control%nonbonded)
1153 END IF
1154 DEALLOCATE (xtb_control)
1155 END IF
1156 END SUBROUTINE xtb_control_release
1157
1158! **************************************************************************************************
1159!> \brief ...
1160!> \param se_control ...
1161! **************************************************************************************************
1162 SUBROUTINE se_control_create(se_control)
1163 TYPE(semi_empirical_control_type), POINTER :: se_control
1164
1165 cpassert(.NOT. ASSOCIATED(se_control))
1166 ALLOCATE (se_control)
1167 END SUBROUTINE se_control_create
1168
1169! **************************************************************************************************
1170!> \brief ...
1171!> \param se_control ...
1172! **************************************************************************************************
1173 SUBROUTINE se_control_release(se_control)
1174 TYPE(semi_empirical_control_type), POINTER :: se_control
1175
1176 IF (ASSOCIATED(se_control)) THEN
1177 DEALLOCATE (se_control)
1178 END IF
1179 END SUBROUTINE se_control_release
1180
1181! **************************************************************************************************
1182!> \brief ...
1183!> \param admm_control ...
1184! **************************************************************************************************
1185 SUBROUTINE admm_control_create(admm_control)
1186 TYPE(admm_control_type), POINTER :: admm_control
1187
1188 cpassert(.NOT. ASSOCIATED(admm_control))
1189 ALLOCATE (admm_control)
1190
1191 END SUBROUTINE admm_control_create
1192
1193! **************************************************************************************************
1194!> \brief ...
1195!> \param admm_control ...
1196! **************************************************************************************************
1197 SUBROUTINE admm_control_release(admm_control)
1198 TYPE(admm_control_type), POINTER :: admm_control
1199
1200 IF (ASSOCIATED(admm_control)) THEN
1201 DEALLOCATE (admm_control)
1202 END IF
1203 END SUBROUTINE admm_control_release
1204
1205! **************************************************************************************************
1206!> \brief ...
1207!> \param expot_control ...
1208! **************************************************************************************************
1209 SUBROUTINE expot_control_create(expot_control)
1210 TYPE(expot_control_type), POINTER :: expot_control
1211
1212 cpassert(.NOT. ASSOCIATED(expot_control))
1213 ALLOCATE (expot_control)
1214 expot_control%read_from_cube = .false.
1215 expot_control%maxwell_solver = .false.
1216 expot_control%static = .true.
1217 expot_control%scaling_factor = 1.0_dp
1218
1219 END SUBROUTINE expot_control_create
1220
1221! **************************************************************************************************
1222!> \brief ...
1223!> \param expot_control ...
1224! **************************************************************************************************
1225 SUBROUTINE expot_control_release(expot_control)
1226 TYPE(expot_control_type), POINTER :: expot_control
1227
1228 IF (ASSOCIATED(expot_control)) THEN
1229 DEALLOCATE (expot_control)
1230 END IF
1231
1232 END SUBROUTINE expot_control_release
1233
1234! **************************************************************************************************
1235!> \brief ...
1236!> \param maxwell_control ...
1237! **************************************************************************************************
1238 SUBROUTINE maxwell_control_create(maxwell_control)
1239 TYPE(maxwell_control_type), POINTER :: maxwell_control
1240
1241 cpassert(.NOT. ASSOCIATED(maxwell_control))
1242 ALLOCATE (maxwell_control)
1243
1244 END SUBROUTINE maxwell_control_create
1245
1246! **************************************************************************************************
1247!> \brief ...
1248!> \param maxwell_control ...
1249! **************************************************************************************************
1250 SUBROUTINE maxwell_control_release(maxwell_control)
1251 TYPE(maxwell_control_type), POINTER :: maxwell_control
1252
1253 IF (ASSOCIATED(maxwell_control)) THEN
1254 DEALLOCATE (maxwell_control)
1255 END IF
1256
1257 END SUBROUTINE maxwell_control_release
1258
1259END 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.