34 #include "./base/base_uses.f90"
40 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'basis_set_output'
54 TYPE(qs_environment_type),
POINTER :: qs_env
55 TYPE(section_vals_type),
POINTER :: base_section
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
61 TYPE(cp_logger_type),
POINTER :: logger
62 TYPE(gto_basis_set_type),
POINTER :: aux_fit_basis, lri_aux_basis, orb_basis, &
63 p_lri_aux_basis, ri_aux_basis, ri_hfx_basis, ri_hxc_basis, ri_xas_basis
64 TYPE(qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
65 TYPE(qs_kind_type),
POINTER :: qs_kind
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")
100 IF (
ASSOCIATED(orb_basis))
THEN
101 bname =
"local_orbital"
102 CALL basis_out(orb_basis, element_symbol, bname, iunit)
104 IF (
ASSOCIATED(ri_aux_basis))
THEN
105 bname =
"local_ri_aux"
106 CALL basis_out(ri_aux_basis, element_symbol, bname, iunit)
108 IF (
ASSOCIATED(ri_hxc_basis))
THEN
109 bname =
"local_ri_hxc"
110 CALL basis_out(ri_hxc_basis, element_symbol, bname, iunit)
112 IF (
ASSOCIATED(lri_aux_basis))
THEN
113 bname =
"local_lri_aux"
114 CALL basis_out(lri_aux_basis, element_symbol, bname, iunit)
116 IF (
ASSOCIATED(p_lri_aux_basis))
THEN
117 bname =
"local_p_lri_aux"
118 CALL basis_out(p_lri_aux_basis, element_symbol, bname, iunit)
120 IF (
ASSOCIATED(aux_fit_basis))
THEN
121 bname =
"local_aux_fit"
122 CALL basis_out(aux_fit_basis, element_symbol, bname, iunit)
124 IF (
ASSOCIATED(ri_xas_basis))
THEN
125 bname =
"local_ri_xas"
126 CALL basis_out(ri_xas_basis, element_symbol, bname, iunit)
128 IF (
ASSOCIATED(ri_hfx_basis))
THEN
129 bname =
"local_ri_hfx"
130 CALL basis_out(ri_hfx_basis, element_symbol, bname, iunit)
150 SUBROUTINE basis_out(basis, element_symbol, bname, iunit)
151 TYPE(gto_basis_set_type),
POINTER :: basis
152 CHARACTER(LEN=*),
INTENT(IN) :: element_symbol, bname
153 INTEGER,
INTENT(IN) :: iunit
155 INTEGER :: ipgf, iset, ishell, ll, nset
156 INTEGER,
DIMENSION(0:9) :: lset
157 INTEGER,
DIMENSION(:),
POINTER :: lmax, lmin, npgf, nshell
158 INTEGER,
DIMENSION(:, :),
POINTER :: l, n
159 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: zet
160 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: gcc
162 WRITE (iunit,
"(A1)")
"#"
163 WRITE (iunit,
"(A2,T5,A)") element_symbol, adjustl(trim(bname))
166 nshell=nshell, n=n, l=l, &
169 WRITE (iunit,
"(I5)") nset
172 DO ishell = 1, nshell(iset)
174 lset(ll) = lset(ll) + 1
176 WRITE (iunit,
"(I5,2I3,I5,2X,10(I3))") n(1, iset), lmin(iset), lmax(iset), npgf(iset), &
177 (lset(ll), ll=lmin(iset), lmax(iset))
178 DO ipgf = 1, npgf(iset)
179 WRITE (iunit,
"(F20.10,50(F15.10))") zet(ipgf, iset), (gcc(ipgf, ishell, iset), ishell=1, nshell(iset))
183 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)
...
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= *), parameter, public cp2k_version
character(len=default_string_length), public r_user_name
character(len=26), public r_datx
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_nonbond, sab_almo, sab_kp, sab_kp_nosym, 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, ecoul_1c, rho0_s_rs, rho0_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, 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, rhs)
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, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, 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_r3d_rs_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_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.