Documentation for module qs_ks_types

...

source: qs_ks_types.F
Loading...

public Types:

qs_ks_env_type
calculation environement to calculate the ks matrix, holds all the needed vars. assumes that the core hamiltonian and energy are up to date.

public Subroutines/Functions:

...
tells that some of the things relevant to the ks calculation did change. has to be called when changes happen otherwise the calculation will give wrong results.
Allocates a new instance of ks_env.
SUBROUTINE
qs_ks_release (ks_env)
releases the ks_env (see doc/ReferenceCounting.html)
SUBROUTINE
qs_ks_retain (ks_env)
retains the given ks_environment
...

public Types:

TYPE :: qs_ks_env_type

calculation environement to calculate the ks matrix, holds all the needed vars. assumes that the core hamiltonian and energy are up to date.


LOGICAL
:: s_mstruct_changed = .TRUE. if the sparsity structure of s in qs_env where this ks_env lives has changed
LOGICAL
:: rho_changed = .TRUE. if the rho stored in the qs_env has changed
LOGICAL
:: potential_changed = .TRUE. if some external potentian changed (such as due to the constraint)
LOGICAL
:: forces_up_to_date = .FALSE. if the forces are up to date
INTEGER
:: n_evals = 0 ...
INTEGER
:: id_nr = -1 ...
INTEGER
:: ref_count = 1 ...
TYPE(pw_type),
POINTER :: v_hartree_rspace => NULL() ...
:: matrix_ks Khon-Sham matrix (filtred by the structure of S). with LSD an array with the differents orbitals
:: matrix_s the overlap matrix (matrix_s(1)), if needed by the calculation also its derivatives wrt. x,y, and z (matrix_s(2:4))
:: kinetic kinetic part of h
:: matrix_h core hamiltonian (matrix_h(1)), if needed by the calculation also its derivatives wrt. x,y, and z (matrix_h(2:4))
:: matrix_w ...
:: matrix_vxc ...
DIMENSION(:), POINTER :: matrix_ks_im => NULL() ...
DIMENSION(:), POINTER :: matrix_w_mp2 => NULL() ...
DIMENSION(:), POINTER :: matrix_p_mp2 => NULL() ...
DIMENSION(:), POINTER :: gamma_matrix => NULL() gamma (Coulomb) matrix in DFTB, if needed by the calculation also its derivatives wrt. x,y, and z
DIMENSION(:), POINTER :: matrix_s_aux_fit => NULL() ...
DIMENSION(:), POINTER :: matrix_s_aux_fit_vs_orb => NULL() ...
DIMENSION(:), POINTER :: matrix_s_ri_aux => NULL() ...
DIMENSION(:), POINTER :: matrix_ks_aux_fit => NULL() ...
DIMENSION(:), POINTER :: matrix_ks_aux_fit_im => NULL() ...
DIMENSION(:), POINTER :: matrix_ks_aux_fit_dft => NULL() ...
DIMENSION(:), POINTER :: matrix_ks_aux_fit_hfx => NULL() ...
POINTER :: rho => NULL() the (old) density, in various representations (ao+grid)
POINTER :: rho_buffer => NULL() ...
POINTER :: rho_xc => NULL() the (old) soft density, used for the GAPW_XC method only
POINTER :: rho_aux_fit => NULL() ...
POINTER :: rho_aux_fit_buffer => NULL() ...
TYPE(pw_p_type),
POINTER :: rho_core => NULL() a grid with the charges of the cores of the atoms in the reciprocal (g) space
TYPE(pw_p_type),
POINTER :: vppl => NULL() a realspace grid with the local pseudopotential
TYPE(pw_p_type),
POINTER :: rho_nlcc => NULL() ...
TYPE(pw_p_type),
POINTER :: rho_nlcc_g => NULL() ...
TYPE(pw_p_type),
POINTER :: vee => NULL() a realspace grid with the external electrostatic potential
INTEGER
:: neighbor_list_id = -1 the current version of the neighbor_list
DIMENSION(:), POINTER :: sab_orb => NULL() ...
DIMENSION(:), POINTER :: sac_ae => NULL() ...
DIMENSION(:), POINTER :: sac_ppl => NULL() ...
DIMENSION(:), POINTER :: sap_ppnl => NULL() ...
DIMENSION(:), POINTER :: sap_oce => NULL() neighbor lists for the calculation of the expansion coefficients of the local atomic densities rho1_hard and rho1_soft
DIMENSION(:), POINTER :: sab_se => NULL() neighbor lists for the calculation of the 2 centers hartree term in semi-empirical methods
DIMENSION(:), POINTER :: sab_vdw => NULL() neighbor lists for the calculation of dispersion interactions
DIMENSION(:), POINTER :: sab_scp => NULL() neighbor lists for the calculation of self-consistent polarization
DIMENSION(:), POINTER :: sab_tbe => NULL() ...
DIMENSION(:), POINTER :: sab_core => NULL() neighbor lists for the calculation of the core interactions
DIMENSION(:), POINTER :: sab_all => NULL() neighbor lists for the calculation of the matrix element of non-symmetric operators
DIMENSION(:), POINTER :: sab_aux_fit => NULL() ...
DIMENSION(:), POINTER :: sab_aux_fit_vs_orb => NULL() ...
DIMENSION(:), POINTER :: sab_aux_fit_asymm => NULL() ...
DIMENSION(:), POINTER :: sab_lrc => NULL() ...
DIMENSION(:), POINTER :: sab_almo => NULL() neighbor lists to create ALMO delocalization template
DIMENSION(:), POINTER :: sab_kp => NULL() neighbor lists to create kp image cell lists
POINTER :: task_list => NULL() ...
POINTER :: task_list_aux_fit => NULL() ...
POINTER :: task_list_soft => NULL() ...
POINTER :: kpoints => NULL() information on the kpoints used
POINTER :: subsys => NULL() the particles, molecules,... of this environment
POINTER :: dft_control => NULL() object that contains the values of various parameters relevant to a dft calculation
POINTER :: dbcsr_dist => NULL() ...
POINTER :: distribution_2d => NULL() distribution of the atom pairs between the processors
POINTER :: pw_env => NULL() ...
POINTER :: para_env => NULL() ...
POINTER :: blacs_env => NULL() ...
POINTER :: admm_dm => NULL() ...

