36#include "./base/base_uses.f90"
42 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_gcp_utils'
44 INTEGER,
DIMENSION(106) :: nshell = [ &
45 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, &
46 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, &
47 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, &
48 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]
50 INTEGER,
DIMENSION(106) :: nll = [ &
51 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, &
52 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, &
53 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, &
54 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 0, 0]
64 REAL(KIND=
dp),
DIMENSION(4, 106),
PARAMETER,
PRIVATE :: sexp = reshape([ &
65 1.2000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, 1.6469_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, &
66 0.6534_dp, 0.5305_dp, 0.0000_dp, 0.0000_dp, 1.0365_dp, 0.8994_dp, 0.0000_dp, 0.0000_dp, &
67 1.3990_dp, 1.2685_dp, 0.0000_dp, 0.0000_dp, 1.7210_dp, 1.6105_dp, 0.0000_dp, 0.0000_dp, &
68 2.0348_dp, 1.9398_dp, 0.0000_dp, 0.0000_dp, 2.2399_dp, 2.0477_dp, 0.0000_dp, 0.0000_dp, &
69 2.5644_dp, 2.4022_dp, 0.0000_dp, 0.0000_dp, 2.8812_dp, 2.7421_dp, 0.0000_dp, 0.0000_dp, &
70 0.8675_dp, 0.6148_dp, 0.0000_dp, 0.0000_dp, 1.1935_dp, 0.8809_dp, 0.0000_dp, 0.0000_dp, &
71 1.5143_dp, 1.1660_dp, 0.0000_dp, 0.0000_dp, 1.7580_dp, 1.4337_dp, 0.0000_dp, 0.0000_dp, &
72 1.9860_dp, 1.6755_dp, 0.0000_dp, 0.0000_dp, 2.1362_dp, 1.7721_dp, 0.0000_dp, 0.0000_dp, &
73 2.3617_dp, 2.0176_dp, 0.0000_dp, 0.0000_dp, 2.5796_dp, 2.2501_dp, 0.0000_dp, 0.0000_dp, &
74 0.9362_dp, 0.6914_dp, 0.0000_dp, 0.0000_dp, 1.2112_dp, 0.9329_dp, 0.0000_dp, 0.0000_dp, &
75 1.2870_dp, 0.9828_dp, 2.4341_dp, 0.0000_dp, 1.3416_dp, 1.0104_dp, 2.6439_dp, 0.0000_dp, &
76 1.3570_dp, 0.9947_dp, 2.7809_dp, 0.0000_dp, 1.3804_dp, 0.9784_dp, 2.9775_dp, 0.0000_dp, &
77 1.4761_dp, 1.0641_dp, 3.2208_dp, 0.0000_dp, 1.5465_dp, 1.1114_dp, 3.4537_dp, 0.0000_dp, &
78 1.5650_dp, 1.1001_dp, 3.6023_dp, 0.0000_dp, 1.5532_dp, 1.0594_dp, 3.7017_dp, 0.0000_dp, &
79 1.5791_dp, 1.0527_dp, 3.8962_dp, 0.0000_dp, 1.7778_dp, 1.2448_dp, 0.0000_dp, 0.0000_dp, &
80 2.0675_dp, 1.5073_dp, 0.0000_dp, 0.0000_dp, 2.2702_dp, 1.7680_dp, 0.0000_dp, 0.0000_dp, &
81 2.4546_dp, 1.9819_dp, 0.0000_dp, 0.0000_dp, 2.5680_dp, 2.0548_dp, 0.0000_dp, 0.0000_dp, &
82 2.7523_dp, 2.2652_dp, 0.0000_dp, 0.0000_dp, 2.9299_dp, 2.4617_dp, 0.0000_dp, 0.0000_dp, &
83 1.0963_dp, 0.7990_dp, 0.0000_dp, 0.0000_dp, 1.3664_dp, 1.0415_dp, 0.0000_dp, 0.0000_dp, &
84 1.4613_dp, 1.1100_dp, 2.1576_dp, 0.0000_dp, 1.5393_dp, 1.1647_dp, 2.3831_dp, 0.0000_dp, &
85 1.5926_dp, 1.1738_dp, 2.6256_dp, 0.0000_dp, 1.6579_dp, 1.2186_dp, 2.8241_dp, 0.0000_dp, &
86 1.6930_dp, 1.2490_dp, 2.9340_dp, 0.0000_dp, 1.7347_dp, 1.2514_dp, 3.1524_dp, 0.0000_dp, &
87 1.7671_dp, 1.2623_dp, 3.3113_dp, 0.0000_dp, 1.6261_dp, 1.1221_dp, 3.0858_dp, 0.0000_dp, &
88 1.8184_dp, 1.2719_dp, 3.6171_dp, 0.0000_dp, 1.9900_dp, 1.4596_dp, 0.0000_dp, 0.0000_dp, &
89 2.4649_dp, 1.6848_dp, 0.0000_dp, 0.0000_dp, 2.4041_dp, 1.9128_dp, 0.0000_dp, 0.0000_dp, &
90 2.5492_dp, 2.0781_dp, 0.0000_dp, 0.0000_dp, 2.6576_dp, 2.1718_dp, 0.0000_dp, 0.0000_dp, &
91 2.8080_dp, 2.3390_dp, 0.0000_dp, 0.0000_dp, 2.9595_dp, 2.5074_dp, 0.0000_dp, 0.0000_dp, &
92 1.1993_dp, 0.8918_dp, 0.0000_dp, 0.0000_dp, 1.4519_dp, 1.1397_dp, 0.0000_dp, 0.0000_dp, &
93 1.5331_dp, 1.1979_dp, 2.2743_dp, 4.4161_dp, 1.5379_dp, 1.1930_dp, 2.2912_dp, 4.9478_dp, &
94 1.5162_dp, 1.1834_dp, 2.0558_dp, 4.8982_dp, 1.5322_dp, 1.1923_dp, 2.0718_dp, 5.0744_dp, &
95 1.5486_dp, 1.2018_dp, 2.0863_dp, 5.2466_dp, 1.5653_dp, 1.2118_dp, 2.0999_dp, 5.4145_dp, &
96 1.5762_dp, 1.2152_dp, 2.0980_dp, 5.5679_dp, 1.6703_dp, 1.2874_dp, 2.4862_dp, 5.9888_dp, &
97 1.6186_dp, 1.2460_dp, 2.1383_dp, 5.9040_dp, 1.6358_dp, 1.2570_dp, 2.1472_dp, 6.0598_dp, &
98 1.6536_dp, 1.2687_dp, 2.1566_dp, 6.2155_dp, 1.6723_dp, 1.2813_dp, 2.1668_dp, 6.3703_dp, &
99 1.6898_dp, 1.2928_dp, 2.1731_dp, 6.5208_dp, 1.7063_dp, 1.3030_dp, 2.1754_dp, 6.6686_dp, &
100 1.6647_dp, 1.2167_dp, 2.3795_dp, 0.0000_dp, 1.8411_dp, 1.3822_dp, 2.7702_dp, 0.0000_dp, &
101 1.9554_dp, 1.4857_dp, 3.0193_dp, 0.0000_dp, 2.0190_dp, 1.5296_dp, 3.1936_dp, 0.0000_dp, &
102 2.0447_dp, 1.5276_dp, 3.3237_dp, 0.0000_dp, 2.1361_dp, 1.6102_dp, 3.5241_dp, 0.0000_dp, &
103 2.2167_dp, 1.6814_dp, 3.7077_dp, 0.0000_dp, 2.2646_dp, 1.6759_dp, 3.8996_dp, 0.0000_dp, &
104 2.3185_dp, 1.7126_dp, 4.0525_dp, 0.0000_dp, 2.4306_dp, 1.8672_dp, 0.0000_dp, 0.0000_dp, &
105 2.5779_dp, 1.9899_dp, 0.0000_dp, 0.0000_dp, 2.7241_dp, 2.1837_dp, 0.0000_dp, 0.0000_dp, &
106 2.7869_dp, 2.2146_dp, 0.0000_dp, 0.0000_dp, 2.9312_dp, 2.3830_dp, 0.0000_dp, 0.0000_dp, &
107 3.1160_dp, 2.6200_dp, 0.0000_dp, 0.0000_dp, 3.2053_dp, 2.6866_dp, 0.0000_dp, 0.0000_dp, &
108 1.4160_dp, 1.0598_dp, 0.0000_dp, 0.0000_dp, 1.6336_dp, 1.3011_dp, 0.0000_dp, 0.0000_dp, &
109 1.6540_dp, 1.2890_dp, 2.3740_dp, 3.7960_dp, 1.8381_dp, 1.4726_dp, 2.6584_dp, 4.3613_dp, &
110 1.7770_dp, 1.4120_dp, 2.5710_dp, 4.5540_dp, 1.8246_dp, 1.4588_dp, 2.6496_dp, 4.7702_dp, &
111 1.8451_dp, 1.4739_dp, 2.6940_dp, 4.9412_dp, 1.7983_dp, 1.4366_dp, 2.5123_dp, 4.9882_dp, &
112 1.8011_dp, 1.4317_dp, 2.5170_dp, 5.1301_dp, 1.8408_dp, 1.4418_dp, 2.7349_dp, 5.3476_dp, &
113 1.8464_dp, 1.4697_dp, 2.5922_dp, 5.4596_dp, 1.8647_dp, 1.4838_dp, 2.6205_dp, 5.6140_dp, &
114 1.8890_dp, 1.5050_dp, 2.6590_dp, 5.7740_dp, 1.9070_dp, 1.5190_dp, 2.6850_dp, 5.9220_dp, &
115 1.9240_dp, 1.5320_dp, 2.7090_dp, 6.0690_dp, 1.9400_dp, 1.5440_dp, 2.7300_dp, 6.2130_dp, &
116 2.1300_dp, 1.7200_dp, 2.9900_dp, 0.0000_dp, 1.9200_dp, 1.4500_dp, 2.9700_dp, 0.0000_dp, &
117 0.0000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp, 0.0000_dp], &
133 CHARACTER(LEN=default_string_length), &
134 DIMENSION(:),
POINTER :: tmpstringlist
135 INTEGER :: i_rep, n_rep
137 REAL(
dp),
POINTER :: params(:)
140 cpassert(
ASSOCIATED(gcp_env))
146 gcp_env%do_gcp = .true.
148 c_val=gcp_env%parameter_file_name)
150 gcp_env%sigma = params(1)
151 gcp_env%alpha = params(2)
152 gcp_env%beta = params(3)
153 gcp_env%eta = params(4)
157 ALLOCATE (gcp_env%kind_type(n_rep))
158 ALLOCATE (gcp_env%ea(n_rep))
161 c_vals=tmpstringlist)
162 READ (tmpstringlist(1), *) gcp_env%kind_type(i_rep)
163 READ (tmpstringlist(2), *) gcp_env%ea(i_rep)
167 gcp_env%do_gcp = .false.
181 REAL(kind=
dp),
PARAMETER :: epsc = 1.e-6_dp
183 CHARACTER(LEN=10) :: aname
184 CHARACTER(LEN=2) :: element_symbol
185 INTEGER :: i, ikind, nbas, nel, nkind, nsto, za
188 REAL(kind=
dp),
DIMENSION(10) :: al, cl
191 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
194 IF (gcp_env%do_gcp)
THEN
195 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set, nkind=nkind)
196 ALLOCATE (gcp_env%gcp_kind(nkind))
198 qs_kind => qs_kind_set(ikind)
199 gcp_env%gcp_kind(ikind)%rcsto = 0.0_dp
200 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
202 gcp_env%gcp_kind(ikind)%za = za
203 gcp_env%gcp_kind(ikind)%asto = gcp_env%eta*sum(sexp(1:4, za))/real(nll(za), kind=
dp)
204 gcp_env%gcp_kind(ikind)%nq = nshell(za)
205 gcp_env%gcp_kind(ikind)%rcsto = ((nshell(za) - 1)*2.5_dp - log(epsc))/gcp_env%gcp_kind(ikind)%asto
208 CALL get_qs_kind(qs_kind, basis_set=orb_basis, basis_type=
"ORB")
210 nel = sum(qs_kind%elec_conf)
211 gcp_env%gcp_kind(ikind)%nbvirt = real(nbas, kind=
dp) - 0.5_dp*real(nel, kind=
dp)
213 nsto =
SIZE(gcp_env%gcp_kind(ikind)%al)
214 CALL get_sto_ng(gcp_env%gcp_kind(ikind)%asto, nsto, nshell(za), 0, al, cl)
216 gcp_env%gcp_kind(ikind)%al(i) = al(i)
217 gcp_env%gcp_kind(ikind)%cl(i) = cl(i)*(2._dp*al(i)/
pi)**0.75_dp
221 IF (gcp_env%parameter_file_name /=
"---")
THEN
226 qs_kind => qs_kind_set(ikind)
227 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
230 CALL parser_create(parser, gcp_env%parameter_file_name, para_env=para_env)
237 IF (trim(aname) == element_symbol)
THEN
243 gcp_env%gcp_kind(ikind)%eamiss = ea
249 IF (
ASSOCIATED(gcp_env%kind_type))
THEN
250 DO i = 1,
SIZE(gcp_env%kind_type)
251 IF (trim(gcp_env%kind_type(i)) ==
"XX") cycle
252 element_symbol = trim(gcp_env%kind_type(i))
256 IF (za == gcp_env%gcp_kind(ikind)%za)
THEN
257 gcp_env%gcp_kind(ikind)%eamiss = ea
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, ccon)
...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_get_next_line(parser, nline, at_end)
Read the next input line and broadcast the input information. Skip (nline-1) lines and skip also all ...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
Interface to the message passing library MPI.
Periodic Table related data definitions.
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.
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.
Definition of gCP types for DFT calculations.
Set disperson types for DFT calculations.
subroutine, public qs_gcp_env_set(gcp_env, xc_section)
...
subroutine, public qs_gcp_init(qs_env, gcp_env)
...
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_sto_ng(zeta, n, nq, lq, alpha, coef)
return STO-NG parameters; INPUT: zeta (Slater exponent) n (Expansion length) nq (principle quantum nu...
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.