scf Module


Uses

  • module~~scf~~UsesGraph module~scf scf module~precision precision module~scf->module~precision iso_fortran_env iso_fortran_env module~precision->iso_fortran_env

Used by

  • module~~scf~~UsedByGraph module~scf scf proc~hf_energy hf_energy proc~hf_energy->module~scf

Variables

Type Visibility Attributes Name Initial
character(len=*), public, parameter :: module_name = "scf"

Subroutines

public subroutine scf_driver(basis, infos, molGrid)

Arguments

Type IntentOptional Attributes Name
type(basis_set), intent(in) :: basis
type(information), intent(inout), target :: infos
type(dft_grid_t), intent(in) :: molGrid

public subroutine print_scf_energy(psinrm, ehf1, enuclear, etot, vee, vne, vnn, vtot, tkin, virial)

Arguments

Type IntentOptional Attributes Name
real(kind=dp) :: psinrm
real(kind=dp) :: ehf1
real(kind=dp) :: enuclear
real(kind=dp) :: etot
real(kind=dp) :: vee
real(kind=dp) :: vne
real(kind=dp) :: vnn
real(kind=dp) :: vtot
real(kind=dp) :: tkin
real(kind=dp) :: virial

public subroutine form_rohf_fock(fock_a_ao, fock_b_ao, fock_mo, MOs, overlap_tri, work, nocca, noccb, nbf, vshift)

@brief Form the ROHF Fock matrix in MO basis.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), dimension(:) :: fock_a_ao
real(kind=dp), intent(inout), dimension(:) :: fock_b_ao
real(kind=dp), intent(out), dimension(:) :: fock_mo
real(kind=dp), intent(in), dimension(:,:) :: MOs
real(kind=dp), intent(in), dimension(:) :: overlap_tri
real(kind=dp), intent(out), dimension(:) :: work
integer, intent(in) :: nocca
integer, intent(in) :: noccb
integer, intent(in) :: nbf
real(kind=dp), intent(in) :: vshift

public subroutine mo_to_ao(fao, fmo, s, v, nmo, nbf)

@brief Back-transform a symmetric operator Fmo expressed in the MO basis V to the AO basis @detail compute the transformation: Fao = S*V * Fmo * (SV)^T

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out) :: fao(*)
real(kind=dp), intent(in) :: fmo(*)
real(kind=dp), intent(in) :: s(*)
real(kind=dp), intent(in) :: v(*)
integer, intent(in) :: nmo
integer, intent(in) :: nbf

public subroutine fock_jk(basis, d, f, scalefactor, infos)

Arguments

Type IntentOptional Attributes Name
type(basis_set), intent(in) :: basis
real(kind=dp), intent(in), target :: d(:,:)
real(kind=dp), intent(inout) :: f(:,:)
real(kind=dp), intent(in), optional :: scalefactor
type(information), intent(inout) :: infos

public subroutine mo_reorder(infos, Va, Ea, Vb, Eb, Sq)

Arguments

Type IntentOptional Attributes Name
type(information), intent(inout) :: infos
real(kind=dp), intent(inout), dimension(:,:) :: Va
real(kind=dp), intent(inout), dimension(:) :: Ea
real(kind=dp), intent(inout), dimension(:,:) :: Vb
real(kind=dp), intent(inout), dimension(:) :: Eb
real(kind=dp), intent(in), dimension(:,:) :: Sq

public subroutine pfon_occupations(mo_energy, nbf, nelec, occ, beta_pfon, scf_type, nsmear, is_beta, nelec_a, nelec_b)

@brief pFON Implementation in SCF Module Author: Alireza Lashkaripour Date: January 2025 Reference paper: https://doi.org/10.1063/1.478177 This subroutine incorporates the Partial Fractional Occupation Number (pFON) method into SCF calculations, ensuring smooth occupation numbers using Fermi-Dirac distribution. It dynamically adjusts temperature and beta factors to enhance SCF convergence, particularly for near-degenerate states.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: mo_energy(nbf)
integer, intent(in) :: nbf
integer, intent(in) :: nelec
real(kind=dp), intent(inout) :: occ(nbf)
real(kind=dp), intent(in) :: beta_pfon
integer, intent(in) :: scf_type
integer, intent(in) :: nsmear
logical, intent(in), optional :: is_beta
integer, intent(in), optional :: nelec_a
integer, intent(in), optional :: nelec_b

public subroutine build_pfon_density(pdmat, mo_a, mo_b, occ_a, occ_b, scf_type, nbf, nelec_a, nelec_b)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: pdmat(:,:)
real(kind=dp), intent(in) :: mo_a(:,:)
real(kind=dp), intent(in) :: mo_b(:,:)
real(kind=dp), intent(in) :: occ_a(:)
real(kind=dp), intent(in) :: occ_b(:)
integer, intent(in) :: scf_type
integer, intent(in) :: nbf
integer, intent(in) :: nelec_a
integer, intent(in) :: nelec_b

public subroutine reordermos(V, E, Smo, l0, nbf, lr1, lr2)

@brief This routine reorders orbitals to maximum overlap.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), dimension(nbf,*) :: V
real(kind=dp), intent(in), dimension(*) :: E
real(kind=dp), intent(in), dimension(l0,*) :: Smo
integer :: l0
integer :: nbf
integer :: lr1
integer :: lr2