mo_basis

Molecular orbitals are expressed as

\[\phi_k({\bf r}) = \sum_i C_{ik} \chi_k({\bf r})\]

where \(\chi_k\) are normalized atomic basis functions.

The current set of MOs has a label mo_label. When the orbitals are modified, the label should also be updated to keep everything consistent.

When saving the MOs, the mo_basis directory of the EZFIO database is copied in the save directory, named by the current mo_label. All this is done with the script named save_current_mos.sh in the $QP_ROOT/scripts directory.

EZFIO parameters

mo_num

Total number of MOs

mo_coef

Coefficient of the i-th AO on the j-th MO

mo_label

Label characterizing the MOS (Local, Canonical, Natural, etc)

mo_occ

MO occupation numbers

mo_class

[ Core | Inactive | Active | Virtual | Deleted ], as defined by qp_set_mo_class

ao_md5

MD5 checksum characterizing the AO basis set.

Providers

mo_coef

File : mo_basis/mos.irp.f

double precision, allocatable   :: mo_coef      (ao_num,mo_num)

Molecular orbital coefficients on AO basis set

mo_coef(i,j) = coefficient of the i-th AO on the jth mo

mo_label : Label characterizing the MOS (local, canonical, natural, etc)

Needs:

Needed by:

mo_coef_begin_iteration

File : mo_basis/track_orb.irp.f

double precision, allocatable   :: mo_coef_begin_iteration      (ao_num,mo_num)

Void provider to store the coefficients of the MO basis at the beginning of the SCF iteration

Usefull to track some orbitals

Needs:

  • ao_num
mo_coef_in_ao_ortho_basis

File : mo_basis/mos.irp.f

double precision, allocatable   :: mo_coef_in_ao_ortho_basis    (ao_num,mo_num)

MO coefficients in orthogonalized AO basis

\(C^{-1}.C_{mo}\)

Needs:

mo_coef_transp

File : mo_basis/mos.irp.f

double precision, allocatable   :: mo_coef_transp       (mo_num,ao_num)

MO coefficients on AO basis set

Needs:

  • ao_num

Needed by:

mo_label

File : mo_basis/mos.irp.f

character*(64)  :: mo_label

MO coefficients on AO basis set

mo_coef(i,j) = coefficient of the i-th AO on the j-th MO

mo_label : Label characterizing the MOs (local, canonical, natural, etc)

Needs:

Needed by:

mo_num

File : mo_basis/mos.irp.f

integer :: mo_num

Number of MOs

Needs:

Needed by:

mo_occ

File : mo_basis/mos.irp.f

double precision, allocatable   :: mo_occ       (mo_num)

MO occupation numbers

Needs:

  • elec_alpha_num
  • elec_beta_num

Subroutines / functions

ao_ortho_cano_to_ao:()

File : mo_basis/mos.irp.f

subroutine ao_ortho_cano_to_ao(A_ao,LDA_ao,A,LDA)

Transform A from the AO basis to the orthogonal AO basis

$C^{-1}.A_{ao}.C^{dagger-1}$

Needs:

  • ao_num

Calls:

  • dgemm()
ao_to_mo:()

File : mo_basis/mos.irp.f

subroutine ao_to_mo(A_ao,LDA_ao,A_mo,LDA_mo)

Transform A from the AO basis to the MO basis

$C^dagger.A_{ao}.C$

Needs:

  • ao_num

Called by:

Calls:

  • dgemm()
give_all_mos_and_grad_and_lapl_at_r:()

File : mo_basis/mos_in_r.irp.f

subroutine give_all_mos_and_grad_and_lapl_at_r(r,mos_array,mos_grad_array,mos_lapl_array)

Needs:

  • ao_num

Calls:

  • give_all_aos_and_grad_and_lapl_at_r()
give_all_mos_and_grad_at_r:()

File : mo_basis/mos_in_r.irp.f

subroutine give_all_mos_and_grad_at_r(r,mos_array,mos_grad_array)

Needs:

  • ao_num

Calls:

  • give_all_aos_and_grad_at_r()
give_all_mos_at_r:()

File : mo_basis/mos_in_r.irp.f

subroutine give_all_mos_at_r(r,mos_array)

Needs:

  • ao_num

Calls:

  • dgemv()
  • give_all_aos_at_r()
initialize_mo_coef_begin_iteration:()

File : mo_basis/track_orb.irp.f

subroutine initialize_mo_coef_begin_iteration

Initialize mo_coef_begin_iteration to the current mo_coef

Needs:

Called by:

  • damping_scf()
  • roothaan_hall_scf()
mix_mo_jk:()

File : mo_basis/mos.irp.f

subroutine mix_mo_jk(j,k)

Rotates the j-th MO with the k-th MO to give two new MOs that are

  • $+ = frac{1}{sqrt{2}} (|jrangle + |krangle)$
  • $- = frac{1}{sqrt{2}} (|jrangle - |krangle)$

by convention, the ‘+’ MO is in the lowest index (min(j,k)) by convention, the ‘-‘ MO is in the highest index (max(j,k))

Needs:

  • ao_num
mo_as_eigvectors_of_mo_matrix:()

File : mo_basis/utils.irp.f

subroutine mo_as_eigvectors_of_mo_matrix(matrix,n,m,label,sign,output)

Needs:

Called by:

  • create_guess()
  • damping_scf()
  • hcore_guess()
  • roothaan_hall_scf()

Calls:

  • dgemm()
  • lapack_diag()
  • write_time()
mo_as_svd_vectors_of_mo_matrix:()

File : mo_basis/utils.irp.f

subroutine mo_as_svd_vectors_of_mo_matrix(matrix,lda,m,n,label)

Needs:

Calls:

  • dgemm()
  • svd()
  • write_time()
mo_as_svd_vectors_of_mo_matrix_eig:()

File : mo_basis/utils.irp.f

subroutine mo_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,eig,label)

Needs:

Called by:

  • set_natural_mos()

Calls:

  • dgemm()
  • svd()
  • write_time()
reorder_core_orb:()

File : mo_basis/track_orb.irp.f

subroutine reorder_core_orb

routines that takes the current mo_coef and reorder the core orbitals (see list_core and n_core_orb) according to the overlap with mo_coef_begin_iteration

Needs:

Called by:

  • damping_scf()
  • roothaan_hall_scf()

Calls:

  • dsort()
save_mos:()

File : mo_basis/utils.irp.f

subroutine save_mos

Needs:

Called by:

  • damping_scf()
  • hcore_guess()
  • huckel_guess()
  • roothaan_hall_scf()
  • save_natural_mos()
  • save_ortho_mos()

Calls:

  • ezfio_set_mo_basis_ao_md5()
  • ezfio_set_mo_basis_mo_coef()
  • ezfio_set_mo_basis_mo_label()
  • ezfio_set_mo_basis_mo_num()
  • ezfio_set_mo_basis_mo_occ()
  • system()
save_mos_truncated:()

File : mo_basis/utils.irp.f

subroutine save_mos_truncated(n)

Needs:

Calls:

  • ezfio_set_mo_basis_ao_md5()
  • ezfio_set_mo_basis_mo_coef()
  • ezfio_set_mo_basis_mo_label()
  • ezfio_set_mo_basis_mo_num()
  • ezfio_set_mo_basis_mo_occ()
  • system()