63 LOGICAL,
INTENT(IN) :: calc_forces
65 CHARACTER(len=*),
PARAMETER :: routinen =
'compute_matrix_w'
67 INTEGER :: handle, is, ispin, nao, nspin
68 LOGICAL :: do_kpoints, has_unit_metric
69 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks, matrix_s, matrix_w, &
77 CALL timeset(routinen, handle)
80 CALL get_qs_env(qs_env, has_unit_metric=has_unit_metric)
82 IF (calc_forces .AND. .NOT. has_unit_metric)
THEN
90 TYPE(
dbcsr_p_type),
DIMENSION(:, :),
POINTER :: matrix_s_kp, matrix_w_kp
96 matrix_w_kp=matrix_w_kp, &
97 matrix_s_kp=matrix_s_kp, &
102 CALL get_mo_set(mos(1), mo_coeff=mo_coeff, nao=nao)
104 template_fmstruct=mo_coeff%matrix_struct)
106 DO is = 1,
SIZE(fmwork)
107 CALL cp_fm_create(fmwork(is), matrix_struct=ao_ao_fmstruct)
115 matrix_s_kp(1, 1)%matrix, sab_nl, fmwork)
117 DO is = 1,
SIZE(fmwork)
124 NULLIFY (dft_control, rho_ao)
127 matrix_ks=matrix_ks, &
129 mo_derivs=mo_derivs, &
130 scf_control=scf_control, &
133 dft_control=dft_control)
140 IF (dft_control%roks)
THEN
141 IF (scf_control%use_ot)
THEN
144 CALL dbcsr_set(matrix_w(ispin)%matrix, 0.0_dp)
147 matrix_w(ispin)%matrix, matrix_s(1)%matrix)
151 matrix_ks=matrix_ks(ispin)%matrix, &
152 matrix_p=rho_ao(ispin)%matrix, &
153 matrix_w=matrix_w(ispin)%matrix)
156 IF (scf_control%use_ot)
THEN
158 matrix_w(ispin)%matrix, matrix_s(1)%matrix)
169 CALL timestop(handle)
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.