Localized Orbital Scaling Correction (LOSC) C library
|
The C interface for LOSC corrections. More...
Go to the source code of this file.
Functions | |
losc_matrix * | losc_ao_hamiltonian_correction (const losc_matrix *S, const losc_matrix *C_lo, const losc_matrix *Curvature, const losc_matrix *LocalOcc) |
Calculate LOSC effective Hamiltonian under AO basis. More... | |
double | energy_correction (const losc_matrix *Curvature, const losc_matrix *LocalOcc) |
Calculate the total energy correction from LOSC. More... | |
double * | orbital_energy_post_scf (const losc_matrix *H_dfa, const losc_matrix *H_losc, const losc_matrix *C_co) |
Calculate corrected orbital energy from LOSC in a post-SCF approach. More... | |
The C interface for LOSC corrections.
double energy_correction | ( | const losc_matrix * | Curvature, |
const losc_matrix * | LocalOcc | ||
) |
Calculate the total energy correction from LOSC.
This is just the energy correction from LOSC, NOT the total energy of LOSC-DFA. Total energy of LOSC-DFA is: E_losc_dfa = E_dfa + E_losc
.
[in] | Curvature | LOSC curvature matrix with dimension of [nlo, nlo] . |
[in] | LocalOcc | Local occupation matrix with dimension of [nlo, nlo] . |
losc_matrix* losc_ao_hamiltonian_correction | ( | const losc_matrix * | S, |
const losc_matrix * | C_lo, | ||
const losc_matrix * | Curvature, | ||
const losc_matrix * | LocalOcc | ||
) |
Calculate LOSC effective Hamiltonian under AO basis.
The LOSC effective Hamiltonian is constructed with LOs fixed. The expression of the effective Hamiltonian is shown as Eq. S25 in the supporting information of the original LOSC paper (https://doi.org/10.1093/nsr/nwx111). This effective Hamiltonian is exact in the developed version of SCF-LOSC (self-consistent LOSC). See reference (J. Phys. Chem. Lett. 2020, 11, 23, 10269-10277) for more details about how to perform reliable SCF-LOSC calculations.
[in] | S | AO overlap matrix with dimension [nbasis, nbasis]. |
[in] | C_lo | LOs coefficient matrix under AOs with dimension of [nbasis, nlo] . The i -th column in C_lo matrix is the i -th LO. |
[in] | Curvature | LOSC curvature matrix with dimension of [nlo, nlo] . |
[in] | LocalOcc | Local occupation matrix with dimension of [nlo, nlo] . |
[nbasis, nbasis]
and return the matrix pointer. double* orbital_energy_post_scf | ( | const losc_matrix * | H_dfa, |
const losc_matrix * | H_losc, | ||
const losc_matrix * | C_co | ||
) |
Calculate corrected orbital energy from LOSC in a post-SCF approach.
This function gives the final orbital energies WITH the correction from LOSC. Note the difference to the function energy_correction() that only calculates the energy correction. The corrected orbital energies are the expectation values of converged DFA's COs on the LOSC-DFA Hamiltonian, that is,
\[ \epsilon_i = \langle \psi_i | H_{\rm{dfa}} + H_{\rm{losc}} | \psi_i \rangle. \]
[in] | H_dfa | The DFA Hamiltonian under AOs with dimension of [nbasis, nbasis] . |
[in] | H_losc | The LOSC effective Hamiltonian under AOs with dimension of [nbasis, nbasis] . |
[in] | C_co | The coefficient matrix of converged DFA COs under AOs with dimension of [nbasis, n] (n <= nbasis , which is the number of COs). You can choose whatever number of COs you want. |
n
and return the pointer. The order of orbital energies match the order of input COs (order of columns in C_co
matrix).