PROGRESS  master
prg_xlbokernel_mod Module Reference

Pre-conditioned O(N) calculation of the kernel for XL-BOMD. More...

Functions/Subroutines

subroutine invert (A, AI, N)
 
subroutine, public prg_kernel_multirank_latte (KRes, KK0_bml, Res, FelTol, L, LMAX, NUMRANK, HO_bml, mu, beta, RXYZ, Box, Hubbard_U, Element_Pointer, Nr_atoms, HDIM, Max_Nr_Neigh, Coulomb_acc, nebcoul, totnebcoul, Hinxlist, S_bml, Z_bml, Nocc, Inv_bml, H1_bml, DO_bml, D1_bml, m_rec, threshold, Nr_elem, mdstep, update)
 Compute low rank approximation of (K0*J)^(-1)*K0*(q[n]-n)(for LATTE) More...
 
subroutine prg_update_preconditioner (K0, v, fv, Nr_atoms, threshold)
 
subroutine, public prg_kernel_multirank (KRes, KK0_bml, Res, FelTol, L, LMAX, HO_bml, mu, beta, RX, RY, RZ, LBox, Hubbard_U, Element_Type, Nr_atoms, HDIM, Max_Nr_Neigh, Coulomb_acc, TIMERATIO, nnRx, nnRy, nnRz, nrnnlist, nnType, H_INDEX_START, H_INDEX_END, S_bml, Z_bml, Nocc, Znuc, Inv_bml, H1_bml, X_bml, Y_bml, DO_bml, D1_bml, m_rec, threshold)
 
subroutine, public prg_full_kernel_latte (KK, DO_bml, mu0, RXYZ, Box, Hubbard_U, Element_Pointer, Nr_atoms, HDIM, Max_Nr_Neigh, Coulomb_acc, Hinxlist, S_bml, Z_bml, Inv_bml, D1_bml, H1_bml, HO_bml, Nocc, m_rec, threshold, beta, Nr_elem, nebcoul, totnebcoul)
 Compute full inverse Jacobian of q[n]-n (for LATTE) More...
 
subroutine, public prg_full_kernel (KK, DO_bml, mu0, RX, RY, RZ, LBox, Hubbard_U, Element_Type, Nr_atoms, HDIM, Max_Nr_Neigh, Coulomb_acc, TIMERATIO, nnRx, nnRy, nnRz, nrnnlist, nnType, H_INDEX_START, H_INDEX_END, S_bml, Z_bml, Inv_bml, D1_bml, H1_bml, HO_bml, Y_bml, X_bml, Nocc, Znuc, m_rec, threshold, beta, diagonal)
 Compute full inverse Jacobian of q[n]-n (for development code) More...
 
subroutine, public prg_kernel_matrix_multirank (KRes, KK0_bml, Res, FelTol, L, LMAX, HO_bml, mu, beta, RX, RY, RZ, LBox, Hubbard_U, Element_Type, Nr_atoms, HDIM, Max_Nr_Neigh, Coulomb_acc, TIMERATIO, nnRx, nnRy, nnRz, nrnnlist, nnType, H_INDEX_START, H_INDEX_END, S_bml, Z_bml, Nocc, Znuc, Inv_bml, H1_bml, X_bml, Y_bml, DO_bml, D1_bml, m_rec, threshold)
 

Variables

integer, parameter dp = kind(1.0d0)
 

Detailed Description

Pre-conditioned O(N) calculation of the kernel for XL-BOMD.

Here are subroutines implementing Niklasson's scheme for low-rank, Krylov subspace approximation of the kernel.

Function/Subroutine Documentation

◆ invert()

subroutine prg_xlbokernel_mod::invert ( real(prec), dimension(n,n), intent(in)  A,
real(prec), dimension(n,n), intent(out)  AI,
integer, intent(in)  N 
)
private

Definition at line 30 of file prg_xlbokernel_mod.F90.

◆ prg_full_kernel()

