wavefunction Module

All about wavefunctions (actually orbitals) for the molecular system written by Yajiang Hao in 2014 editted by Ludger Inhester, Kota Hanasaki, Sang-Kil Son in 2014-2015

USAGE: type(WF_data) :: F call construct_WF_data( P, A, G, B, F ) ! create F call SCF_procedure( P, A, G, B, F ) ! calculate MO and E (in scf.f90) call calculate_gradient( P, A, G, B, F ) ! calculate grad. (in gradient.f90)

WF_data contains all information of SCF results. The main quantities are: - total energy = F%E_tot - molecular orbitals: stored in F%LC(:,:) - orbital energies: stored in F%CE(:) - gradients: stored in F%grad(:)



Derived Types

type, public ::  wf_data

wave function data

Components

Type Visibility Attributes Name Initial
integer, public :: n_nuc
integer, public :: n_basis
integer, public :: nr_basis
integer, public :: n_grid
integer, public :: n_mo
integer, public :: homo_idx
integer, public :: nopen
integer, public :: multp
integer, public :: csf_num
real(kind=long), public, allocatable :: fidelity(:)
real(kind=long), public, allocatable :: fidelityb(:)
integer, public, allocatable :: n_occ(:)
integer, public, allocatable :: n_occ_old(:)
integer, public, allocatable :: irrep_mo(:)
integer, public :: state_irrep
real(kind=long), public, allocatable :: f_occ(:)
real(kind=long), public, allocatable :: d(:,:)
real(kind=long), public, allocatable :: d_old(:,:)
real(kind=long), public, allocatable :: d_old2(:,:)
real(kind=long), public, allocatable :: ce(:)
real(kind=long), public, allocatable :: lc(:,:)
real(kind=long), public, allocatable :: h(:,:)
real(kind=long), public, allocatable :: h0(:,:)
real(kind=long), public, allocatable :: h0_mo(:,:)
real(kind=long), public, allocatable :: h_old(:,:)
real(kind=long), public, allocatable :: levelshift(:)
integer, public, allocatable :: n_occ_a(:)
integer, public, allocatable :: n_occ_b(:)
real(kind=long), public, allocatable :: f_occ_a(:)
real(kind=long), public, allocatable :: f_occ_b(:)
real(kind=long), public, allocatable :: h_a(:,:)
real(kind=long), public, allocatable :: h_b(:,:)
real(kind=long), public, allocatable :: lc_a(:,:)
real(kind=long), public, allocatable :: lc_b(:,:)
real(kind=long), public, allocatable :: ce_a(:)
real(kind=long), public, allocatable :: ce_b(:)
real(kind=long), public, allocatable :: d_a(:,:)
real(kind=long), public, allocatable :: d_b(:,:)
real(kind=long), public, allocatable :: d_old_a(:,:)
real(kind=long), public, allocatable :: d_old_b(:,:)
real(kind=long), public, allocatable :: h_old_a(:,:)
real(kind=long), public, allocatable :: h_old_b(:,:)
real(kind=long), public, allocatable :: focka(:,:)
real(kind=long), public, allocatable :: fockb(:,:)
real(kind=long), public, allocatable :: da(:,:)
real(kind=long), public, allocatable :: db(:,:)
real(kind=long), public, allocatable :: errsave(:,:,:)
real(kind=long), public, allocatable :: hsave(:,:,:)
integer, public :: nsave = 0
real(kind=long), public, allocatable :: dsave(:,:,:)
real(kind=long), public, allocatable :: v_jsave(:,:)
real(kind=long), public, allocatable :: rho(:)
real(kind=long), public, allocatable :: rho_old(:)
real(kind=long), public, allocatable :: v_eff(:)
real(kind=long), public, allocatable :: v_old(:)
real(kind=long), public, allocatable :: v_ext(:)
real(kind=long), public, allocatable :: v_j(:)
real(kind=long), public, allocatable :: v_xc(:)
real(kind=long), public, allocatable :: v_xc_old(:)
real(kind=long), public, allocatable :: spin_density(:)
real(kind=long), public, allocatable :: v_xc_a(:)
real(kind=long), public, allocatable :: v_xc_b(:)
real(kind=long), public, allocatable :: v_eff_a(:)
real(kind=long), public, allocatable :: v_eff_b(:)
real(kind=long), public, allocatable :: rho_ini(:)
real(kind=long), public, allocatable :: lc_ini(:,:)
real(kind=long), public, allocatable :: lc_ini_b(:,:)
real(kind=long), public, allocatable :: basis_ini(:,:)
real(kind=long), public, allocatable :: strans(:,:)
real(kind=long), public :: e
real(kind=long), public :: e_old
real(kind=long), public :: e_old2
real(kind=long), public :: d_rho
real(kind=long), public :: d_rho_old
real(kind=long), public :: e_nuc
real(kind=long), public :: e_tot
real(kind=long), public :: e_ext
real(kind=long), public :: e_j
real(kind=long), public :: e_x
real(kind=long), public :: e_c
real(kind=long), public :: e_xc_int
real(kind=long), public :: e_ts
real(kind=long), public :: e_sum_orb
real(kind=long), public :: chem_pot
real(kind=long), public :: e_long_range(3)
real(kind=long), public, allocatable :: partial_charge(:)
real(kind=long), public, allocatable :: q_a(:)
real(kind=long), public, allocatable :: dipole_a(:,:)
logical, public :: switch_diis_on
logical, public :: switch_rstrct_on
logical, public :: switch_levelshift_off
logical, public :: switch_soscf_on
logical, public :: yes_mom
real(kind=long), public, allocatable :: grad(:)
integer(kind=1), public :: iscfstate = 0
integer, public :: ierr_o
integer, public :: n_iter_o
real(kind=long), public :: avgsqrovlp_w_refmo_o
real(kind=long), public :: prod_overlap
real(kind=long), public, allocatable :: partialpopulation_m(:)
real(kind=long), public, allocatable :: partialpopulation_l(:)
real(kind=long), public, allocatable :: partialpopulation_g(:)
real(kind=long), public, allocatable :: partialpopulation_g1(:)
real(kind=long), public, allocatable :: omin(:,:)
real(kind=long), public, allocatable :: smin(:,:)
integer, public, allocatable :: min_info(:,:)
real(kind=long), public, allocatable :: ce_grad(:,:)
logical, public :: f_occ_given

