35#include "./base/base_uses.f90"
45 REAL(kind=
dp) :: alpha = 0.0_dp
46 REAL(kind=
dp) :: mu = 0.0_dp
47 REAL(kind=
dp) :: t = 0.0_dp
48 REAL(kind=
dp) :: eps_hp = 0.0_dp
49 INTEGER :: natoms = 0, &
52 INTEGER,
DIMENSION(:),
POINTER :: atom_ids => null()
59 LOGICAL :: spherical = .false.
60 LOGICAL :: fullspace = .false.
61 INTEGER,
DIMENSION(2) :: distribution_layout = 0
62 INTEGER :: blocked = 0
63 END TYPE pw_grid_option
69 INTEGER,
DIMENSION(:),
ALLOCATABLE :: ref_mo_index
70 INTEGER :: ref_mo_spin = 1
71 INTEGER :: ref_nlumo = 0
72 LOGICAL :: sum_on_all_ref = .false.
73 INTEGER,
DIMENSION(:),
ALLOCATABLE :: td_mo_index
74 REAL(
dp),
DIMENSION(:),
ALLOCATABLE :: td_mo_occ
75 INTEGER :: td_mo_spin = 1
76 LOGICAL :: sum_on_all_td = .false.
77 CHARACTER(LEN=default_path_length) :: ref_mo_file_name =
""
78 LOGICAL :: propagate_ref = .false.
85 END TYPE proj_mo_p_type
91 LOGICAL :: converged = .false.
92 REAL(kind=
dp) :: eps_ener = 0.0_dp
93 INTEGER :: max_iter = 0
94 INTEGER :: mat_exp = 0
95 INTEGER :: propagator = 0
96 LOGICAL :: fixed_ions = .false.
99 INTEGER :: initial_wfn = 0
100 REAL(
dp) :: eps_exp = 0.0_dp
101 LOGICAL :: initial_step = .false.
102 LOGICAL :: hfx_redistribute = .false.
103 INTEGER :: aspc_order = 0
104 INTEGER :: sc_check_start = 0
105 LOGICAL :: apply_wfn_mix_init_restart = .false.
106 LOGICAL :: apply_delta_pulse = .false.
107 LOGICAL :: apply_delta_pulse_mag = .false.
108 LOGICAL :: periodic = .false.
109 LOGICAL :: linear_scaling = .false.
110 LOGICAL :: write_restart = .false.
111 INTEGER :: mcweeny_max_iter = 0
112 INTEGER :: acc_ref = 0
113 REAL(
dp) :: mcweeny_eps = 0.0_dp
114 INTEGER,
DIMENSION(3) :: delta_pulse_direction = 0
115 REAL(kind=
dp) :: delta_pulse_scale = 0.0_dp
116 LOGICAL :: velocity_gauge = .false.
117 REAL(kind=
dp),
DIMENSION(3) :: field = 0.0_dp
118 REAL(kind=
dp),
DIMENSION(3) :: vec_pot = 0.0_dp
119 LOGICAL :: nl_gauge_transform = .false.
120 LOGICAL :: is_proj_mo = .false.
121 TYPE(proj_mo_p_type),
DIMENSION(:), &
122 POINTER :: proj_mo_list => null()
129 LOGICAL :: self_consistent = .false.
130 LOGICAL :: orthogonal_basis = .false.
131 LOGICAL :: dispersion = .false.
132 INTEGER :: dispersion_type = 0
133 LOGICAL :: dftb3_diagonal = .false.
134 LOGICAL :: hb_sr_damp = .false.
135 REAL(kind=
dp) :: hb_sr_para = 0.0_dp
136 REAL(kind=
dp) :: eps_disp = 0.0_dp
137 REAL(kind=
dp) :: epscn = 0.0_dp
138 REAL(kind=
dp) :: exp_pre = 0.0_dp
139 REAL(kind=
dp) :: scaling = 0.0_dp
140 REAL(kind=
dp) :: rcdisp = 0.0_dp
141 REAL(kind=
dp),
DIMENSION(3) :: sd3 = 0.0_dp
142 REAL(kind=
dp),
DIMENSION(4) :: sd3bj = 0.0_dp
143 LOGICAL :: do_ewald = .false.
144 CHARACTER(LEN=default_path_length) :: sk_file_path =
""
145 CHARACTER(LEN=default_path_length) :: sk_file_list =
""
146 CHARACTER(LEN=default_string_length), &
147 DIMENSION(:, :),
POINTER :: sk_pair_list => null()
148 CHARACTER(LEN=default_path_length) :: uff_force_field =
""
149 CHARACTER(LEN=default_path_length) :: dispersion_parameter_file =
""
157 INTEGER :: gfn_type = 1
159 LOGICAL :: do_ewald = .false.
160 LOGICAL :: do_tblite = .false.
163 INTEGER :: h_sto_ng = 0
164 INTEGER :: tblite_method = 0
166 INTEGER :: vdw_type = -1
167 CHARACTER(LEN=default_path_length) :: parameter_file_path =
""
168 CHARACTER(LEN=default_path_length) :: parameter_file_name =
""
170 CHARACTER(LEN=default_path_length) :: dispersion_parameter_file =
""
171 REAL(kind=
dp) :: epscn = 0.0_dp
172 REAL(kind=
dp) :: rcdisp = 0.0_dp
173 REAL(kind=
dp) :: s6 = 0.0_dp, s8 = 0.0_dp
174 REAL(kind=
dp) :: a1 = 0.0_dp, a2 = 0.0_dp
176 REAL(kind=
dp) :: ks = 0.0_dp, kp = 0.0_dp, kd = 0.0_dp, ksp = 0.0_dp, k2sh = 0.0_dp
177 REAL(kind=
dp) :: kg = 0.0_dp, kf = 0.0_dp
178 REAL(kind=
dp) :: kcns = 0.0_dp, kcnp = 0.0_dp, kcnd = 0.0_dp
179 REAL(kind=
dp) :: ken = 0.0_dp
180 REAL(kind=
dp) :: ksen = 0.0_dp, kpen = 0.0_dp, kden = 0.0_dp
181 REAL(kind=
dp) :: ben = 0.0_dp
182 REAL(kind=
dp) :: kxr = 0.0_dp, kx2 = 0.0_dp
183 REAL(kind=
dp) :: enscale = 0.0_dp
185 LOGICAL :: xb_interaction = .false.
186 LOGICAL :: do_nonbonded = .false.
187 LOGICAL :: coulomb_interaction = .false.
188 LOGICAL :: coulomb_lr = .false.
189 LOGICAL :: tb3_interaction = .false.
190 LOGICAL :: check_atomic_charges = .false.
191 LOGICAL :: var_dipole = .false.
193 REAL(kind=
dp) :: xb_radius = 0.0_dp
194 REAL(kind=
dp) :: coulomb_sr_cut = 0.0_dp
195 REAL(kind=
dp) :: coulomb_sr_eps = 0.0_dp
197 CHARACTER(LEN=default_string_length), &
198 DIMENSION(:, :),
POINTER :: kab_param => null()
199 INTEGER,
DIMENSION(:, :),
POINTER :: kab_types => null()
200 INTEGER :: kab_nval = 0
201 REAL,
DIMENSION(:),
POINTER :: kab_vals => null()
204 REAL(kind=
dp) :: eps_pair = 0.0_dp
205 REAL(kind=
dp),
DIMENSION(:, :), &
206 POINTER :: rcpair => null()
209 REAL(kind=
dp) :: ksrb = 0.0_dp, esrb = 0.0_dp, gscal = 0.0_dp
210 REAL(kind=
dp) :: c1srb = 0.0_dp, c2srb = 0.0_dp, shift = 0.0_dp
213 INTEGER :: enshift_type = 1
221 LOGICAL :: orthogonal_basis = .false.
222 LOGICAL :: analytical_gradients = .false.
223 LOGICAL :: force_kdsod_ex = .false.
224 LOGICAL :: do_ewald = .false., do_ewald_r3 = .false., do_ewald_gks = .false.
225 INTEGER :: integral_screening = 0, periodic_type = 0
226 INTEGER :: max_multipole = 0
227 INTEGER :: ga_ncells = 0
228 REAL(kind=
dp) :: delta = 0.0_dp
230 LOGICAL :: dispersion = .false.
231 REAL(kind=
dp) :: rcdisp = 0.0_dp
232 REAL(kind=
dp) :: epscn = 0.0_dp
233 REAL(kind=
dp),
DIMENSION(3) :: sd3 = 0.0_dp
234 CHARACTER(LEN=default_path_length) :: dispersion_parameter_file =
""
236 REAL(kind=
dp) :: cutoff_lrc = 0.0_dp, taper_lrc = 0.0_dp, range_lrc = 0.0_dp
237 REAL(kind=
dp) :: cutoff_cou = 0.0_dp, taper_cou = 0.0_dp, range_cou = 0.0_dp
238 REAL(kind=
dp) :: cutoff_exc = 0.0_dp, taper_exc = 0.0_dp, range_exc = 0.0_dp
239 REAL(kind=
dp) :: taper_scr = 0.0_dp, range_scr = 0.0_dp
246 INTEGER :: basis_1c = 0
247 REAL(kind=
dp) :: eps_fit = 0.0_dp, &
249 eps_vrho0 = 0.0_dp, &
252 INTEGER :: ladd_rho0 = 0, &
256 LOGICAL :: lrho1_eq_lrho0 = .false.
257 LOGICAL :: alpha0_hard_from_input = .false., &
258 force_paw = .false., &
259 non_paw_atoms = .false., &
260 nopaw_as_gpw = .false.
261 REAL(kind=
dp) :: alpha0_hard = 0.0_dp
262 REAL(kind=
dp) :: max_rad_local = 0.0_dp
269 REAL(kind=
dp) :: actual_time = 0.0_dp
270 REAL(kind=
dp),
DIMENSION(:),
POINTER :: polarisation => null()
271 INTEGER :: envelop_id = 0
272 REAL(kind=
dp),
DIMENSION(:),
POINTER :: envelop_r_vars => null()
273 INTEGER,
DIMENSION(:),
POINTER :: envelop_i_vars => null()
274 REAL(kind=
dp) :: strength = 0.0_dp
275 REAL(kind=
dp) :: phase_offset = 0.0_dp
276 REAL(kind=
dp) :: wavelength = 0.0_dp
277 REAL(kind=
dp),
DIMENSION(3) :: vec_pot_initial = 0.0_dp
282 END TYPE efield_p_type
287 TYPE period_efield_type
288 LOGICAL :: displacement_field = .false.
289 REAL(kind=
dp),
DIMENSION(3) :: polarisation = 0.0_dp
290 REAL(kind=
dp),
DIMENSION(3) :: d_filter = 0.0_dp
291 REAL(kind=
dp) :: strength = 0.0_dp
292 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: strength_list
293 INTEGER :: start_frame = 0
294 INTEGER :: end_frame = -1
295 END TYPE period_efield_type
301 REAL(kind=
dp) :: strength = 0.0_dp
302 REAL(kind=
dp) ::
TARGET = 0.0_dp
303 INTEGER :: natoms = 0
304 INTEGER,
POINTER,
DIMENSION(:) :: atoms => null()
311 INTEGER :: ref_count = 0
312 REAL(kind=
dp) :: strength = 0.0_dp
313 REAL(kind=
dp) ::
TARGET = 0.0_dp
314 REAL(kind=
dp) :: ddapc_order_p = 0.0_dp
315 INTEGER :: functional_form = 0
316 INTEGER :: natoms = 0
317 INTEGER,
POINTER,
DIMENSION(:) :: atoms => null()
318 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: coeff => null()
319 INTEGER :: density_type = 0
326 REAL(kind=
dp) :: strength = 0.0_dp
327 REAL(kind=
dp) ::
TARGET = 0.0_dp
328 REAL(kind=
dp) :: s2_order_p = 0.0_dp
329 INTEGER :: functional_form = 0
336 INTEGER,
DIMENSION(:),
ALLOCATABLE ::
list
337 END TYPE admm_block_type
340 REAL(kind=
dp) :: eps_filter = 0.0_dp
341 INTEGER :: admm_type = 0
342 INTEGER :: purification_method = 0
343 INTEGER :: method = 0
344 LOGICAL :: charge_constrain = .false.
345 INTEGER :: scaling_model = 0
346 INTEGER :: aux_exch_func = 0
347 LOGICAL :: aux_exch_func_param = .false.
348 REAL(kind=
dp),
DIMENSION(3) :: aux_x_param = 0.0_dp
349 TYPE(admm_block_type),
DIMENSION(:), &
350 ALLOCATABLE :: blocks
357 LOGICAL :: read_from_cube = .false.
358 LOGICAL :: maxwell_solver = .false.
359 LOGICAL :: static = .false.
360 REAL(kind=
dp) :: scaling_factor = 0.0_dp
367 LOGICAL :: log_test = .false.
368 INTEGER :: int_test = 0
369 REAL(kind=
dp) :: real_test = 0.0_dp
378 INTEGER :: method_id = 0
379 REAL(kind=
dp) :: eps_core_charge = 0.0_dp, &
380 eps_kg_orb = 0.0_dp, &
381 eps_pgf_orb = 0.0_dp, &
384 eps_rho_gspace = 0.0_dp, &
385 eps_rho_rspace = 0.0_dp, &
386 eps_filter_matrix = 0.0_dp, &
387 eps_gvg_rspace = 0.0_dp, &
388 progression_factor = 0.0_dp, &
389 relative_cutoff = 0.0_dp
390 LOGICAL :: do_almo_scf = .false.
391 LOGICAL :: do_ls_scf = .false.
392 LOGICAL :: do_kg = .false.
393 LOGICAL :: commensurate_mgrids = .false.
394 LOGICAL :: realspace_mgrids = .false.
395 LOGICAL :: gapw = .false., gapw_xc = .false., gpw = .false., pao = .false.
396 LOGICAL :: lrigpw = .false., rigpw = .false.
397 LOGICAL :: lri_optbas = .false.
398 LOGICAL :: ofgpw = .false.
399 LOGICAL :: dftb = .false.
400 LOGICAL :: xtb = .false.
401 LOGICAL :: semi_empirical = .false.
402 LOGICAL :: mulliken_restraint = .false.
403 LOGICAL :: ddapc_restraint = .false.
404 LOGICAL :: ddapc_restraint_is_spin = .false.
405 LOGICAL :: ddapc_explicit_potential = .false.
406 LOGICAL :: cdft = .false.
407 LOGICAL :: et_coupling_calc = .false.
408 LOGICAL :: s2_restraint = .false.
409 INTEGER :: do_ppl_method = 0
410 INTEGER :: wf_interpolation_method_nr = 0
411 INTEGER :: wf_extrapolation_order = 0
412 INTEGER :: periodicity = 0
413 REAL(kind=
dp) :: pairlist_radius = 0.0_dp
414 REAL(kind=
dp) :: cutoff = 0.0_dp
415 REAL(kind=
dp),
DIMENSION(:),
POINTER :: e_cutoff => null()
417 POINTER :: mulliken_restraint_control => null()
419 DIMENSION(:),
POINTER :: ddapc_restraint_control => null()
425 POINTER :: se_control => null()
427 TYPE(pw_grid_option) :: pw_grid_opt = pw_grid_option()
428 LOGICAL :: skip_load_balance_distributed = .false.
430 LOGICAL :: ref_embed_subsys = .false.
431 LOGICAL :: cluster_embed_subsys = .false.
432 LOGICAL :: high_level_embed_subsys = .false.
433 LOGICAL :: dfet_embedded = .false.
434 LOGICAL :: dmfet_embedded = .false.
441 LOGICAL :: sccs_activated = .false.
442 INTEGER :: derivative_method = 0, &
445 REAL(kind=
dp) :: alpha_solvent = 0.0_dp, &
447 beta_solvent = 0.0_dp, &
448 delta_rho = 0.0_dp, &
451 epsilon_solvent = 0.0_dp, &
452 gamma_solvent = 0.0_dp, &
465 LOGICAL :: do_ewald = .false.
466 LOGICAL :: do_exchange = .false.
467 REAL(kind=
dp) :: hfx_fraction = 0.0_dp
468 REAL(kind=
dp) :: eps_td_filter = 0.0_dp
469 REAL(kind=
dp) :: mn_alpha = 0.0_dp
470 REAL(kind=
dp) :: mn_beta = 0.0_dp
471 REAL(kind=
dp) :: coulomb_sr_cut = 0.0_dp
472 REAL(kind=
dp) :: coulomb_sr_eps = 0.0_dp
481 REAL(kind=
dp),
DIMENSION(:),
POINTER :: fermia => null()
482 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: fermib => null()
490 LOGICAL :: enabled = .false.
492 INTEGER :: nstates = 0
494 INTEGER :: niters = 0
500 INTEGER :: nprocs = 0
502 INTEGER :: kernel = 0
504 LOGICAL :: do_hfx = .false.
505 LOGICAL :: do_admm = .false.
507 LOGICAL :: do_hfxsr = .false.
508 LOGICAL :: hfxsr_re_int = .true.
509 INTEGER :: hfxsr_primbas = 0
510 LOGICAL :: do_hfxlr = .false.
511 REAL(kind=
dp) :: hfxlr_rcut = 0.0_dp, hfxlr_scale = 0.0_dp
512 LOGICAL :: do_exck = .false.
516 INTEGER :: oe_corr = 0
518 REAL(kind=
dp) :: ev_shift = 0.0_dp, eos_shift = 0.0_dp
520 REAL(kind=
dp) :: conv = 0.0_dp
522 REAL(kind=
dp) :: min_excitation_amplitude = 0.0_dp
525 REAL(kind=
dp) :: orthogonal_eps = 0.0_dp
527 LOGICAL :: is_restart = .false.
529 LOGICAL :: rks_triplets = .false.
531 LOGICAL :: do_lrigpw = .false.
533 LOGICAL :: do_smearing = .false.
535 INTEGER :: auto_basis_p_lri_aux = 1
537 LOGICAL :: admm_symm = .false.
539 LOGICAL :: admm_xc_correction = .false.
541 LOGICAL :: do_exciton_descriptors = .false.
542 LOGICAL :: do_directional_exciton_descriptors = .false.
547 INTEGER :: dipole_form = 0
549 INTEGER :: dipole_reference = 0
551 REAL(kind=
dp),
DIMENSION(:),
POINTER :: dipole_ref_point => null()
554 LOGICAL :: do_soc = .false.
559 INTEGER :: mgrid_ngrids = 0
561 LOGICAL :: mgrid_commensurate_mgrids = .false.
565 LOGICAL :: mgrid_is_explicit = .false.
567 LOGICAL :: mgrid_realspace_mgrids = .false.
569 LOGICAL :: mgrid_skip_load_balance = .false.
571 REAL(kind=
dp) :: mgrid_cutoff = 0.0_dp
574 REAL(kind=
dp) :: mgrid_progression_factor = 0.0_dp
576 REAL(kind=
dp) :: mgrid_relative_cutoff = 0.0_dp
579 REAL(kind=
dp),
DIMENSION(:),
POINTER :: mgrid_e_cutoff => null()
601 TYPE(period_efield_type),
POINTER :: period_efield => null()
611 TYPE(efield_p_type),
POINTER, &
612 DIMENSION(:) :: efield_fields => null()
614 DIMENSION(:) :: probe => null()
615 INTEGER :: nspins = 0, &
619 plus_u_method_id = 0, &
622 INTEGER :: sic_list_id = 0
623 INTEGER :: auto_basis_ri_aux = 1, &
624 auto_basis_aux_fit = 1, &
625 auto_basis_lri_aux = 1, &
626 auto_basis_p_lri_aux = 1, &
627 auto_basis_ri_hxc = 1, &
628 auto_basis_ri_xas = 1, &
629 auto_basis_ri_hfx = 1
630 REAL(kind=
dp) :: relax_multiplicity = 0.0_dp, &
631 sic_scaling_a = 0.0_dp, &
632 sic_scaling_b = 0.0_dp, &
633 pos_dir_surf_dip = 0.0_dp
634 LOGICAL :: do_xas_calculation = .false., &
635 do_xas_tdp_calculation = .false., &
636 drho_by_collocation = .false., &
637 use_kinetic_energy_density = .false., &
638 restricted = .false., &
643 apply_efield = .false., &
644 apply_efield_field = .false., &
645 apply_vector_potential = .false., &
646 apply_period_efield = .false., &
647 apply_external_potential = .false., &
648 eval_external_potential = .false., &
650 do_admm_dm = .false., &
651 do_admm_mo = .false., &
653 low_spin_roks = .false., &
654 apply_external_density = .false., &
655 read_external_density = .false., &
656 apply_external_vxc = .false., &
657 read_external_vxc = .false., &
658 correct_surf_dip = .false., &
659 surf_dip_correct_switch = .false., &
660 switch_surf_dip = .false., &
661 correct_el_density_dip = .false., &
663 apply_embed_pot = .false., &
664 apply_dmfet_pot = .false., &
668 CHARACTER(len=*),
PARAMETER,
PRIVATE :: modulen =
'cp_control_types'
714 SUBROUTINE mulliken_control_create(mulliken_restraint_control)
717 mulliken_restraint_control%strength = 0.1_dp
718 mulliken_restraint_control%target = 1.0_dp
719 mulliken_restraint_control%natoms = 0
720 NULLIFY (mulliken_restraint_control%atoms)
721 END SUBROUTINE mulliken_control_create
729 SUBROUTINE mulliken_control_release(mulliken_restraint_control)
732 IF (
ASSOCIATED(mulliken_restraint_control%atoms)) &
733 DEALLOCATE (mulliken_restraint_control%atoms)
734 mulliken_restraint_control%strength = 0.0_dp
735 mulliken_restraint_control%target = 0.0_dp
736 mulliken_restraint_control%natoms = 0
737 END SUBROUTINE mulliken_control_release
749 ddapc_restraint_control%strength = 0.1_dp
750 ddapc_restraint_control%ddapc_order_p = 0.0_dp
751 ddapc_restraint_control%functional_form = -1
752 ddapc_restraint_control%target = 1.0_dp
753 ddapc_restraint_control%natoms = 0
754 NULLIFY (ddapc_restraint_control%atoms)
755 NULLIFY (ddapc_restraint_control%coeff)
765 SUBROUTINE ddapc_control_release(ddapc_restraint_control)
768 IF (
ASSOCIATED(ddapc_restraint_control%atoms)) &
769 DEALLOCATE (ddapc_restraint_control%atoms)
770 IF (
ASSOCIATED(ddapc_restraint_control%coeff)) &
771 DEALLOCATE (ddapc_restraint_control%coeff)
772 ddapc_restraint_control%strength = 0.0_dp
773 ddapc_restraint_control%target = 0.0_dp
774 ddapc_restraint_control%natoms = 0
775 END SUBROUTINE ddapc_control_release
783 SUBROUTINE s2_control_create(s2_restraint_control)
786 s2_restraint_control%strength = 0.1_dp
787 s2_restraint_control%s2_order_p = 0.0_dp
788 s2_restraint_control%functional_form = -1
789 s2_restraint_control%target = 1.0_dp
790 END SUBROUTINE s2_control_create
798 SUBROUTINE s2_control_release(s2_restraint_control)
801 s2_restraint_control%strength = 0.0_dp
802 s2_restraint_control%target = 0.0_dp
803 END SUBROUTINE s2_control_release
815 NULLIFY (dft_control%xas_control)
816 NULLIFY (dft_control%qs_control)
817 NULLIFY (dft_control%tddfpt2_control)
818 NULLIFY (dft_control%rixs_control)
819 NULLIFY (dft_control%efield_fields)
820 NULLIFY (dft_control%period_efield)
821 NULLIFY (dft_control%admm_control)
822 NULLIFY (dft_control%expot_control)
823 NULLIFY (dft_control%maxwell_control)
824 NULLIFY (dft_control%smeagol_control)
825 NULLIFY (dft_control%rtp_control)
826 NULLIFY (dft_control%sccs_control)
827 NULLIFY (dft_control%probe)
828 dft_control%do_sccs = .false.
829 dft_control%apply_embed_pot = .false.
830 dft_control%apply_dmfet_pot = .false.
831 dft_control%hairy_probes = .false.
832 CALL qs_control_create(dft_control%qs_control)
833 CALL tddfpt2_control_create(dft_control%tddfpt2_control)
850 CALL qs_control_release(dft_control%qs_control)
851 CALL tddfpt2_control_release(dft_control%tddfpt2_control)
853 IF (
ASSOCIATED(dft_control%xas_control))
THEN
855 DEALLOCATE (dft_control%xas_control)
858 CALL expot_control_release(dft_control%expot_control)
859 CALL maxwell_control_release(dft_control%maxwell_control)
861 CALL efield_fields_release(dft_control%efield_fields)
862 IF (
ASSOCIATED(dft_control%probe))
THEN
863 DO i = 1,
SIZE(dft_control%probe)
864 DEALLOCATE (dft_control%probe(i)%atom_ids)
866 DEALLOCATE (dft_control%probe)
868 IF (
ASSOCIATED(dft_control%sccs_control))
DEALLOCATE (dft_control%sccs_control)
869 IF (
ASSOCIATED(dft_control%period_efield))
THEN
870 DEALLOCATE (dft_control%period_efield)
872 IF (
ASSOCIATED(dft_control%rtp_control))
THEN
873 CALL proj_mo_list_release(dft_control%rtp_control%proj_mo_list)
874 DEALLOCATE (dft_control%rtp_control)
883 SUBROUTINE qs_control_create(qs_control)
886 cpassert(.NOT.
ASSOCIATED(qs_control))
887 ALLOCATE (qs_control)
889 NULLIFY (qs_control%e_cutoff)
890 NULLIFY (qs_control%gapw_control)
891 NULLIFY (qs_control%mulliken_restraint_control)
892 NULLIFY (qs_control%ddapc_restraint_control)
893 NULLIFY (qs_control%s2_restraint_control)
894 NULLIFY (qs_control%se_control)
895 NULLIFY (qs_control%dftb_control)
896 NULLIFY (qs_control%xtb_control)
897 NULLIFY (qs_control%cdft_control)
898 NULLIFY (qs_control%ddapc_restraint_control)
900 ALLOCATE (qs_control%mulliken_restraint_control)
901 CALL mulliken_control_create(qs_control%mulliken_restraint_control)
902 ALLOCATE (qs_control%s2_restraint_control)
903 CALL s2_control_create(qs_control%s2_restraint_control)
904 ALLOCATE (qs_control%gapw_control)
905 CALL se_control_create(qs_control%se_control)
906 CALL dftb_control_create(qs_control%dftb_control)
907 CALL xtb_control_create(qs_control%xtb_control)
908 ALLOCATE (qs_control%cdft_control)
910 END SUBROUTINE qs_control_create
916 SUBROUTINE qs_control_release(qs_control)
921 IF (
ASSOCIATED(qs_control))
THEN
922 CALL mulliken_control_release(qs_control%mulliken_restraint_control)
923 DEALLOCATE (qs_control%mulliken_restraint_control)
924 CALL s2_control_release(qs_control%s2_restraint_control)
925 DEALLOCATE (qs_control%s2_restraint_control)
926 CALL se_control_release(qs_control%se_control)
927 CALL dftb_control_release(qs_control%dftb_control)
928 CALL xtb_control_release(qs_control%xtb_control)
929 IF (
ASSOCIATED(qs_control%cdft_control))
THEN
931 DEALLOCATE (qs_control%cdft_control)
934 IF (
ASSOCIATED(qs_control%e_cutoff))
THEN
935 DEALLOCATE (qs_control%e_cutoff)
937 IF (
ASSOCIATED(qs_control%gapw_control))
THEN
938 DEALLOCATE (qs_control%gapw_control)
940 IF (
ASSOCIATED(qs_control%ddapc_restraint_control))
THEN
941 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
942 CALL ddapc_control_release(qs_control%ddapc_restraint_control(i))
944 DEALLOCATE (qs_control%ddapc_restraint_control)
946 DEALLOCATE (qs_control)
948 END SUBROUTINE qs_control_release
956 SUBROUTINE tddfpt2_control_create(tddfpt_control)
959 CHARACTER(len=*),
PARAMETER :: routinen =
'tddfpt2_control_create'
963 cpassert(.NOT.
ASSOCIATED(tddfpt_control))
964 CALL timeset(routinen, handle)
966 ALLOCATE (tddfpt_control)
967 tddfpt_control%do_soc = .false.
969 CALL timestop(handle)
970 END SUBROUTINE tddfpt2_control_create
978 SUBROUTINE tddfpt2_control_release(tddfpt_control)
981 CHARACTER(len=*),
PARAMETER :: routinen =
'tddfpt2_control_release'
985 CALL timeset(routinen, handle)
987 IF (
ASSOCIATED(tddfpt_control))
THEN
988 DEALLOCATE (tddfpt_control)
991 CALL timestop(handle)
992 END SUBROUTINE tddfpt2_control_release
1001 cpassert(.NOT.
ASSOCIATED(rixs_control))
1002 ALLOCATE (rixs_control)
1004 NULLIFY (rixs_control%tddfpt2_control)
1005 CALL tddfpt2_control_create(rixs_control%tddfpt2_control)
1006 NULLIFY (rixs_control%xas_tdp_control)
1018 IF (
ASSOCIATED(rixs_control))
THEN
1019 CALL tddfpt2_control_release(rixs_control%tddfpt2_control)
1022 DEALLOCATE (rixs_control)
1031 SUBROUTINE proj_mo_list_release(proj_mo_list)
1032 TYPE(proj_mo_p_type),
DIMENSION(:),
POINTER :: proj_mo_list
1034 INTEGER :: i, mo_ref_nbr
1036 IF (
ASSOCIATED(proj_mo_list))
THEN
1037 DO i = 1,
SIZE(proj_mo_list)
1038 IF (
ASSOCIATED(proj_mo_list(i)%proj_mo))
THEN
1039 IF (
ALLOCATED(proj_mo_list(i)%proj_mo%ref_mo_index)) &
1040 DEALLOCATE (proj_mo_list(i)%proj_mo%ref_mo_index)
1041 IF (
ALLOCATED(proj_mo_list(i)%proj_mo%mo_ref))
THEN
1042 DO mo_ref_nbr = 1,
SIZE(proj_mo_list(i)%proj_mo%mo_ref)
1043 CALL cp_fm_release(proj_mo_list(i)%proj_mo%mo_ref(mo_ref_nbr))
1045 DEALLOCATE (proj_mo_list(i)%proj_mo%mo_ref)
1047 IF (
ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_index)) &
1048 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_index)
1049 IF (
ALLOCATED(proj_mo_list(i)%proj_mo%td_mo_occ)) &
1050 DEALLOCATE (proj_mo_list(i)%proj_mo%td_mo_occ)
1051 DEALLOCATE (proj_mo_list(i)%proj_mo)
1054 DEALLOCATE (proj_mo_list)
1056 END SUBROUTINE proj_mo_list_release
1062 SUBROUTINE efield_fields_release(efield_fields)
1063 TYPE(efield_p_type),
DIMENSION(:),
POINTER :: efield_fields
1067 IF (
ASSOCIATED(efield_fields))
THEN
1068 DO i = 1,
SIZE(efield_fields)
1069 IF (
ASSOCIATED(efield_fields(i)%efield))
THEN
1070 IF (
ASSOCIATED(efield_fields(i)%efield%envelop_r_vars))
THEN
1071 DEALLOCATE (efield_fields(i)%efield%envelop_r_vars)
1073 IF (
ASSOCIATED(efield_fields(i)%efield%envelop_i_vars))
THEN
1074 DEALLOCATE (efield_fields(i)%efield%envelop_i_vars)
1076 IF (
ASSOCIATED(efield_fields(i)%efield%polarisation)) &
1077 DEALLOCATE (efield_fields(i)%efield%polarisation)
1078 DEALLOCATE (efield_fields(i)%efield)
1081 DEALLOCATE (efield_fields)
1083 END SUBROUTINE efield_fields_release
1089 SUBROUTINE dftb_control_create(dftb_control)
1092 cpassert(.NOT.
ASSOCIATED(dftb_control))
1093 ALLOCATE (dftb_control)
1095 NULLIFY (dftb_control%sk_pair_list)
1096 END SUBROUTINE dftb_control_create
1102 SUBROUTINE dftb_control_release(dftb_control)
1105 IF (
ASSOCIATED(dftb_control))
THEN
1106 IF (
ASSOCIATED(dftb_control%sk_pair_list))
THEN
1107 DEALLOCATE (dftb_control%sk_pair_list)
1109 DEALLOCATE (dftb_control)
1111 END SUBROUTINE dftb_control_release
1117 SUBROUTINE xtb_control_create(xtb_control)
1120 cpassert(.NOT.
ASSOCIATED(xtb_control))
1121 ALLOCATE (xtb_control)
1123 NULLIFY (xtb_control%kab_param)
1124 NULLIFY (xtb_control%kab_vals)
1125 NULLIFY (xtb_control%kab_types)
1126 NULLIFY (xtb_control%nonbonded)
1127 NULLIFY (xtb_control%rcpair)
1129 END SUBROUTINE xtb_control_create
1135 SUBROUTINE xtb_control_release(xtb_control)
1138 IF (
ASSOCIATED(xtb_control))
THEN
1139 IF (
ASSOCIATED(xtb_control%kab_param))
THEN
1140 DEALLOCATE (xtb_control%kab_param)
1142 IF (
ASSOCIATED(xtb_control%kab_vals))
THEN
1143 DEALLOCATE (xtb_control%kab_vals)
1145 IF (
ASSOCIATED(xtb_control%kab_types))
THEN
1146 DEALLOCATE (xtb_control%kab_types)
1148 IF (
ASSOCIATED(xtb_control%rcpair))
THEN
1149 DEALLOCATE (xtb_control%rcpair)
1151 IF (
ASSOCIATED(xtb_control%nonbonded))
THEN
1154 DEALLOCATE (xtb_control)
1156 END SUBROUTINE xtb_control_release
1162 SUBROUTINE se_control_create(se_control)
1165 cpassert(.NOT.
ASSOCIATED(se_control))
1166 ALLOCATE (se_control)
1167 END SUBROUTINE se_control_create
1173 SUBROUTINE se_control_release(se_control)
1176 IF (
ASSOCIATED(se_control))
THEN
1177 DEALLOCATE (se_control)
1179 END SUBROUTINE se_control_release
1188 cpassert(.NOT.
ASSOCIATED(admm_control))
1189 ALLOCATE (admm_control)
1200 IF (
ASSOCIATED(admm_control))
THEN
1201 DEALLOCATE (admm_control)
1212 cpassert(.NOT.
ASSOCIATED(expot_control))
1213 ALLOCATE (expot_control)
1214 expot_control%read_from_cube = .false.
1215 expot_control%maxwell_solver = .false.
1216 expot_control%static = .true.
1217 expot_control%scaling_factor = 1.0_dp
1225 SUBROUTINE expot_control_release(expot_control)
1228 IF (
ASSOCIATED(expot_control))
THEN
1229 DEALLOCATE (expot_control)
1232 END SUBROUTINE expot_control_release
1241 cpassert(.NOT.
ASSOCIATED(maxwell_control))
1242 ALLOCATE (maxwell_control)
1250 SUBROUTINE maxwell_control_release(maxwell_control)
1253 IF (
ASSOCIATED(maxwell_control))
THEN
1254 DEALLOCATE (maxwell_control)
1257 END SUBROUTINE maxwell_control_release
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public rixs_control_release(rixs_control)
Releases the rixs_control_type.
subroutine, public admm_control_release(admm_control)
...
subroutine, public dft_control_create(dft_control)
allocates and perform a very basic initialization
subroutine, public expot_control_create(expot_control)
...
subroutine, public maxwell_control_create(maxwell_control)
...
subroutine, public ddapc_control_create(ddapc_restraint_control)
create the ddapc_restraint_type
subroutine, public admm_control_create(admm_control)
...
subroutine, public dft_control_release(dft_control)
...
subroutine, public rixs_control_create(rixs_control)
Creates and initializes the rixs_control_type.
represent a full matrix distributed on many processors
Add the DFT+U contribution to the Hamiltonian matrix.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
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.
subroutine, public xas_control_release(xas_control)
...
Define XAS TDP control type and associated create, release, etc subroutines, as well as XAS TDP envir...
subroutine, public xas_tdp_control_release(xas_tdp_control)
Releases the xas_tdp_control_type.
subroutine, public xas_tdp_control_create(xas_tdp_control)
Creates and initializes the xas_tdp_control_type.
SMEAGOL-related input parameters.
A type that holds controlling information for a xas calculation.
Type containing control information for TDP XAS calculations.