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_class

File : mo_basis/mo_class.irp.f

character*(32), allocatable     :: mo_class     (mo_num)

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

Needs:

  • ezfio_filename

  • mo_num

  • mpi_master

  • output_wall_time_0

Needed by:

  • full_ijkl_bitmask

  • list_act

  • list_all_but_del_orb

  • list_core

  • list_del

  • list_inact

  • list_virt

  • mo_two_e_integrals_in_map

  • n_act_orb

  • n_all_but_del_orb

  • n_core_orb

  • n_del_orb

  • n_inact_orb

  • n_virt_orb

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:

  • ao_num

  • ao_ortho_canonical_coef

  • ezfio_filename

  • mo_num

  • mpi_master

Needed by:

  • mo_coef_in_ao_ortho_basis

  • mo_coef_novirt

  • mo_coef_transp

  • mo_dipole_x

  • mo_integrals_n_e

  • mo_integrals_n_e_per_atom

  • mo_kinetic_integrals

  • mo_overlap

  • mo_pseudo_integrals

  • mo_spread_x

  • mo_two_e_integral_jj_from_ao

  • mo_two_e_integrals_in_map

  • mo_two_e_integrals_vv_from_ao

  • one_e_dm_alpha_ao_for_dft

  • one_e_dm_alpha_ao_for_dft_no_core

  • one_e_dm_ao_alpha

  • one_e_dm_mo_alpha_for_dft

  • one_e_dm_mo_beta_for_dft

  • one_e_spin_density_ao

  • psi_det

  • s_mo_coef

mo_coef_imag

File : mo_basis/mos.irp.f

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

Molecular orbital coefficients on AO basis set

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

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

Needs:

  • ao_num

  • ezfio_filename

  • mo_num

  • mpi_master

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:

  • ao_num

  • ao_ortho_canonical_coef_inv

  • mo_coef

  • mo_num

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

  • mo_coef

  • mo_num

Needed by:

  • mo_two_e_integral_jj_from_ao

  • mo_two_e_integrals_in_map

  • mo_two_e_integrals_vv_from_ao

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:

  • ezfio_filename

  • mpi_master

Needed by:

  • n_det

  • psi_coef

  • psi_det

mo_num

File : mo_basis/mos.irp.f

integer :: mo_num

Number of MOs

Needs:

  • ao_ortho_canonical_coef

  • ezfio_filename

  • mpi_master

Needed by:

  • banned_excitation

  • big_array_coulomb_integrals

  • core_fock_operator

  • data_one_e_dm_alpha_mo

  • data_one_e_dm_beta_mo

  • fock_operator_closed_shell_ref_bitmask

  • fock_wee_closed_shell

  • full_ijkl_bitmask

  • list_act

  • list_all_but_del_orb

  • list_core

  • list_core_inact

  • list_core_inact_act

  • list_del

  • list_inact

  • list_inact_act

  • list_virt

  • mo_class

  • mo_coef

  • mo_coef_begin_iteration

  • mo_coef_imag

  • mo_coef_in_ao_ortho_basis

  • mo_coef_transp

  • mo_dipole_x

  • mo_integrals_cache_min

  • mo_integrals_map

  • mo_integrals_n_e

  • mo_integrals_n_e_per_atom

  • mo_kinetic_integrals

  • mo_occ

  • mo_one_e_integrals

  • mo_overlap

  • mo_pseudo_integrals

  • mo_spread_x

  • mo_two_e_integral_jj_from_ao

  • mo_two_e_integrals_in_map

  • mo_two_e_integrals_jj

  • mo_two_e_integrals_vv_from_ao

  • n_act_orb

  • n_all_but_del_orb

  • n_core_orb

  • n_del_orb

  • n_inact_orb

  • n_int

  • n_virt_orb

  • one_body_dm_mo_alpha_one_det

  • one_e_dm_alpha_ao_for_dft

  • one_e_dm_alpha_ao_for_dft_no_core

  • one_e_dm_ao_alpha

  • one_e_dm_average_alpha_mo_for_dft

  • one_e_dm_average_beta_mo_for_dft

  • one_e_dm_average_mo_for_dft

  • one_e_dm_dagger_mo_spin_index

  • one_e_dm_mo

  • one_e_dm_mo_alpha

  • one_e_dm_mo_alpha_average

  • one_e_dm_mo_alpha_for_dft

  • one_e_dm_mo_alpha_for_dft_no_core

  • one_e_dm_mo_beta_for_dft

  • one_e_dm_mo_beta_for_dft_no_core

  • one_e_dm_mo_diff

  • one_e_dm_mo_for_dft

  • one_e_dm_mo_spin_index

  • one_e_spin_density_ao

  • one_e_spin_density_mo

  • psi_energy_h_core

  • s_mo_coef

  • singles_alpha_csc_idx

  • singles_beta_csc_idx

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

  • ezfio_filename

  • mo_num

  • mpi_master

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

  • ao_ortho_canonical_coef_inv

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

  • mo_coef

  • mo_num

Called by:

  • four_idx_novvvv()

  • mo_dipole_x

  • mo_integrals_n_e

  • mo_integrals_n_e_per_atom

  • mo_kinetic_integrals

  • mo_pseudo_integrals

  • mo_spread_x

  • one_e_dm_mo_alpha_for_dft

  • one_e_dm_mo_beta_for_dft

Calls:

  • dgemm()

  • restore_symmetry()

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

  • mo_coef

  • mo_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

  • mo_coef

  • mo_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

  • mo_coef_transp

  • mo_num

Calls:

  • dgemv()

  • give_all_aos_at_r()

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_coef

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:

  • ao_num

  • mo_coef

  • mo_label

  • mo_num

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:

  • ao_num

  • mo_coef

  • mo_label

  • mo_num

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:

  • ao_num

  • mo_coef

  • mo_label

  • mo_num

Called by:

  • set_natural_mos()

Calls:

  • dgemm()

  • svd()

  • write_time()

mo_coef_new_as_svd_vectors_of_mo_matrix_eig:

File : mo_basis/utils.irp.f

subroutine mo_coef_new_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,mo_coef_before,eig,mo_coef_new)

You enter with matrix in the MO basis defined with the mo_coef_before.

You SVD the matrix and set the eigenvectors as mo_coef_new ordered by increasing singular values

Needs:

  • ao_num

  • mo_num

Calls:

  • dgemm()

  • svd()

  • write_time()

save_mos:

File : mo_basis/utils.irp.f

subroutine save_mos

Needs:

  • ao_md5

  • ao_num

  • ezfio_filename

  • mo_class

  • mo_coef

  • mo_label

  • mo_num

  • mo_occ

Called by:

  • save_natural_mos()

Calls:

  • ezfio_set_mo_basis_ao_md5()

  • ezfio_set_mo_basis_mo_class()

  • 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_no_occ:

File : mo_basis/utils.irp.f

subroutine save_mos_no_occ

Needs:

  • ao_num

  • ezfio_filename

  • mo_coef

  • mo_num

Calls:

  • ezfio_set_mo_basis_mo_coef()

  • system()

save_mos_truncated:

File : mo_basis/utils.irp.f

subroutine save_mos_truncated(n)

Needs:

  • ao_md5

  • ao_num

  • ezfio_filename

  • mo_class

  • mo_coef

  • mo_label

  • mo_occ

Calls:

  • ezfio_set_mo_basis_ao_md5()

  • ezfio_set_mo_basis_mo_class()

  • 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()