XXX real(long),allocatable :: partialPopulation(:) ! Loewdin or Mulliken population. Removed on 28.07.2015 to replace with 4 types of charges

integer, public, allocatable :: acceptable_convergenceat(:,:)
logical, public, allocatable :: apply_looser_threshold(:,:)
type(average_occ), public, allocatable :: av_occ(:)
real(kind=long), public, allocatable :: p_not_frozen(:,:)
integer, public, allocatable :: frozen_mo(:)
real(kind=long), public :: random_scale
real(kind=long), public, allocatable :: teint(:)
real(kind=long), public, allocatable :: teint_three_active(:)
real(kind=long), public, allocatable :: teint_abij(:)
real(kind=long), public, allocatable :: teint_abcd(:)
real(kind=long), public, allocatable :: teint_aibj(:)
real(kind=long), public, allocatable :: teint_ccij(:)
real(kind=long), public, allocatable :: teint_cicj(:)
real(kind=long), public, allocatable :: teint_cdij(:)
real(kind=long), public, allocatable :: teint_cidj(:)
real(kind=long), public, allocatable :: teint_cdei(:)
integer, public :: ncore
real(kind=long), public, allocatable :: e_cis(:)
real(kind=long), public, allocatable :: c_cis(:,:)
real(kind=long), public, allocatable :: c_cis_old(:,:)
real(kind=long), public, allocatable :: lc_old(:,:)
integer, public, allocatable :: cis_excitation(:,:)
logical, public :: yes_calculate_ci_overlap
logical, public :: yes_reinit
real(kind=long), public, allocatable :: e_ci(:)
real(kind=long), public, allocatable :: c_ci(:,:)
real(kind=long), public, allocatable :: o_ci(:,:)
real(kind=long), public, allocatable :: occ_overlap(:)
integer, public, allocatable :: occs_ci(:,:)
real(kind=long), public, allocatable :: d_ci(:,:)
integer, public :: state
logical, public :: yes_converged

Functions

public function random_gaussian() result(rn)

Arguments

None

Return Value real(kind=long)


Subroutines

public subroutine construct_wf_data(p, a, g, b, f)

create WF_data from P, A, G, and B

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(grid3d), intent(in) :: g
type(basis), intent(in) :: b
type(wf_data), intent(out) :: f

public subroutine adapt_wf_nr_basis(b, f)

in case the number of basis functions has changed dynamically due to out-projection of high overlap matrix eigenvalues we here adapt the wavefunction object, so that we can smoothly continue the calculation

Arguments

Type IntentOptional Attributes Name
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f

public subroutine print_density_of_states(f, output, de_ev)

print out density of states (DOS)

Arguments

Type IntentOptional Attributes Name
type(wf_data), intent(in) :: f
integer, intent(in) :: output
real(kind=long), intent(in), optional :: de_ev

public subroutine purge_wf_data(f)

purges Wave function data

Arguments

Type IntentOptional Attributes Name
type(wf_data), intent(inout) :: f

public subroutine construct_overlap2minimalbasis(p, a, g, b, f)

prepares the overlap matrix of the current molecular orbitals to a minimal orbital set based on numerical atomic orbitals

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(grid3d), intent(in) :: g
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f

public subroutine print_projection_info(info, omin, smin, atom, iout)

print projection information

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: info(:,:)
real(kind=long), intent(in) :: omin(:,:)
real(kind=long), intent(in) :: smin(:,:)
integer, intent(in) :: atom
integer, intent(in) :: iout