48 SUBROUTINE topology_state_begin(qs_env, filename, nao, nband, npoint, nspin, ntotal, spin_channel, bands, unit)
50 CHARACTER(len=*),
INTENT(IN) :: filename
51 INTEGER,
INTENT(IN) :: nao, nband, npoint, nspin, ntotal, &
52 spin_channel, bands(:)
53 INTEGER,
INTENT(OUT) :: unit
55 INTEGER :: count_ao, first, ia, ic, ik, ip, iset, &
63 CALL get_qs_env(qs_env, cell=cell, particle_set=particles, qs_kind_set=kinds_set, para_env=para_env)
65 IF (.NOT. para_env%is_source())
RETURN
66 CALL open_file(filename, unit_number=unit, file_status=
"UNKNOWN", file_action=
"WRITE")
67 WRITE (unit,
'(A)')
'CP2K_TOPOLOGY_STATE 1'
68 WRITE (unit,
'(7I12)')
SIZE(particles), nao, nband, npoint, nspin, ntotal, spin_channel
69 WRITE (unit,
'(*(I12))') bands
71 WRITE (unit,
'(3ES26.17)') cell%hmat(:, j)
73 WRITE (unit,
'(3I12)') cell%perd
75 DO ia = 1,
SIZE(particles)
78 IF (.NOT.
ASSOCIATED(basis))
THEN
79 cpabort(
"STATE_EXPORT requires a Gaussian orbital basis on every atom.")
81 WRITE (unit,
'(4I12)') ia, ik, basis%nset, basis%nsgf
82 WRITE (unit,
'(3ES26.17)')
pbc(particles(ia)%r, cell)
83 DO iset = 1, basis%nset
84 first = basis%first_sgf(1, iset)
85 ns = basis%nsgf_set(iset)
86 ncart =
ncoset(basis%lmax(iset))
87 WRITE (unit,
'(5I12,ES26.17)') first, ns, basis%npgf(iset), ncart, basis%lmin(iset), &
88 basis%set_radius(iset)
89 DO ip = 1, basis%npgf(iset)
90 WRITE (unit,
'(2ES26.17)') basis%zet(ip, iset), basis%pgf_radius(ip, iset)
92 row = (ip - 1)*ncart + ic
93 WRITE (unit,
'(3I5,*(ES26.17))')
indco(:, ic), basis%sphi(row, first:first + ns - 1)
97 count_ao = count_ao + basis%nsgf
99 IF (count_ao /= nao) cpabort(
"STATE_EXPORT: inconsistent atom/AO dimensions.")
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.
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.