20 dbcsr_type_no_symmetry
59#include "./base/base_uses.f90"
65 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_eht_guess'
80 TYPE(
mo_set_type),
DIMENSION(:),
POINTER :: mo_array
82 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calculate_eht_guess'
84 INTEGER :: handle, ispin, nao, nbas, neeht, neorb, &
85 nkind, nmo, nspins, zero
86 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: eigenvalues
87 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eigval
90 TYPE(
cp_fm_type) :: fmksmat, fmorb, fmscr, fmsmat, fmvec, &
94 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: ksmat, matrix_s, matrix_t, smat
101 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
104 force_env_section, qs_section, &
105 subsys_section, xtb_section
107 CALL timeset(routinen, handle)
109 NULLIFY (subsys_section)
113 input=force_env_section, &
115 NULLIFY (eht_force_env_section)
126 CALL qs_init(eht_env, para_env, cp_subsys=cp_subsys, &
127 force_env_section=eht_force_env_section, &
128 subsys_section=subsys_section, &
129 use_motion_section=.false., silent=.true.)
131 CALL get_qs_env(qs_env, nelectron_total=neorb)
132 CALL get_qs_env(eht_env, nelectron_total=neeht)
133 IF (neorb /= neeht)
THEN
134 cpwarn(
"EHT has different number of electrons than calculation method.")
135 cpabort(
"EHT Initial Guess")
143 matrix_s=smat, matrix_ks=ksmat)
144 nspins =
SIZE(ksmat, 1)
145 CALL get_qs_env(eht_env, para_env=para_env, blacs_env=blacs_env)
148 nrow_global=nao, ncol_global=nao)
153 ALLOCATE (eigenvalues(nao))
156 CALL dbcsr_create(tempmat, template=smat(1)%matrix, matrix_type=dbcsr_type_no_symmetry)
163 CALL get_qs_env(qs_env, para_env=para_env, blacs_env=blacs_env)
166 CALL dbcsr_create(tmat, template=matrix_s(1)%matrix, matrix_type=dbcsr_type_no_symmetry)
168 nrow_global=nbas, ncol_global=nbas)
177 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set, sab_all=sab_nl, nkind=nkind)
178 IF (.NOT.
ASSOCIATED(sab_nl))
THEN
179 cpwarn(
"Full neighborlist not available for this method. EHT initial guess not possible.")
180 cpabort(
"EHT Initial Guess")
182 ALLOCATE (basis_set_list_a(nkind), basis_set_list_b(nkind))
184 CALL get_qs_env(eht_env, qs_kind_set=qs_kind_set)
189 basis_set_list_a, basis_set_list_b, sab_nl)
190 DEALLOCATE (basis_set_list_a, basis_set_list_b)
196 CALL cp_fm_geeig(fmksmat, fmsmat, fmvec, eigenvalues, fmwork)
199 nrow_global=nbas, ncol_global=nao)
203 CALL parallel_gemm(
'N',
'N', nbas, nao, nbas, 1.0_dp, sinv, fmscr, 0.0_dp, fmorb)
206 CALL get_mo_set(mo_set=mo_array(ispin), mo_coeff=mo_coeff, nmo=nmo)
209 CALL get_mo_set(mo_set=mo_array(ispin), eigenvalues=eigval)
210 IF (
ASSOCIATED(eigval))
THEN
211 eigval(1:nmo) = eigenvalues(1:nmo)
216 DEALLOCATE (eigenvalues)
234 CALL timestop(handle)
methods related to the blacs parallel environment
subroutine, public dbcsr_desymmetrize(matrix_a, matrix_b)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_release(matrix)
...
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
basic linear algebra operations for full matrices
subroutine, public cp_fm_invert(matrix_a, matrix_inverse, det_a, eps_svd, eigval)
Inverts a cp_fm_type matrix, optionally returning the determinant of the input matrix.
used for collecting some of the diagonalization schemes available for cp_fm_type. cp_fm_power also mo...
subroutine, public cp_fm_geeig(amatrix, bmatrix, eigenvectors, eigenvalues, work)
General Eigenvalue Problem AX = BXE Single option version: Cholesky decomposition of B.
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
types that represent a subsys, i.e. a part of the system
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
basic linear algebra operations for full matrixes
Generate an initial guess (dm and orb) from EHT calculation.
subroutine, public calculate_eht_guess(qs_env, mo_array)
EHT MO guess calclulation.
Utility subroutine for qs energy calculation.
subroutine, public qs_energies_init(qs_env, calc_forces)
Refactoring of qs_energies_scf. Driver routine for the initial setup and calculations for a qs energy...
qs_environment methods that use many other modules
subroutine, public qs_env_rebuild_pw_env(qs_env)
rebuilds the pw_env in the given qs_env, allocating it if necessary
subroutine, public qs_env_release(qs_env)
releases the given qs_env (see doc/ReferenceCounting.html)
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.
subroutine, public qs_env_create(qs_env, globenv)
allocates and intitializes a qs_env
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, cell, cell_ref, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section, silent)
Read the input and the database files for the setup of the QUICKSTEP environment.
Some utility functions for the calculation of integrals.
subroutine, public basis_set_list_setup(basis_set_list, basis_type, qs_kind_set)
Set up an easy accessible list of the basis sets for all kinds.
Define the quickstep kind type and their sub types.
Set occupation of molecular orbitals.
Definition and initialisation of the mo data type.
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count)
Get the components of a MO set data structure.
Define the neighbor list data types and the corresponding functionality.
Calculation of overlap matrix, its derivatives and forces.
subroutine, public build_overlap_matrix_simple(ks_env, matrix_s, basis_set_list_a, basis_set_list_b, sab_nl)
Calculation of the overlap matrix over Cartesian Gaussian functions.
Calculation of KS matrix in xTB Reference: Stefan Grimme, Christoph Bannwarth, Philip Shushkov JCTC 1...
subroutine, public build_xtb_ks_matrix(qs_env, calculate_forces, just_energy, ext_ks_matrix)
...
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
represents a system: atoms, molecules, their pos,vel,...
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...