(git:f2099e5)
Loading...
Searching...
No Matches
ec_environment.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Energy correction environment setup and handling
10!> \par History
11!> 2019.09 created
12!> \author JGH
13! **************************************************************************************************
22 USE bibliography, ONLY: niklasson2003,&
24 cite_reference
25 USE cell_types, ONLY: cell_type
36 USE input_constants, ONLY: &
49 USE kinds, ONLY: dp
54 USE kpoint_types, ONLY: kpoint_create,&
70 USE qs_kind_types, ONLY: get_qs_kind,&
73 USE qs_mo_types, ONLY: allocate_mo_set,&
77 USE qs_rho_types, ONLY: qs_rho_type
83#include "./base/base_uses.f90"
84
85 IMPLICIT NONE
86
87 PRIVATE
88
89 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ec_environment'
90
91 PUBLIC :: ec_env_create
92 PUBLIC :: ec_write_input
93
94CONTAINS
95
96! **************************************************************************************************
97!> \brief Allocates and intitializes ec_env
98!> \param qs_env The QS environment
99!> \param ec_env The energy correction environment (the object to create)
100!> \param dft_section The DFT section
101!> \param ec_section The energy correction input section
102!> \par History
103!> 2019.09 created
104!> \author JGH
105! **************************************************************************************************
106 SUBROUTINE ec_env_create(qs_env, ec_env, dft_section, ec_section)
107 TYPE(qs_environment_type), POINTER :: qs_env
108 TYPE(energy_correction_type), POINTER :: ec_env
109 TYPE(section_vals_type), POINTER :: dft_section
110 TYPE(section_vals_type), OPTIONAL, POINTER :: ec_section
111
112 cpassert(.NOT. ASSOCIATED(ec_env))
113 ALLOCATE (ec_env)
114 CALL init_ec_env(qs_env, ec_env, dft_section, ec_section)
115
116 END SUBROUTINE ec_env_create
117
118! **************************************************************************************************
119!> \brief Initializes energy correction environment
120!> \param qs_env The QS environment
121!> \param ec_env The energy correction environment
122!> \param dft_section The DFT section
123!> \param ec_section The energy correction input section
124!> \par History
125!> 2019.09 created
126!> \author JGH
127! **************************************************************************************************
128 SUBROUTINE init_ec_env(qs_env, ec_env, dft_section, ec_section)
129 TYPE(qs_environment_type), POINTER :: qs_env
130 TYPE(energy_correction_type), POINTER :: ec_env
131 TYPE(section_vals_type), POINTER :: dft_section
132 TYPE(section_vals_type), OPTIONAL, POINTER :: ec_section
133
134 CHARACTER(LEN=*), PARAMETER :: routinen = 'init_ec_env'
135
136 INTEGER :: handle, ikind, ispin, maxlgto, nel(2), &
137 nkind, nsgf, nspins, unit_nr
138 LOGICAL :: explicit, gpw, gs_kpoints, paw_atom
139 REAL(kind=dp) :: eps_pgf_orb, etemp, &
140 flexible_electron_count, focc, n_el_f, &
141 rc
142 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
143 TYPE(cell_type), POINTER :: cell
144 TYPE(cp_blacs_env_type), POINTER :: blacs_env
145 TYPE(cp_fm_struct_type), POINTER :: fm_struct
146 TYPE(cp_logger_type), POINTER :: logger
147 TYPE(dft_control_type), POINTER :: dft_control
148 TYPE(gto_basis_set_type), POINTER :: basis_set, harris_basis, &
149 harris_soft_basis
150 TYPE(mo_set_type), DIMENSION(:), POINTER :: mo_set
151 TYPE(mp_para_env_type), POINTER :: para_env
152 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
153 TYPE(qs_dispersion_type), POINTER :: dispersion_env
154 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
155 TYPE(qs_kind_type), POINTER :: qs_kind
156 TYPE(qs_rho_type), POINTER :: rho
157 TYPE(section_vals_type), POINTER :: ec_hfx_section, kp_section, nl_section, &
158 pp_section, section1, section2, &
159 xc_fun_section, xc_section
160
161 CALL timeset(routinen, handle)
162
163 NULLIFY (atomic_kind_set, dispersion_env, ec_env%ls_env, para_env)
164 NULLIFY (ec_env%sab_orb, ec_env%sac_ae, ec_env%sac_ppl, ec_env%sap_ppnl)
165 NULLIFY (ec_env%matrix_ks, ec_env%matrix_h, ec_env%matrix_s)
166 NULLIFY (ec_env%matrix_t, ec_env%matrix_p, ec_env%matrix_w)
167 NULLIFY (ec_env%task_list)
168 NULLIFY (ec_env%mao_coef)
169 NULLIFY (ec_env%force)
170 NULLIFY (ec_env%dispersion_env)
171 NULLIFY (ec_env%xc_section)
172 NULLIFY (ec_env%matrix_z)
173 NULLIFY (ec_env%matrix_hz)
174 NULLIFY (ec_env%matrix_wz)
175 NULLIFY (ec_env%z_admm)
176 NULLIFY (ec_env%p_env)
177 NULLIFY (ec_env%vxc_rspace)
178 NULLIFY (ec_env%vtau_rspace)
179 NULLIFY (ec_env%vadmm_rspace)
180 NULLIFY (ec_env%vadmm_tau_rspace)
181 NULLIFY (ec_env%rhoout_r, ec_env%rhoz_r)
182 NULLIFY (ec_env%x_data)
183 ec_env%should_update = .true.
184 ec_env%mao = .false.
185 ec_env%do_ec_admm = .false.
186 ec_env%do_kpoints = .false.
187 ec_env%do_ec_hfx = .false.
188 ec_env%reuse_hfx = .false.
189
190 IF (qs_env%energy_correction) THEN
191
192 cpassert(PRESENT(ec_section))
193
194 ! get a useful output_unit
195 logger => cp_get_default_logger()
196 IF (logger%para_env%is_source()) THEN
197 unit_nr = cp_logger_get_default_unit_nr(logger, local=.true.)
198 ELSE
199 unit_nr = -1
200 END IF
201
202 CALL section_vals_val_get(ec_section, "ALGORITHM", &
203 i_val=ec_env%ks_solver)
204 CALL section_vals_val_get(ec_section, "ENERGY_FUNCTIONAL", &
205 i_val=ec_env%energy_functional)
206 CALL section_vals_val_get(ec_section, "FACTORIZATION", &
207 i_val=ec_env%factorization)
208 CALL section_vals_val_get(ec_section, "OT_INITIAL_GUESS", &
209 i_val=ec_env%ec_initial_guess)
210 CALL section_vals_val_get(ec_section, "EPS_DEFAULT", &
211 r_val=ec_env%eps_default)
212 CALL section_vals_val_get(ec_section, "HARRIS_BASIS", &
213 c_val=ec_env%basis)
214 CALL section_vals_val_get(ec_section, "ELECTRONIC_TEMPERATURE", &
215 r_val=etemp)
216 CALL section_vals_val_get(ec_section, "MAO", &
217 l_val=ec_env%mao)
218 CALL section_vals_val_get(ec_section, "MAO_MAX_ITER", &
219 i_val=ec_env%mao_max_iter)
220 CALL section_vals_val_get(ec_section, "MAO_EPS_GRAD", &
221 r_val=ec_env%mao_eps_grad)
222 CALL section_vals_val_get(ec_section, "MAO_EPS1", &
223 r_val=ec_env%mao_eps1)
224 CALL section_vals_val_get(ec_section, "MAO_IOLEVEL", &
225 i_val=ec_env%mao_iolevel)
226 ! Skip EC calculation if ground-state calculation did not converge
227 CALL section_vals_val_get(ec_section, "SKIP_EC", &
228 l_val=ec_env%skip_ec)
229 ! Debug output
230 CALL section_vals_val_get(ec_section, "DEBUG_FORCES", &
231 l_val=ec_env%debug_forces)
232 CALL section_vals_val_get(ec_section, "DEBUG_STRESS", &
233 l_val=ec_env%debug_stress)
234 CALL section_vals_val_get(ec_section, "DEBUG_EXTERNAL_METHOD", &
235 l_val=ec_env%debug_external)
236 ! WFN output
237 section1 => section_vals_get_subs_vals(ec_section, "PRINT%HARRIS_OUTPUT_WFN")
238 CALL section_vals_get(section1, explicit=ec_env%write_harris_wfn)
239 ! ADMM
240 CALL section_vals_val_get(ec_section, "ADMM", l_val=ec_env%do_ec_admm)
241 ! EXTERNAL
242 CALL section_vals_val_get(ec_section, "EXTERNAL_RESPONSE_FILENAME", &
243 c_val=ec_env%exresp_fn)
244 CALL section_vals_val_get(ec_section, "EXTERNAL_RESPONSE_ERROR_FILENAME", &
245 c_val=ec_env%exresperr_fn)
246 CALL section_vals_val_get(ec_section, "EXTERNAL_RESULT_FILENAME", &
247 c_val=ec_env%exresult_fn)
248 CALL section_vals_val_get(ec_section, "ERROR_ESTIMATION", &
249 l_val=ec_env%do_error)
250 CALL section_vals_val_get(ec_section, "ERROR_ESTIMATION_METHOD", &
251 c_val=ec_env%error_method)
252 CALL uppercase(ec_env%error_method)
253 CALL section_vals_val_get(ec_section, "ERROR_CUTOFF", &
254 r_val=ec_env%error_cutoff)
255 CALL section_vals_val_get(ec_section, "ERROR_SUBSPACE_SIZE", &
256 i_val=ec_env%error_subspace)
257
258 ec_env%do_skip = .false.
259
260 ! smearing
261 IF (etemp > 0.0_dp) THEN
262 ec_env%smear%do_smear = .true.
263 ec_env%smear%method = smear_fermi_dirac
264 ec_env%smear%electronic_temperature = etemp
265 ec_env%smear%eps_fermi_dirac = 1.0e-5_dp
266 ec_env%smear%fixed_mag_mom = -100.0_dp
267 ELSE
268 ec_env%smear%do_smear = .false.
269 ec_env%smear%electronic_temperature = 0.0_dp
270 END IF
271
272 ! kpoints
273 ! Options: gs ec
274 ! gamma gamma
275 ! gamma KPec
276 ! KPgs KPgs
277 ! KPgs KPec
278 CALL get_qs_env(qs_env, do_kpoints=gs_kpoints)
279 kp_section => section_vals_get_subs_vals(ec_section, "KPOINTS")
280 CALL section_vals_get(kp_section, explicit=explicit)
281 ec_env%do_kpoints = gs_kpoints .OR. explicit
282 IF (ec_env%do_kpoints) THEN
283 IF (.NOT. explicit) THEN
284 kp_section => section_vals_get_subs_vals(dft_section, "KPOINTS")
285 END IF
286 CALL get_qs_env(qs_env, particle_set=particle_set, cell=cell)
287 CALL kpoint_create(ec_env%kpoints)
288 CALL read_kpoint_section(ec_env%kpoints, kp_section, cell%hmat, cell)
289 CALL kpoint_initialize(ec_env%kpoints, particle_set, cell)
290 CALL get_qs_env(qs_env, para_env=para_env, blacs_env=blacs_env)
291 CALL kpoint_env_initialize(ec_env%kpoints, para_env, blacs_env)
292 ELSE
293 NULLIFY (ec_env%kpoints)
294 END IF
295
296 ! set basis
297 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set, nkind=nkind)
298 CALL uppercase(ec_env%basis)
299 SELECT CASE (ec_env%basis)
300 CASE ("ORBITAL")
301 DO ikind = 1, nkind
302 qs_kind => qs_kind_set(ikind)
303 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type="ORB")
304 IF (ASSOCIATED(basis_set)) THEN
305 NULLIFY (harris_basis)
306 CALL get_qs_kind(qs_kind=qs_kind, basis_set=harris_basis, basis_type="HARRIS")
307 IF (ASSOCIATED(harris_basis)) THEN
308 CALL remove_basis_from_container(qs_kind%basis_sets, basis_type="HARRIS")
309 END IF
310 NULLIFY (harris_basis)
311 CALL copy_gto_basis_set(basis_set, harris_basis)
312 CALL add_basis_set_to_container(qs_kind%basis_sets, harris_basis, "HARRIS")
313 END IF
314 END DO
315 CASE ("PRIMITIVE")
316 DO ikind = 1, nkind
317 qs_kind => qs_kind_set(ikind)
318 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type="ORB")
319 IF (ASSOCIATED(basis_set)) THEN
320 NULLIFY (harris_basis)
321 CALL get_qs_kind(qs_kind=qs_kind, basis_set=harris_basis, basis_type="HARRIS")
322 IF (ASSOCIATED(harris_basis)) THEN
323 CALL remove_basis_from_container(qs_kind%basis_sets, basis_type="HARRIS")
324 END IF
325 NULLIFY (harris_basis)
326 CALL create_primitive_basis_set(basis_set, harris_basis)
327 CALL get_qs_env(qs_env, dft_control=dft_control)
328 eps_pgf_orb = dft_control%qs_control%eps_pgf_orb
329 CALL init_interaction_radii_orb_basis(harris_basis, eps_pgf_orb)
330 harris_basis%kind_radius = basis_set%kind_radius
331 CALL add_basis_set_to_container(qs_kind%basis_sets, harris_basis, "HARRIS")
332 END IF
333 END DO
334 CASE ("HARRIS")
335 DO ikind = 1, nkind
336 qs_kind => qs_kind_set(ikind)
337 NULLIFY (harris_basis)
338 CALL get_qs_kind(qs_kind=qs_kind, basis_set=harris_basis, basis_type="HARRIS")
339 IF (.NOT. ASSOCIATED(harris_basis)) THEN
340 cpwarn("Harris Basis not defined for all types of atoms.")
341 END IF
342 END DO
343 CASE DEFAULT
344 cpabort("Unknown basis set for energy correction (Harris functional)")
345 END SELECT
346 !
347 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto, basis_type="HARRIS")
348 CALL init_orbital_pointers(maxlgto + 1)
349 ! GAPW: Generate soft version of Harris basis
350 CALL get_qs_env(qs_env, dft_control=dft_control)
351 IF (dft_control%qs_control%gapw .OR. dft_control%qs_control%gapw_xc) THEN
352 eps_pgf_orb = dft_control%qs_control%eps_pgf_orb
353 DO ikind = 1, nkind
354 qs_kind => qs_kind_set(ikind)
355 NULLIFY (harris_basis)
356 CALL get_qs_kind(qs_kind, basis_set=harris_basis, basis_type="HARRIS")
357 CALL get_qs_kind(qs_kind, hard_radius=rc, gpw_type_forced=gpw)
358 NULLIFY (harris_soft_basis)
359 CALL allocate_gto_basis_set(harris_soft_basis)
360 CALL create_soft_basis(harris_basis, harris_soft_basis, &
361 dft_control%qs_control%gapw_control%eps_fit, &
362 rc, paw_atom, &
363 dft_control%qs_control%gapw_control%force_paw, gpw)
364 CALL init_interaction_radii_orb_basis(harris_soft_basis, eps_pgf_orb)
365 CALL add_basis_set_to_container(qs_kind%basis_sets, harris_soft_basis, "HARRIS_SOFT")
366 END DO
367 END IF
368 !
369 CALL uppercase(ec_env%basis)
370
371 ! Basis may only differ from ground-state if explicitly added
372 ec_env%basis_inconsistent = .false.
373 IF (ec_env%basis == "HARRIS") THEN
374 DO ikind = 1, nkind
375 qs_kind => qs_kind_set(ikind)
376 ! Basis sets of ground-state
377 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type="ORB")
378 ! Basis sets of energy correction
379 CALL get_qs_kind(qs_kind=qs_kind, basis_set=harris_basis, basis_type="HARRIS")
380
381 IF (basis_set%name /= harris_basis%name) THEN
382 ec_env%basis_inconsistent = .true.
383 END IF
384 END DO
385 END IF
386
387 !Density-corrected DFT must be performed with the same basis as ground-state
388 IF (ec_env%energy_functional == ec_functional_dc .AND. ec_env%basis_inconsistent) THEN
389 CALL cp_abort(__location__, &
390 "DC-DFT: Correction and ground state need to use the same basis. "// &
391 "Checked by comparing basis set names only.")
392 END IF
393 IF (ec_env%energy_functional == ec_functional_ext .AND. ec_env%basis_inconsistent) THEN
394 CALL cp_abort(__location__, &
395 "Exteranl Energy: Correction and ground state need to use the same basis. "// &
396 "Checked by comparing basis set names only.")
397 END IF
398 !
399 ! set functional
400 SELECT CASE (ec_env%energy_functional)
402 ec_env%ec_name = "Harris"
403 CASE (ec_functional_dc)
404 ec_env%ec_name = "DC-DFT"
405 CASE (ec_functional_ext)
406 ec_env%ec_name = "External Energy"
407 CASE DEFAULT
408 cpabort("unknown energy correction")
409 END SELECT
410 ! select the XC section
411 NULLIFY (xc_section)
412 xc_section => section_vals_get_subs_vals(dft_section, "XC")
413 section1 => section_vals_get_subs_vals(ec_section, "XC")
414 section2 => section_vals_get_subs_vals(ec_section, "XC%XC_FUNCTIONAL")
415 CALL section_vals_get(section2, explicit=explicit)
416 IF (explicit) THEN
417 CALL xc_functionals_expand(section2, section1)
418 ec_env%xc_section => section1
419 ELSE
420 ec_env%xc_section => xc_section
421 END IF
422 ! Check whether energy correction requires the kinetic energy density and rebuild rho if necessary
423 CALL get_qs_env(qs_env, dft_control=dft_control, rho=rho)
424 xc_fun_section => section_vals_get_subs_vals(ec_env%xc_section, "XC_FUNCTIONAL")
425 dft_control%use_kinetic_energy_density = dft_control%use_kinetic_energy_density .OR. &
426 xc_uses_kinetic_energy_density(xc_fun_section, dft_control%lsd)
427 ! Same for density gradient
428 dft_control%drho_by_collocation = dft_control%drho_by_collocation .OR. &
429 (xc_uses_norm_drho(xc_fun_section, dft_control%lsd) .AND. &
430 (section_get_ival(xc_section, "XC_GRID%XC_DERIV") == xc_deriv_collocate))
431 ! dispersion
432 ALLOCATE (dispersion_env)
433 NULLIFY (xc_section)
434 xc_section => ec_env%xc_section
435 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set, para_env=para_env)
436 CALL qs_dispersion_env_set(dispersion_env, xc_section)
437 IF (dispersion_env%type == xc_vdw_fun_pairpot) THEN
438 NULLIFY (pp_section)
439 pp_section => section_vals_get_subs_vals(xc_section, "VDW_POTENTIAL%PAIR_POTENTIAL")
440 CALL qs_dispersion_pairpot_init(atomic_kind_set, qs_kind_set, dispersion_env, pp_section, para_env)
441 ELSE IF (dispersion_env%type == xc_vdw_fun_nonloc) THEN
442 NULLIFY (nl_section)
443 nl_section => section_vals_get_subs_vals(xc_section, "VDW_POTENTIAL%NON_LOCAL")
444 CALL qs_dispersion_nonloc_init(dispersion_env, para_env)
445 END IF
446 ec_env%dispersion_env => dispersion_env
447
448 ! Check if hybrid functional are used
449 ec_hfx_section => section_vals_get_subs_vals(ec_section, "XC%HF")
450 CALL section_vals_get(ec_hfx_section, explicit=ec_env%do_ec_hfx)
451
452 ! Initialize Harris LS solver environment
453 ec_env%use_ls_solver = .false.
454 ec_env%use_ls_solver = (ec_env%ks_solver == ec_matrix_sign) &
455 .OR. (ec_env%ks_solver == ec_matrix_trs4) &
456 .OR. (ec_env%ks_solver == ec_matrix_tc2)
457
458 IF (ec_env%use_ls_solver) THEN
459 CALL ec_ls_create(qs_env, ec_env)
460 END IF
461
462 ! check that Harris functional with electronic temperature uses diagonalization
463 IF (ec_env%energy_functional == ec_functional_harris) THEN
464 IF (ec_env%smear%do_smear .AND. ec_env%ks_solver /= ec_diagonalization) THEN
465 cpabort("Harris functional with Fermi-Dirac smearing needs diagonalization solver.")
466 END IF
467 IF (ec_env%do_kpoints .AND. ec_env%ks_solver /= ec_diagonalization) THEN
468 cpabort("Harris functional with K-points needs diagonalization solver.")
469 END IF
470 END IF
471
472 ! initialize Kpoint MOs
473 IF (ec_env%do_kpoints) THEN
474 CALL get_qs_env(qs_env, dft_control=dft_control)
475 nspins = dft_control%nspins
476 CALL get_qs_kind_set(qs_kind_set, nsgf=nsgf, basis_type="HARRIS")
477 focc = 2.0_dp + real(1 - nspins, dp)
478 flexible_electron_count = dft_control%relax_multiplicity
479 CALL get_qs_env(qs_env, para_env=para_env, blacs_env=blacs_env)
480 CALL cp_fm_struct_create(fm_struct, para_env=para_env, context=blacs_env, &
481 nrow_global=nsgf, ncol_global=nsgf)
482 CALL get_qs_env(qs_env, nelectron_spin=nel)
483 ALLOCATE (mo_set(nspins))
484 DO ispin = 1, nspins
485 n_el_f = nel(ispin)
486 CALL allocate_mo_set(mo_set(ispin), nsgf, nsgf, nel(ispin), n_el_f, &
487 focc, flexible_electron_count)
488 CALL init_mo_set(mo_set(ispin), fm_struct=fm_struct, name="MO")
489 END DO
490 CALL kpoint_initialize_mos(ec_env%kpoints, mo_set)
491 CALL kpoint_initialize_mo_set(ec_env%kpoints)
492 CALL qs_basis_rotation(qs_env, ec_env%kpoints, basis_type="HARRIS")
493 DO ispin = 1, nspins
494 CALL deallocate_mo_set(mo_set(ispin))
495 END DO
496 DEALLOCATE (mo_set)
497 CALL cp_fm_struct_release(fm_struct)
498 END IF
499
500 END IF
501
502 CALL timestop(handle)
503
504 END SUBROUTINE init_ec_env
505
506! **************************************************************************************************
507!> \brief Initializes linear scaling environment for LS based solver of
508!> Harris energy functional and parses input section
509!> \param qs_env ...
510!> \param ec_env ...
511!> \par History
512!> 2020.10 created [Fabian Belleflamme]
513!> \author Fabian Belleflamme
514! **************************************************************************************************
515 SUBROUTINE ec_ls_create(qs_env, ec_env)
516 TYPE(qs_environment_type), POINTER :: qs_env
517 TYPE(energy_correction_type), POINTER :: ec_env
518
519 CHARACTER(LEN=*), PARAMETER :: routinen = 'ec_ls_create'
520
521 INTEGER :: handle
522 REAL(kind=dp) :: mu
523 TYPE(dft_control_type), POINTER :: dft_control
524 TYPE(ls_scf_env_type), POINTER :: ls_env
525 TYPE(molecule_type), DIMENSION(:), POINTER :: molecule_set
526 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
527 TYPE(section_vals_type), POINTER :: ec_section, input
528
529 CALL timeset(routinen, handle)
530
531 ALLOCATE (ec_env%ls_env)
532 ls_env => ec_env%ls_env
533
534 NULLIFY (dft_control, input, ls_env%para_env)
535
536 CALL get_qs_env(qs_env, &
537 dft_control=dft_control, &
538 input=input, &
539 molecule_set=molecule_set, &
540 particle_set=particle_set, &
541 para_env=ls_env%para_env, &
542 nelectron_spin=ls_env%nelectron_spin)
543
544 ! copy some basic stuff
545 ls_env%nspins = dft_control%nspins
546 ls_env%natoms = SIZE(particle_set, 1)
547 CALL ls_env%para_env%retain()
548
549 ! initialize block to group to defined molecules
550 ALLOCATE (ls_env%ls_mstruct%atom_to_molecule(ls_env%natoms))
551 CALL molecule_of_atom(molecule_set, atom_to_mol=ls_env%ls_mstruct%atom_to_molecule)
552
553 ls_env%do_transport = .false.
554 ls_env%do_pao = .false.
555 ls_env%ls_mstruct%do_pao = ls_env%do_pao
556 ls_env%do_pexsi = .false.
557 ls_env%has_unit_metric = .false.
558
559 ec_section => section_vals_get_subs_vals(input, "DFT%ENERGY_CORRECTION")
560 CALL section_vals_val_get(ec_section, "EPS_FILTER", r_val=ls_env%eps_filter)
561 CALL section_vals_val_get(ec_section, "MU", r_val=mu)
562 CALL section_vals_val_get(ec_section, "FIXED_MU", l_val=ls_env%fixed_mu)
563 ls_env%mu_spin = mu
564 CALL section_vals_val_get(ec_section, "S_PRECONDITIONER", i_val=ls_env%s_preconditioner_type)
565 CALL section_vals_val_get(ec_section, "MATRIX_CLUSTER_TYPE", i_val=ls_env%ls_mstruct%cluster_type)
566 CALL section_vals_val_get(ec_section, "S_INVERSION", i_val=ls_env%s_inversion_type)
567 CALL section_vals_val_get(ec_section, "CHECK_S_INV", l_val=ls_env%check_s_inv)
568 CALL section_vals_val_get(ec_section, "REPORT_ALL_SPARSITIES", l_val=ls_env%report_all_sparsities)
569 CALL section_vals_val_get(ec_section, "SIGN_METHOD", i_val=ls_env%sign_method)
570 CALL section_vals_val_get(ec_section, "SIGN_ORDER", i_val=ls_env%sign_order)
571 CALL section_vals_val_get(ec_section, "DYNAMIC_THRESHOLD", l_val=ls_env%dynamic_threshold)
572 CALL section_vals_val_get(ec_section, "NON_MONOTONIC", l_val=ls_env%non_monotonic)
573 CALL section_vals_val_get(ec_section, "S_SQRT_METHOD", i_val=ls_env%s_sqrt_method)
574 CALL section_vals_val_get(ec_section, "S_SQRT_ORDER", i_val=ls_env%s_sqrt_order)
575 CALL section_vals_val_get(ec_section, "EPS_LANCZOS", r_val=ls_env%eps_lanczos)
576 CALL section_vals_val_get(ec_section, "MAX_ITER_LANCZOS", i_val=ls_env%max_iter_lanczos)
577
578 SELECT CASE (ec_env%ks_solver)
579 CASE (ec_matrix_sign)
580 ! S inverse required for Sign matrix algorithm,
581 ! calculated either by Hotelling or multiplying S matrix sqrt inv
582 SELECT CASE (ls_env%s_inversion_type)
584 ls_env%needs_s_inv = .true.
585 ls_env%use_s_sqrt = .true.
587 ls_env%needs_s_inv = .true.
588 ls_env%use_s_sqrt = .false.
590 ls_env%needs_s_inv = .false.
591 ls_env%use_s_sqrt = .false.
592 CASE DEFAULT
593 cpabort("Unknown ls_env%s_inversion_type")
594 END SELECT
596 ls_env%needs_s_inv = .false.
597 ls_env%use_s_sqrt = .true.
598 CASE DEFAULT
599 cpabort("Unknown ec_env%ks_solver")
600 END SELECT
601
602 SELECT CASE (ls_env%s_preconditioner_type)
604 ls_env%has_s_preconditioner = .false.
605 CASE DEFAULT
606 ls_env%has_s_preconditioner = .true.
607 END SELECT
608
609 ! buffer for the history of matrices, not needed here
610 ls_env%extrapolation_order = 0
611 ls_env%scf_history%nstore = 0
612 ls_env%scf_history%istore = 0
613 ALLOCATE (ls_env%scf_history%matrix(ls_env%nspins, ls_env%scf_history%nstore))
614
615 NULLIFY (ls_env%mixing_store)
616
617 CALL timestop(handle)
618
619 END SUBROUTINE ec_ls_create
620
621! **************************************************************************************************
622!> \brief Print out the energy correction input section
623!>
624!> \param ec_env ...
625!> \par History
626!> 2020.10 created [Fabian Belleflamme]
627!> \author Fabian Belleflamme
628! **************************************************************************************************
629 SUBROUTINE ec_write_input(ec_env)
630 TYPE(energy_correction_type), POINTER :: ec_env
631
632 CHARACTER(LEN=*), PARAMETER :: routinen = 'ec_write_input'
633
634 INTEGER :: handle, unit_nr
635 TYPE(cp_logger_type), POINTER :: logger
636 TYPE(ls_scf_env_type), POINTER :: ls_env
637
638 CALL timeset(routinen, handle)
639
640 logger => cp_get_default_logger()
641 IF (logger%para_env%is_source()) THEN
642 unit_nr = cp_logger_get_default_unit_nr(logger, local=.true.)
643 ELSE
644 unit_nr = -1
645 END IF
646
647 IF (unit_nr > 0) THEN
648
649 WRITE (unit_nr, '(T2,A)') &
650 "!"//repeat("-", 29)//" Energy Correction "//repeat("-", 29)//"!"
651
652 ! Type of energy correction
653 SELECT CASE (ec_env%energy_functional)
655 WRITE (unit_nr, '(T2,A,T61,A20)') "Energy Correction: ", "HARRIS FUNCTIONAL"
656 CASE (ec_functional_dc)
657 WRITE (unit_nr, '(T2,A,T61,A20)') "Energy Correction: ", "DC-DFT"
658 CASE (ec_functional_ext)
659 WRITE (unit_nr, '(T2,A,T61,A20)') "Energy Correction: ", "External"
660 END SELECT
661 WRITE (unit_nr, '()')
662
663 ! Energy correction parameters
664 WRITE (unit_nr, '(T2,A,T61,E20.3)') "eps_default:", ec_env%eps_default
665
666 CALL uppercase(ec_env%basis)
667 SELECT CASE (ec_env%basis)
668 CASE ("ORBITAL")
669 WRITE (unit_nr, '(T2,A,T61,A20)') "EC basis: ", "ORBITAL"
670 CASE ("PRIMITIVE")
671 WRITE (unit_nr, '(T2,A,T61,A20)') "EC basis: ", "PRIMITIVE"
672 CASE ("HARRIS")
673 WRITE (unit_nr, '(T2,A,T61,A20)') "EC Basis: ", "HARRIS"
674 END SELECT
675
676 ! Info how HFX in energy correction is treated
677 IF (ec_env%do_ec_hfx) THEN
678
679 WRITE (unit_nr, '(T2,A,T61,L20)') "DC-DFT with HFX", ec_env%do_ec_hfx
680 WRITE (unit_nr, '(T2,A,T61,L20)') "Reuse HFX integrals", ec_env%reuse_hfx
681 WRITE (unit_nr, '(T2,A,T61,L20)') "DC-DFT HFX with ADMM", ec_env%do_ec_admm
682
683 END IF ! ec_env%do_ec_hfx
684
685 IF (ec_env%do_kpoints) THEN
686 CALL write_kpoint_info(ec_env%kpoints, iounit=unit_nr)
687 END IF
688
689 ! Parameters for Harris functional solver
690 IF (ec_env%energy_functional == ec_functional_harris) THEN
691
692 ! Algorithm
693 SELECT CASE (ec_env%ks_solver)
694 CASE (ec_diagonalization)
695 WRITE (unit_nr, '(T2,A,T61,A20)') "Algorithm: ", "DIAGONALIZATION"
696 CASE (ec_ot_diag)
697 WRITE (unit_nr, '(T2,A,T61,A20)') "Algorithm: ", "OT DIAGONALIZATION"
698 CASE (ec_matrix_sign)
699 WRITE (unit_nr, '(T2,A,T61,A20)') "Algorithm: ", "MATRIX_SIGN"
700 CASE (ec_matrix_trs4)
701 WRITE (unit_nr, '(T2,A,T61,A20)') "Algorithm: ", "TRS4"
702 CALL cite_reference(niklasson2003)
703 CASE (ec_matrix_tc2)
704 WRITE (unit_nr, '(T2,A,T61,A20)') "Algorithm: ", "TC2"
705 CALL cite_reference(niklasson2014)
706 END SELECT
707 WRITE (unit_nr, '()')
708
709 ! MAO
710 IF (ec_env%mao) THEN
711 WRITE (unit_nr, '(T2,A,T61,L20)') "MAO:", ec_env%mao
712 WRITE (unit_nr, '(T2,A,T61,L20)') "MAO_IOLEVEL:", ec_env%mao_iolevel
713 WRITE (unit_nr, '(T2,A,T61,I20)') "MAO_MAX_ITER:", ec_env%mao_max_iter
714 WRITE (unit_nr, '(T2,A,T61,E20.3)') "MAO_EPS_GRAD:", ec_env%mao_eps_grad
715 WRITE (unit_nr, '(T2,A,T61,E20.3)') "MAO_EPS1:", ec_env%mao_eps1
716 WRITE (unit_nr, '()')
717 END IF
718
719 ! Parameters for linear response solver
720 IF (.NOT. ec_env%use_ls_solver) THEN
721
722 WRITE (unit_nr, '(T2,A)') "MO Solver"
723 WRITE (unit_nr, '()')
724
725 SELECT CASE (ec_env%ks_solver)
726 CASE (ec_diagonalization)
727
728 SELECT CASE (ec_env%factorization)
729 CASE (kg_cholesky)
730 WRITE (unit_nr, '(T2,A,T61,A20)') "Factorization: ", "CHOLESKY"
731 END SELECT
732
733 CASE (ec_ot_diag)
734
735 ! OT Diagonalization
736 ! Initial guess : 1) block diagonal initial guess
737 ! 2) GS-density matrix (might require trafo if basis diff)
738
739 SELECT CASE (ec_env%ec_initial_guess)
740 CASE (ec_ot_atomic)
741 WRITE (unit_nr, '(T2,A,T61,A20)') "OT Diag initial guess: ", "ATOMIC"
742 CASE (ec_ot_gs)
743 WRITE (unit_nr, '(T2,A,T61,A20)') "OT Diag initial guess: ", "GROUND STATE DM"
744 END SELECT
745
746 CASE DEFAULT
747 cpabort("Unknown Diagonalization algorithm for Harris functional")
748 END SELECT
749
750 ELSE
751
752 WRITE (unit_nr, '(T2,A)') "AO Solver"
753 WRITE (unit_nr, '()')
754
755 ls_env => ec_env%ls_env
756 WRITE (unit_nr, '(T2,A,T61,E20.3)') "eps_filter:", ls_env%eps_filter
757 WRITE (unit_nr, '(T2,A,T61,L20)') "fixed chemical potential (mu)", ls_env%fixed_mu
758 WRITE (unit_nr, '(T2,A,T61,L20)') "Computing inv(S):", ls_env%needs_s_inv
759 WRITE (unit_nr, '(T2,A,T61,L20)') "Computing sqrt(S):", ls_env%use_s_sqrt
760 WRITE (unit_nr, '(T2,A,T61,L20)') "Computing S preconditioner ", ls_env%has_s_preconditioner
761
762 IF (ls_env%use_s_sqrt) THEN
763 SELECT CASE (ls_env%s_sqrt_method)
764 CASE (ls_s_sqrt_ns)
765 WRITE (unit_nr, '(T2,A,T61,A20)') "S sqrt method:", "NEWTONSCHULZ"
766 CASE (ls_s_sqrt_proot)
767 WRITE (unit_nr, '(T2,A,T61,A20)') "S sqrt method:", "PROOT"
768 CASE DEFAULT
769 cpabort("Unknown sqrt method.")
770 END SELECT
771 WRITE (unit_nr, '(T2,A,T61,I20)') "S sqrt order:", ls_env%s_sqrt_order
772 END IF
773
774 SELECT CASE (ls_env%s_preconditioner_type)
776 WRITE (unit_nr, '(T2,A,T61,A20)') "S preconditioner type ", "NONE"
778 WRITE (unit_nr, '(T2,A,T61,A20)') "S preconditioner type ", "ATOMIC"
780 WRITE (unit_nr, '(T2,A,T61,A20)') "S preconditioner type ", "MOLECULAR"
781 END SELECT
782
783 SELECT CASE (ls_env%ls_mstruct%cluster_type)
784 CASE (ls_cluster_atomic)
785 WRITE (unit_nr, '(T2,A,T61,A20)') "Cluster type", adjustr("ATOMIC")
787 WRITE (unit_nr, '(T2,A,T61,A20)') "Cluster type", adjustr("MOLECULAR")
788 CASE DEFAULT
789 cpabort("Unknown cluster type")
790 END SELECT
791
792 END IF
793
794 END IF ! if ec_functional_harris
795
796 WRITE (unit_nr, '(T2,A)') repeat("-", 79)
797 WRITE (unit_nr, '()')
798
799 END IF ! unit_nr
800
801 CALL timestop(handle)
802
803 END SUBROUTINE ec_write_input
804
805END MODULE ec_environment
Define the atomic kind types and their sub types.
subroutine, public remove_basis_from_container(container, inum, basis_type)
...
subroutine, public add_basis_set_to_container(container, basis_set, basis_set_type)
...
subroutine, public allocate_gto_basis_set(gto_basis_set)
...
subroutine, public copy_gto_basis_set(basis_set_in, basis_set_out)
...
subroutine, public create_primitive_basis_set(basis_set, pbasis, lmax)
...
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public niklasson2014
integer, save, public niklasson2003
Handles all functions related to the CELL.
Definition cell_types.F:15
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
various routines to log and control the output. The idea is that decisions about where to log should ...
recursive integer function, public cp_logger_get_default_unit_nr(logger, local, skip_not_ionode)
asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
Types needed for a linear scaling quickstep SCF run based on the density matrix.
Types needed for a for a Energy Correction.
Energy correction environment setup and handling.
subroutine, public ec_write_input(ec_env)
Print out the energy correction input section.
subroutine, public ec_env_create(qs_env, ec_env, dft_section, ec_section)
Allocates and intitializes ec_env.
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public ec_functional_harris
integer, parameter, public smear_fermi_dirac
integer, parameter, public ec_functional_dc
integer, parameter, public ls_s_preconditioner_molecular
integer, parameter, public ls_s_inversion_hotelling
integer, parameter, public xc_vdw_fun_nonloc
integer, parameter, public ls_cluster_molecular
integer, parameter, public ec_ot_atomic
integer, parameter, public ls_s_preconditioner_atomic
integer, parameter, public ec_ot_diag
integer, parameter, public ec_ot_gs
integer, parameter, public ls_s_inversion_none
integer, parameter, public ls_s_sqrt_proot
integer, parameter, public ls_s_sqrt_ns
integer, parameter, public ls_s_preconditioner_none
integer, parameter, public ec_matrix_tc2
integer, parameter, public ec_diagonalization
integer, parameter, public ec_matrix_trs4
integer, parameter, public ec_functional_ext
integer, parameter, public ec_matrix_sign
integer, parameter, public ls_s_inversion_sign_sqrt
integer, parameter, public xc_vdw_fun_pairpot
integer, parameter, public kg_cholesky
integer, parameter, public ls_cluster_atomic
checks the input and perform some automatic "magic" on it
subroutine, public xc_functionals_expand(functionals, xc_section)
expand a shortcutted functional section
objects that represent the structure of input sections and the data contained in an input section
integer function, public section_get_ival(section_vals, keyword_name)
...
recursive type(section_vals_type) function, pointer, public section_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)
returns the values of the requested subsection
subroutine, public section_vals_get(section_vals, ref_count, n_repetition, n_subs_vals_rep, section, explicit)
returns various attributes about the section_vals
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Routines needed for kpoint calculation.
subroutine, public kpoint_initialize_mo_set(kpoint)
...
subroutine, public kpoint_initialize_mos(kpoint, mos, added_mos, for_aux_fit)
Initialize a set of MOs and density matrix for each kpoint (kpoint group).
subroutine, public kpoint_initialize(kpoint, particle_set, cell)
Generate the kpoints and initialize the kpoint environment.
subroutine, public kpoint_env_initialize(kpoint, para_env, blacs_env, with_aux_fit)
Initialize the kpoint environment.
Types and basic routines needed for a kpoint calculation.
subroutine, public write_kpoint_info(kpoint, iounit, dft_section)
Write information on the kpoints to output.
subroutine, public kpoint_create(kpoint)
Create a kpoint environment.
subroutine, public read_kpoint_section(kpoint, kpoint_section, a_vec, cell)
Read the kpoint input section.
Interface to the message passing library MPI.
Define the data structure for the molecule information.
subroutine, public molecule_of_atom(molecule_set, atom_to_mol)
finds for each atom the molecule it belongs to
Provides Cartesian and spherical orbital pointers and indices.
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
Define the data structure for the particle information.
subroutine, public qs_basis_rotation(qs_env, kpoints, basis_type)
Construct basis set rotation matrices.
Calculation of non local dispersion functionals Some routines adapted from: Copyright (C) 2001-2009 Q...
subroutine, public qs_dispersion_nonloc_init(dispersion_env, para_env)
...
Calculation of dispersion using pair potentials.
subroutine, public qs_dispersion_pairpot_init(atomic_kind_set, qs_kind_set, dispersion_env, pp_section, para_env)
...
Definition of disperson types for DFT calculations.
Set disperson types for DFT calculations.
subroutine, public qs_dispersion_env_set(dispersion_env, xc_section)
...
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
Calculate the interaction radii for the operator matrix calculation.
subroutine, public init_interaction_radii_orb_basis(orb_basis_set, eps_pgf_orb, eps_pgf_short)
...
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, cneo_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, hund_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, proj_shell_charge, lr_atom, do_mtlr, u_j_loop, ao_coef, init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public get_qs_kind_set(qs_kind_set, all_potential_present, tnadd_potential_present, gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, basis_rcut, do_mtlr_present, basis_type, total_zeff_corr, npgf_seg, cneo_potential_present, nkind_q, natom_q)
Get attributes of an atomic kind set.
Definition and initialisation of the mo data type.
Definition qs_mo_types.F:22
subroutine, public init_mo_set(mo_set, fm_pool, fm_ref, fm_struct, name, counter, complex_coeff)
initializes an allocated mo_set. eigenvalues, mo_coeff, occupation_numbers are valid only after this ...
subroutine, public allocate_mo_set(mo_set, nao, nmo, nelectron, n_el_f, maxocc, flexible_electron_count)
Allocates a mo set and partially initializes it (nao,nmo,nelectron, and flexible_electron_count are v...
subroutine, public deallocate_mo_set(mo_set)
Deallocate a wavefunction data structure.
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public create_soft_basis(orb_basis, soft_basis, eps_fit, rc, paw_atom, paw_type_forced, gpw_r3d_rs_type_forced)
create the soft basis from a GTO basis
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
input constants for xc
integer, parameter, public xc_deriv_collocate
Exchange and Correlation functional calculations.
Definition xc.F:17
logical function, public xc_uses_norm_drho(xc_fun_section, lsd)
...
Definition xc.F:119
logical function, public xc_uses_kinetic_energy_density(xc_fun_section, lsd)
...
Definition xc.F:99
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
type of a logger, at the moment it contains just a print level starting at which level it should be l...
Contains information on the energy correction functional for KG.
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
keeps the density in various representations, keeping track of which ones are valid.