subroutine, public prg_xlbokernel_mod::prg_full_kernel ( real(prec), dimension(nr_atoms,nr_atoms), intent(out)  KK,
type(bml_matrix_t), intent(inout)  DO_bml,
real(prec), intent(inout)  mu0,
real(prec), dimension(nr_atoms), intent(in)  RX,
real(prec), dimension(nr_atoms), intent(in)  RY,
real(prec), dimension(nr_atoms), intent(in)  RZ,
real(prec), dimension(3), intent(in)  LBox,
real(prec), dimension(nr_atoms), intent(in)  Hubbard_U,
character(10), dimension(nr_atoms), intent(in)  Element_Type,
integer, intent(in)  Nr_atoms,
integer, intent(in)  HDIM,
integer, intent(in)  Max_Nr_Neigh,
real(prec), intent(in)  Coulomb_acc,
real(prec), intent(in)  TIMERATIO,
real(prec), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRx,
real(prec), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRy,
real(prec), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRz,
integer, dimension(nr_atoms), intent(in)  nrnnlist,
integer, dimension(nr_atoms,max_nr_neigh), intent(in)  nnType,
integer, dimension(nr_atoms), intent(in)  H_INDEX_START,
integer, dimension(nr_atoms), intent(in)  H_INDEX_END,
type(bml_matrix_t), intent(in)  S_bml,
type(bml_matrix_t), intent(in)  Z_bml,
type(bml_matrix_t), dimension(m_rec), intent(in)  Inv_bml,
type(bml_matrix_t), intent(inout)  D1_bml,
type(bml_matrix_t), intent(inout)  H1_bml,
type(bml_matrix_t), intent(in)  HO_bml,
type(bml_matrix_t), intent(inout)  Y_bml,
type(bml_matrix_t), intent(inout)  X_bml,
integer, intent(in)  Nocc,
real(prec), dimension(nr_atoms), intent(in)  Znuc,
integer, intent(in)  m_rec,
real(prec), intent(in)  threshold,
real(prec), intent(in)  beta,
real(prec), dimension(hdim), intent(inout)  diagonal 
)

Compute full inverse Jacobian of q[n]-n (for development code)

Parameters
KKThe inverse Jacobian.
DO_bmlOrthogonalized density matrix.
mu0The chemical potiential.
RX,RY,RZNuclear coordinates.
LboxBox dimensions.
Hubbard_UHubbard U list.
Element_TypeList to keep track of elements.
Nr_atomsThe number of atoms.
HDIMHamiltonian matrix dimension.
Max_Nr_NeighMax neighbours for Ewald.
Coulomb_accCoulomb accuracy
TIMERATIOParameter for Ewald
nnRx,nnRy,nnRzNeighbour lists.
nrnnlistNumber of neighbours list.
nnTypeRefers to original order of atoms.
H_INDEX_START,H_INDEX_ENDLists to keep track of atomic positions in the Hamiltonian.
S_bmlThe S matrix.
Z_bml,TheZ matrix.
Inv_bml,Inversesgenerated by prg_implicit_fermi_save_inverse.
HO_bml,OrthogonalizedHamiltonian matrix.
D1_bml,H1_bml,Y_bml,X_bmlAuxillary matrices.
NoccOccupation.
ZnucList of nuclear charges.
m_recNumber of recursion steps.
thresholdThreshold value for matrix truncation.
betaScaled inverse temperature.
diagonalAuxillary vector.

Definition at line 680 of file prg_xlbokernel_mod.F90.

◆ prg_full_kernel_latte()

subroutine, public prg_xlbokernel_mod::prg_full_kernel_latte ( real(prec), dimension(nr_atoms,nr_atoms), intent(out)  KK,
type(bml_matrix_t), intent(inout)  DO_bml,
real(prec), intent(inout)  mu0,
real(prec), dimension(3,nr_atoms), intent(in)  RXYZ,
real(prec), dimension(3,3), intent(in)  Box,
real(prec), dimension(nr_elem), intent(in)  Hubbard_U,
integer, dimension(nr_atoms), intent(in)  Element_Pointer,
integer, intent(in)  Nr_atoms,
integer, intent(in)  HDIM,
integer, intent(in)  Max_Nr_Neigh,
real(prec), intent(in)  Coulomb_acc,
integer, dimension(hdim), intent(in)  Hinxlist,
type(bml_matrix_t), intent(in)  S_bml,
type(bml_matrix_t), intent(in)  Z_bml,
type(bml_matrix_t), dimension(m_rec), intent(in)  Inv_bml,
type(bml_matrix_t), intent(inout)  D1_bml,
type(bml_matrix_t), intent(inout)  H1_bml,
type(bml_matrix_t), intent(in)  HO_bml,
real(prec), intent(in)  Nocc,
integer, intent(in)  m_rec,
real(prec), intent(in)  threshold,
real(prec), intent(in)  beta,
integer, intent(in)  Nr_elem,
integer, dimension(4,max_nr_neigh,nr_atoms), intent(in)  nebcoul,
integer, dimension(nr_atoms), intent(in)  totnebcoul 
)

Compute full inverse Jacobian of q[n]-n (for LATTE)

