34#include "./base/base_uses.f90"
40 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'basis_set_output'
57 CHARACTER(LEN=2) :: element_symbol
58 CHARACTER(LEN=default_string_length) :: bname, filename
59 INTEGER :: ikind, iunit, nkind, ounit
60 INTEGER,
SAVE :: ncalls = 0
62 TYPE(
gto_basis_set_type),
POINTER :: aux_fit_basis, lri_aux_basis, nuclear_basis, orb_basis, &
63 p_lri_aux_basis, ri_aux_basis, ri_hfx_basis, ri_hxc_basis, ri_xas_basis, tda_hfx_basis
67 IF (ncalls > 0)
RETURN
76 WRITE (unit=ounit, fmt=
'(/,(T2,A))') repeat(
"-", 79)
77 WRITE (unit=ounit, fmt=
'((T2,A,A))')
"Print Basis Set File: ", trim(filename)
78 WRITE (unit=ounit, fmt=
'((T2,A))') repeat(
"-", 79)
79 CALL open_file(filename, unit_number=iunit, file_status=
"UNKNOWN", file_action=
"WRITE")
80 WRITE (unit=iunit, fmt=
"(A8,T11,A)") &
86 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set, nkind=nkind)
88 qs_kind => qs_kind_set(ikind)
89 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
90 NULLIFY (orb_basis, ri_aux_basis, lri_aux_basis, p_lri_aux_basis, aux_fit_basis)
91 CALL get_qs_kind(qs_kind, basis_set=orb_basis, basis_type=
"ORB")
92 CALL get_qs_kind(qs_kind, basis_set=ri_aux_basis, basis_type=
"RI_AUX")
93 CALL get_qs_kind(qs_kind, basis_set=ri_hxc_basis, basis_type=
"RI_HXC")
94 CALL get_qs_kind(qs_kind, basis_set=ri_hfx_basis, basis_type=
"RI_HFX")
95 CALL get_qs_kind(qs_kind, basis_set=lri_aux_basis, basis_type=
"LRI_AUX")
96 CALL get_qs_kind(qs_kind, basis_set=p_lri_aux_basis, basis_type=
"P_LRI_AUX")
97 CALL get_qs_kind(qs_kind, basis_set=aux_fit_basis, basis_type=
"AUX_FIT")
98 CALL get_qs_kind(qs_kind, basis_set=ri_xas_basis, basis_type=
"RI_XAS")
99 CALL get_qs_kind(qs_kind, basis_set=tda_hfx_basis, basis_type=
"TDA_HFX")
100 CALL get_qs_kind(qs_kind, basis_set=nuclear_basis, basis_type=
"NUC")
102 IF (
ASSOCIATED(orb_basis))
THEN
103 bname =
"local_orbital"
104 CALL basis_out(orb_basis, element_symbol, bname, iunit)
106 IF (
ASSOCIATED(ri_aux_basis))
THEN
107 bname =
"local_ri_aux"
108 CALL basis_out(ri_aux_basis, element_symbol, bname, iunit)
110 IF (
ASSOCIATED(ri_hxc_basis))
THEN
111 bname =
"local_ri_hxc"
112 CALL basis_out(ri_hxc_basis, element_symbol, bname, iunit)
114 IF (
ASSOCIATED(lri_aux_basis))
THEN
115 bname =
"local_lri_aux"
116 CALL basis_out(lri_aux_basis, element_symbol, bname, iunit)
118 IF (
ASSOCIATED(p_lri_aux_basis))
THEN
119 bname =
"local_p_lri_aux"
120 CALL basis_out(p_lri_aux_basis, element_symbol, bname, iunit)
122 IF (
ASSOCIATED(aux_fit_basis))
THEN
123 bname =
"local_aux_fit"
124 CALL basis_out(aux_fit_basis, element_symbol, bname, iunit)
126 IF (
ASSOCIATED(ri_xas_basis))
THEN
127 bname =
"local_ri_xas"
128 CALL basis_out(ri_xas_basis, element_symbol, bname, iunit)
130 IF (
ASSOCIATED(ri_hfx_basis))
THEN
131 bname =
"local_ri_hfx"
132 CALL basis_out(ri_hfx_basis, element_symbol, bname, iunit)
134 IF (
ASSOCIATED(tda_hfx_basis))
THEN
135 bname =
"local_tda_hfx"
136 CALL basis_out(tda_hfx_basis, element_symbol, bname, iunit)
138 IF (
ASSOCIATED(nuclear_basis))
THEN
140 CALL basis_out(nuclear_basis, element_symbol, bname, iunit)
160 SUBROUTINE basis_out(basis, element_symbol, bname, iunit)
162 CHARACTER(LEN=*),
INTENT(IN) :: element_symbol, bname
163 INTEGER,
INTENT(IN) :: iunit
165 INTEGER :: ipgf, iset, ishell, ll, nset
166 INTEGER,
DIMENSION(0:9) :: lset
167 INTEGER,
DIMENSION(:),
POINTER :: lmax, lmin, npgf, nshell
168 INTEGER,
DIMENSION(:, :),
POINTER :: l, n
169 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: zet
170 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: gcc
172 WRITE (iunit,
"(A1)")
"#"
173 WRITE (iunit,
"(A2,T5,A)") element_symbol, adjustl(trim(bname))
176 nshell=nshell, n=n, l=l, &
179 WRITE (iunit,
"(I5)") nset
182 DO ishell = 1, nshell(iset)
184 lset(ll) = lset(ll) + 1
186 WRITE (iunit,
"(I5,2I3,I5,2X,10(I3))") n(1, iset), lmin(iset), lmax(iset), npgf(iset), &
187 (lset(ll), ll=lmin(iset), lmax(iset))
188 DO ipgf = 1, npgf(iset)
189 WRITE (iunit,
"(F20.10,50(F15.10))") zet(ipgf, iset), (gcc(ipgf, ishell, iset), ishell=1, nshell(iset))
193 END SUBROUTINE basis_out
Print basis sets in CP2K format.
subroutine, public print_basis_set_file(qs_env, base_section)
...
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)
...
some minimal info about CP2K, including its version and license
character(len=default_string_length), public r_host_name
character(len= *), parameter, public compile_revision
character(len=timestamp_length), public r_timestamp
character(len= *), parameter, public cp2k_version
character(len=default_string_length), public r_user_name
Utility routines to open and close files. Tracking of preconnections.
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
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
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
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, 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, 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, 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.
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, 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, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
Provides all information about a quickstep kind.