118#include "./base/base_uses.f90"
126 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_kind_types'
134 INTEGER :: max_scf = -1
135 REAL(KIND=
dp) :: eps_u_ramping = 0.0_dp
136 REAL(KIND=
dp) :: eps_scf = huge(0.0_dp)
137 REAL(KIND=
dp) :: u_minus_j_target = 0.0_dp
138 REAL(KIND=
dp) :: u_minus_j = 0.0_dp
139 REAL(KIND=
dp) :: u_ramping = 0.0_dp
140 REAL(KIND=
dp) :: u = 0.0_dp
141 REAL(KIND=
dp) :: j = 0.0_dp
142 REAL(KIND=
dp) :: alpha = 0.0_dp
143 REAL(KIND=
dp) :: beta = 0.0_dp
144 REAL(KIND=
dp) :: j0 = 0.0_dp
145 REAL(KIND=
dp) :: occupation = -1.0_dp
146 INTEGER,
DIMENSION(:),
POINTER :: orbitals => null()
147 LOGICAL :: init_u_ramping_each_scf = .false.
148 LOGICAL :: smear = .false.
149 REAL(KIND=
dp),
DIMENSION(:),
POINTER :: nelec => null()
150 END TYPE dft_plus_u_type
157 REAL(kind=
dp) :: beta = 0.0_dp
158 REAL(kind=
dp) :: weight = 0.0_dp
159 INTEGER :: max_projector = -1
160 REAL(kind=
dp) :: beta_radius = huge(
dp)
167 REAL(kind=
dp) :: beta = 0.0_dp
168 REAL(kind=
dp) :: beta_radius = huge(
dp)
169 REAL(kind=
dp) :: weight = 0.0_dp
170 REAL(kind=
dp) :: screening = 0.0_dp
171 REAL(kind=
dp) :: screening_radius = huge(
dp)
178 CHARACTER(LEN=default_string_length) :: name =
""
179 CHARACTER(LEN=2) :: element_symbol =
""
180 INTEGER :: natom = -1
195 REAL(kind=
dp) :: covalent_radius = 0.0_dp
196 REAL(kind=
dp) :: vdw_radius = 0.0_dp
199 REAL(kind=
dp) :: hard_radius = 0.8_dp*
bohr
200 REAL(kind=
dp) :: hard0_radius = 0.8_dp*
bohr
201 REAL(kind=
dp) :: max_rad_local = 13.2_dp*
bohr
202 LOGICAL :: paw_atom = .false.
203 LOGICAL :: gpw_type_forced = .false.
205 LOGICAL :: ghost = .false.
206 LOGICAL :: monovalent = .false.
207 LOGICAL :: floating = .false.
208 INTEGER :: lmax_dftb = -1
209 REAL(kind=
dp) :: dudq_dftb3 = 0.0_dp
210 REAL(kind=
dp) :: magnetization = 0.0_dp
211 INTEGER,
DIMENSION(:, :),
POINTER :: addel => null()
212 INTEGER,
DIMENSION(:, :),
POINTER :: laddel => null()
213 INTEGER,
DIMENSION(:, :),
POINTER :: naddel => null()
216 INTEGER :: ngrid_rad = 50
217 INTEGER :: ngrid_ang = 50
218 INTEGER :: lmax_rho0 = 0
220 INTEGER,
DIMENSION(:),
POINTER :: elec_conf => null()
221 LOGICAL :: bs_occupation = .false.
223 LOGICAL :: no_optimize = .true.
225 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: nlcc_pot => null()
228 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: reltmat => null()
229 INTEGER :: pao_basis_size = -1
230 CHARACTER(LEN=default_path_length) :: pao_model_file =
""
240 POINTER :: qs_kind_set => null()
241 END TYPE qs_kind_p_type
274 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
276 INTEGER :: ikind, nkind
278 IF (
ASSOCIATED(qs_kind_set))
THEN
280 nkind =
SIZE(qs_kind_set)
283 IF (
ASSOCIATED(qs_kind_set(ikind)%all_potential))
THEN
286 IF (
ASSOCIATED(qs_kind_set(ikind)%tnadd_potential))
THEN
289 IF (
ASSOCIATED(qs_kind_set(ikind)%gth_potential))
THEN
292 IF (
ASSOCIATED(qs_kind_set(ikind)%sgp_potential))
THEN
295 IF (
ASSOCIATED(qs_kind_set(ikind)%upf_potential))
THEN
297 DEALLOCATE (qs_kind_set(ikind)%upf_potential)
299 IF (
ASSOCIATED(qs_kind_set(ikind)%cneo_potential))
THEN
302 IF (
ASSOCIATED(qs_kind_set(ikind)%se_parameter))
THEN
305 IF (
ASSOCIATED(qs_kind_set(ikind)%dftb_parameter))
THEN
308 IF (
ASSOCIATED(qs_kind_set(ikind)%xtb_parameter))
THEN
311 IF (
ASSOCIATED(qs_kind_set(ikind)%paw_proj_set))
THEN
314 IF (
ASSOCIATED(qs_kind_set(ikind)%harmonics))
THEN
317 IF (
ASSOCIATED(qs_kind_set(ikind)%grid_atom))
THEN
320 IF (
ASSOCIATED(qs_kind_set(ikind)%elec_conf))
THEN
321 DEALLOCATE (qs_kind_set(ikind)%elec_conf)
324 IF (
ASSOCIATED(qs_kind_set(ikind)%dft_plus_u))
THEN
325 IF (
ASSOCIATED(qs_kind_set(ikind)%dft_plus_u%orbitals))
THEN
326 DEALLOCATE (qs_kind_set(ikind)%dft_plus_u%orbitals)
328 IF (
ASSOCIATED(qs_kind_set(ikind)%dft_plus_u%nelec))
THEN
329 DEALLOCATE (qs_kind_set(ikind)%dft_plus_u%nelec)
331 DEALLOCATE (qs_kind_set(ikind)%dft_plus_u)
334 IF (
ASSOCIATED(qs_kind_set(ikind)%nlcc_pot))
THEN
335 DEALLOCATE (qs_kind_set(ikind)%nlcc_pot)
338 IF (
ASSOCIATED(qs_kind_set(ikind)%dispersion))
THEN
339 DEALLOCATE (qs_kind_set(ikind)%dispersion)
341 IF (
ASSOCIATED(qs_kind_set(ikind)%addel))
THEN
342 DEALLOCATE (qs_kind_set(ikind)%addel)
344 IF (
ASSOCIATED(qs_kind_set(ikind)%naddel))
THEN
345 DEALLOCATE (qs_kind_set(ikind)%naddel)
347 IF (
ASSOCIATED(qs_kind_set(ikind)%laddel))
THEN
348 DEALLOCATE (qs_kind_set(ikind)%laddel)
350 IF (
ASSOCIATED(qs_kind_set(ikind)%reltmat))
THEN
351 DEALLOCATE (qs_kind_set(ikind)%reltmat)
354 IF (
ASSOCIATED(qs_kind_set(ikind)%pao_potentials))
THEN
355 DEALLOCATE (qs_kind_set(ikind)%pao_potentials)
357 IF (
ASSOCIATED(qs_kind_set(ikind)%pao_descriptors))
THEN
358 DEALLOCATE (qs_kind_set(ikind)%pao_descriptors)
364 DEALLOCATE (qs_kind_set)
366 CALL cp_abort(__location__, &
367 "The pointer qs_kind_set is not associated and "// &
368 "cannot be deallocated")
452 basis_set, basis_type, ncgf, nsgf, &
453 all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, &
454 cneo_potential, se_parameter, dftb_parameter, xtb_parameter, &
455 dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, &
456 alpha_core_charge, ccore_charge, core_charge, core_charge_radius, &
457 paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, &
458 covalent_radius, vdw_radius, &
459 gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, &
460 ngrid_ang, ngrid_rad, lmax_rho0, &
461 dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, &
462 u_minus_j, U_of_dft_plus_u, J_of_dft_plus_u, &
463 alpha_of_dft_plus_u, beta_of_dft_plus_u, J0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, &
464 bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, &
465 max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, &
466 init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, &
467 pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
471 CHARACTER(len=*),
OPTIONAL :: basis_type
472 INTEGER,
INTENT(OUT),
OPTIONAL :: ncgf, nsgf
482 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: dftb3_param
483 INTEGER,
INTENT(OUT),
OPTIONAL :: zatom
484 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: zeff
485 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: elec_conf
486 INTEGER,
INTENT(OUT),
OPTIONAL :: mao, lmax_dftb
487 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: alpha_core_charge, ccore_charge, &
488 core_charge, core_charge_radius
490 LOGICAL,
INTENT(OUT),
OPTIONAL :: paw_atom
491 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: hard_radius, hard0_radius, &
492 max_rad_local, covalent_radius, &
494 LOGICAL,
INTENT(OUT),
OPTIONAL :: gpw_type_forced
496 INTEGER,
INTENT(OUT),
OPTIONAL :: max_iso_not0, max_s_harm
498 INTEGER,
INTENT(OUT),
OPTIONAL :: ngrid_ang, ngrid_rad, lmax_rho0
499 LOGICAL,
INTENT(OUT),
OPTIONAL :: dft_plus_u_atom
500 INTEGER,
INTENT(OUT),
OPTIONAL :: l_of_dft_plus_u, n_of_dft_plus_u
501 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, &
502 alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u
504 LOGICAL,
INTENT(OUT),
OPTIONAL :: bs_occupation
505 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: magnetization
506 LOGICAL,
INTENT(OUT),
OPTIONAL :: no_optimize
507 INTEGER,
DIMENSION(:, :),
OPTIONAL,
POINTER :: addel, laddel, naddel
508 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: orbitals
509 INTEGER,
OPTIONAL :: max_scf
510 REAL(kind=
dp),
OPTIONAL :: eps_scf
511 LOGICAL,
OPTIONAL :: smear
512 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: u_ramping, u_minus_j_target, &
514 LOGICAL,
OPTIONAL :: init_u_ramping_each_scf
515 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: reltmat
516 LOGICAL,
OPTIONAL :: ghost
517 LOGICAL,
INTENT(OUT),
OPTIONAL :: monovalent
518 LOGICAL,
OPTIONAL :: floating
519 CHARACTER(LEN=default_string_length), &
520 INTENT(OUT),
OPTIONAL :: name
521 CHARACTER(LEN=2),
INTENT(OUT),
OPTIONAL :: element_symbol
522 INTEGER,
INTENT(OUT),
OPTIONAL :: pao_basis_size
523 CHARACTER(LEN=default_path_length),
INTENT(OUT), &
524 OPTIONAL :: pao_model_file
528 OPTIONAL,
POINTER :: pao_descriptors
529 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: nelec
531 CHARACTER(LEN=default_string_length) :: my_basis_type
537 IF (
PRESENT(basis_type))
THEN
538 my_basis_type = basis_type
540 my_basis_type =
"ORB"
543 IF (
PRESENT(basis_set))
THEN
545 basis_type=my_basis_type)
548 IF (
PRESENT(ncgf))
THEN
550 basis_type=my_basis_type)
551 IF (
ASSOCIATED(tmp_basis_set))
THEN
553 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
554 l = qs_kind%dftb_parameter%lmax
555 ncgf = ((l + 1)*(l + 2)*(l + 3))/6
561 IF (
PRESENT(nsgf))
THEN
563 basis_type=my_basis_type)
564 IF (
ASSOCIATED(tmp_basis_set))
THEN
566 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
567 nsgf = qs_kind%dftb_parameter%natorb
573 IF (
PRESENT(all_potential)) all_potential => qs_kind%all_potential
574 IF (
PRESENT(tnadd_potential)) tnadd_potential => qs_kind%tnadd_potential
575 IF (
PRESENT(gth_potential)) gth_potential => qs_kind%gth_potential
576 IF (
PRESENT(sgp_potential)) sgp_potential => qs_kind%sgp_potential
577 IF (
PRESENT(upf_potential)) upf_potential => qs_kind%upf_potential
578 IF (
PRESENT(cneo_potential)) cneo_potential => qs_kind%cneo_potential
579 IF (
PRESENT(se_parameter)) se_parameter => qs_kind%se_parameter
580 IF (
PRESENT(dftb_parameter)) dftb_parameter => qs_kind%dftb_parameter
581 IF (
PRESENT(xtb_parameter)) xtb_parameter => qs_kind%xtb_parameter
582 IF (
PRESENT(element_symbol)) element_symbol = qs_kind%element_symbol
583 IF (
PRESENT(name)) name = qs_kind%name
584 IF (
PRESENT(dftb3_param)) dftb3_param = qs_kind%dudq_dftb3
585 IF (
PRESENT(elec_conf)) elec_conf => qs_kind%elec_conf
586 IF (
PRESENT(alpha_core_charge))
THEN
587 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
589 alpha_core_charge=alpha_core_charge)
590 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
592 alpha_core_charge=alpha_core_charge)
593 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
595 alpha_core_charge=alpha_core_charge)
596 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
597 cpabort(
"CNEO ALPHA CORE CHARGE NOT AVAILABLE")
599 alpha_core_charge = 1.0_dp
602 IF (
PRESENT(ccore_charge))
THEN
603 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
605 ccore_charge=ccore_charge)
606 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
608 ccore_charge=ccore_charge)
609 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
611 ccore_charge=ccore_charge)
612 ELSE IF (
ASSOCIATED(qs_kind%upf_potential))
THEN
613 cpabort(
"UPF CCORE CHARGE NOT AVAILABLE")
614 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
615 cpabort(
"CNEO CCORE CHARGE NOT AVAILABLE")
617 ccore_charge = 0.0_dp
620 IF (
PRESENT(core_charge_radius))
THEN
621 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
623 core_charge_radius=core_charge_radius)
624 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
626 core_charge_radius=core_charge_radius)
627 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
629 core_charge_radius=core_charge_radius)
630 ELSE IF (
ASSOCIATED(qs_kind%upf_potential))
THEN
631 cpabort(
"UPF CORE CHARGE RADIUS NOT AVAILABLE")
632 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
633 cpabort(
"CNEO CORE CHARGE RADIUS NOT AVAILABLE")
635 core_charge_radius = 0.0_dp
638 IF (
PRESENT(core_charge))
THEN
639 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
642 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
645 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
648 ELSE IF (
ASSOCIATED(qs_kind%upf_potential))
THEN
649 cpabort(
"UPF CORE CHARGE NOT AVAILABLE")
650 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
658 IF (
PRESENT(zatom))
THEN
660 CALL get_ptable_info(qs_kind%element_symbol, ielement=zatom, found=found)
664 IF (
PRESENT(zeff))
THEN
665 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
666 CALL get_potential(potential=qs_kind%all_potential, zeff=zeff)
667 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
668 CALL get_potential(potential=qs_kind%gth_potential, zeff=zeff)
669 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
670 CALL get_potential(potential=qs_kind%sgp_potential, zeff=zeff)
671 ELSE IF (
ASSOCIATED(qs_kind%upf_potential))
THEN
672 zeff = qs_kind%upf_potential%zion
673 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
680 IF (
PRESENT(covalent_radius)) covalent_radius = qs_kind%covalent_radius
681 IF (
PRESENT(vdw_radius)) vdw_radius = qs_kind%vdw_radius
683 IF (
PRESENT(paw_proj_set)) paw_proj_set => qs_kind%paw_proj_set
684 IF (
PRESENT(paw_atom)) paw_atom = qs_kind%paw_atom
685 IF (
PRESENT(gpw_type_forced)) gpw_type_forced = qs_kind%gpw_type_forced
686 IF (
PRESENT(hard_radius)) hard_radius = qs_kind%hard_radius
687 IF (
PRESENT(hard0_radius)) hard0_radius = qs_kind%hard0_radius
688 IF (
PRESENT(max_rad_local)) max_rad_local = qs_kind%max_rad_local
689 IF (
PRESENT(harmonics)) harmonics => qs_kind%harmonics
690 IF (
PRESENT(max_s_harm))
THEN
691 IF (
ASSOCIATED(qs_kind%harmonics))
THEN
692 max_s_harm = qs_kind%harmonics%max_s_harm
697 IF (
PRESENT(max_iso_not0))
THEN
698 IF (
ASSOCIATED(qs_kind%harmonics))
THEN
699 max_iso_not0 = qs_kind%harmonics%max_iso_not0
704 IF (
PRESENT(grid_atom)) grid_atom => qs_kind%grid_atom
705 IF (
PRESENT(ngrid_ang)) ngrid_ang = qs_kind%ngrid_ang
706 IF (
PRESENT(ngrid_rad)) ngrid_rad = qs_kind%ngrid_rad
707 IF (
PRESENT(lmax_rho0)) lmax_rho0 = qs_kind%lmax_rho0
708 IF (
PRESENT(ghost)) ghost = qs_kind%ghost
709 IF (
PRESENT(monovalent)) monovalent = qs_kind%monovalent
710 IF (
PRESENT(floating)) floating = qs_kind%floating
711 IF (
PRESENT(dft_plus_u_atom)) dft_plus_u_atom =
ASSOCIATED(qs_kind%dft_plus_u)
712 IF (
PRESENT(l_of_dft_plus_u))
THEN
713 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
714 l_of_dft_plus_u = qs_kind%dft_plus_u%l
719 IF (
PRESENT(n_of_dft_plus_u))
THEN
720 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
721 n_of_dft_plus_u = qs_kind%dft_plus_u%n
726 IF (
PRESENT(u_minus_j))
THEN
727 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
728 u_minus_j = qs_kind%dft_plus_u%u_minus_j
733 IF (
PRESENT(u_minus_j_target))
THEN
734 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
735 u_minus_j_target = qs_kind%dft_plus_u%u_minus_j_target
737 u_minus_j_target = 0.0_dp
740 IF (
PRESENT(u_of_dft_plus_u))
THEN
741 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
742 u_of_dft_plus_u = qs_kind%dft_plus_u%U
744 u_of_dft_plus_u = 0.0_dp
747 IF (
PRESENT(j_of_dft_plus_u))
THEN
748 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
749 j_of_dft_plus_u = qs_kind%dft_plus_u%J
751 j_of_dft_plus_u = 0.0_dp
754 IF (
PRESENT(alpha_of_dft_plus_u))
THEN
755 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
756 alpha_of_dft_plus_u = qs_kind%dft_plus_u%alpha
758 alpha_of_dft_plus_u = 0.0_dp
761 IF (
PRESENT(beta_of_dft_plus_u))
THEN
762 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
763 beta_of_dft_plus_u = qs_kind%dft_plus_u%beta
765 beta_of_dft_plus_u = 0.0_dp
768 IF (
PRESENT(j0_of_dft_plus_u))
THEN
769 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
770 j0_of_dft_plus_u = qs_kind%dft_plus_u%J0
772 j0_of_dft_plus_u = 0.0_dp
775 IF (
PRESENT(occupation_of_dft_plus_u))
THEN
776 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
777 occupation_of_dft_plus_u = qs_kind%dft_plus_u%occupation
779 occupation_of_dft_plus_u = -1.0_dp
783 IF (
PRESENT(init_u_ramping_each_scf))
THEN
784 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
785 init_u_ramping_each_scf = qs_kind%dft_plus_u%init_u_ramping_each_scf
787 init_u_ramping_each_scf = .false.
790 IF (
PRESENT(u_ramping))
THEN
791 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
792 u_ramping = qs_kind%dft_plus_u%u_ramping
797 IF (
PRESENT(eps_u_ramping))
THEN
798 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
799 eps_u_ramping = qs_kind%dft_plus_u%eps_u_ramping
801 eps_u_ramping = 1.0e-5_dp
804 IF (
PRESENT(nelec))
THEN
806 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
807 IF (
ASSOCIATED(qs_kind%dft_plus_u%nelec))
THEN
808 nelec => qs_kind%dft_plus_u%nelec
812 IF (
PRESENT(orbitals))
THEN
814 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
815 IF (
ASSOCIATED(qs_kind%dft_plus_u%orbitals))
THEN
816 orbitals => qs_kind%dft_plus_u%orbitals
820 IF (
PRESENT(eps_scf))
THEN
821 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
822 eps_scf = qs_kind%dft_plus_u%eps_scf
827 IF (
PRESENT(max_scf))
THEN
828 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
829 max_scf = qs_kind%dft_plus_u%max_scf
834 IF (
PRESENT(smear))
THEN
835 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
836 smear = qs_kind%dft_plus_u%smear
841 IF (
PRESENT(dispersion)) dispersion => qs_kind%dispersion
842 IF (
PRESENT(bs_occupation)) bs_occupation = qs_kind%bs_occupation
843 IF (
PRESENT(addel)) addel => qs_kind%addel
844 IF (
PRESENT(laddel)) laddel => qs_kind%laddel
845 IF (
PRESENT(naddel)) naddel => qs_kind%naddel
847 IF (
PRESENT(magnetization)) magnetization = qs_kind%magnetization
849 IF (
PRESENT(no_optimize)) no_optimize = qs_kind%no_optimize
851 IF (
PRESENT(reltmat)) reltmat => qs_kind%reltmat
853 IF (
PRESENT(mao)) mao = qs_kind%mao
855 IF (
PRESENT(lmax_dftb)) lmax_dftb = qs_kind%lmax_dftb
857 IF (
PRESENT(pao_basis_size)) pao_basis_size = qs_kind%pao_basis_size
858 IF (
PRESENT(pao_model_file)) pao_model_file = qs_kind%pao_model_file
860 IF (
PRESENT(pao_descriptors)) pao_descriptors => qs_kind%pao_descriptors
905 all_potential_present, tnadd_potential_present, gth_potential_present, &
906 sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, &
907 maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, &
908 ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, &
909 nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, &
911 basis_type, total_zeff_corr, npgf_seg, &
912 cneo_potential_present, nkind_q, natom_q)
914 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
915 LOGICAL,
INTENT(OUT),
OPTIONAL :: all_potential_present, tnadd_potential_present, &
916 gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present
917 INTEGER,
INTENT(OUT),
OPTIONAL :: maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, &
918 maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, &
920 INTEGER,
INTENT(IN),
OPTIONAL :: maxder
921 INTEGER,
INTENT(OUT),
OPTIONAL :: max_ngrid_rad, max_sph_harm, &
922 maxg_iso_not0, lmax_rho0
923 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: basis_rcut
924 CHARACTER(len=*),
OPTIONAL :: basis_type
925 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: total_zeff_corr
926 INTEGER,
INTENT(OUT),
OPTIONAL :: npgf_seg
927 LOGICAL,
INTENT(OUT),
OPTIONAL :: cneo_potential_present
928 INTEGER,
INTENT(OUT),
OPTIONAL :: nkind_q, natom_q
930 CHARACTER(len=default_string_length) :: my_basis_type
931 INTEGER :: ikind,
imax, lmax_rho0_kind, &
932 max_iso_not0, max_s_harm, n, &
933 ngrid_rad, nkind, nrloc(10), &
935 LOGICAL :: dft_plus_u_atom, ecp_semi_local, paw_atom
936 REAL(kind=
dp) :: brcut, zeff, zeff_correction
947 IF (
PRESENT(basis_type))
THEN
948 my_basis_type = basis_type
950 my_basis_type =
"ORB"
953 IF (
ASSOCIATED(qs_kind_set))
THEN
955 IF (
PRESENT(maxcgf)) maxcgf = 0
956 IF (
PRESENT(maxco)) maxco = 0
957 IF (
PRESENT(maxco_proj)) maxco_proj = 0
958 IF (
PRESENT(maxg_iso_not0)) maxg_iso_not0 = 0
959 IF (
PRESENT(maxgtops)) maxgtops = 0
960 IF (
PRESENT(maxlgto)) maxlgto = -1
961 IF (
PRESENT(maxlppl)) maxlppl = -1
962 IF (
PRESENT(maxlppnl)) maxlppnl = -1
963 IF (
PRESENT(maxpol)) maxpol = -1
964 IF (
PRESENT(maxlprj)) maxlprj = -1
965 IF (
PRESENT(maxnset)) maxnset = 0
966 IF (
PRESENT(maxppnl)) maxppnl = 0
967 IF (
PRESENT(maxsgf)) maxsgf = 0
968 IF (
PRESENT(maxsgf_set)) maxsgf_set = 0
969 IF (
PRESENT(ncgf)) ncgf = 0
970 IF (
PRESENT(nelectron)) nelectron = 0
971 IF (
PRESENT(npgf)) npgf = 0
972 IF (
PRESENT(nset)) nset = 0
973 IF (
PRESENT(nsgf)) nsgf = 0
974 IF (
PRESENT(nshell)) nshell = 0
975 IF (
PRESENT(all_potential_present)) all_potential_present = .false.
976 IF (
PRESENT(tnadd_potential_present)) tnadd_potential_present = .false.
977 IF (
PRESENT(gth_potential_present)) gth_potential_present = .false.
978 IF (
PRESENT(sgp_potential_present)) sgp_potential_present = .false.
979 IF (
PRESENT(cneo_potential_present)) cneo_potential_present = .false.
980 IF (
PRESENT(nkind_q)) nkind_q = 0
981 IF (
PRESENT(natom_q)) natom_q = 0
982 IF (
PRESENT(paw_atom_present)) paw_atom_present = .false.
983 IF (
PRESENT(max_ngrid_rad)) max_ngrid_rad = 0
984 IF (
PRESENT(max_sph_harm)) max_sph_harm = 0
985 IF (
PRESENT(lmax_rho0)) lmax_rho0 = 0
986 IF (
PRESENT(basis_rcut)) basis_rcut = 0.0_dp
987 IF (
PRESENT(total_zeff_corr)) total_zeff_corr = 0.0_dp
988 IF (
PRESENT(npgf_seg)) npgf_seg = 0
990 nkind =
SIZE(qs_kind_set)
992 qs_kind => qs_kind_set(ikind)
994 all_potential=all_potential, &
995 tnadd_potential=tnadd_potential, &
996 gth_potential=gth_potential, &
997 sgp_potential=sgp_potential, &
998 cneo_potential=cneo_potential, &
999 paw_proj_set=paw_proj_set, &
1000 dftb_parameter=dftb_parameter, &
1001 ngrid_rad=ngrid_rad, &
1002 max_s_harm=max_s_harm, &
1003 max_iso_not0=max_iso_not0, &
1004 paw_atom=paw_atom, &
1005 dft_plus_u_atom=dft_plus_u_atom, &
1006 lmax_rho0=lmax_rho0_kind)
1008 IF (
PRESENT(maxlppl) .AND.
ASSOCIATED(gth_potential))
THEN
1010 maxlppl = max(maxlppl, 2*(n - 1))
1011 ELSEIF (
PRESENT(maxlppl) .AND.
ASSOCIATED(sgp_potential))
THEN
1012 CALL get_potential(potential=sgp_potential, nrloc=nrloc, ecp_semi_local=ecp_semi_local)
1013 n = maxval(nrloc) - 2
1014 maxlppl = max(maxlppl, 2*(n - 1))
1015 IF (ecp_semi_local)
THEN
1017 n = maxval(nrpot) - 2
1018 n = 2*(n - 1) +
imax
1019 maxlppl = max(maxlppl, n)
1023 IF (
PRESENT(maxlppnl) .AND.
ASSOCIATED(gth_potential))
THEN
1025 maxlppnl = max(maxlppnl,
imax)
1026 ELSEIF (
PRESENT(maxlppnl) .AND.
ASSOCIATED(sgp_potential))
THEN
1028 maxlppnl = max(maxlppnl,
imax)
1031 IF (
PRESENT(maxpol) .AND.
ASSOCIATED(tnadd_potential))
THEN
1033 maxpol = max(maxpol, 2*(n - 1))
1036 IF (
PRESENT(maxco_proj) .AND.
ASSOCIATED(paw_proj_set))
THEN
1038 maxco_proj = max(maxco_proj,
imax)
1041 IF (
PRESENT(maxlprj) .AND.
ASSOCIATED(paw_proj_set))
THEN
1043 maxlprj = max(maxlprj,
imax)
1046 IF (
PRESENT(maxppnl) .AND.
ASSOCIATED(gth_potential))
THEN
1048 maxppnl = max(maxppnl,
imax)
1049 ELSEIF (
PRESENT(maxppnl) .AND.
ASSOCIATED(sgp_potential))
THEN
1051 maxppnl = max(maxppnl,
imax)
1054 IF (my_basis_type(1:3) ==
"NUC" .AND. .NOT.
ASSOCIATED(cneo_potential))
THEN
1055 NULLIFY (tmp_basis_set)
1058 basis_type=my_basis_type)
1061 IF (
PRESENT(maxcgf))
THEN
1062 IF (
ASSOCIATED(tmp_basis_set))
THEN
1064 maxcgf = max(maxcgf,
imax)
1065 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1068 maxcgf = max(maxcgf,
imax)
1072 IF (
PRESENT(maxco))
THEN
1073 IF (
ASSOCIATED(tmp_basis_set))
THEN
1074 IF (
PRESENT(maxder))
THEN
1076 maxco=
imax, maxder=maxder)
1080 maxco = max(maxco,
imax)
1082 IF (
ASSOCIATED(gth_potential))
THEN
1086 IF (
ASSOCIATED(sgp_potential))
THEN
1094 IF (
PRESENT(maxgtops))
THEN
1095 IF (
ASSOCIATED(tmp_basis_set))
THEN
1097 maxgtops = max(maxgtops, n*
imax)
1101 IF (
PRESENT(maxlgto))
THEN
1102 IF (
ASSOCIATED(tmp_basis_set))
THEN
1104 maxlgto = max(maxlgto,
imax)
1105 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1107 maxlgto = max(maxlgto,
imax)
1111 IF (
PRESENT(maxnset))
THEN
1112 IF (
ASSOCIATED(tmp_basis_set))
THEN
1114 maxnset = max(maxnset, n)
1118 IF (
PRESENT(maxsgf))
THEN
1119 IF (
ASSOCIATED(tmp_basis_set))
THEN
1121 maxsgf = max(maxsgf,
imax)
1125 IF (
PRESENT(maxsgf_set))
THEN
1126 IF (
ASSOCIATED(tmp_basis_set))
THEN
1128 maxsgf_set = max(maxsgf_set,
imax)
1132 IF (
PRESENT(ncgf))
THEN
1133 IF (
ASSOCIATED(tmp_basis_set))
THEN
1135 ncgf = ncgf + n*qs_kind_set(ikind)%natom
1136 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1139 ncgf = ncgf + n*qs_kind_set(ikind)%natom
1143 IF (
PRESENT(npgf))
THEN
1144 IF (
ASSOCIATED(tmp_basis_set))
THEN
1146 npgf = npgf + n*qs_kind_set(ikind)%natom
1150 IF (
PRESENT(nset))
THEN
1151 IF (
ASSOCIATED(tmp_basis_set))
THEN
1153 nset = nset + n*qs_kind_set(ikind)%natom
1157 IF (
PRESENT(nsgf))
THEN
1158 IF (
ASSOCIATED(tmp_basis_set))
THEN
1160 nsgf = nsgf + n*qs_kind_set(ikind)%natom
1161 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1163 nsgf = nsgf + n*qs_kind_set(ikind)%natom
1167 IF (
PRESENT(nshell))
THEN
1168 IF (
ASSOCIATED(tmp_basis_set))
THEN
1170 nshell = nshell + n*qs_kind_set(ikind)%natom
1171 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1173 nshell = nshell + (n + 1)*qs_kind_set(ikind)%natom
1177 IF (
PRESENT(nelectron))
THEN
1178 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
1180 zeff=zeff, zeff_correction=zeff_correction)
1181 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
1183 zeff=zeff, zeff_correction=zeff_correction)
1184 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
1186 zeff=zeff, zeff_correction=zeff_correction)
1187 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
1190 zeff_correction = 0.0_dp
1193 zeff_correction = 0.0_dp
1195 nelectron = nelectron + qs_kind_set(ikind)%natom*nint(zeff - zeff_correction)
1198 IF (
PRESENT(basis_rcut))
THEN
1199 IF (
ASSOCIATED(tmp_basis_set))
THEN
1201 basis_rcut = max(basis_rcut, brcut)
1202 ELSE IF (
ASSOCIATED(qs_kind%dftb_parameter))
THEN
1204 basis_rcut = max(basis_rcut, brcut)
1208 IF (
PRESENT(total_zeff_corr))
THEN
1209 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
1211 zeff=zeff, zeff_correction=zeff_correction)
1212 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
1214 zeff=zeff, zeff_correction=zeff_correction)
1215 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
1217 zeff=zeff, zeff_correction=zeff_correction)
1220 zeff_correction = 0.0_dp
1222 total_zeff_corr = total_zeff_corr + qs_kind_set(ikind)%natom*zeff_correction
1225 IF (
PRESENT(all_potential_present))
THEN
1226 IF (
ASSOCIATED(all_potential))
THEN
1227 all_potential_present = .true.
1231 IF (
PRESENT(tnadd_potential_present))
THEN
1232 IF (
ASSOCIATED(tnadd_potential))
THEN
1233 tnadd_potential_present = .true.
1237 IF (
PRESENT(gth_potential_present))
THEN
1238 IF (
ASSOCIATED(gth_potential))
THEN
1239 gth_potential_present = .true.
1243 IF (
PRESENT(sgp_potential_present))
THEN
1244 IF (
ASSOCIATED(sgp_potential))
THEN
1245 sgp_potential_present = .true.
1249 IF (
PRESENT(cneo_potential_present))
THEN
1250 IF (
ASSOCIATED(cneo_potential))
THEN
1251 cneo_potential_present = .true.
1255 IF (
PRESENT(nkind_q))
THEN
1256 IF (
ASSOCIATED(cneo_potential))
THEN
1257 nkind_q = nkind_q + 1
1261 IF (
PRESENT(natom_q))
THEN
1262 IF (
ASSOCIATED(cneo_potential))
THEN
1263 natom_q = natom_q + qs_kind_set(ikind)%natom
1267 IF (
PRESENT(paw_atom_present))
THEN
1269 paw_atom_present = .true.
1273 IF (
PRESENT(dft_plus_u_atom_present))
THEN
1274 IF (dft_plus_u_atom)
THEN
1275 dft_plus_u_atom_present = .true.
1279 IF (
PRESENT(max_ngrid_rad))
THEN
1280 max_ngrid_rad = max(max_ngrid_rad, ngrid_rad)
1283 IF (
PRESENT(max_sph_harm))
THEN
1284 max_sph_harm = max(max_sph_harm, max_s_harm)
1287 IF (
PRESENT(maxg_iso_not0))
THEN
1288 maxg_iso_not0 = max(maxg_iso_not0, max_iso_not0)
1291 IF (
PRESENT(lmax_rho0))
THEN
1292 lmax_rho0 = max(lmax_rho0, lmax_rho0_kind)
1295 IF (
PRESENT(npgf_seg))
THEN
1296 IF (
ASSOCIATED(tmp_basis_set))
THEN
1298 npgf_seg = npgf_seg + n*qs_kind_set(ikind)%natom
1304 cpabort(
"The pointer qs_kind_set is not associated")
1315 SUBROUTINE init_qs_kind(qs_kind)
1318 CHARACTER(len=*),
PARAMETER :: routinen =
'init_qs_kind'
1320 CHARACTER(LEN=default_string_length) :: basis_type
1321 INTEGER :: handle, i
1324 CALL timeset(routinen, handle)
1326 cpassert(
ASSOCIATED(qs_kind))
1328 IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
1330 ELSEIF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
1334 DO i = 1,
SIZE(qs_kind%basis_sets, 1)
1335 NULLIFY (tmp_basis_set)
1337 inumbas=i, basis_type=basis_type)
1338 IF (basis_type ==
"") cycle
1339 IF (basis_type ==
"AUX")
THEN
1340 IF (tmp_basis_set%norm_type < 0) tmp_basis_set%norm_type = 1
1343 IF (tmp_basis_set%norm_type < 0) tmp_basis_set%norm_type = 2
1348 CALL timestop(handle)
1350 END SUBROUTINE init_qs_kind
1360 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1362 CHARACTER(len=*),
PARAMETER :: routinen =
'init_qs_kind_set'
1364 INTEGER :: handle, ikind
1367 CALL timeset(routinen, handle)
1369 IF (.NOT.
ASSOCIATED(qs_kind_set))
THEN
1370 cpabort(
"init_qs_kind_set: The pointer qs_kind_set is not associated")
1373 DO ikind = 1,
SIZE(qs_kind_set)
1374 qs_kind => qs_kind_set(ikind)
1375 CALL init_qs_kind(qs_kind)
1378 CALL timestop(handle)
1391 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1394 LOGICAL,
OPTIONAL :: modify_qs_control
1396 CHARACTER(LEN=default_string_length) :: bsname
1397 INTEGER :: bas1c, ikind, ilevel, nkind
1398 LOGICAL :: gpw, my_mod_control, paw_atom
1399 REAL(
dp) :: max_rad_local_type, rc
1404 my_mod_control = .true.
1405 IF (
PRESENT(modify_qs_control))
THEN
1406 my_mod_control = modify_qs_control
1409 IF (
ASSOCIATED(qs_kind_set))
THEN
1411 IF (my_mod_control) qs_control%gapw_control%non_paw_atoms = .false.
1412 nkind =
SIZE(qs_kind_set)
1416 qs_kind => qs_kind_set(ikind)
1418 CALL get_qs_kind(qs_kind=qs_kind, basis_set=orb_basis)
1419 CALL get_qs_kind(qs_kind=qs_kind, hard_radius=rc, &
1420 max_rad_local=max_rad_local_type, gpw_type_forced=gpw)
1422 NULLIFY (soft_basis)
1428 qs_control%gapw_control%eps_fit, rc, paw_atom, &
1429 (qs_control%gapw_control%force_paw .OR. &
1430 ASSOCIATED(qs_kind%cneo_potential)), gpw)
1432 CALL set_qs_kind(qs_kind=qs_kind, paw_atom=paw_atom)
1434 bas1c = qs_control%gapw_control%basis_1c
1448 cpabort(
"basis_1c type")
1453 basis_1c%name = trim(bsname)//
"_1c"
1457 CALL get_qs_kind(qs_kind=qs_kind, paw_proj_set=paw_proj)
1458 CALL projectors(paw_proj, basis_1c, orb_basis, rc, qs_control, &
1459 max_rad_local_type, force_env_section)
1461 IF (my_mod_control) qs_control%gapw_control%non_paw_atoms = .true.
1465 NULLIFY (qs_kind%grid_atom, qs_kind%harmonics)
1471 IF (my_mod_control)
THEN
1472 IF (qs_control%gapw_control%non_paw_atoms)
THEN
1473 qs_control%gapw_control%nopaw_as_gpw = .true.
1475 qs_control%gapw_control%nopaw_as_gpw = .false.
1479 cpabort(
"The pointer qs_kind_set is not associated")
1489 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1491 INTEGER :: i, ic, ikind, n_nlcc, nc, nexp_nlcc, &
1493 INTEGER,
DIMENSION(:),
POINTER :: nct_nlcc
1494 LOGICAL :: nlcc, nlcc_type, paw_atom
1495 REAL(
dp) :: alpha, coa, cval
1496 REAL(kind=
dp),
DIMENSION(:),
POINTER :: a_nlcc, alpha_nlcc, c_nlcc, fe, rc, rr
1497 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cval_nlcc, den
1502 IF (
ASSOCIATED(qs_kind_set))
THEN
1505 nkind =
SIZE(qs_kind_set)
1507 qs_kind => qs_kind_set(ikind)
1510 CALL get_qs_kind(qs_kind, gth_potential=gth_potential)
1511 CALL get_qs_kind(qs_kind, sgp_potential=sgp_potential)
1512 IF (
ASSOCIATED(gth_potential))
THEN
1513 CALL get_potential(potential=gth_potential, nlcc_present=nlcc_type, &
1514 nexp_nlcc=nexp_nlcc, alpha_nlcc=alpha_nlcc, nct_nlcc=nct_nlcc, cval_nlcc=cval_nlcc)
1516 nr = qs_kind%grid_atom%nr
1517 rr => qs_kind%grid_atom%rad
1518 ALLOCATE (qs_kind%nlcc_pot(nr, 2), rc(nr), fe(nr))
1519 den => qs_kind%nlcc_pot
1522 alpha = alpha_nlcc(i)
1524 fe(:) = exp(-0.5_dp*rc(:)*rc(:))
1527 cval = cval_nlcc(ic, i)
1529 den(:, 1) = den(:, 1) + fe(:)*rc**(2*ic - 2)*cval
1530 den(:, 2) = den(:, 2) - fe(:)*rc**(2*ic - 1)*coa
1532 den(:, 2) = den(:, 2) + real(2*ic - 2,
dp)*fe(:)*rc**(2*ic - 3)*coa
1538 ELSE IF (
ASSOCIATED(sgp_potential))
THEN
1540 n_nlcc=n_nlcc, a_nlcc=a_nlcc, c_nlcc=c_nlcc)
1542 nr = qs_kind%grid_atom%nr
1543 rr => qs_kind%grid_atom%rad
1544 ALLOCATE (qs_kind%nlcc_pot(nr, 2), rc(nr), fe(nr))
1545 den => qs_kind%nlcc_pot
1549 fe(:) = exp(-alpha*rr(:)*rr(:))
1551 den(:, 1) = den(:, 1) + cval*fe(:)
1552 den(:, 2) = den(:, 2) - 2.0_dp*alpha*cval*rr(:)*fe(:)
1563 cpabort(
"The pointer qs_kind_set is not associated")
1575 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1578 INTEGER :: ikind, nkind
1584 IF (
ASSOCIATED(qs_kind_set))
THEN
1586 nkind =
SIZE(qs_kind_set)
1590 qs_kind => qs_kind_set(ikind)
1592 IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
1593 CALL get_qs_kind(qs_kind=qs_kind, basis_set=orb_basis, basis_type=
"NUC", &
1596 NULLIFY (soft_basis)
1599 qs_control%gapw_control%eps_fit/ &
1600 sqrt(qs_kind%cneo_potential%zeff), &
1601 rc, paw_atom, .true., .false.)
1608 cpabort(
"The pointer qs_kind_set is not associated")
1627 SUBROUTINE read_qs_kind(qs_kind, kind_section, para_env, force_env_section, &
1628 no_fail, method_id, silent)
1634 LOGICAL,
INTENT(IN) :: no_fail
1635 INTEGER,
INTENT(IN) :: method_id
1636 LOGICAL,
INTENT(IN) :: silent
1638 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_qs_kind'
1639 INTEGER,
PARAMETER :: maxbas = 20
1641 CHARACTER(LEN=2) :: element_symbol
1642 CHARACTER(len=default_path_length) :: kg_potential_fn_kind, &
1643 potential_file_name, potential_fn_kind
1644 CHARACTER(LEN=default_string_length) :: akind_name, basis_type, keyword, &
1645 kgpot_name, kgpot_type, &
1646 potential_name, potential_type, tmp
1647 CHARACTER(LEN=default_string_length),
DIMENSION(4) :: description
1648 CHARACTER(LEN=default_string_length), &
1649 DIMENSION(:),
POINTER :: tmpstringlist
1650 CHARACTER(LEN=default_string_length), &
1651 DIMENSION(maxbas) :: basis_set_form, basis_set_name, &
1653 INTEGER :: handle, i, i_rep, iounit, ipaodesc, ipaopot, ipos, j, jj, k_rep, l, m, n_rep, &
1654 nb_rep, nexp, ngauss, nlcc, nloc, nnl, norbitals, npaodesc, npaopot, nppnl, nspin, nu, z
1655 INTEGER,
DIMENSION(:),
POINTER :: add_el, elec_conf, orbitals
1656 LOGICAL :: check, ecp_semi_local, explicit, explicit_basis, explicit_j, explicit_kgpot, &
1657 explicit_potential, explicit_u, explicit_u_m_j, nobasis, nobasis_nuc, section_enabled, &
1658 subsection_enabled, update_input
1659 REAL(kind=
dp) :: alpha, ccore, mass, r, rc, &
1661 REAL(kind=
dp),
DIMENSION(6) :: error
1662 REAL(kind=
dp),
DIMENSION(:),
POINTER :: a_nl, aloc, anlcc, cloc, cnlcc, nelec
1663 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: h_nl
1664 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: c_nl
1671 TYPE(
section_vals_type),
POINTER :: basis_section, bs_section, dft_plus_u_section, &
1672 dft_section, enforce_occupation_section, kgpot_section, pao_desc_section, &
1673 pao_pot_section, potential_section, spin_section
1676 CALL timeset(routinen, handle)
1684 update_input = .true.
1685 basis_set_name(:) =
""
1686 basis_set_type(:) =
""
1687 basis_set_form(:) =
""
1693 zeff_correction = 0.0_dp
1695 explicit_basis = .false.
1696 explicit_j = .false.
1697 explicit_kgpot = .false.
1698 explicit_potential = .false.
1699 explicit_u = .false.
1700 explicit_u_m_j = .false.
1705 akind_name = qs_kind%name
1710 c_val=keyword, i_rep_section=i_rep)
1712 IF (keyword == akind_name)
THEN
1719 ipos = index(qs_kind%name,
"_")
1720 IF (((ipos == 2) .OR. (ipos == 3)) .AND. (index(qs_kind%name,
"_ghost") == 0))
THEN
1723 akind_name = qs_kind%name(1:ipos - 1)
1727 c_val=keyword, i_rep_section=i_rep)
1729 IF (keyword == akind_name)
THEN
1740 element_symbol = qs_kind%element_symbol(1:2)
1744 c_val=keyword, i_rep_section=i_rep)
1746 IF (keyword == element_symbol)
THEN
1757 c_val=keyword, i_rep_section=i_rep)
1759 IF (keyword ==
"DEFAULT")
THEN
1760 update_input = .false.
1766 IF (k_rep < 0 .AND. (.NOT. no_fail))
THEN
1767 CALL cp_abort(__location__, &
1768 "No &KIND section was possible to associate to the atomic kind <"// &
1769 trim(akind_name)//
">. The KIND section were also scanned for the"// &
1770 " corresponding element <"//trim(qs_kind%element_symbol)//
">"// &
1771 " and for the DEFAULT section but no match was found. Check your input file!")
1780 keyword_name=
"BASIS_SET", &
1781 explicit=explicit, &
1783 IF (.NOT. explicit) nb_rep = 0
1784 cpassert(nb_rep <= maxbas)
1787 keyword_name=
"BASIS_SET", i_rep_val=i, c_vals=tmpstringlist)
1788 IF (
SIZE(tmpstringlist) == 1)
THEN
1790 basis_set_type(i) =
"ORB"
1791 basis_set_form(i) =
"GTO"
1792 basis_set_name(i) = tmpstringlist(1)
1793 ELSEIF (
SIZE(tmpstringlist) == 2)
THEN
1795 basis_set_type(i) = tmpstringlist(1)
1796 basis_set_form(i) =
"GTO"
1797 basis_set_name(i) = tmpstringlist(2)
1798 ELSEIF (
SIZE(tmpstringlist) == 3)
THEN
1799 basis_set_type(i) = tmpstringlist(1)
1800 basis_set_form(i) = tmpstringlist(2)
1801 basis_set_name(i) = tmpstringlist(3)
1803 CALL cp_abort(__location__, &
1804 "invalid number of BASIS_SET keyword parameters: BASIS_SET [<TYPE>] [<FORM>] <NAME>")
1807 IF (basis_set_form(i) /=
"GTO" .AND. basis_set_form(i) /=
"STO")
THEN
1808 cpabort(
"invalid BASIS_SET FORM parameter")
1814 i_val=qs_kind%pao_basis_size)
1819 c_val=qs_kind%pao_model_file)
1825 ALLOCATE (qs_kind%pao_potentials(npaopot))
1826 DO ipaopot = 1, npaopot
1828 i_val=qs_kind%pao_potentials(ipaopot)%maxl)
1829 CALL section_vals_val_get(pao_pot_section, keyword_name=
"MAX_PROJECTOR", i_rep_section=ipaopot, &
1830 i_val=qs_kind%pao_potentials(ipaopot)%max_projector)
1832 r_val=qs_kind%pao_potentials(ipaopot)%beta)
1834 r_val=qs_kind%pao_potentials(ipaopot)%weight)
1840 ALLOCATE (qs_kind%pao_descriptors(npaodesc))
1841 DO ipaodesc = 1, npaodesc
1843 r_val=qs_kind%pao_descriptors(ipaodesc)%beta)
1844 CALL section_vals_val_get(pao_desc_section, keyword_name=
"SCREENING", i_rep_section=ipaodesc, &
1845 r_val=qs_kind%pao_descriptors(ipaodesc)%screening)
1847 r_val=qs_kind%pao_descriptors(ipaodesc)%weight)
1852 keyword_name=
"ELEC_CONF", n_rep_val=i)
1855 keyword_name=
"ELEC_CONF", i_vals=elec_conf)
1859 keyword_name=
"CORE_CORRECTION", r_val=zeff_correction)
1862 keyword_name=
"POTENTIAL_FILE_NAME", c_val=potential_fn_kind)
1864 keyword_name=
"POTENTIAL_TYPE", c_val=potential_type)
1866 explicit=explicit, keyword_name=
"POTENTIAL", c_vals=tmpstringlist)
1868 IF (
SIZE(tmpstringlist) == 1)
THEN
1870 potential_name = tmpstringlist(1)
1871 IF (potential_type ==
"")
THEN
1872 ipos = index(potential_name,
"-")
1874 potential_type = potential_name(:ipos - 1)
1876 potential_type = potential_name
1879 ELSEIF (
SIZE(tmpstringlist) == 2)
THEN
1880 potential_type = tmpstringlist(1)
1881 potential_name = tmpstringlist(2)
1883 cpabort(
"POTENTIAL input list is not correct")
1890 keyword_name=
"KG_POTENTIAL_FILE_NAME", c_val=kg_potential_fn_kind)
1892 keyword_name=
"KG_POTENTIAL", c_val=kgpot_name)
1896 keyword_name=
"ECP_SEMI_LOCAL", l_val=ecp_semi_local)
1899 qs_kind%covalent_radius =
ptable(z)%covalent_radius*
bohr
1901 keyword_name=
"COVALENT_RADIUS", r_val=r)
1902 IF (r > 0.0_dp) qs_kind%covalent_radius = r
1905 qs_kind%vdw_radius =
ptable(z)%vdw_radius*
bohr
1907 keyword_name=
"VDW_RADIUS", r_val=r)
1908 IF (r > 0.0_dp) qs_kind%vdw_radius = r
1912 keyword_name=
"HARD_EXP_RADIUS")
1915 qs_kind%hard_radius = 1.2_dp
1917 qs_kind%hard_radius = 0.8_dp*
bohr
1921 keyword_name=
"HARD_EXP_RADIUS", r_val=qs_kind%hard_radius)
1926 keyword_name=
"RHO0_EXP_RADIUS")
1928 qs_kind%hard0_radius = qs_kind%hard_radius
1931 keyword_name=
"RHO0_EXP_RADIUS", r_val=qs_kind%hard0_radius)
1933 IF (qs_kind%hard_radius < qs_kind%hard0_radius) &
1934 cpabort(
"rc0 should be <= rc")
1937 keyword_name=
"MAX_RAD_LOCAL", r_val=qs_kind%max_rad_local)
1939 keyword_name=
"LEBEDEV_GRID", i_val=qs_kind%ngrid_ang)
1940 IF (qs_kind%ngrid_ang <= 0) &
1941 cpabort(
"# point lebedev grid < 0")
1943 keyword_name=
"RADIAL_GRID", i_val=qs_kind%ngrid_rad)
1944 IF (qs_kind%ngrid_rad <= 0) &
1945 cpabort(
"# point radial grid < 0")
1947 keyword_name=
"GPW_TYPE", l_val=qs_kind%gpw_type_forced)
1949 keyword_name=
"GHOST", l_val=qs_kind%ghost)
1951 keyword_name=
"FLOATING_BASIS_CENTER", l_val=qs_kind%floating)
1953 keyword_name=
"NO_OPTIMIZE", l_val=qs_kind%no_optimize)
1957 keyword_name=
"MAGNETIZATION", r_val=qs_kind%magnetization)
1960 keyword_name=
"DFTB3_PARAM", r_val=qs_kind%dudq_dftb3)
1962 keyword_name=
"LMAX_DFTB", i_val=qs_kind%lmax_dftb)
1966 keyword_name=
"MAO", i_val=qs_kind%mao)
1970 keyword_name=
"MONOVALENT", l_val=qs_kind%monovalent)
1971 IF (qs_kind%monovalent .AND. trim(potential_type) /=
'GTH')
THEN
1972 cpabort(
"Monovalent pseudopotentials currently implemented for GTH only!")
1976 NULLIFY (bs_section)
1978 i_rep_section=k_rep)
1979 section_enabled = .false.
1981 l_val=section_enabled)
1982 IF (section_enabled)
THEN
1984 IF (qs_kind%magnetization /= 0.0_dp)
THEN
1985 CALL cp_abort(__location__,
"BS Section is in conflict with non-zero magnetization "// &
1986 "for this atom kind.")
1988 qs_kind%bs_occupation = .true.
1990 NULLIFY (spin_section)
1996 keyword_name=
"NEL", i_vals=add_el)
1997 cpassert(
ASSOCIATED(add_el))
1998 ALLOCATE (qs_kind%addel(
SIZE(add_el), 2))
2000 qs_kind%addel(1:
SIZE(add_el), 1) = add_el(1:
SIZE(add_el))
2003 keyword_name=
"L", i_vals=add_el)
2004 cpassert(
ASSOCIATED(add_el))
2005 cpassert(
SIZE(add_el) ==
SIZE(qs_kind%addel, 1))
2006 ALLOCATE (qs_kind%laddel(
SIZE(add_el), 2))
2008 qs_kind%laddel(1:
SIZE(add_el), 1) = add_el(1:
SIZE(add_el))
2009 ALLOCATE (qs_kind%naddel(
SIZE(add_el), 2))
2013 keyword_name=
"N", n_rep_val=i)
2016 keyword_name=
"N", i_vals=add_el)
2017 IF (
SIZE(add_el) ==
SIZE(qs_kind%addel, 1))
THEN
2018 qs_kind%naddel(1:
SIZE(add_el), 1) = add_el(1:
SIZE(add_el))
2023 NULLIFY (spin_section)
2029 keyword_name=
"NEL", i_vals=add_el)
2030 cpassert(
SIZE(add_el) ==
SIZE(qs_kind%addel, 1))
2031 qs_kind%addel(1:
SIZE(add_el), 2) = add_el(1:
SIZE(add_el))
2032 qs_kind%addel(:, :) = qs_kind%addel(:, :)
2035 keyword_name=
"L", i_vals=add_el)
2036 cpassert(
SIZE(add_el) ==
SIZE(qs_kind%addel, 1))
2037 qs_kind%laddel(1:
SIZE(add_el), 2) = add_el(1:
SIZE(add_el))
2040 keyword_name=
"N", n_rep_val=i)
2044 keyword_name=
"N", i_vals=add_el)
2045 IF (
SIZE(add_el) ==
SIZE(qs_kind%addel, 1))
THEN
2046 qs_kind%naddel(1:
SIZE(add_el), 2) = add_el(1:
SIZE(add_el))
2054 NULLIFY (dft_plus_u_section)
2056 subsection_name=
"DFT_PLUS_U", &
2057 i_rep_section=k_rep)
2058 section_enabled = .false.
2060 keyword_name=
"_SECTION_PARAMETERS_", &
2061 l_val=section_enabled)
2062 IF (section_enabled)
THEN
2063 ALLOCATE (qs_kind%dft_plus_u)
2064 NULLIFY (qs_kind%dft_plus_u%nelec)
2065 NULLIFY (qs_kind%dft_plus_u%orbitals)
2069 qs_kind%dft_plus_u%l = l
2070#if defined(__SIRIUS)
2074 qs_kind%dft_plus_u%n = nu
2078 r_val=qs_kind%dft_plus_u%U, &
2079 explicit=explicit_u)
2083 r_val=qs_kind%dft_plus_u%J, &
2084 explicit=explicit_j)
2087 keyword_name=
"alpha", &
2088 r_val=qs_kind%dft_plus_u%alpha)
2091 keyword_name=
"beta", &
2092 r_val=qs_kind%dft_plus_u%beta)
2095 keyword_name=
"J0", &
2096 r_val=qs_kind%dft_plus_u%J0)
2099 keyword_name=
"occupation", &
2100 r_val=qs_kind%dft_plus_u%occupation)
2106 keyword_name=
"U_MINUS_J", &
2107 r_val=qs_kind%dft_plus_u%u_minus_j_target, &
2108 explicit=explicit_u_m_j)
2110 IF ((explicit_u .OR. explicit_j) .AND. explicit_u_m_j)
THEN
2111 cpabort(
"DFT+U| specifying U or J and U_MINUS_J parameters are mutually exclusive.")
2115 keyword_name=
"U_RAMPING", &
2116 r_val=qs_kind%dft_plus_u%u_ramping)
2118 keyword_name=
"INIT_U_RAMPING_EACH_SCF", &
2119 l_val=qs_kind%dft_plus_u%init_u_ramping_each_scf)
2120 IF (qs_kind%dft_plus_u%u_ramping > 0.0_dp)
THEN
2121 qs_kind%dft_plus_u%u_minus_j = 0.0_dp
2123 qs_kind%dft_plus_u%u_minus_j = qs_kind%dft_plus_u%u_minus_j_target
2126 keyword_name=
"EPS_U_RAMPING", &
2127 r_val=qs_kind%dft_plus_u%eps_u_ramping)
2129 NULLIFY (enforce_occupation_section)
2131 subsection_name=
"ENFORCE_OCCUPATION")
2132 subsection_enabled = .false.
2134 keyword_name=
"_SECTION_PARAMETERS_", &
2135 l_val=subsection_enabled)
2136 IF (subsection_enabled)
THEN
2139 keyword_name=
"NELEC", &
2142 ALLOCATE (qs_kind%dft_plus_u%nelec(nspin))
2143 qs_kind%dft_plus_u%nelec(:) = nelec(:)
2146 keyword_name=
"ORBITALS", &
2148 norbitals =
SIZE(orbitals)
2149 IF (norbitals <= 0 .OR. norbitals > 2*l + 1) &
2150 CALL cp_abort(__location__,
"DFT+U| Invalid number of ORBITALS specified: "// &
2151 "1 to 2*L+1 integer numbers are expected")
2152 ALLOCATE (qs_kind%dft_plus_u%orbitals(norbitals))
2153 qs_kind%dft_plus_u%orbitals(:) = orbitals(:)
2156 IF (qs_kind%dft_plus_u%orbitals(m) > l) &
2157 cpabort(
"DFT+U| Invalid orbital magnetic quantum number specified: m > l")
2158 IF (qs_kind%dft_plus_u%orbitals(m) < -l) &
2159 cpabort(
"DFT+U| Invalid orbital magnetic quantum number specified: m < -l")
2162 IF (qs_kind%dft_plus_u%orbitals(j) == qs_kind%dft_plus_u%orbitals(m)) &
2163 cpabort(
"DFT+U| An orbital magnetic quantum number was specified twice")
2168 keyword_name=
"EPS_SCF", &
2169 r_val=qs_kind%dft_plus_u%eps_scf)
2171 keyword_name=
"MAX_SCF", &
2173 qs_kind%dft_plus_u%max_scf = max(-1, i)
2175 keyword_name=
"SMEAR", &
2176 l_val=qs_kind%dft_plus_u%smear)
2187 explicit_basis = .false.
2190 can_return_null=.true.)
2194 explicit_potential = .false.
2197 i_rep_section=k_rep, can_return_null=.true.)
2201 explicit_kgpot = .false.
2204 i_rep_section=k_rep, can_return_null=.true.)
2208 SELECT CASE (method_id)
2215 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2216 CALL get_potential(potential=qs_kind%all_potential, elec_conf=elec_conf)
2219 cpassert(.NOT. qs_kind%floating)
2220 IF (qs_kind%ghost)
THEN
2221 CALL get_qs_kind(qs_kind=qs_kind, elec_conf=elec_conf)
2224 elec_conf=elec_conf)
2228 zeff_correction=0.0_dp)
2233 check = .NOT.
ASSOCIATED(qs_kind%se_parameter)
2241 keyword_name=
"SE_P_ORBITALS_ON_H", l_val=qs_kind%se_parameter%p_orbitals_on_h)
2249 NULLIFY (tmp_basis_set)
2250 CALL init_se_param(qs_kind%se_parameter, tmp_basis_set, ngauss)
2253 zeff=qs_kind%se_parameter%zeff, zeff_correction=zeff_correction)
2254 qs_kind%se_parameter%zeff = qs_kind%se_parameter%zeff - zeff_correction
2256 check = ((potential_name /=
'') .OR. explicit_potential) .AND. .NOT. silent
2258 CALL cp_warn(__location__, &
2259 "Information provided in the input file regarding POTENTIAL for KIND <"// &
2260 trim(qs_kind%name)//
"> will be ignored!")
2262 check = ((k_rep > 0) .OR. explicit_basis) .AND. .NOT. silent
2264 CALL cp_warn(__location__, &
2265 "Information provided in the input file regarding BASIS for KIND <"// &
2266 trim(qs_kind%name)//
"> will be ignored!")
2273 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2274 CALL get_potential(potential=qs_kind%all_potential, elec_conf=elec_conf)
2277 cpassert(.NOT. qs_kind%floating)
2278 IF (qs_kind%ghost)
THEN
2279 CALL get_qs_kind(qs_kind=qs_kind, elec_conf=elec_conf)
2282 elec_conf=elec_conf)
2286 zeff_correction=0.0_dp)
2289 check = ((potential_name /=
'') .OR. explicit_potential) .AND. .NOT. silent
2291 CALL cp_warn(__location__, &
2292 "Information provided in the input file regarding POTENTIAL for KIND <"// &
2293 trim(qs_kind%name)//
"> will be ignored!")
2295 check = ((k_rep > 0) .OR. explicit_basis) .AND. .NOT. silent
2297 CALL cp_warn(__location__, &
2298 "Information provided in the input file regarding BASIS for KIND <"// &
2299 trim(qs_kind%name)//
"> will be ignored!")
2306 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2307 CALL get_potential(potential=qs_kind%all_potential, elec_conf=elec_conf)
2310 cpassert(.NOT. qs_kind%floating)
2311 IF (qs_kind%ghost)
THEN
2312 CALL get_qs_kind(qs_kind=qs_kind, elec_conf=elec_conf)
2315 elec_conf=elec_conf)
2319 zeff_correction=0.0_dp)
2322 check = ((potential_name /=
'') .OR. explicit_potential) .AND. .NOT. silent
2324 CALL cp_warn(__location__, &
2325 "Information provided in the input file regarding POTENTIAL for KIND <"// &
2326 trim(qs_kind%name)//
"> will be ignored!")
2328 check = ((k_rep > 0) .OR. explicit_basis) .AND. .NOT. silent
2330 CALL cp_warn(__location__, &
2331 "Information provided in the input file regarding BASIS for KIND <"// &
2332 trim(qs_kind%name)//
"> will be ignored!")
2337 IF (potential_name /=
'')
THEN
2338 SELECT CASE (trim(potential_type))
2339 CASE (
"ALL",
"ECP",
"CNEO")
2340 CALL cp_abort(__location__, &
2341 "PW DFT calculations only with potential type UPF or GTH possible."// &
2342 " <"//trim(potential_type)//
"> was specified "// &
2343 "for the atomic kind <"//trim(qs_kind%name))
2345 IF (potential_fn_kind ==
"-")
THEN
2348 potential_file_name = potential_fn_kind
2352 qs_kind%gth_potential, zeff_correction, para_env, &
2353 potential_file_name, potential_section, update_input, &
2354 monovalent=qs_kind%monovalent)
2357 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2358 CALL get_potential(potential=qs_kind%gth_potential, elec_conf=elec_conf)
2361 CALL set_potential(potential=qs_kind%gth_potential, elec_conf=elec_conf)
2364 ALLOCATE (qs_kind%upf_potential)
2365 qs_kind%upf_potential%zion = 0
2366 qs_kind%upf_potential%filename = adjustl(trim(potential_name))
2368 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2369 CALL set_qs_kind(qs_kind, elec_conf=qs_kind%upf_potential%econf)
2372 CALL cp_abort(__location__, &
2373 "An invalid potential type <"// &
2374 trim(potential_type)//
"> was specified "// &
2375 "for the atomic kind <"// &
2379 CALL cp_abort(__location__, &
2380 "No potential type was defined for the "// &
2381 "atomic kind <"//trim(qs_kind%name)//
">")
2391 SELECT CASE (basis_set_form(i))
2393 NULLIFY (tmp_basis_set)
2396 tmp_basis_set, para_env, dft_section)
2398 NULLIFY (sto_basis_set)
2401 sto_basis_set, para_env, dft_section)
2402 NULLIFY (tmp_basis_set)
2406 CALL cp_abort(__location__, &
2407 "Invalid basis set form "//trim(basis_set_form(i))// &
2408 "for atomic kind <"//trim(qs_kind%name)//
">")
2410 tmp = basis_set_type(i)
2415 IF (explicit_basis)
THEN
2418 NULLIFY (tmp_basis_set)
2421 tmp_basis_set, basis_section, i, dft_section)
2428 DO i = 1,
SIZE(qs_kind%basis_sets)
2429 NULLIFY (tmp_basis_set)
2431 inumbas=i, basis_type=basis_type)
2432 IF (basis_type ==
"") cycle
2434 DO j = i + 1,
SIZE(qs_kind%basis_sets)
2436 NULLIFY (sup_basis_set)
2438 inumbas=jj, basis_type=tmp)
2439 IF (basis_type == tmp)
THEN
2446 NULLIFY (sup_basis_set)
2451 DO i = 1,
SIZE(qs_kind%basis_sets)
2452 NULLIFY (tmp_basis_set)
2454 inumbas=i, basis_type=basis_type)
2455 IF (basis_type ==
"ORB") nobasis = .false.
2458 CALL cp_abort(__location__, &
2459 "No basis set type was defined for the "// &
2460 "atomic kind <"//trim(qs_kind%name)//
">")
2464 IF (qs_kind%ghost .OR. qs_kind%floating)
THEN
2465 IF (
ASSOCIATED(qs_kind%elec_conf)) qs_kind%elec_conf = 0
2468 IF ((potential_name /=
'') .OR. explicit_potential)
THEN
2470 IF (potential_fn_kind ==
"-")
THEN
2473 potential_file_name = potential_fn_kind
2476 SELECT CASE (trim(potential_type))
2480 qs_kind%all_potential, zeff_correction, para_env, &
2481 potential_file_name, potential_section, update_input)
2484 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2485 CALL get_potential(potential=qs_kind%all_potential, elec_conf=elec_conf)
2488 CALL set_potential(potential=qs_kind%all_potential, elec_conf=elec_conf)
2493 qs_kind%gth_potential, zeff_correction, para_env, &
2494 potential_file_name, potential_section, update_input, &
2495 monovalent=qs_kind%monovalent)
2498 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2499 CALL get_potential(potential=qs_kind%gth_potential, elec_conf=elec_conf)
2502 CALL set_potential(potential=qs_kind%gth_potential, elec_conf=elec_conf)
2506 CALL get_potential(qs_kind%sgp_potential, description=description)
2508 potential_name, potential_file_name, potential_section)
2509 IF (ecp_semi_local)
THEN
2510 description(1) =
"Semi-local Gaussian pseudopotential "
2511 description(2) =
"ECP "//trim(potential_name)
2512 description(3) =
"LIBGRPP: A. V. Oleynichenko et al., Symmetry 15 197 2023"
2513 description(4) =
" "
2515 description(4) =
"ECP "//trim(potential_name)
2517 CALL set_potential(qs_kind%sgp_potential, name=ecppot%pname, description=description, &
2518 zeff=ecppot%zion, z=z, ecp_local=.true., ecp_semi_local=ecp_semi_local, &
2519 nloc=ecppot%nloc, nrloc=ecppot%nrloc, aloc=ecppot%aloc, bloc=ecppot%bloc, &
2521 CALL set_potential(qs_kind%sgp_potential, sl_lmax=ecppot%lmax, &
2522 npot=ecppot%npot, nrpot=ecppot%nrpot, apot=ecppot%apot, bpot=ecppot%bpot)
2524 IF (.NOT. ecp_semi_local)
THEN
2525 cpabort(
"ECPs are only well tested in their semi-local form")
2526 CALL get_qs_kind(qs_kind, basis_set=orb_basis_set)
2527 CALL sgp_construction(sgp_pot=sgppot, ecp_pot=ecppot, orb_basis=orb_basis_set, error=error)
2528 IF (iounit > 0 .AND. .NOT. silent)
THEN
2529 WRITE (iounit,
"(/,T2,'PP Transformation for ',A)") trim(ecppot%pname)
2530 IF (sgppot%has_local)
THEN
2531 WRITE (iounit,
"(T8,'Accuracy for local part:',T41,F10.3,'%',T61,F20.12)") error(4), error(1)
2533 IF (sgppot%has_nonlocal)
THEN
2534 WRITE (iounit,
"(T8,'Accuracy for nonlocal part:',T41,F10.3,'%',T61,F20.12)") error(5), error(2)
2536 IF (sgppot%has_nlcc)
THEN
2537 WRITE (iounit,
"(T8,'Accuracy for NLCC density:',T61,F20.12)") error(3)
2541 IF (sgppot%has_nonlocal)
THEN
2542 CALL set_potential(qs_kind%sgp_potential, n_nonlocal=sgppot%n_nonlocal, lmax=sgppot%lmax, &
2543 is_nonlocal=sgppot%is_nonlocal)
2544 nnl = sgppot%n_nonlocal
2546 DO l = 0, sgppot%lmax
2547 nppnl = nppnl + nnl*
nco(l)
2550 ALLOCATE (a_nl(nnl), h_nl(nnl, 0:l), c_nl(nnl, nnl, 0:l))
2551 a_nl(:) = sgppot%a_nonlocal(:)
2552 h_nl(:, :) = sgppot%h_nonlocal(:, :)
2553 DO l = 0, sgppot%lmax
2554 c_nl(:, :, l) = sgppot%c_nonlocal(:, :, l)*sqrt(2._dp*l + 1.0_dp)
2556 CALL set_potential(qs_kind%sgp_potential, nppnl=nppnl, a_nonlocal=a_nl, h_nonlocal=h_nl, c_nonlocal=c_nl)
2558 CALL set_potential(qs_kind%sgp_potential, n_nonlocal=0, lmax=-1, is_nonlocal=sgppot%is_nonlocal)
2562 cpassert(.NOT. sgppot%has_local)
2563 cpassert(.NOT. sgppot%has_nlcc)
2565 rc = 0.5_dp*qs_kind%covalent_radius*
angstrom
2566 rc = max(rc, 0.2_dp)
2567 rc = min(rc, 1.0_dp)
2568 alpha = 1.0_dp/(2.0_dp*rc**2)
2569 ccore = ecppot%zion*sqrt((alpha/
pi)**3)
2570 CALL set_potential(qs_kind%sgp_potential, alpha_core_charge=alpha, ccore_charge=ccore, &
2571 core_charge_radius=rc)
2574 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2578 CALL set_potential(qs_kind%sgp_potential, elec_conf=elec_conf)
2581 CALL get_potential(qs_kind%sgp_potential, description=description)
2582 description(4) =
"UPF "//trim(potential_name)
2584 CALL set_potential(qs_kind%sgp_potential, name=upfpot%pname, description=description, &
2585 zeff=upfpot%zion, z=z,
has_nlcc=upfpot%core_correction)
2588 IF (iounit > 0 .AND. .NOT. silent)
THEN
2589 WRITE (iounit,
"(/,T2,'PP Transformation for ',A)") trim(upfpot%pname)
2590 IF (sgppot%has_local)
THEN
2591 WRITE (iounit,
"(T8,'Accuracy for local part:',T61,F20.12)") error(1)
2593 IF (sgppot%has_nonlocal)
THEN
2594 WRITE (iounit,
"(T8,'Accuracy for nonlocal part:',T61,F20.12)") error(2)
2596 IF (sgppot%has_nlcc)
THEN
2597 WRITE (iounit,
"(T8,'Accuracy for NLCC density:',T61,F20.12)") error(3)
2600 IF (sgppot%has_nonlocal)
THEN
2601 CALL set_potential(qs_kind%sgp_potential, n_nonlocal=sgppot%n_nonlocal, lmax=sgppot%lmax, &
2602 is_nonlocal=sgppot%is_nonlocal)
2603 nnl = sgppot%n_nonlocal
2605 DO l = 0, sgppot%lmax
2606 nppnl = nppnl + nnl*
nco(l)
2609 ALLOCATE (a_nl(nnl), h_nl(nnl, 0:l), c_nl(nnl, nnl, 0:l))
2610 a_nl(:) = sgppot%a_nonlocal(:)
2611 h_nl(:, :) = sgppot%h_nonlocal(:, :)
2612 c_nl(:, :, :) = sgppot%c_nonlocal(:, :, :)
2613 CALL set_potential(qs_kind%sgp_potential, nppnl=nppnl, a_nonlocal=a_nl, h_nonlocal=h_nl, c_nonlocal=c_nl)
2615 CALL set_potential(qs_kind%sgp_potential, n_nonlocal=0, lmax=-1, is_nonlocal=sgppot%is_nonlocal)
2618 cpassert(sgppot%has_local)
2620 rc = sgppot%ac_local
2621 alpha = 1.0_dp/(2.0_dp*rc**2)
2622 ccore = upfpot%zion*sqrt((alpha/
pi)**3)
2623 CALL set_potential(qs_kind%sgp_potential, alpha_core_charge=alpha, ccore_charge=ccore, &
2624 core_charge_radius=rc)
2626 nloc = sgppot%n_local
2627 ALLOCATE (aloc(nloc), cloc(nloc))
2628 aloc(1:nloc) = sgppot%a_local(1:nloc)
2629 cloc(1:nloc) = sgppot%c_local(1:nloc)
2630 CALL set_potential(qs_kind%sgp_potential, n_local=nloc, a_local=aloc, c_local=cloc)
2631 IF (sgppot%has_nlcc)
THEN
2632 nlcc = sgppot%n_nlcc
2633 ALLOCATE (anlcc(nlcc), cnlcc(nlcc))
2634 anlcc(1:nlcc) = sgppot%a_nlcc(1:nlcc)
2635 cnlcc(1:nlcc) = sgppot%c_nlcc(1:nlcc)
2640 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2644 CALL set_potential(qs_kind%sgp_potential, elec_conf=elec_conf)
2648 IF (zeff_correction /= 0.0_dp) &
2649 cpabort(
"CORE_CORRECTION is not compatible with CNEO")
2658 keyword_name=
"MASS", n_rep_val=i)
2660 keyword_name=
"MASS", r_val=mass)
2663 IF (mass - real(z,
dp)*0.000548579909_dp > 0.0_dp)
THEN
2664 mass = mass - real(z,
dp)*0.000548579909_dp
2670 IF (abs(mass + real(z,
dp)*0.000548579909_dp -
ptable(z)%amass) < 1.e-4_dp)
THEN
2671 CALL cp_warn(__location__, &
2672 "Atomic mass of the atomic kind <"//trim(qs_kind%name)// &
2673 "> is very close to its average mass. Is it a pure isotope? "// &
2674 "Pure isotopes are preferable for CNEO. "// &
2675 "(e.g., mass of 1H is 1.007825, not 1.00794)")
2678 IF (.NOT.
ASSOCIATED(elec_conf))
THEN
2685 CALL cp_abort(__location__, &
2686 "An invalid potential type <"// &
2687 trim(potential_name)//
"> was specified "// &
2688 "for the atomic kind <"// &
2692 CALL cp_abort(__location__, &
2693 "No potential type was defined for the "// &
2694 "atomic kind <"//trim(qs_kind%name)//
">")
2697 CALL check_potential_basis_compatibility(qs_kind)
2700 IF ((kgpot_name /=
'') .OR. explicit_kgpot)
THEN
2701 ipos = index(kgpot_name,
"-")
2703 kgpot_type = kgpot_name(:ipos - 1)
2705 kgpot_type = kgpot_name
2709 SELECT CASE (trim(kgpot_type))
2712 IF (kg_potential_fn_kind ==
"-")
THEN
2715 potential_file_name = kg_potential_fn_kind
2719 qs_kind%tnadd_potential, para_env, &
2720 potential_file_name, kgpot_section, update_input)
2722 NULLIFY (qs_kind%tnadd_potential)
2724 CALL cp_abort(__location__, &
2725 "An invalid kg_potential type <"// &
2726 trim(potential_name)//
"> was specified "// &
2727 "for the atomic kind <"// &
2734 nobasis_nuc =
ASSOCIATED(qs_kind%cneo_potential)
2735 DO i = 1,
SIZE(qs_kind%basis_sets)
2736 NULLIFY (tmp_basis_set)
2738 inumbas=i, basis_type=basis_type)
2739 IF (basis_type ==
"NUC")
THEN
2740 nobasis_nuc = .false.
2741 IF (.NOT.
ASSOCIATED(qs_kind%cneo_potential))
THEN
2742 CALL cp_warn(__location__, &
2743 "POTENTIAL is not set to CNEO, NUC type basis set for KIND <"// &
2744 trim(qs_kind%name)//
"> will be ignored!")
2748 IF (nobasis_nuc)
THEN
2749 CALL cp_abort(__location__, &
2750 "No NUC type basis set was defined for the "// &
2751 "atomic kind <"//trim(qs_kind%name)//
">, which is required by "// &
2756 CALL timestop(handle)
2758 END SUBROUTINE read_qs_kind
2765 SUBROUTINE check_potential_basis_compatibility(qs_kind)
2768 CHARACTER(LEN=default_string_length) :: name
2773 CALL get_qs_kind(qs_kind, name=name, gth_potential=gth_potential, basis_set=basis_set)
2776 IF (
ASSOCIATED(gth_potential)) &
2777 npp = parse_valence_electrons(gth_potential%aliases)
2778 IF (
ASSOCIATED(basis_set)) &
2779 nbs = parse_valence_electrons(basis_set%aliases)
2781 IF (npp >= 0 .AND. nbs >= 0 .AND. npp /= nbs) &
2782 CALL cp_abort(__location__,
"Basis-set and pseudo-potential of atomic kind '"//trim(name)//
"'"// &
2783 " were optimized for different valence electron numbers.")
2785 END SUBROUTINE check_potential_basis_compatibility
2793 FUNCTION parse_valence_electrons(string)
RESULT(n)
2794 CHARACTER(*) :: string
2797 INTEGER :: i, istat, j
2799 i = index(string,
"-Q", .true.)
2803 j = scan(string(i + 2:),
"- ")
2804 READ (string(i + 2:i + j),
'(I3)', iostat=istat) n
2805 IF (istat /= 0) n = -1
2808 END FUNCTION parse_valence_electrons
2820 force_env_section, silent)
2822 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
2827 LOGICAL,
INTENT(IN) :: silent
2829 CHARACTER(len=*),
PARAMETER :: routinen =
'create_qs_kind_set'
2831 INTEGER :: handle, ikind, method, nkind, qs_method
2834 CALL timeset(routinen, handle)
2836 IF (
ASSOCIATED(qs_kind_set)) cpabort(
"create_qs_kind_set: qs_kind_set already associated")
2837 IF (.NOT.
ASSOCIATED(atomic_kind_set)) cpabort(
"create_qs_kind_set: atomic_kind_set not associated")
2843 IF (method ==
do_qs)
THEN
2845 SELECT CASE (qs_method)
2860 nkind =
SIZE(atomic_kind_set)
2861 ALLOCATE (qs_kind_set(nkind))
2864 qs_kind_set(ikind)%name = atomic_kind_set(ikind)%name
2865 qs_kind_set(ikind)%element_symbol = atomic_kind_set(ikind)%element_symbol
2866 qs_kind_set(ikind)%natom = atomic_kind_set(ikind)%natom
2867 CALL read_qs_kind(qs_kind_set(ikind), kind_section, para_env, force_env_section, &
2868 no_fail, qs_method, silent)
2871 CALL timestop(handle)
2882 SUBROUTINE check_qs_kind(qs_kind, dft_control, subsys_section)
2894 IF (dft_control%qs_control%semi_empirical)
THEN
2895 CALL get_qs_kind(qs_kind, se_parameter=se_parameter)
2896 cpassert(
ASSOCIATED(se_parameter))
2900 ELSE IF (dft_control%qs_control%dftb)
THEN
2901 CALL get_qs_kind(qs_kind, dftb_parameter=dftb_parameter)
2902 cpassert(
ASSOCIATED(dftb_parameter))
2906 ELSE IF (dft_control%qs_control%xtb)
THEN
2907 IF (.NOT. (dft_control%qs_control%xtb_control%do_tblite))
THEN
2908 CALL get_qs_kind(qs_kind, xtb_parameter=xtb_parameter)
2909 cpassert(
ASSOCIATED(xtb_parameter))
2910 gfn_type = dft_control%qs_control%xtb_control%gfn_type
2915 END SUBROUTINE check_qs_kind
2925 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
2929 CHARACTER(len=*),
PARAMETER :: routinen =
'check_qs_kind_set'
2931 INTEGER :: handle, ikind, nkind
2934 CALL timeset(routinen, handle)
2935 IF (
ASSOCIATED(qs_kind_set))
THEN
2936 nkind =
SIZE(qs_kind_set)
2938 qs_kind => qs_kind_set(ikind)
2939 CALL check_qs_kind(qs_kind, dft_control, subsys_section)
2941 IF (dft_control%qs_control%xtb)
THEN
2942 CALL write_xtb_kab_param(qs_kind_set, subsys_section, &
2943 dft_control%qs_control%xtb_control)
2946 cpabort(
"The pointer qs_kind_set is not associated")
2948 CALL timestop(handle)
2957 SUBROUTINE write_xtb_kab_param(qs_kind_set, subsys_section, xtb_control)
2959 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
2963 CHARACTER(LEN=default_string_length) :: aname, bname
2964 INTEGER :: ikind, io_unit, jkind, nkind, za, zb
2967 TYPE(
xtb_atom_type),
POINTER :: xtb_parameter_a, xtb_parameter_b
2972 "PRINT%KINDS/POTENTIAL"),
cp_p_file))
THEN
2975 IF (io_unit > 0)
THEN
2977 WRITE (io_unit,
"(/,T2,A)")
"xTB| Kab parameters"
2978 nkind =
SIZE(qs_kind_set)
2980 qs_kinda => qs_kind_set(ikind)
2981 CALL get_qs_kind(qs_kinda, xtb_parameter=xtb_parameter_a)
2983 DO jkind = ikind, nkind
2984 qs_kindb => qs_kind_set(jkind)
2985 CALL get_qs_kind(qs_kindb, xtb_parameter=xtb_parameter_b)
2987 WRITE (io_unit,
"(A,T10,A15,T25,A15,T71,F10.3)") &
2988 " Kab:", trim(aname), trim(bname),
xtb_set_kab(za, zb, xtb_control)
2998 END SUBROUTINE write_xtb_kab_param
3021 SUBROUTINE set_qs_kind(qs_kind, paw_atom, ghost, floating, hard_radius, hard0_radius, &
3022 covalent_radius, vdw_radius, lmax_rho0, zeff, &
3023 no_optimize, dispersion, u_minus_j, reltmat, &
3024 dftb_parameter, xtb_parameter, &
3025 elec_conf, pao_basis_size)
3028 LOGICAL,
INTENT(IN),
OPTIONAL :: paw_atom, ghost, floating
3029 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: hard_radius, hard0_radius, &
3030 covalent_radius, vdw_radius
3031 INTEGER,
INTENT(IN),
OPTIONAL :: lmax_rho0
3032 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: zeff
3033 LOGICAL,
INTENT(IN),
OPTIONAL :: no_optimize
3035 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: u_minus_j
3036 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: reltmat
3039 INTEGER,
DIMENSION(:),
INTENT(IN),
OPTIONAL :: elec_conf
3040 INTEGER,
INTENT(IN),
OPTIONAL :: pao_basis_size
3042 IF (
PRESENT(dftb_parameter)) qs_kind%dftb_parameter => dftb_parameter
3043 IF (
PRESENT(xtb_parameter)) qs_kind%xtb_parameter => xtb_parameter
3044 IF (
PRESENT(elec_conf))
THEN
3045 IF (
ASSOCIATED(qs_kind%elec_conf))
THEN
3046 DEALLOCATE (qs_kind%elec_conf)
3048 ALLOCATE (qs_kind%elec_conf(0:
SIZE(elec_conf) - 1))
3049 qs_kind%elec_conf(:) = elec_conf(:)
3051 IF (
PRESENT(paw_atom)) qs_kind%paw_atom = paw_atom
3052 IF (
PRESENT(hard_radius)) qs_kind%hard_radius = hard_radius
3053 IF (
PRESENT(hard0_radius)) qs_kind%hard0_radius = hard0_radius
3054 IF (
PRESENT(covalent_radius)) qs_kind%covalent_radius = covalent_radius
3055 IF (
PRESENT(vdw_radius)) qs_kind%vdw_radius = vdw_radius
3056 IF (
PRESENT(lmax_rho0)) qs_kind%lmax_rho0 = lmax_rho0
3057 IF (
PRESENT(zeff))
THEN
3058 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
3059 CALL set_potential(potential=qs_kind%all_potential, zeff=zeff)
3060 ELSE IF (
ASSOCIATED(qs_kind%gth_potential))
THEN
3061 CALL set_potential(potential=qs_kind%gth_potential, zeff=zeff)
3062 ELSE IF (
ASSOCIATED(qs_kind%sgp_potential))
THEN
3063 CALL set_potential(potential=qs_kind%sgp_potential, zeff=zeff)
3064 ELSE IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
3065 cpabort(
"CNEO potential ZEFF should not be manually set")
3068 IF (
PRESENT(ghost)) qs_kind%ghost = ghost
3070 IF (
PRESENT(floating)) qs_kind%floating = floating
3072 IF (
PRESENT(no_optimize)) qs_kind%no_optimize = no_optimize
3074 IF (
PRESENT(dispersion)) qs_kind%dispersion => dispersion
3076 IF (
PRESENT(u_minus_j))
THEN
3077 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
3078 qs_kind%dft_plus_u%u_minus_j = u_minus_j
3082 IF (
PRESENT(reltmat)) qs_kind%reltmat => reltmat
3084 IF (
PRESENT(pao_basis_size)) qs_kind%pao_basis_size = pao_basis_size
3096 SUBROUTINE write_qs_kind(qs_kind, kind_number, output_unit)
3099 INTEGER,
INTENT(in) :: kind_number, output_unit
3101 CHARACTER(LEN=3) :: yon
3102 CHARACTER(LEN=default_string_length) :: basis_type, bstring
3107 IF (output_unit > 0)
THEN
3109 IF (
ASSOCIATED(qs_kind))
THEN
3110 WRITE (unit=output_unit, fmt=
"(/,T2,I2,A,T57,A,T75,I6)") &
3111 kind_number,
". Atomic kind: "//trim(qs_kind%name), &
3112 "Number of atoms: ", qs_kind%natom
3114 DO ibas = 1,
SIZE(qs_kind%basis_sets, 1)
3117 inumbas=ibas, basis_type=basis_type)
3119 SELECT CASE (basis_type)
3121 bstring =
"Basis Set"
3124 bstring =
"Orbital Basis Set"
3126 bstring =
"GAPW Soft Basis Set"
3129 bstring =
"Auxiliary Basis Set"
3131 bstring =
"Minimal Basis Set"
3133 bstring =
"RI Auxiliary Basis Set"
3135 bstring =
"Auxiliary Fit Basis Set"
3137 bstring =
"LRI Basis Set"
3139 bstring =
"LRI Basis Set for TDDFPT"
3141 bstring =
"RI XAS Basis Set"
3143 bstring =
"RI HFX Basis Set"
3145 bstring =
"Nuclear Basis Set"
3148 bstring =
"Nuclear Soft Basis Set"
3158 IF (qs_kind%ghost)
THEN
3159 WRITE (unit=output_unit, fmt=
"(/,T6,A)") &
3160 "The atoms of this atomic kind are GHOST atoms!"
3162 IF (qs_kind%monovalent)
THEN
3163 WRITE (unit=output_unit, fmt=
"(/,T6,A)") &
3164 "The atoms of this atomic kind are MONOVALENT!"
3166 IF (qs_kind%floating)
THEN
3167 WRITE (unit=output_unit, fmt=
"(/,T6,A)") &
3168 "The atoms of this atomic kind are FLOATING BASIS FUNCTIONS."
3170 IF (qs_kind%covalent_radius > 0.0_dp)
THEN
3171 WRITE (unit=output_unit, fmt=
"(/,T8,A,T71,F10.3)") &
3172 "Atomic covalent radius [Angstrom]:", &
3175 IF (qs_kind%vdw_radius > 0.0_dp)
THEN
3176 WRITE (unit=output_unit, fmt=
"(/,T8,A,T71,F10.3)") &
3177 "Atomic van der Waals radius [Angstrom]:", &
3180 IF (qs_kind%paw_atom)
THEN
3181 WRITE (unit=output_unit, fmt=
"(/,T6,A)") &
3182 "The atoms of this atomic kind are PAW atoms (GAPW):"
3183 WRITE (unit=output_unit, fmt=
"(T8,A,T71,F10.3)") &
3184 "Hard Gaussian function radius:", qs_kind%hard_radius, &
3185 "Rho0 radius:", qs_kind%hard0_radius, &
3186 "Maximum GTO radius used for PAW projector construction:", &
3187 qs_kind%max_rad_local
3190 basis_type=
"ORB_SOFT")
3194 IF (
ASSOCIATED(qs_kind%all_potential))
CALL write_potential(qs_kind%all_potential, output_unit)
3195 IF (
ASSOCIATED(qs_kind%gth_potential))
CALL write_potential(qs_kind%gth_potential, output_unit)
3196 IF (
ASSOCIATED(qs_kind%sgp_potential))
CALL write_potential(qs_kind%sgp_potential, output_unit)
3197 IF (
ASSOCIATED(qs_kind%tnadd_potential))
CALL write_potential(qs_kind%tnadd_potential, output_unit)
3198 IF (
ASSOCIATED(qs_kind%dft_plus_u))
THEN
3199 WRITE (unit=output_unit, fmt=
"(/,T6,A,/,T8,A,T76,I5,/,T8,A,T73,F8.3)") &
3200 "A DFT+U correction is applied to atoms of this atomic kind:", &
3201 "Angular quantum momentum number L:", qs_kind%dft_plus_u%l, &
3202 "U(eff) = (U - J) value in [eV]:", qs_kind%dft_plus_u%u_minus_j_target*
evolt
3203 IF (qs_kind%dft_plus_u%u_ramping > 0.0_dp)
THEN
3204 IF (qs_kind%dft_plus_u%init_u_ramping_each_scf)
THEN
3209 WRITE (unit=output_unit, fmt=
"(T8,A,T73,F8.3,/,T8,A,T73,ES8.1,/,T8,A,T78,A3)") &
3210 "Increment for U ramping in [eV]:", qs_kind%dft_plus_u%u_ramping*
evolt, &
3211 "SCF threshold value for U ramping:", qs_kind%dft_plus_u%eps_u_ramping, &
3212 "Set U ramping value to zero before each wavefunction optimisation:", yon
3214 IF (
ASSOCIATED(qs_kind%dft_plus_u%orbitals))
THEN
3215 WRITE (unit=output_unit, fmt=
"(T8,A)") &
3216 "An initial orbital occupation is requested:"
3217 IF (
ASSOCIATED(qs_kind%dft_plus_u%nelec))
THEN
3218 IF (any(qs_kind%dft_plus_u%nelec(:) >= 0.5_dp))
THEN
3219 IF (
SIZE(qs_kind%dft_plus_u%nelec) > 1)
THEN
3220 WRITE (unit=output_unit, fmt=
"(T9,A,T75,F6.2)") &
3221 "Number of alpha electrons:", &
3222 qs_kind%dft_plus_u%nelec(1), &
3223 "Number of beta electrons:", &
3224 qs_kind%dft_plus_u%nelec(2)
3226 WRITE (unit=output_unit, fmt=
"(T9,A,T75,F6.2)") &
3227 "Number of electrons:", &
3228 qs_kind%dft_plus_u%nelec(1)
3232 WRITE (unit=output_unit, fmt=
"(T9,A,(T78,I3))") &
3233 "Preferred (initial) orbital occupation order (orbital M values):", &
3234 qs_kind%dft_plus_u%orbitals(:)
3235 WRITE (unit=output_unit, fmt=
"(T9,A,T71,ES10.3,/,T9,A,T76,I5)") &
3236 "Threshold value for the SCF convergence criterion:", &
3237 qs_kind%dft_plus_u%eps_scf, &
3238 "Number of initial SCF iterations:", &
3239 qs_kind%dft_plus_u%max_scf
3240 IF (qs_kind%dft_plus_u%smear)
THEN
3241 WRITE (unit=output_unit, fmt=
"(T9,A)") &
3242 "A smearing of the orbital occupations will be performed"
3246 IF (
ASSOCIATED(qs_kind%cneo_potential))
THEN
3247 WRITE (unit=output_unit, fmt=
"(/,T6,A)") &
3248 "The nuclei of this atomic kind are quantum mechanical (CNEO)"
3256 basis_type=
"NUC_SOFT")
3265 END SUBROUTINE write_qs_kind
3275 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
3278 CHARACTER(len=*),
PARAMETER :: routinen =
'write_qs_kind_set'
3280 INTEGER :: handle, ikind, nkind, output_unit
3284 CALL timeset(routinen, handle)
3289 "PRINT%KINDS", extension=
".Log")
3290 IF (output_unit > 0)
THEN
3291 IF (
ASSOCIATED(qs_kind_set))
THEN
3292 WRITE (unit=output_unit, fmt=
"(/,/,T2,A)")
"ATOMIC KIND INFORMATION"
3293 nkind =
SIZE(qs_kind_set)
3295 qs_kind => qs_kind_set(ikind)
3296 CALL write_qs_kind(qs_kind, ikind, output_unit)
3306 CALL timestop(handle)
3321 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
3324 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_gto_basis_sets'
3326 CHARACTER(LEN=default_string_length) :: basis_type, bstring
3327 INTEGER :: handle, ibas, ikind, nkind, output_unit
3332 CALL timeset(routinen, handle)
3337 "PRINT%KINDS/BASIS_SET", &
3339 IF (output_unit > 0)
THEN
3340 IF (
ASSOCIATED(qs_kind_set))
THEN
3341 WRITE (unit=output_unit, fmt=
"(/,/,T2,A)") &
3342 "BASIS SET INFORMATION (Unnormalised Gaussian-type functions)"
3343 nkind =
SIZE(qs_kind_set)
3345 qs_kind => qs_kind_set(ikind)
3346 WRITE (unit=output_unit, fmt=
"(/,T2,I2,A)") &
3347 ikind,
". Atomic kind: "//trim(qs_kind%name)
3349 DO ibas = 1,
SIZE(qs_kind%basis_sets, 1)
3352 inumbas=ibas, basis_type=basis_type)
3353 IF (basis_type ==
"") cycle
3354 SELECT CASE (basis_type)
3356 bstring =
"Basis Set"
3358 bstring =
"Orbital Basis Set"
3360 bstring =
"GAPW Soft Basis Set"
3362 bstring =
"Auxiliary Basis Set"
3364 bstring =
"Minimal Basis Set"
3366 bstring =
"RI Auxiliary Basis Set"
3368 bstring =
"Auxiliary Fit Basis Set"
3370 bstring =
"LRI Basis Set"
3372 bstring =
"LRI Basis Set for TDDFPT"
3374 bstring =
"RI HFX Basis Set"
3376 bstring =
"Nuclear Basis Set"
3377 IF (.NOT.
ASSOCIATED(qs_kind%cneo_potential))
NULLIFY (tmp_basis)
3379 bstring =
"Nuclear Soft Basis Set"
3380 IF (.NOT.
ASSOCIATED(qs_kind%cneo_potential))
NULLIFY (tmp_basis)
3394 "PRINT%KINDS/BASIS_SET")
3396 CALL timestop(handle)
3413 INTEGER,
DIMENSION(0:lmat, 10),
INTENT(OUT) :: ncalc, ncore,
nelem
3414 REAL(kind=
dp),
DIMENSION(0:lmat, 10, 2), &
3415 INTENT(OUT) :: edelta
3417 INTEGER :: i, ii, is, l, ll, ne, nn, z
3418 INTEGER,
DIMENSION(:),
POINTER :: econf
3419 INTEGER,
DIMENSION(:, :),
POINTER :: addel, laddel, naddel
3420 LOGICAL :: bs_occupation, monovalent
3421 REAL(kind=
dp) :: dmag, magnetization
3426 NULLIFY (gth_potential)
3428 gth_potential=gth_potential, &
3429 sgp_potential=sgp_potential, &
3430 magnetization=magnetization, &
3431 bs_occupation=bs_occupation, &
3432 monovalent=monovalent, &
3433 addel=addel, laddel=laddel, naddel=naddel)
3440 IF (monovalent)
THEN
3443 ELSE IF (
ASSOCIATED(gth_potential))
THEN
3446 ELSE IF (
ASSOCIATED(sgp_potential))
THEN
3450 DO l = 0, min(
lmat, ubound(
ptable(z)%e_conv, 1))
3465 ncalc =
nelem - ncore
3471 IF (bs_occupation)
THEN
3473 DO i = 1,
SIZE(addel, 1)
3476 nn = naddel(i, is) - l
3479 DO ii =
SIZE(
nelem, 2), 1, -1
3480 IF (ncalc(l, ii) > 0)
THEN
3481 IF ((ncalc(l, ii) + ne) < 2*(2*l + 1) + 1)
THEN
3482 edelta(l, ii, is) = edelta(l, ii, is) + ne
3485 edelta(l, ii + 1, is) = edelta(l, ii + 1, is) + ne
3489 ELSE IF (ii == 1)
THEN
3490 edelta(l, ii, is) = edelta(l, ii, is) + ne
3495 edelta(l, nn, is) = edelta(l, nn, is) + ne
3497 IF (ncalc(l, nn) + edelta(l, nn, is) < 0)
THEN
3498 edelta(l, nn, is) = -ncalc(l, nn)
3503 edelta = 0.5_dp*edelta
3504 ELSE IF (magnetization /= 0.0_dp)
THEN
3505 dmag = 0.5_dp*abs(magnetization)
3506 DO l = 0, min(
lmat, ubound(
ptable(z)%e_conv, 1))
3509 DO i = 1,
SIZE(ncalc, 2)
3510 IF (ncalc(l, i) == 0) cycle
3511 IF (ncalc(l, i) == ll) cycle
3512 IF (ncalc(l, i) > dmag .AND. (ll - ncalc(l, i)) > dmag)
THEN
3518 edelta(l, ii, 1) = magnetization*0.5_dp
3519 edelta(l, ii, 2) = -magnetization*0.5_dp
3524 CALL cp_abort(__location__, &
3525 "Magnetization value cannot be imposed for this atom type")
3529 IF (qs_kind%ghost .OR. qs_kind%floating)
THEN
3547 INTEGER,
DIMENSION(:),
POINTER :: econf
3548 INTEGER,
INTENT(IN) :: z
3549 INTEGER,
DIMENSION(0:lmat, 10),
INTENT(OUT) :: ncalc, ncore,
nelem
3551 CHARACTER(LEN=default_string_length) :: message
3552 INTEGER :: ii, iounit, l, ll, lmin, nc, nn
3553 INTEGER,
DIMENSION(0:lmat) :: econfx
3561 econfx(0:
SIZE(econf) - 1) = econf
3562 IF (sum(econf) >= 0)
THEN
3563 lmin = min(
lmat, ubound(
ptable(z)%e_conv, 1))
3874 IF (z == 65 .AND. econfx(3) == 0)
THEN
3880 IF (ncore(0, 1) <= 0)
THEN
3881 IF (z >= 58 .AND. z <= 71)
THEN
3894 ncore(3, 1) = nc - 28
3895 message =
"A small-core pseudopotential with 4f-in-core is used for the lanthanide "// &
3897 cphint(trim(message))
3908 ncore(3, 1) = nc - 46
3909 message =
"A medium-core pseudopotential with 4f-in-core is used for the lanthanide "// &
3911 cphint(trim(message))
3918 IF (ncore(0, 1) >= 0)
THEN
3921 nn = sum(ncore(l, :)) + econfx(l)
3934 ncalc =
nelem - ncore
3937 IF (iounit > 0)
THEN
3938 WRITE (iounit,
"(/,A,A2)")
"WARNING: Core states irregular for atom type ",
ptable(z)%symbol
3939 WRITE (iounit,
"(A,10I3)")
"WARNING: Redefine ELEC_CONF in the KIND section"
3940 cpabort(
"Incompatible Atomic Occupations Detected")
3944 lmin = min(
lmat, ubound(
ptable(z)%e_conv, 1))
3978 LOGICAL :: nlcc_present
3984 DO ikind = 1,
SIZE(qs_kind_set)
3985 CALL get_qs_kind(qs_kind_set(ikind), gth_potential=gth_potential, sgp_potential=sgp_potential)
3986 IF (
ASSOCIATED(gth_potential))
THEN
3987 CALL get_potential(potential=gth_potential, nlcc_present=nlcc_present)
3988 nlcc = nlcc .OR. nlcc_present
3989 ELSEIF (
ASSOCIATED(sgp_potential))
THEN
3991 nlcc = nlcc .OR. nlcc_present
static int imax(int x, int y)
Returns the larger of two given integers (missing from the C standard)
subroutine, public atom_sgp_release(sgp_pot)
...
subroutine, public sgp_construction(sgp_pot, ecp_pot, upf_pot, orb_basis, error)
...
Define the atom type and its sub types.
integer, parameter, public lmat
subroutine, public read_ecp_potential(element_symbol, potential, pseudo_name, pseudo_file, potential_section)
...
Routines that process Quantum Espresso UPF files.
subroutine, public atom_read_upf(pot, upf_filename, read_header)
...
pure subroutine, public atom_release_upf(upfpot)
...
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
subroutine, public remove_basis_set_container(basis)
...
subroutine, public remove_basis_from_container(container, inum, basis_type)
...
subroutine, public get_basis_from_container(container, basis_set, inumbas, basis_type)
Retrieve a basis set from the container.
subroutine, public add_basis_set_to_container(container, basis_set, basis_set_type)
...
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum)
...
subroutine, public write_orb_basis_set(orb_basis_set, output_unit, header)
Write a Gaussian-type orbital (GTO) basis set data set to the output unit.
subroutine, public deallocate_sto_basis_set(sto_basis_set)
...
subroutine, public init_aux_basis_set(gto_basis_set)
...
subroutine, public allocate_gto_basis_set(gto_basis_set)
...
subroutine, public combine_basis_sets(basis_set, basis_set_add)
...
subroutine, public write_gto_basis_set(gto_basis_set, output_unit, header)
Write a Gaussian-type orbital (GTO) basis set data set to the output unit.
subroutine, public allocate_sto_basis_set(sto_basis_set)
...
subroutine, public create_gto_from_sto_basis(sto_basis_set, gto_basis_set, ngauss, ortho)
...
subroutine, public read_sto_basis_set(element_symbol, basis_set_name, sto_basis_set, para_env, dft_section)
...
subroutine, public init_orb_basis_set(gto_basis_set)
Initialise a Gaussian-type orbital (GTO) basis set data set.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
Add the DFT+U contribution to the Hamiltonian matrix.
Definition of the atomic potential types.
subroutine, public set_default_all_potential(potential, z, zeff_correction)
...
subroutine, public create_1c_basis(orb_basis, soft_basis, gapw_1c_basis, basis_1c_level)
create the one center basis from the orbital basis
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
Interface to the message passing library MPI.
Provides Cartesian and spherical orbital pointers and indices.
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public ncoset
Factory routines for potentials used e.g. by pao_param_exp and pao_ml.
subroutine, public get_paw_proj_set(paw_proj_set, csprj, chprj, first_prj, first_prjs, last_prj, local_oce_sphi_h, local_oce_sphi_s, maxl, ncgauprj, nsgauprj, nsatbas, nsotot, nprj, o2nindex, n2oindex, rcprj, rzetprj, zisomin, zetprj)
Get informations about a paw projectors set.
subroutine, public allocate_paw_proj_set(paw_proj_set)
Allocate projector type for GAPW.
subroutine, public projectors(paw_proj, basis_1c, orb_basis, rc, qs_control, max_rad_local_type, force_env_section)
Initialize the projector-type set data set.
subroutine, public deallocate_paw_proj_set(paw_proj_set)
Deallocate a projector-type set data set.
Periodic Table related data definitions.
type(atom), dimension(0:nelem), public ptable
integer, parameter, public nelem
subroutine, public get_ptable_info(symbol, number, amass, ielement, covalent_radius, metallic_radius, vdw_radius, found)
Pass information about the kind given the element symbol.
Definition of physical constants:
real(kind=dp), parameter, public evolt
real(kind=dp), parameter, public angstrom
real(kind=dp), parameter, public bohr
Types used by CNEO-DFT (see J. Chem. Theory Comput. 2025, 21, 16, 7865–7877)
subroutine, public allocate_cneo_potential(potential)
...
subroutine, public write_cneo_potential(potential, output_unit)
...
subroutine, public deallocate_cneo_potential(potential)
...
subroutine, public set_cneo_potential(potential, z, mass, elec_conf, nsgf, nne, npsgf, nsotot, my_gcc_h, my_gcc_s, ovlp, kin, utrans, distance, harmonics, qlm_gg, gg, vgg, n2oindex, o2nindex, rad2l, oorad2l)
...
subroutine, public get_cneo_potential(potential, z, zeff, mass, elec_conf, nsgf, nne, npsgf, nsotot, my_gcc_h, my_gcc_s, ovlp, kin, utrans, distance, harmonics, qlm_gg, gg, vgg, n2oindex, o2nindex, rad2l, oorad2l)
...
Definition of the DFTB parameter types.
Working with the DFTB parameter types.
subroutine, public deallocate_dftb_atom_param(dftb_parameter)
...
subroutine, public write_dftb_atom_param(dftb_parameter, subsys_section)
...
subroutine, public get_dftb_atom_param(dftb_parameter, name, typ, defined, z, zeff, natorb, lmax, skself, occupation, eta, energy, cutoff, xi, di, rcdisp, dudq)
...
Definition of disperson types for DFT calculations.
subroutine, public deallocate_grid_atom(grid_atom)
Deallocate a Gaussian-type orbital (GTO) basis set data set.
subroutine, public allocate_grid_atom(grid_atom)
Initialize components of the grid_atom_type structure.
subroutine, public allocate_harmonics_atom(harmonics)
Allocate a spherical harmonics set for the atom grid.
subroutine, public deallocate_harmonics_atom(harmonics)
Deallocate the spherical harmonics set for the atom grid.
Define the quickstep kind type and their sub types.
subroutine, public set_pseudo_state(econf, z, ncalc, ncore, nelem)
...
logical function, public has_nlcc(qs_kind_set)
finds if a given qs run needs to use nlcc
subroutine, public deallocate_qs_kind_set(qs_kind_set)
Destructor routine for a set of qs kinds.
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, 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, 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 init_atom_electronic_state(atomic_kind, qs_kind, ncalc, ncore, nelem, edelta)
...
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, basis_type, total_zeff_corr, npgf_seg, cneo_potential_present, nkind_q, natom_q)
Get attributes of an atomic kind set.
subroutine, public init_gapw_nlcc(qs_kind_set)
...
subroutine, public init_cneo_basis_set(qs_kind_set, qs_control)
...
subroutine, public set_qs_kind(qs_kind, paw_atom, ghost, floating, hard_radius, hard0_radius, covalent_radius, vdw_radius, lmax_rho0, zeff, no_optimize, dispersion, u_minus_j, reltmat, dftb_parameter, xtb_parameter, elec_conf, pao_basis_size)
Set the components of an atomic kind data set.
subroutine, public write_qs_kind_set(qs_kind_set, subsys_section)
Write an atomic kind set data set to the output unit.
subroutine, public init_gapw_basis_set(qs_kind_set, qs_control, force_env_section, modify_qs_control)
...
subroutine, public init_qs_kind_set(qs_kind_set)
Initialise an atomic kind set data set.
subroutine, public check_qs_kind_set(qs_kind_set, dft_control, subsys_section)
...
subroutine, public write_gto_basis_sets(qs_kind_set, subsys_section)
Write all the GTO basis sets of an atomic kind set to the output unit (for the printing of the unnorm...
subroutine, public create_qs_kind_set(qs_kind_set, atomic_kind_set, kind_section, para_env, force_env_section, silent)
Read an atomic kind set data set from the input file.
Definition of the semi empirical parameter types.
subroutine, public write_se_param(sep, subsys_section)
Writes the semi-empirical type.
subroutine, public semi_empirical_create(sep)
Allocate semi-empirical type.
subroutine, public get_se_param(sep, name, typ, defined, z, zeff, natorb, eheat, beta, sto_exponents, uss, upp, udd, uff, alp, eisol, gss, gsp, gpp, gp2, acoul, nr, de, ass, asp, app, hsp, gsd, gpd, gdd, ppddg, dpddg, ngauss)
Get info from the semi-empirical type.
subroutine, public semi_empirical_release(sep)
Deallocate the semi-empirical type.
Working with the semi empirical parameter types.
subroutine, public se_param_set_default(sep, z, method)
Initialize parameter for a semi_empirival type.
subroutine, public init_se_param(sep, orb_basis_set, ngauss)
Initialize semi_empirical type.
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.
real(kind=dp) function, public xtb_set_kab(za, zb, xtb_control)
...
Definition of the xTB parameter types.
subroutine, public get_xtb_atom_param(xtb_parameter, symbol, aname, typ, defined, z, zeff, natorb, lmax, nao, lao, rcut, rcov, kx, eta, xgamma, alpha, zneff, nshell, nval, lval, kpoly, kappa, hen, zeta, xi, kappa0, alpg, occupation, electronegativity, chmax, en, kqat2, kcn, kq)
...
subroutine, public deallocate_xtb_atom_param(xtb_parameter)
...
subroutine, public write_xtb_atom_param(xtb_parameter, gfn_type, subsys_section)
...
Provides all information about an atomic kind.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
Holds information about a PAO descriptor.
Holds information about a PAO potential.
Provides all information about a quickstep kind.