Parameters
KKThe inverse Jacobian.
DO_bmlOrthogonalized density matrix.
mu0The chemical potiential.
RXYZNuclear coordinates.
BoxBox dimensions.
Hubbard_UHubbard U list.
Element_PointerList to keep track of elements.
Nr_atomsThe number of atoms.
HDIMHamiltonian matrix dimension.
Max_Nr_NeighMax neighbours for Ewald.
Coulomb_accCoulomb accuracy
HinxlistList to keep track of atomic positions in the Hamiltonian.
S_bmlThe S matrix.
Z_bml,TheZ matrix.
Inv_bml,Inversesgenerated by prg_implicit_fermi_save_inverse.
HO_bml,OrthogonalizedHamiltonian matrix.
D1_bml,H1_bml,Y_bml,X_bmlAuxillary matrices.
NoccOccupation.
m_recNumber of recursion steps.
thresholdThreshold value for matrix truncation.
betaScaled inverse temperature.
Nr_elemNumber of elements in Hubbard list.

Definition at line 511 of file prg_xlbokernel_mod.F90.

◆ prg_kernel_matrix_multirank()

subroutine, public prg_xlbokernel_mod::prg_kernel_matrix_multirank ( real(dp), dimension(nr_atoms), intent(out)  KRes,
type(bml_matrix_t), intent(inout)  KK0_bml,
real(dp), dimension(nr_atoms), intent(in)  Res,
real(dp), intent(in)  FelTol,
integer, intent(out)  L,
integer, intent(in)  LMAX,
type(bml_matrix_t), intent(in)  HO_bml,
real(dp), intent(in)  mu,
real(dp), intent(in)  beta,
real(dp), dimension(nr_atoms), intent(in)  RX,
real(dp), dimension(nr_atoms), intent(in)  RY,
real(dp), dimension(nr_atoms), intent(in)  RZ,
real(dp), dimension(3), intent(in)  LBox,
real(dp), dimension(nr_atoms), intent(in)  Hubbard_U,
character(10), dimension(nr_atoms), intent(in)  Element_Type,
integer, intent(in)  Nr_atoms,
integer, intent(in)  HDIM,
integer, intent(in)  Max_Nr_Neigh,
real(dp), intent(in)  Coulomb_acc,
real(dp), intent(in)  TIMERATIO,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRx,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRy,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRz,
integer, dimension(nr_atoms), intent(in)  nrnnlist,
integer, dimension(nr_atoms,max_nr_neigh), intent(in)  nnType,
integer, dimension(nr_atoms), intent(in)  H_INDEX_START,
integer, dimension(nr_atoms), intent(in)  H_INDEX_END,
type(bml_matrix_t), intent(in)  S_bml,
type(bml_matrix_t), intent(in)  Z_bml,
real(dp), intent(in)  Nocc,
real(dp), dimension(nr_atoms), intent(in)  Znuc,
type(bml_matrix_t), dimension(m_rec), intent(in)  Inv_bml,
type(bml_matrix_t), intent(inout)  H1_bml,
type(bml_matrix_t), intent(inout)  X_bml,
type(bml_matrix_t), intent(inout)  Y_bml,
type(bml_matrix_t), intent(inout)  DO_bml,
type(bml_matrix_t), intent(inout)  D1_bml,
integer, intent(in)  m_rec,
real(dp), intent(in)  threshold 
)

Definition at line 786 of file prg_xlbokernel_mod.F90.

◆ prg_kernel_multirank()

subroutine, public prg_xlbokernel_mod::prg_kernel_multirank ( real(dp), dimension(nr_atoms), intent(inout)  KRes,
type(bml_matrix_t), intent(in)  KK0_bml,
real(dp), dimension(nr_atoms), intent(in)  Res,
real(dp), intent(in)  FelTol,
integer, intent(out)  L,
integer, intent(in)  LMAX,
type(bml_matrix_t), intent(in)  HO_bml,
real(dp), intent(in)  mu,
real(dp), intent(in)  beta,
real(dp), dimension(nr_atoms), intent(in)  RX,
real(dp), dimension(nr_atoms), intent(in)  RY,
real(dp), dimension(nr_atoms), intent(in)  RZ,
real(dp), dimension(3), intent(in)  LBox,
real(dp), dimension(nr_atoms), intent(in)  Hubbard_U,
character(10), dimension(nr_atoms), intent(in)  Element_Type,
integer, intent(in)  Nr_atoms,
integer, intent(in)  HDIM,
integer, intent(in)  Max_Nr_Neigh,
real(dp), intent(in)  Coulomb_acc,
real(dp), intent(in)  TIMERATIO,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRx,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRy,
real(dp), dimension(nr_atoms,max_nr_neigh), intent(in)  nnRz,
integer, dimension(nr_atoms), intent(in)  nrnnlist,
integer, dimension(nr_atoms,max_nr_neigh), intent(in)  nnType,
integer, dimension(nr_atoms), intent(in)  H_INDEX_START,
integer, dimension(nr_atoms), intent(in)  H_INDEX_END,
type(bml_matrix_t), intent(in)  S_bml,
type(bml_matrix_t), intent(in)  Z_bml,
integer, intent(in)  Nocc,
real(dp), dimension(nr_atoms), intent(in)  Znuc,
type(bml_matrix_t), dimension(m_rec), intent(in)  Inv_bml,
type(bml_matrix_t), intent(inout)  H1_bml,
type(bml_matrix_t), intent(inout)  X_bml,
type(bml_matrix_t), intent(inout)  Y_bml,
type(bml_matrix_t), intent(inout)  DO_bml,
type(bml_matrix_t), intent(inout)  D1_bml,
integer, intent(in)  m_rec,
real(dp), intent(in)  threshold 
)

