27#include "./base/base_uses.f90"
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_basis_rotation_methods'
53 INTEGER :: ik, ikind, ir, ira, irot, jr, lval, &
55 REAL(kind=
dp),
DIMENSION(3, 3) :: rotmat
63 cpassert(
ASSOCIATED(qs_env))
64 cpassert(
ASSOCIATED(kpoints))
65 IF (
ASSOCIATED(kpoints%kind_rotmat))
THEN
67 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set)
69 nrot =
SIZE(kpoints%kind_rotmat, 1)
70 nkind =
SIZE(kpoints%kind_rotmat, 2)
74 IF (
ASSOCIATED(kpoints%kind_rotmat(irot, ikind)%rmat))
THEN
75 DEALLOCATE (kpoints%kind_rotmat(irot, ikind)%rmat)
81 CALL get_qs_env(qs_env, dft_control=dft_control)
82 DO ik = 1, kpoints%nkp
83 kpsym => kpoints%kp_sym(ik)%kpoint_sym
84 IF (
kpsym%apply_symmetry)
THEN
85 DO irot = 1,
SIZE(
kpsym%rotp)
88 DO jr = 1,
SIZE(kpoints%ibrot)
89 IF (ir == kpoints%ibrot(jr)) ira = jr
92 IF (.NOT.
ASSOCIATED(kpoints%kind_rotmat(ira, 1)%rmat))
THEN
93 rotmat(1:3, 1:3) = matmul(cell%h_inv, &
94 matmul(
kpsym%rot(:, :, irot), cell%hmat))
100 CALL get_qs_kind(qs_kind_set(ikind), basis_set=orb_basis)
101 NULLIFY (kpoints%kind_rotmat(ira, ikind)%rmat)
102 CALL set_rotmat_basis(kpoints%kind_rotmat(ira, ikind)%rmat, orbrot, orb_basis)
121 SUBROUTINE set_rotmat_basis(rmat, orbrot, basis)
122 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rmat
126 INTEGER :: fs1, fs2, iset, ishell, l, nset, nsgf
127 INTEGER,
DIMENSION(:),
POINTER :: nshell
128 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgf, lshell
131 ALLOCATE (rmat(nsgf, nsgf))
134 CALL get_gto_basis_set(gto_basis_set=basis, nset=nset, nshell=nshell, l=lshell, &
137 DO ishell = 1, nshell(iset)
138 l = lshell(ishell, iset)
139 fs1 = first_sgf(ishell, iset)
140 fs2 = fs1 +
nso(l) - 1
141 rmat(fs1:fs2, fs1:fs2) = orbrot(l)%mat(1:
nso(l), 1:
nso(l))
145 END SUBROUTINE set_rotmat_basis
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)
...
Handles all functions related to the CELL.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
Defines the basic variable types.
integer, parameter, public dp
Types and basic routines needed for a kpoint calculation.
K-points and crystal symmetry routines based on.
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public nso
subroutine, public qs_basis_rotation(qs_env, kpoints)
Construct basis set rotation matrices.
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, 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, 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)
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, 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.
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)
Get attributes of an atomic kind set.
Type defining parameters related to the simulation cell.
Keeps symmetry information about a specific k-point.
Contains information about kpoints.
Provides all information about a quickstep kind.