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