![]() |
(git:b77b4be)
|
Some basic routines for atomic calculations. More...
Data Types | |
interface | integrate_grid |
Functions/Subroutines | |
subroutine, public | atom_set_occupation (ostring, occupation, wfnocc, multiplicity) |
Set occupation of atomic orbitals. | |
pure integer function, public | get_maxl_occ (occupation) |
Return the maximum orbital quantum number of occupied orbitals. | |
pure integer function, dimension(0:lmat), public | get_maxn_occ (occupation) |
Return the maximum principal quantum number of occupied orbitals. | |
pure subroutine, public | atom_denmat (pmat, wfn, nbas, occ, maxl, maxn) |
Calculate a density matrix using atomic orbitals. | |
subroutine, public | atom_density (density, pmat, basis, maxl, typ, rr) |
Map the electron density on an atomic radial grid. | |
subroutine, public | atom_write_zmp_restart (atom) |
ZMP subroutine to write external restart file. | |
subroutine, public | atom_read_zmp_restart (atom, doguess, iw) |
ZMP subroutine to read external restart file. | |
subroutine, public | atom_read_external_density (density, atom, iw) |
ZMP subroutine to read external density from linear grid of density matrix. | |
subroutine, public | atom_read_external_vxc (vxc, atom, iw) |
ZMP subroutine to read external v_xc in the atomic code. | |
pure subroutine, public | atom_orbital_charge (charge, wfn, rcov, l, basis) |
... | |
subroutine, public | atom_core_density (corden, potential, typ, rr) |
... | |
pure subroutine, public | atom_local_potential (locpot, gthpot, rr) |
... | |
pure subroutine, public | atom_orbital_max (rmax, wfn, rcov, l, basis) |
... | |
pure subroutine, public | atom_orbital_nodes (node, wfn, rcov, l, basis) |
... | |
pure subroutine, public | atom_wfnr0 (value, wfn, basis) |
... | |
subroutine, public | atom_solve (hmat, umat, orb, ener, nb, nv, maxl) |
Solve the generalised eigenproblem for every angular momentum. | |
subroutine, public | coulomb_potential_numeric (cpot, density, grid) |
Numerically compute the Coulomb potential on an atomic radial grid. | |
subroutine, public | coulomb_potential_analytic (cpot, pmat, basis, grid, maxl) |
Analytically compute the Coulomb potential on an atomic radial grid. | |
subroutine, public | exchange_numeric (kmat, state, occ, wfn, basis, hfx_pot) |
Calculate the exchange potential numerically. | |
subroutine, public | exchange_semi_analytic (kmat, state, occ, wfn, basis, hfx_pot) |
Calculate the exchange potential semi-analytically. | |
pure real(kind=dp) function, public | atom_trace (opmat, pmat) |
Compute Trace[opmat * pmat] == Trace[opmat * pmat^T] . | |
subroutine, public | numpot_matrix (imat, cpot, basis, derivatives) |
Calculate a potential matrix by integrating the potential on an atomic radial grid. | |
pure subroutine, public | ceri_contract (jmat, erint, pmat, nsize, all_nu) |
Contract Coulomb Electron Repulsion Integrals. | |
pure subroutine, public | eeri_contract (kmat, erint, pmat, nsize) |
Contract exchange Electron Repulsion Integrals. | |
pure subroutine, public | err_matrix (emat, demax, kmat, pmat, umat, upmat, nval, nbs) |
Calculate the error matrix for each angular momentum. | |
subroutine, public | slater_density (density1, density2, zcore, state, grid) |
Calculate Slater density on a radial grid. | |
pure subroutine, public | wigner_slater_functional (rho, vxc) |
Calculate the functional derivative of the Wigner (correlation) - Slater (exchange) density functional. | |
pure logical function, public | atom_consistent_method (method, multiplicity) |
Check that the atomic multiplicity is consistent with the electronic structure method. | |
subroutine, public | get_rho0 (atom, rho0) |
Calculate the total electron density at R=0. | |
subroutine, public | atom_condnumber (basis, crad, iw) |
Print condition numbers of the given atomic basis set. | |
subroutine, public | atom_completeness (basis, zv, iw) |
Estimate completeness of the given atomic basis set. | |
subroutine, public | atom_basis_condnum (basis, rad, cnum) |
Calculate the condition number of the given atomic basis set. | |
subroutine, public | contract2 (int, omat, cm) |
Transform a matrix expressed in terms of a uncontracted basis set to a contracted one. | |
subroutine, public | contract2add (int, omat, cm) |
Same as contract2(), but add the new contracted matrix to the old one instead of overwriting it. | |
subroutine, public | contract4 (eri, omat, cm1, cm2) |
Contract a matrix of Electron Repulsion Integrals (ERI-s). | |
Some basic routines for atomic calculations.
subroutine, public atom_utils::atom_set_occupation | ( | character(len=default_string_length), dimension(:), pointer | ostring, |
real(kind=dp), dimension(0:lmat, 10) | occupation, | ||
real(kind=dp), dimension(0:lmat, 10) | wfnocc, | ||
integer, intent(out), optional | multiplicity | ||
) |
Set occupation of atomic orbitals.
ostring | list of electronic states |
occupation | ... |
wfnocc | ... |
multiplicity | ... |
Definition at line 102 of file atom_utils.F.
pure integer function, public atom_utils::get_maxl_occ | ( | real(kind=dp), dimension(0:lmat, 10), intent(in) | occupation | ) |
Return the maximum orbital quantum number of occupied orbitals.
occupation | ... |
Definition at line 280 of file atom_utils.F.
pure integer function, dimension(0:lmat), public atom_utils::get_maxn_occ | ( | real(kind=dp), dimension(0:lmat, 10), intent(in) | occupation | ) |
Return the maximum principal quantum number of occupied orbitals.
occupation | ... |
Definition at line 300 of file atom_utils.F.
pure subroutine, public atom_utils::atom_denmat | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | pmat, |
real(kind=dp), dimension(:, :, 0:), intent(in) | wfn, | ||
integer, dimension(0:lmat), intent(in) | nbas, | ||
real(kind=dp), dimension(0:, :), intent(in) | occ, | ||
integer, intent(in) | maxl, | ||
integer, dimension(0:lmat), intent(in) | maxn | ||
) |
Calculate a density matrix using atomic orbitals.
pmat | electron density matrix |
wfn | atomic wavefunctions |
nbas | number of basis functions |
occ | occupation numbers |
maxl | maximum angular momentum to consider |
maxn | maximum principal quantum number for each angular momentum |
Definition at line 326 of file atom_utils.F.
subroutine, public atom_utils::atom_density | ( | real(kind=dp), dimension(:), intent(out) | density, |
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat, | ||
type(atom_basis_type), intent(in) | basis, | ||
integer, intent(in) | maxl, | ||
character(len=*), optional | typ, | ||
real(kind=dp), dimension(:), intent(in), optional | rr | ||
) |
Map the electron density on an atomic radial grid.
density | computed electron density |
pmat | electron density matrix |
basis | atomic basis set |
maxl | maximum angular momentum to consider |
typ | type of the matrix to map: RHO – density matrix; DER – first derivatives of the electron density; KIN – kinetic energy density; LAP – second derivatives of the electron density. |
rr | abscissa on the radial grid (required for typ == 'KIN') |
Definition at line 365 of file atom_utils.F.
subroutine, public atom_utils::atom_write_zmp_restart | ( | type(atom_type), intent(in) | atom | ) |
ZMP subroutine to write external restart file.
atom | information about the atomic kind |
Definition at line 422 of file atom_utils.F.
subroutine, public atom_utils::atom_read_zmp_restart | ( | type(atom_type), intent(inout) | atom, |
logical, intent(inout) | doguess, | ||
integer, intent(in) | iw | ||
) |
ZMP subroutine to read external restart file.
atom | information about the atomic kind |
doguess | flag that indicates that the restart file has not been read, so the initial guess is required |
iw | output file unit |
Definition at line 456 of file atom_utils.F.
subroutine, public atom_utils::atom_read_external_density | ( | real(kind=dp), dimension(:), intent(out) | density, |
type(atom_type), intent(inout) | atom, | ||
integer, intent(in) | iw | ||
) |
ZMP subroutine to read external density from linear grid of density matrix.
density | external density |
atom | information about the atomic kind |
iw | output file unit |
Definition at line 515 of file atom_utils.F.
subroutine, public atom_utils::atom_read_external_vxc | ( | real(kind=dp), dimension(:), intent(out) | vxc, |
type(atom_type), intent(inout) | atom, | ||
integer, intent(in) | iw | ||
) |
ZMP subroutine to read external v_xc in the atomic code.
vxc | external exchange-correlation potential |
atom | information about the atomic kind |
iw | output file unit |
Definition at line 606 of file atom_utils.F.
pure subroutine, public atom_utils::atom_orbital_charge | ( | real(kind=dp), intent(out) | charge, |
real(kind=dp), dimension(:), intent(in) | wfn, | ||
real(kind=dp), intent(in) | rcov, | ||
integer, intent(in) | l, | ||
type(atom_basis_type), intent(in) | basis | ||
) |
...
charge | ... |
wfn | ... |
rcov | ... |
l | ... |
basis | ... |
Definition at line 652 of file atom_utils.F.
subroutine, public atom_utils::atom_core_density | ( | real(kind=dp), dimension(:), intent(inout) | corden, |
type(atom_potential_type), intent(in) | potential, | ||
character(len=*), optional | typ, | ||
real(kind=dp), dimension(:), intent(in) | rr | ||
) |
...
corden | ... |
potential | ... |
typ | ... |
rr | ... |
Definition at line 692 of file atom_utils.F.
pure subroutine, public atom_utils::atom_local_potential | ( | real(kind=dp), dimension(:), intent(inout) | locpot, |
type(atom_gthpot_type), intent(in) | gthpot, | ||
real(kind=dp), dimension(:), intent(in) | rr | ||
) |
...
locpot | ... |
gthpot | ... |
rr | ... |
Definition at line 798 of file atom_utils.F.
pure subroutine, public atom_utils::atom_orbital_max | ( | real(kind=dp), intent(out) | rmax, |
real(kind=dp), dimension(:), intent(in) | wfn, | ||
real(kind=dp), intent(in) | rcov, | ||
integer, intent(in) | l, | ||
type(atom_basis_type), intent(in) | basis | ||
) |
...
rmax | ... |
wfn | ... |
rcov | ... |
l | ... |
basis | ... |
Definition at line 841 of file atom_utils.F.
pure subroutine, public atom_utils::atom_orbital_nodes | ( | integer, intent(out) | node, |
real(kind=dp), dimension(:), intent(in) | wfn, | ||
real(kind=dp), intent(in) | rcov, | ||
integer, intent(in) | l, | ||
type(atom_basis_type), intent(in) | basis | ||
) |
...
node | ... |
wfn | ... |
rcov | ... |
l | ... |
basis | ... |
Definition at line 880 of file atom_utils.F.
pure subroutine, public atom_utils::atom_wfnr0 | ( | real(kind=dp), intent(out) | value, |
real(kind=dp), dimension(:), intent(in) | wfn, | ||
type(atom_basis_type), intent(in) | basis | ||
) |
...
value | ... |
wfn | ... |
basis | ... |
Definition at line 915 of file atom_utils.F.
subroutine, public atom_utils::atom_solve | ( | real(kind=dp), dimension(:, :, 0:), intent(in) | hmat, |
real(kind=dp), dimension(:, :, 0:), intent(in) | umat, | ||
real(kind=dp), dimension(:, :, 0:), intent(inout) | orb, | ||
real(kind=dp), dimension(:, 0:), intent(inout) | ener, | ||
integer, dimension(0:), intent(in) | nb, | ||
integer, dimension(0:), intent(in) | nv, | ||
integer, intent(in) | maxl | ||
) |
Solve the generalised eigenproblem for every angular momentum.
hmat | Hamiltonian matrix |
umat | transformation matrix which reduces the overlap matrix to its unitary form |
orb | atomic wavefunctions |
ener | atomic orbital energies |
nb | number of contracted basis functions |
nv | number of linear-independent contracted basis functions |
maxl | maximum angular momentum to consider |
Definition at line 942 of file atom_utils.F.
subroutine, public atom_utils::coulomb_potential_numeric | ( | real(kind=dp), dimension(:), intent(inout) | cpot, |
real(kind=dp), dimension(:), intent(in) | density, | ||
type(grid_atom_type), intent(in) | grid | ||
) |
Numerically compute the Coulomb potential on an atomic radial grid.
cpot | Coulomb potential on the radial grid |
density | electron density on the radial grid |
grid | atomic radial grid |
Definition at line 1075 of file atom_utils.F.
subroutine, public atom_utils::coulomb_potential_analytic | ( | real(kind=dp), dimension(:), intent(inout) | cpot, |
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat, | ||
type(atom_basis_type), intent(in) | basis, | ||
type(grid_atom_type) | grid, | ||
integer, intent(in) | maxl | ||
) |
Analytically compute the Coulomb potential on an atomic radial grid.
cpot | Coulomb potential on the radial grid |
pmat | density matrix |
basis | atomic basis set |
grid | atomic radial grid |
maxl | maximum angular momentum to consider |
Definition at line 1113 of file atom_utils.F.
subroutine, public atom_utils::exchange_numeric | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | kmat, |
type(atom_state), intent(in) | state, | ||
real(kind=dp), dimension(0:, :), intent(in) | occ, | ||
real(kind=dp), dimension(:, :, :), pointer | wfn, | ||
type(atom_basis_type), intent(in) | basis, | ||
type(atom_hfx_type), intent(in) | hfx_pot | ||
) |
Calculate the exchange potential numerically.
kmat | Kohn-Sham matrix |
state | electronic state |
occ | occupation numbers |
wfn | wavefunctions |
basis | atomic basis set |
hfx_pot | potential parameters from Hartree-Fock section |
Definition at line 1218 of file atom_utils.F.
subroutine, public atom_utils::exchange_semi_analytic | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | kmat, |
type(atom_state), intent(in) | state, | ||
real(kind=dp), dimension(0:, :), intent(in) | occ, | ||
real(kind=dp), dimension(:, :, :), pointer | wfn, | ||
type(atom_basis_type), intent(in) | basis, | ||
type(atom_hfx_type), intent(in) | hfx_pot | ||
) |
Calculate the exchange potential semi-analytically.
kmat | Kohn-Sham matrix |
state | electronic state |
occ | occupation numbers |
wfn | wavefunctions |
basis | atomic basis set |
hfx_pot | properties of the Hartree-Fock potential |
Definition at line 1306 of file atom_utils.F.
pure real(kind=dp) function, public atom_utils::atom_trace | ( | real(kind=dp), dimension(:, :, 0:), intent(in) | opmat, |
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat | ||
) |
Compute Trace[opmat * pmat] == Trace[opmat * pmat^T] .
opmat | operator matrix (e.g. Kohn-Sham matrix or overlap matrix) |
pmat | density matrix |
Definition at line 1821 of file atom_utils.F.
subroutine, public atom_utils::numpot_matrix | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | imat, |
real(kind=dp), dimension(:), intent(in) | cpot, | ||
type(atom_basis_type), intent(inout) | basis, | ||
integer, intent(in) | derivatives | ||
) |
Calculate a potential matrix by integrating the potential on an atomic radial grid.
imat | potential matrix |
cpot | potential on the atomic radial grid |
basis | atomic basis set |
derivatives | order of derivatives |
Definition at line 1838 of file atom_utils.F.
pure subroutine, public atom_utils::ceri_contract | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | jmat, |
type(eri), dimension(:), intent(in) | erint, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat, | ||
integer, dimension(0:), intent(in) | nsize, | ||
logical, intent(in), optional | all_nu | ||
) |
Contract Coulomb Electron Repulsion Integrals.
jmat | ... |
erint | ... |
pmat | ... |
nsize | ... |
all_nu | ... |
Definition at line 1898 of file atom_utils.F.
pure subroutine, public atom_utils::eeri_contract | ( | real(kind=dp), dimension(:, :, 0:), intent(inout) | kmat, |
type(eri), dimension(:), intent(in) | erint, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat, | ||
integer, dimension(0:), intent(in) | nsize | ||
) |
Contract exchange Electron Repulsion Integrals.
kmat | ... |
erint | ... |
pmat | ... |
nsize | ... |
Definition at line 1972 of file atom_utils.F.
pure subroutine, public atom_utils::err_matrix | ( | real(kind=dp), dimension(:, :, 0:), intent(out) | emat, |
real(kind=dp), intent(out) | demax, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | kmat, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | pmat, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | umat, | ||
real(kind=dp), dimension(:, :, 0:), intent(in) | upmat, | ||
integer, dimension(0:), intent(in) | nval, | ||
integer, dimension(0:), intent(in) | nbs | ||
) |
Calculate the error matrix for each angular momentum.
emat | error matrix |
demax | the largest absolute value of error matrix elements |
kmat | Kohn-Sham matrix |
pmat | electron density matrix |
umat | transformation matrix which reduce overlap matrix to its unitary form |
upmat | transformation matrix which reduce density matrix to its unitary form |
nval | number of linear-independent contracted basis functions |
nbs | number of contracted basis functions |
Definition at line 2049 of file atom_utils.F.
subroutine, public atom_utils::slater_density | ( | real(kind=dp), dimension(:), intent(out) | density1, |
real(kind=dp), dimension(:), intent(out) | density2, | ||
integer, intent(in) | zcore, | ||
type(atom_state), intent(in) | state, | ||
type(grid_atom_type), intent(in) | grid | ||
) |
Calculate Slater density on a radial grid.
density1 | alpha-spin electron density |
density2 | beta-spin electron density |
zcore | nuclear charge |
state | electronic state |
grid | atomic radial grid |
Definition at line 2092 of file atom_utils.F.
pure subroutine, public atom_utils::wigner_slater_functional | ( | real(kind=dp), dimension(:), intent(in) | rho, |
real(kind=dp), dimension(:), intent(out) | vxc | ||
) |
Calculate the functional derivative of the Wigner (correlation) - Slater (exchange) density functional.
rho | electron density on a radial grid |
vxc | (output) exchange-correlation potential |
Definition at line 2157 of file atom_utils.F.
pure logical function, public atom_utils::atom_consistent_method | ( | integer, intent(in) | method, |
integer, intent(in) | multiplicity | ||
) |
Check that the atomic multiplicity is consistent with the electronic structure method.
method | electronic structure method |
multiplicity | multiplicity |
Definition at line 2187 of file atom_utils.F.
subroutine, public atom_utils::get_rho0 | ( | type(atom_type), intent(in) | atom, |
real(kind=dp), intent(out) | rho0 | ||
) |
Calculate the total electron density at R=0.
atom | information about the atomic kind |
rho0 | (output) computed density |
Definition at line 2217 of file atom_utils.F.
subroutine, public atom_utils::atom_condnumber | ( | type(atom_basis_type), pointer | basis, |
real(kind=dp) | crad, | ||
integer, intent(in) | iw | ||
) |
Print condition numbers of the given atomic basis set.
basis | atomic basis set |
crad | atomic covalent radius |
iw | output file unit |
Definition at line 2308 of file atom_utils.F.
subroutine, public atom_utils::atom_completeness | ( | type(atom_basis_type), pointer | basis, |
integer, intent(in) | zv, | ||
integer, intent(in) | iw | ||
) |
Estimate completeness of the given atomic basis set.
basis | atomic basis set |
zv | atomic number |
iw | output file unit |
Definition at line 2343 of file atom_utils.F.
subroutine, public atom_utils::atom_basis_condnum | ( | type(atom_basis_type) | basis, |
real(kind=dp), intent(in) | rad, | ||
real(kind=dp), intent(out) | cnum | ||
) |
Calculate the condition number of the given atomic basis set.
basis | atomic basis set |
rad | lattice constant (e.g. doubled atomic covalent radius) |
cnum | (output) condition number |
Definition at line 2478 of file atom_utils.F.
subroutine, public atom_utils::contract2 | ( | real(dp), dimension(:, :), intent(inout) | int, |
real(dp), dimension(:, :), intent(in) | omat, | ||
real(dp), dimension(:, :), intent(in) | cm | ||
) |
Transform a matrix expressed in terms of a uncontracted basis set to a contracted one.
int | (output) contracted matrix |
omat | uncontracted matrix |
cm | matrix of contraction coefficients |
Definition at line 2611 of file atom_utils.F.
subroutine, public atom_utils::contract2add | ( | real(dp), dimension(:, :), intent(inout) | int, |
real(dp), dimension(:, :), intent(in) | omat, | ||
real(dp), dimension(:, :), intent(in) | cm | ||
) |
Same as contract2(), but add the new contracted matrix to the old one instead of overwriting it.
int | (input/output) contracted matrix to be updated |
omat | uncontracted matrix |
cm | matrix of contraction coefficients |
Definition at line 2637 of file atom_utils.F.
subroutine, public atom_utils::contract4 | ( | real(dp), dimension(:, :), intent(inout) | eri, |
real(dp), dimension(:, :), intent(in) | omat, | ||
real(dp), dimension(:, :), intent(in) | cm1, | ||
real(dp), dimension(:, :), intent(in) | cm2 | ||
) |
Contract a matrix of Electron Repulsion Integrals (ERI-s).
eri | (output) contracted ERI-s |
omat | uncontracted ERI-s |
cm1 | first matrix of contraction coefficients |
cm2 | second matrix of contraction coefficients |
Definition at line 2663 of file atom_utils.F.