SUBROUTINEget_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, matrix_h, matrix_ks, matrix_ks_im, matrix_vxc, matrix_ks_aux_fit, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, kinetic, matrix_s, matrix_s_aux_fit, matrix_s_aux_fit_vs_orb, matrix_s_ri_aux, matrix_w, matrix_w_mp2, matrix_p_mp2, gamma_matrix, matrix_h_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, rho, rho_aux_fit, rho_aux_fit_buffer, rho_buffer, rho_xc, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, sab_orb, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, sab_all, sac_ae, sac_ppl, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_tbe, sab_core, sab_vdw, sab_scp, sab_almo, sab_kp, task_list, task_list_aux_fit, task_list_soft, kpoints, do_kpoints, atomic_kind_set, qs_kind_set, cell, cell_ref, use_ref_cell, particle_set, energy, force, local_particles, local_molecules, molecule_kind_set, molecule_set, subsys, cp_subsys, virial, results, atprop, nkind, natom, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, nelectron_total, nelectron_spin, admm_dm)

...

Arguments:
POINTER
:: ks_env ...
TYPE(pw_type),
OPTIONAL, POINTER
:: v_hartree_rspace ...
LOGICAL,
OPTIONAL
:: s_mstruct_changed ...
LOGICAL,
OPTIONAL
:: rho_changed ...
LOGICAL,
OPTIONAL
:: potential_changed ...
LOGICAL,
OPTIONAL
:: forces_up_to_date ...
OPTIONAL, POINTER
:: matrix_h(:) ...
OPTIONAL, POINTER
:: matrix_ks(:) ...
OPTIONAL, POINTER
:: matrix_ks_im(:) ...
OPTIONAL, POINTER
:: matrix_vxc(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_im(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_dft(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_hfx(:) ...
OPTIONAL, POINTER
:: kinetic(:) ...
OPTIONAL, POINTER
:: matrix_s(:) ...
OPTIONAL, POINTER
:: matrix_s_aux_fit(:) ...
OPTIONAL, POINTER
:: matrix_s_aux_fit_vs_orb(:) ...
OPTIONAL, POINTER
:: matrix_s_ri_aux(:) ...
OPTIONAL, POINTER
:: matrix_w(:) ...
OPTIONAL, POINTER
:: matrix_w_mp2(:) ...
OPTIONAL, POINTER
:: matrix_p_mp2(:) ...
OPTIONAL, POINTER
:: gamma_matrix(:) ...
OPTIONAL, POINTER
:: matrix_h_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_ks_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_vxc_kp(:,:) ...
OPTIONAL, POINTER
:: kinetic_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_s_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_w_kp(:,:) ...
OPTIONAL, POINTER
:: rho ...
OPTIONAL, POINTER
:: rho_aux_fit ...
OPTIONAL, POINTER
:: rho_aux_fit_buffer ...
OPTIONAL, POINTER
:: rho_buffer ...
OPTIONAL, POINTER
:: rho_xc ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: vppl ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_core ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_nlcc ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_nlcc_g ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: vee ...
INTEGER,
OPTIONAL
:: neighbor_list_id ...
OPTIONAL, POINTER
:: sab_orb(:) ...
OPTIONAL, POINTER
:: sab_aux_fit(:) ...
OPTIONAL, POINTER
:: sab_aux_fit_asymm(:) ...
OPTIONAL, POINTER
:: sab_aux_fit_vs_orb(:) ...
OPTIONAL, POINTER
:: sab_all(:) ...
OPTIONAL, POINTER
:: sac_ae(:) ...
OPTIONAL, POINTER
:: sac_ppl(:) ...
OPTIONAL, POINTER
:: sap_ppnl(:) ...
OPTIONAL, POINTER
:: sap_oce(:) ...
OPTIONAL, POINTER
:: sab_lrc(:) ...
OPTIONAL, POINTER
:: sab_se(:) ...
OPTIONAL, POINTER
:: sab_tbe(:) ...
OPTIONAL, POINTER
:: sab_core(:) ...
OPTIONAL, POINTER
:: sab_vdw(:) ...
OPTIONAL, POINTER
:: sab_scp(:) ...
OPTIONAL, POINTER
:: sab_almo(:) ...
OPTIONAL, POINTER
:: sab_kp(:) ...
OPTIONAL, POINTER
:: task_list ...
OPTIONAL, POINTER
:: task_list_aux_fit ...
OPTIONAL, POINTER
:: task_list_soft ...
OPTIONAL, POINTER
:: kpoints ...
LOGICAL,
OPTIONAL
:: do_kpoints ...
OPTIONAL, POINTER
:: atomic_kind_set(:) ...
OPTIONAL, POINTER
:: qs_kind_set(:) ...
TYPE(cell_type),
OPTIONAL, POINTER
:: cell ...
TYPE(cell_type),
OPTIONAL, POINTER
:: cell_ref ...
LOGICAL,
OPTIONAL
:: use_ref_cell ...
OPTIONAL, POINTER
:: particle_set(:) ...
OPTIONAL, POINTER
:: energy ...
OPTIONAL, POINTER
:: force(:) ...
OPTIONAL, POINTER
:: local_particles ...
OPTIONAL, POINTER
:: local_molecules ...
OPTIONAL, POINTER
:: molecule_kind_set(:) ...
OPTIONAL, POINTER
:: molecule_set(:) ...
OPTIONAL, POINTER
:: subsys ...
OPTIONAL, POINTER
:: cp_subsys ...
OPTIONAL, POINTER
:: virial ...
OPTIONAL, POINTER
:: results ...
OPTIONAL, POINTER
:: atprop ...
INTEGER,
OPTIONAL
:: nkind ...
INTEGER,
OPTIONAL
:: natom ...
OPTIONAL, POINTER
:: dft_control ...
OPTIONAL, POINTER
:: dbcsr_dist ...
OPTIONAL, POINTER
:: distribution_2d ...
OPTIONAL, POINTER
:: pw_env ...
OPTIONAL, POINTER
:: para_env ...
OPTIONAL, POINTER
:: blacs_env ...
INTEGER,
OPTIONAL
:: nelectron_total ...
INTEGER,
OPTIONAL
:: nelectron_spin(2) ...
OPTIONAL, POINTER
:: admm_dm ...

SUBROUTINEqs_ks_did_change(ks_env, s_mstruct_changed, rho_changed, potential_changed, full_reset)

tells that some of the things relevant to the ks calculation did change. has to be called when changes happen otherwise the calculation will give wrong results.

Arguments:
POINTER
:: ks_env the environement that is informed about the changes
LOGICAL,
INTENT(in),
OPTIONAL
:: s_mstruct_changed if true it means that the structure of the overlap matrix has changed (atoms have moved)
LOGICAL,
INTENT(in),
OPTIONAL
:: rho_changed if true it means that the density has changed
LOGICAL,
INTENT(in),
OPTIONAL
:: potential_changed ...
LOGICAL,
INTENT(in),
OPTIONAL
:: full_reset if true everything has changed

SUBROUTINEqs_ks_env_create(ks_env)

Allocates a new instance of ks_env.

Arguments:
POINTER
:: ks_env ...

SUBROUTINEqs_ks_release(ks_env)

releases the ks_env (see doc/ReferenceCounting.html)

Arguments:
POINTER
:: ks_env the ks_env to be released

SUBROUTINEqs_ks_retain(ks_env)

retains the given ks_environment

Arguments:
POINTER
:: ks_env the KohnSham environment to retain

SUBROUTINEset_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, matrix_h, matrix_ks, matrix_ks_im, matrix_vxc, matrix_ks_aux_fit, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, kinetic, matrix_s, matrix_s_aux_fit, matrix_s_aux_fit_vs_orb, matrix_s_ri_aux, matrix_w, matrix_w_mp2, matrix_p_mp2, gamma_matrix, matrix_h_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, kpoints, sab_orb, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, sab_all, sac_ae, sac_ppl, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_tbe, sab_core, sab_vdw, sab_scp, sab_almo, sab_kp, task_list, task_list_aux_fit, task_list_soft, subsys, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, admm_dm)

...

Arguments:
POINTER
:: ks_env ...
TYPE(pw_type),
OPTIONAL, POINTER
:: v_hartree_rspace ...
LOGICAL,
OPTIONAL
:: s_mstruct_changed ...
LOGICAL,
OPTIONAL
:: rho_changed ...
LOGICAL,
OPTIONAL
:: potential_changed ...
LOGICAL,
OPTIONAL
:: forces_up_to_date ...
OPTIONAL, POINTER
:: matrix_h(:) ...
OPTIONAL, POINTER
:: matrix_ks(:) ...
OPTIONAL, POINTER
:: matrix_ks_im(:) ...
OPTIONAL, POINTER
:: matrix_vxc(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_im(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_dft(:) ...
OPTIONAL, POINTER
:: matrix_ks_aux_fit_hfx(:) ...
OPTIONAL, POINTER
:: kinetic(:) ...
OPTIONAL, POINTER
:: matrix_s(:) ...
OPTIONAL, POINTER
:: matrix_s_aux_fit(:) ...
OPTIONAL, POINTER
:: matrix_s_aux_fit_vs_orb(:) ...
OPTIONAL, POINTER
:: matrix_s_ri_aux(:) ...
OPTIONAL, POINTER
:: matrix_w(:) ...
OPTIONAL, POINTER
:: matrix_w_mp2(:) ...
OPTIONAL, POINTER
:: matrix_p_mp2(:) ...
OPTIONAL, POINTER
:: gamma_matrix(:) ...
OPTIONAL, POINTER
:: matrix_h_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_ks_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_vxc_kp(:,:) ...
OPTIONAL, POINTER
:: kinetic_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_s_kp(:,:) ...
OPTIONAL, POINTER
:: matrix_w_kp(:,:) ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: vppl ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_core ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_nlcc ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: rho_nlcc_g ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: vee ...
INTEGER,
OPTIONAL
:: neighbor_list_id ...
OPTIONAL, POINTER
:: kpoints ...
OPTIONAL, POINTER
:: sab_orb(:) ...
OPTIONAL, POINTER
:: sab_aux_fit(:) ...
OPTIONAL, POINTER
:: sab_aux_fit_asymm(:) ...
OPTIONAL, POINTER
:: sab_aux_fit_vs_orb(:) ...
OPTIONAL, POINTER
:: sab_all(:) ...
OPTIONAL, POINTER
:: sac_ae(:) ...
OPTIONAL, POINTER
:: sac_ppl(:) ...
OPTIONAL, POINTER
:: sap_ppnl(:) ...
OPTIONAL, POINTER
:: sap_oce(:) ...
OPTIONAL, POINTER
:: sab_lrc(:) ...
OPTIONAL, POINTER
:: sab_se(:) ...
OPTIONAL, POINTER
:: sab_tbe(:) ...
OPTIONAL, POINTER
:: sab_core(:) ...
OPTIONAL, POINTER
:: sab_vdw(:) ...
OPTIONAL, POINTER
:: sab_scp(:) ...
OPTIONAL, POINTER
:: sab_almo(:) ...
OPTIONAL, POINTER
:: sab_kp(:) ...
OPTIONAL, POINTER
:: task_list ...
OPTIONAL, POINTER
:: task_list_aux_fit ...
OPTIONAL, POINTER
:: task_list_soft ...
OPTIONAL, POINTER
:: subsys ...
OPTIONAL, POINTER
:: dft_control ...
OPTIONAL, POINTER
:: dbcsr_dist ...
OPTIONAL, POINTER
:: distribution_2d ...
OPTIONAL, POINTER
:: pw_env ...
OPTIONAL, POINTER
:: para_env ...
OPTIONAL, POINTER
:: blacs_env ...
OPTIONAL, POINTER
:: admm_dm ...