Definition at line 334 of file prg_xlbokernel_mod.F90.

◆ prg_kernel_multirank_latte()

subroutine, public prg_xlbokernel_mod::prg_kernel_multirank_latte ( real(dp), dimension(nr_atoms), intent(inout)  KRes,
type(bml_matrix_t), intent(inout)  KK0_bml,
real(dp), dimension(nr_atoms), intent(in)  Res,
real(dp), intent(in)  FelTol,
integer, intent(out)  L,
integer, intent(in)  LMAX,
integer, intent(in)  NUMRANK,
type(bml_matrix_t), intent(inout)  HO_bml,
real(dp), intent(in)  mu,
real(dp), intent(in)  beta,
real(dp), dimension(3,nr_atoms), intent(in)  RXYZ,
real(dp), dimension(3,3), intent(in)  Box,
real(dp), dimension(nr_elem), intent(in)  Hubbard_U,
integer, dimension(nr_atoms), intent(in)  Element_Pointer,
integer, intent(in)  Nr_atoms,
integer, intent(in)  HDIM,
integer, intent(in)  Max_Nr_Neigh,
real(dp), intent(in)  Coulomb_acc,
integer, dimension(4,max_nr_neigh,nr_atoms), intent(in)  nebcoul,
integer, dimension(nr_atoms), intent(in)  totnebcoul,
integer, dimension(hdim), intent(in)  Hinxlist,
type(bml_matrix_t), intent(inout)  S_bml,
type(bml_matrix_t), intent(inout)  Z_bml,
real(dp), intent(in)  Nocc,
type(bml_matrix_t), dimension(m_rec), intent(inout)  Inv_bml,
type(bml_matrix_t), intent(inout)  H1_bml,
type(bml_matrix_t), intent(inout)  DO_bml,
type(bml_matrix_t), intent(inout)  D1_bml,
integer, intent(in)  m_rec,
real(dp), intent(in)  threshold,
integer, intent(in)  Nr_elem,
integer, intent(in)  mdstep,
integer, intent(in)  update 
)

Compute low rank approximation of (K0*J)^(-1)*K0*(q[n]-n)(for LATTE)

Parameters
KResThe low rank approximation
KK0_bmlThe pre-conditioner K0.
ResThe residual q[n]-n
FelTolRelative error tolerance for approximation
LNumber of vectors used.
LMAXMaximum nr of vectors to use.
NUMRANKNr of vectors to use.
HO_bml,OrthogonalizedHamiltonian matrix.
muThe chemical potiential.
betaScaled inverse temperature.
RXYZNuclear coordinates.
BoxBox dimensions.
Hubbard_UHubbard U list.
Element_PointerList to keep track of elements.
Nr_atomsThe number of atoms.
HDIMHamiltonian matrix dimension.
Max_Nr_NeighMax neighbours for Ewald.
Coulomb_accCoulomb accuracy.
nebcoulNeighbour lists.
totnebcoulNumber of neighbours list.
HinxlistList to keep track of atomic positions in the Hamiltonian.
S_bmlThe S matrix.
Z_bml,TheZ matrix.
NoccOccupation.
Inv_bml,Inversesgenerated by prg_implicit_fermi_save_inverse.
DO_bml,D1_bml,H1_bml,Y_bml,X_bmlAuxillary matrices.
m_recNumber of recursion steps.
thresholdThreshold value for matrix truncation.
Nr_elemNumber of elements in Hubbard list.

Definition at line 84 of file prg_xlbokernel_mod.F90.

◆ prg_update_preconditioner()

subroutine prg_xlbokernel_mod::prg_update_preconditioner ( type(bml_matrix_t), intent(inout)  K0,
real(dp), dimension(nr_atoms), intent(in)  v,
real(dp), dimension(nr_atoms), intent(in)  fv,
integer, intent(in)  Nr_atoms,
real(dp), intent(in)  threshold 
)
private

Definition at line 265 of file prg_xlbokernel_mod.F90.

Variable Documentation

◆ dp

integer, parameter prg_xlbokernel_mod::dp = kind(1.0d0)
private

Definition at line 20 of file prg_xlbokernel_mod.F90.