|
PROGRESS
master
|
Module to obtain the density matrix by diagonalizing an orthogonalized Hamiltonian. More...
Functions/Subroutines | |
| subroutine, public | prg_build_density_t0 (ham_bml, rho_bml, threshold, bndfil, eigenvalues_out) |
| Builds the density matrix from \( H_0 \) for zero electronic temperature. \( \rho = C \Theta(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( \Theta() \) is the Heaviside function. More... | |
| subroutine, public | prg_build_density_t (ham_bml, rho_bml, threshold, bndfil, kbt, ef, eigenvalues_out) |
| Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function. More... | |
| subroutine, public | prg_build_density_t_fulldata (ham_bml, rho_bml, threshold, bndfil, kbt, ef, eigenvalues_out, evects_bml, fvals) |
| Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function. More... | |
| subroutine, public | prg_build_density_t_ed (ham_bml, rho_bml, evects_bml, threshold, bndfil, kbt, ef, evals, dvals, hindex, llsize, verbose) |
| Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function. More... | |
| subroutine, public | prg_get_evalsdvalsevects (ham_bml, threshold, hindex, llsize, evals, dvals, evects_bml, verbose) |
| Gets the eigenvalues and eigenvectors and the core contribution to each eigenvalue (dvals) . More... | |
| subroutine, public | prg_build_density_fromevalsandevects (evects_bml, evals, rho_bml, threshold, bndfil, kbt, ef, verbose) |
| Builds the density matrix from the evects and evals for electronic temperature T. More... | |
| subroutine, public | prg_build_density_t_fermi (ham_bml, rho_bml, threshold, kbt, ef, verbose, drho) |
| Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function. In this routine the Fermi level is passed as an argument. More... | |
| subroutine, public | prg_build_atomic_density (rhoat_bml, numel, hindex, spindex, norb, bml_type) |
| Builds the atomic density matrix. \( \rho_{ii} = mathcal{Z}_{ii} \) Where, \( mathcal{Z}_{ii} \) is the number of electrons for orbital i. More... | |
| subroutine, public | prg_get_flevel (eigenvalues, kbt, bndfil, tol, Ef, err) |
| Routine to compute the Fermi level given a set of eigenvalues and a temperature. It applies the Bisection method over the function: \( g(\mu) = \sum_k 2 f(\epsilon_k - \mu) - N = 0 \) Where \( f(\epsilon_k - \mu) = \frac{1}{1+\exp{(\epsilon_k - \mu)/(k_bT)}}\). More... | |
| subroutine, public | prg_get_flevel_nt (eigenvalues, kbt, bndfil, tol, ef, err, verbose) |
| Routine to compute the Fermi level given a set of eigenvalues and a temperature. It applies the Newton-Raphson method over the function: \( g(\mu) = \sum_k 2 f(\epsilon_k - \mu) - N = 0 \) Where \( f(\epsilon_k - \mu) = \frac{1}{1+\exp{(\epsilon_k - \mu)/(k_bT)}}\). More... | |
| subroutine, public | prg_get_eigenvalues (ham_bml, eigenvalues, verbose) |
| Gets the eigenvalues of the Orthogonalized Hamiltonian. More... | |
| subroutine, public | prg_check_idempotency (mat_bml, threshold, idempotency) |
| To check the idempotency error of a matrix. This is calculated as the Frobenius norm of \( (A - A^2) \). More... | |
| real(dp) function | fermi (e, ef, kbt) |
| Gives the Fermi distribution value for energy e. More... | |
| real(dp) function | dfermi (e, ef, kbt) |
| Gives the gradient of Fermi distribution w.r.t. ef. More... | |
| subroutine, public | prg_toeigenspace (mat_bml, matEig_bml, evects_bml, threshold, verbose) |
| Change an operator into the eigenspace representation. More... | |
| subroutine, public | prg_tocanonicalspace (mat_bml, matCan_bml, evects_bml, threshold, verbose) |
| Change an operator into the eigenspace representation. More... | |
| subroutine, public | canon_dm_prt (P1, H1, Nocc, T, Q, e, mu0, m, HDIM) |
| subroutine | eig (A, Q, ee, TYPE, HDIM) |
Variables | |
| integer, parameter | dp = kind(1.0d0) |
Module to obtain the density matrix by diagonalizing an orthogonalized Hamiltonian.
| subroutine, public prg_densitymatrix_mod::canon_dm_prt | ( | real(prec), dimension(hdim,hdim), intent(out) | P1, |
| real(prec), dimension(hdim,hdim), intent(in) | H1, | ||
| real(prec), intent(in) | Nocc, | ||
| real(prec), intent(in) | T, | ||
| real(prec), dimension(hdim,hdim), intent(in) | Q, | ||
| real(prec), dimension(hdim), intent(in) | e, | ||
| real(prec), intent(in) | mu0, | ||
| integer, intent(in) | m, | ||
| integer, intent(in) | HDIM | ||
| ) |
Definition at line 1008 of file prg_densitymatrix_mod.F90.
|
private |
Gives the gradient of Fermi distribution w.r.t. ef.
| e | Energy. |
| ef | Fermi energy. |
Definition at line 902 of file prg_densitymatrix_mod.F90.
|
private |
Definition at line 1074 of file prg_densitymatrix_mod.F90.
|
private |
Gives the Fermi distribution value for energy e.
| e | Energy. |
| ef | Fermi energy. |
Definition at line 886 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_atomic_density | ( | type(bml_matrix_t), intent(inout) | rhoat_bml, |
| real(dp), dimension(:), intent(in) | numel, | ||
| integer, dimension(:,:), intent(in) | hindex, | ||
| integer, dimension(:), intent(in) | spindex, | ||
| integer, intent(in) | norb, | ||
| character(len=*), intent(in) | bml_type | ||
| ) |
Builds the atomic density matrix. \( \rho_{ii} = mathcal{Z}_{ii} \) Where, \( mathcal{Z}_{ii} \) is the number of electrons for orbital i.
| rhoat | Output atomic diagonal density matrix, |
| hindex | Start and end index for every atom in the system. |
| numel | Number of electrons per specie. It runs over the specie index. |
| spindex | Specie index. |
| norbs | Number of orbitals. |
Definition at line 593 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_fromevalsandevects | ( | type(bml_matrix_t), intent(in) | evects_bml, |
| real(dp), dimension(*), intent(in) | evals, | ||
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(inout) | ef, | ||
| integer, intent(in) | verbose | ||
| ) |
Builds the density matrix from the evects and evals for electronic temperature T.
| evects_bml | Eigenvectors. |
| evals | Eigenvalues. |
| threshold | Threshold for sparse matrix algebra. |
| bndfil | Filing factor. |
| kbt | Electronic temperature. |
| ef | Fermi level. |
| verbose | Verbosity level. |
Definition at line 448 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_t | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(inout) | ef, | ||
| real(dp), dimension(:), intent(out), optional, allocatable | eigenvalues_out | ||
| ) |
Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| rho_bml | Output density matrix, |
| threshold | Threshold for sparse matrix algebra. |
| bndfil | Filing factor. |
| kbt | Electronic temperature. |
| ef | Fermi level. |
| eigenvalues_out | Output the eigenvalues. |
Definition at line 117 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_t0 | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| real(8), intent(in) | threshold, | ||
| real(8), intent(in) | bndfil, | ||
| real(dp), dimension(:), intent(out), optional, allocatable | eigenvalues_out | ||
| ) |
Builds the density matrix from \( H_0 \) for zero electronic temperature. \( \rho = C \Theta(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( \Theta() \) is the Heaviside function.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| rho_bml | Output density matrix. |
| threshold | Threshold for sparse matrix algebra. |
| bndfil | Filing factor. |
| eigenvalues_out | Output the eigenvalues. |
Definition at line 36 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_t_ed | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| type(bml_matrix_t), intent(inout) | evects_bml, | ||
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(inout) | ef, | ||
| real(dp), dimension(:), intent(inout), allocatable | evals, | ||
| real(dp), dimension(:), intent(inout), allocatable | dvals, | ||
| integer, dimension(:,:), intent(in), allocatable | hindex, | ||
| integer, intent(in) | llsize, | ||
| integer, intent(in) | verbose | ||
| ) |
Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| rho_bml | Output density matrix, |
| threshold | Threshold for sparse matrix algebra. |
| bndfil | Filing factor. |
| kbt | Electronic temperature. |
| ef | Fermi level. |
| evals | Output the eigenvalues. |
| fvals | Output the occupancies. |
| dvals | Contribution to population from every evect. |
| core_indices | Indices in the core. |
Definition at line 287 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_t_fermi | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(in) | ef, | ||
| integer, intent(in), optional | verbose, | ||
| real(dp), intent(inout), optional | drho | ||
| ) |
Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function. In this routine the Fermi level is passed as an argument.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| rho_bml | Output density matrix, |
| threshold | Threshold for sparse matrix algebra. |
Definition at line 509 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_build_density_t_fulldata | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| type(bml_matrix_t), intent(inout) | rho_bml, | ||
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(inout) | ef, | ||
| real(dp), dimension(:), intent(inout), allocatable | eigenvalues_out, | ||
| type(bml_matrix_t), intent(inout) | evects_bml, | ||
| real(dp), dimension(:), intent(inout), allocatable | fvals | ||
| ) |
Builds the density matrix from \( H_0 \) for electronic temperature T. \( \rho = C f(\mu I - \epsilon) C^{\dagger} \) Where, \( C \) is the matrix eigenvector and \( \epsilon \) is the matrix eigenvalue. \( f \) is the Fermi function.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| rho_bml | Output density matrix, |
| threshold | Threshold for sparse matrix algebra. |
| bndfil | Filing factor. |
| kbt | Electronic temperature. |
| ef | Fermi level. |
| eigenvalues_out | Output the eigenvalues. |
| evects_bml | Output the eigenvectors. |
| fvals | Output the occupancies. |
Definition at line 202 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_check_idempotency | ( | type(bml_matrix_t), intent(in) | mat_bml, |
| real(dp), intent(in) | threshold, | ||
| real(dp), intent(out) | idempotency | ||
| ) |
To check the idempotency error of a matrix. This is calculated as the Frobenius norm of \( (A - A^2) \).
| mat_bml | Some bml matrix |
| idempotency | (Output value of the idempotency error) |
Definition at line 862 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_get_eigenvalues | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| real(dp), dimension(:), intent(inout), allocatable | eigenvalues, | ||
| integer, intent(in) | verbose | ||
| ) |
Gets the eigenvalues of the Orthogonalized Hamiltonian.
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| eigenvalues | Output eigenvalues of the system. |
| verbose | Verbosity level. |
Definition at line 817 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_get_evalsdvalsevects | ( | type(bml_matrix_t), intent(in) | ham_bml, |
| real(dp), intent(in) | threshold, | ||
| integer, dimension(:,:), intent(in), allocatable | hindex, | ||
| integer, intent(in) | llsize, | ||
| real(dp), dimension(:), intent(inout), allocatable | evals, | ||
| real(dp), dimension(:), intent(inout), allocatable | dvals, | ||
| type(bml_matrix_t), intent(inout) | evects_bml, | ||
| integer, intent(in) | verbose | ||
| ) |
Gets the eigenvalues and eigenvectors and the core contribution to each eigenvalue (dvals) .
| ham_bml | Input Orthogonalized Hamiltonian matrix. |
| threshold | Threshold for sparse matrix algebra. |
| hindex | Start and end index for every atom in the system. |
| llsize | Number of atoms in the core of the graph part. |
| evals | Eigenvalues. |
| dvals | Contribution to population from every evect. |
| evects_bml | Output the eigenvectors. |
Definition at line 381 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_get_flevel | ( | real(dp), dimension(:), intent(in) | eigenvalues, |
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp) | tol, | ||
| real(dp), intent(inout) | Ef, | ||
| logical, intent(inout) | err | ||
| ) |
Routine to compute the Fermi level given a set of eigenvalues and a temperature. It applies the Bisection method over the function: \( g(\mu) = \sum_k 2 f(\epsilon_k - \mu) - N = 0 \) Where \( f(\epsilon_k - \mu) = \frac{1}{1+\exp{(\epsilon_k - \mu)/(k_bT)}}\).
| eigenvalues | Eigenvalues of the system ( \( \{ \epsilon_k \} \)). |
| kbt | Temperature times the Boltzmann's constant ( \( k_bT \)). |
| bndfil | Filing factor ( \( N_{el}/(2*N_{orbs})\)). |
| tol | Tolerance for the bisection method. |
| Ef | Fermi level ( \( \mu \)). |
| err | Error logical variable |
Definition at line 657 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_get_flevel_nt | ( | real(dp), dimension(:), intent(in) | eigenvalues, |
| real(dp), intent(in) | kbt, | ||
| real(dp), intent(in) | bndfil, | ||
| real(dp), intent(in) | tol, | ||
| real(dp), intent(inout) | ef, | ||
| logical, intent(inout) | err, | ||
| integer, intent(in), optional | verbose | ||
| ) |
Routine to compute the Fermi level given a set of eigenvalues and a temperature. It applies the Newton-Raphson method over the function: \( g(\mu) = \sum_k 2 f(\epsilon_k - \mu) - N = 0 \) Where \( f(\epsilon_k - \mu) = \frac{1}{1+\exp{(\epsilon_k - \mu)/(k_bT)}}\).
| eigenvalues | Eigenvalues of the system ( \( \{ \epsilon_k \} \)). |
| kbt | Temperature times the Boltzmann's constant ( \( k_bT \)). |
| bndfil | Filing factor ( \( N_{el}/(2*N_{orbs})\)). |
| tol | Tolerance for the bisection method. |
| Ef | Fermi level ( \( \mu \)). |
| err | Error logical variable |
Definition at line 729 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_tocanonicalspace | ( | type(bml_matrix_t), intent(in) | mat_bml, |
| type(bml_matrix_t), intent(inout) | matCan_bml, | ||
| type(bml_matrix_t), intent(in) | evects_bml, | ||
| real(dp), intent(in) | threshold, | ||
| integer, intent(in), optional | verbose | ||
| ) |
Change an operator into the eigenspace representation.
This routine performs \( O_{eig} = U O U^{t} \), where operator U is the unitary
Definition at line 972 of file prg_densitymatrix_mod.F90.
| subroutine, public prg_densitymatrix_mod::prg_toeigenspace | ( | type(bml_matrix_t), intent(in) | mat_bml, |
| type(bml_matrix_t), intent(inout) | matEig_bml, | ||
| type(bml_matrix_t), intent(in) | evects_bml, | ||
| real(dp), intent(in) | threshold, | ||
| integer, intent(in), optional | verbose | ||
| ) |
Change an operator into the eigenspace representation.
This routine performs \( O_{eig} = U^{T} O U \), where operator U is the unitary transformations constructed from the eigenvectors of a Hamiltonian
| mat_bml | Operator to be transformed |
| matEig_bml | Output operator after transformation |
| evects_bml | Eigenvectors matrix (U) |
| threshold | Threshold parameter \verbose Verbosity level |
Definition at line 928 of file prg_densitymatrix_mod.F90.
|
private |
Definition at line 14 of file prg_densitymatrix_mod.F90.