Documentation for module qs_core_energies

Calculation of the energies concerning the core charge distribution

source: qs_core_energies.F
Loading...

Generic procedures:

calculate_ptrace

public Subroutines/Functions:

Calculate the overlap energy of the core charge distribution.
Calculate the self energy of the core charge distribution.

Generic procedure calculate_ptrace

...

TYPE(dbcsr_type),
POINTER
:: h ×
TYPE(dbcsr_type),
POINTER
:: p ×
REAL(dp),
INTENT(out)
:: ecore × × ×
POINTER
:: hmat(:) ×
POINTER
:: hmat(:,:) ×
POINTER
:: pmat(:) ×
POINTER
:: pmat(:,:) ×
INTEGER,
INTENT(in)
:: nspin × ×

SUBROUTINEcalculate_ecore_overlap(qs_env, para_env, calculate_forces, molecular, e_overlap_core)

Calculate the overlap energy of the core charge distribution.

Arguments:
POINTER
:: qs_env ...
POINTER
:: para_env ...
LOGICAL,
INTENT(in)
:: calculate_forces ...
LOGICAL,
INTENT(in),
OPTIONAL
:: molecular ...
REAL(dp),
INTENT(out),
OPTIONAL
:: e_overlap_core ...

SUBROUTINEcalculate_ecore_self(qs_env, e_self_core)

Calculate the self energy of the core charge distribution.

Arguments:
POINTER
:: qs_env ...
REAL(dp),
INTENT(out),
OPTIONAL
:: e_self_core ...

SUBROUTINEcalculate_ptrace_1(h, p, ecore)

Calculate the core Hamiltonian energy which includes the kinetic and the potential energy of the electrons. It is assumed, that the core Hamiltonian matrix h and the density matrix p have the same sparse matrix structure (same atomic blocks and block ordering)

Arguments:
TYPE(dbcsr_type),
POINTER
:: h ...
TYPE(dbcsr_type),
POINTER
:: p ...
REAL(dp),
INTENT(out)
:: ecore ...

SUBROUTINEcalculate_ptrace_gamma(hmat, pmat, ecore, nspin)

Calculate the trace of a operator matrix with the density matrix. Sum over all spin components (in P, no spin in H)

Arguments:
POINTER
:: hmat(:) ...
POINTER
:: pmat(:) ...
REAL(dp),
INTENT(out)
:: ecore ...
INTEGER,
INTENT(in)
:: nspin ...

SUBROUTINEcalculate_ptrace_kp(hmat, pmat, ecore, nspin)

Calculate the trace of a operator matrix with the density matrix. Sum over all spin components (in P, no spin in H) and the real space coordinates

Arguments:
POINTER
:: hmat(:,:) H matrix
POINTER
:: pmat(:,:) P matrices
REAL(dp),
INTENT(out)
:: ecore Tr(HP) output
INTEGER,
INTENT(in)
:: nspin Number of P matrices