routines that build the Kohn-Sham matrix contributions coming from local atomic densities

source: qs_ks_atom.FLoading...

The correction to the KS matrix due to the GAPW local terms to the hartree and XC contributions is here added. The correspondig forces contribution are also calculated if required. Each sparse-matrix block A-B is corrected by all the atomic contributions centered on atoms C for which the triplet A-C-B exists (they are close enough) To this end special lists are used

The correction to the KS matrix due to the GAPW local terms to the hartree and XC contributions is here added. The correspondig forces contribution are also calculated if required. Each sparse-matrix block A-B is corrected by all the atomic contributions centered on atoms C for which the triplet A-C-B exists (they are close enough) To this end special lists are used

TYPE(qs_environment_type), |
POINTER |
:: | qs_env | qs enviroment, for the lists, the contraction coefficients and the pre calculated integrals of the potential with the atomic orbitals | |

TYPE(dbcsr_p_type), |
INTENT(inout) |
:: | ksmat(:,:) | KS matrix, sparse matrix | |

TYPE(dbcsr_p_type), |
INTENT(inout) |
:: | pmat(:,:) | density matrix, sparse matrix, needed only for the forces | |

LOGICAL, |
INTENT(in) |
:: | forces | switch for the calculation of the forces on atoms | |

LOGICAL, |
INTENT(in), |
OPTIONAL |
:: | tddft | switch for TDDFT linear response |

TYPE(qs_p_env_type), |
OPTIONAL, POINTER |
:: | p_env | perturbation theory environment |