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