bitmask module

The central part of this module is the bitmasks_module.f90 file. It contains the constants that will be used to define on which kind of integer the bitmasks will be defined.

In the program, to represent a determinant as a pair of bitstrings, the determinant should be defined as

use bitmasks
integer(bit_kind)  :: determinant(N_int,2)

bitmasks_routines.irp.f contains helper routines to manipulate bitmask, like transforming a bit string to a list of integers for example.

bit_kind_shift, bit_kind_size and bit_kind are supposed to be consistent:

2**bit_kind_shift = bit_kind_size
bit_kind = bit_kind_size / 8

For an example of how to use the bitmaks, see the file example.irp.f.

EZFIO parameters

n_act_orb

Number of active MOs

do_ormas

if true restrict selection based on ORMAS rules

Default: false

ormas_n_space

Number of active spaces

Default: 1

ormas_mstart

starting orb for each ORMAS space

ormas_min_e

min number of electrons in each ORMAS space

ormas_max_e

max number of electrons in each ORMAS space

Providers

act_bitmask

File : bitmask/core_inact_act_virt.irp.f

integer(bit_kind), allocatable  :: act_bitmask  (N_int,2)

Bitmask identifying the active MOs

Needs:

  • list_act

  • n_act_orb

  • n_int

Needed by:

  • closed_shell_ref_bitmask

  • n_det_generators

  • psi_cas

  • psi_det_generators

  • reunion_of_act_virt_bitmask

  • reunion_of_bitmask

  • reunion_of_core_inact_act_bitmask

  • reunion_of_inact_act_bitmask

closed_shell_ref_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: closed_shell_ref_bitmask     (N_int,2)

Needs:

  • act_bitmask

  • n_int

  • ref_bitmask

core_bitmask

File : bitmask/core_inact_act_virt.irp.f

integer(bit_kind), allocatable  :: core_bitmask (N_int,2)

Bitmask identifying the core MOs

Needs:

  • list_core

  • n_core_orb

  • n_int

Needed by:

  • inact_virt_bitmask

  • reunion_of_core_inact_bitmask

core_inact_act_bitmask_4

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: core_inact_act_bitmask_4     (N_int,4)

Needs:

  • n_int

  • reunion_of_core_inact_act_bitmask

core_inact_virt_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: inact_virt_bitmask   (N_int,2)
integer(bit_kind), allocatable  :: core_inact_virt_bitmask      (N_int,2)

Reunion of the inactive and virtual bitmasks

Needs:

  • core_bitmask

  • inact_bitmask

  • n_int

  • virt_bitmask

del_bitmask

File : bitmask/core_inact_act_virt.irp.f

integer(bit_kind), allocatable  :: del_bitmask  (N_int,2)

Bitmask identifying the deleted MOs

Needs:

  • list_del

  • n_del_orb

  • n_int

dim_list_act_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_act_orb

dimensions for the allocation of list_act. it is at least 1

Needs:

  • n_act_orb

Needed by:

  • list_act

dim_list_core_inact_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_core_inact_orb

dimensions for the allocation of list_core. it is at least 1

Needs:

  • n_core_inact_orb

Needed by:

  • list_core_inact

dim_list_core_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_core_orb

dimensions for the allocation of list_core. it is at least 1

Needs:

  • n_core_orb

Needed by:

  • list_core

dim_list_del_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_del_orb

dimensions for the allocation of list_del. it is at least 1

Needs:

  • n_del_orb

Needed by:

  • list_del

dim_list_inact_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_inact_orb

dimensions for the allocation of list_inact. it is at least 1

Needs:

  • n_inact_orb

Needed by:

  • list_inact

dim_list_virt_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: dim_list_virt_orb

dimensions for the allocation of list_virt. it is at least 1

Needs:

  • n_virt_orb

Needed by:

  • list_virt

full_ijkl_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: full_ijkl_bitmask    (N_int)

Bitmask to include all possible MOs

Needs:

  • mo_num

  • n_int

Needed by:

  • fock_operator_closed_shell_ref_bitmask

  • fock_wee_closed_shell

  • full_ijkl_bitmask_4

  • generators_bitmask

full_ijkl_bitmask_4

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: full_ijkl_bitmask_4  (N_int,4)

Needs:

  • full_ijkl_bitmask

  • n_int

Needed by:

  • mo_two_e_integrals_erf_in_map

  • mo_two_e_integrals_in_map

generators_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: generators_bitmask   (N_int,2,6)

Bitmasks for generator determinants. (N_int, alpha/beta, hole/particle, generator).

3rd index is :

  • 1 : hole for single exc

  • 2 : particle for single exc

  • 3 : hole for 1st exc of double

  • 4 : particle for 1st exc of double

  • 5 : hole for 2nd exc of double

  • 6 : particle for 2nd exc of double

Needs:

  • ezfio_filename

  • full_ijkl_bitmask

  • n_int

  • reunion_of_act_virt_bitmask

  • reunion_of_inact_act_bitmask

hf_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: hf_bitmask   (N_int,2)

Hartree Fock bit mask

Needs:

  • elec_alpha_num

  • elec_beta_num

  • n_int

Needed by:

  • double_exc_bitmask

  • max_degree_exc

  • psi_cas

  • psi_det

  • ref_bitmask

  • single_exc_bitmask

  • unpaired_alpha_electrons

inact_bitmask

File : bitmask/core_inact_act_virt.irp.f

integer(bit_kind), allocatable  :: inact_bitmask        (N_int,2)

Bitmask identifying the inactive MOs

Needs:

  • list_inact

  • n_inact_orb

  • n_int

Needed by:

  • inact_virt_bitmask

  • reunion_of_bitmask

  • reunion_of_core_inact_bitmask

  • reunion_of_inact_act_bitmask

inact_virt_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: inact_virt_bitmask   (N_int,2)
integer(bit_kind), allocatable  :: core_inact_virt_bitmask      (N_int,2)

Reunion of the inactive and virtual bitmasks

Needs:

  • core_bitmask

  • inact_bitmask

  • n_int

  • virt_bitmask

index_holes_bitmask

File : bitmask/modify_bitmasks.irp.f

integer, allocatable    :: index_holes_bitmask  (3)

Index of the holes in the generators_bitmasks

index_particl_bitmask

File : bitmask/modify_bitmasks.irp.f

integer, allocatable    :: index_particl_bitmask        (3)

Index of the holes in the generators_bitmasks

list_act

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_act     (dim_list_act_orb)
integer, allocatable    :: list_act_reverse     (mo_num)

List of MO indices which are in the active.

Needs:

  • dim_list_act_orb

  • mo_class

  • mo_num

  • n_act_orb

Needed by:

  • act_2_rdm_aa_mo

  • act_2_rdm_ab_mo

  • act_2_rdm_bb_mo

  • act_2_rdm_spin_trace_mo

  • act_2_rdm_trans_spin_trace_mo

  • act_bitmask

  • bielec_pqxx_array

  • bielec_pqxx_no_array

  • bielec_pxxq_array

  • bielec_pxxq_no_array

  • bielecci

  • bielecci_no

  • cholesky_no_1_idx_transp

  • cholesky_no_2_idx_transp

  • cholesky_no_total_transp

  • core_fock_operator

  • core_fock_operator_erf

  • d0tu

  • d0tu_alpha_ao

  • eigenvectors_fock_matrix_mo

  • etwo

  • excit

  • fapq

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • natorbsci_mos

  • occnum

  • one_ints_no

  • p0tuvx_peter

  • state_av_act_2_rdm_aa_mo

  • state_av_act_2_rdm_ab_mo

  • state_av_act_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

  • super_ci_dm

  • umat

list_act_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_act     (dim_list_act_orb)
integer, allocatable    :: list_act_reverse     (mo_num)

List of MO indices which are in the active.

Needs:

  • dim_list_act_orb

  • mo_class

  • mo_num

  • n_act_orb

Needed by:

  • act_2_rdm_aa_mo

  • act_2_rdm_ab_mo

  • act_2_rdm_bb_mo

  • act_2_rdm_spin_trace_mo

  • act_2_rdm_trans_spin_trace_mo

  • act_bitmask

  • bielec_pqxx_array

  • bielec_pqxx_no_array

  • bielec_pxxq_array

  • bielec_pxxq_no_array

  • bielecci

  • bielecci_no

  • cholesky_no_1_idx_transp

  • cholesky_no_2_idx_transp

  • cholesky_no_total_transp

  • core_fock_operator

  • core_fock_operator_erf

  • d0tu

  • d0tu_alpha_ao

  • eigenvectors_fock_matrix_mo

  • etwo

  • excit

  • fapq

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • natorbsci_mos

  • occnum

  • one_ints_no

  • p0tuvx_peter

  • state_av_act_2_rdm_aa_mo

  • state_av_act_2_rdm_ab_mo

  • state_av_act_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

  • super_ci_dm

  • umat

list_all_but_del_orb

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_all_but_del_orb (n_all_but_del_orb)

Needs:

  • mo_class

  • mo_num

  • n_all_but_del_orb

list_core

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core    (dim_list_core_orb)
integer, allocatable    :: list_core_reverse    (mo_num)

List of MO indices which are in the core.

Needs:

  • dim_list_core_orb

  • mo_class

  • mo_num

  • n_core_orb

Needed by:

  • core_bitmask

  • core_energy

  • core_energy_erf

  • core_fock_operator

  • core_fock_operator_erf

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • 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

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

list_core_inact

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core_inact      (dim_list_core_inact_orb)
integer, allocatable    :: list_core_inact_reverse      (mo_num)

List of indices of the core and inactive MOs

Needs:

  • dim_list_core_inact_orb

  • mo_num

  • n_core_inact_orb

  • n_int

  • reunion_of_core_inact_bitmask

Needed by:

  • bielec_pqxx_array

  • bielec_pxxq_array

  • cholesky_no_total_transp

  • d0tu_alpha_ao

  • etwo

  • excit

  • fipq

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • occnum

  • super_ci_dm

  • umat

list_core_inact_act

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core_inact_act  (n_core_inact_act_orb)
integer, allocatable    :: list_core_inact_act_reverse  (mo_num)

List of indices of the core inactive and active MOs

Needs:

  • mo_num

  • n_core_inact_act_orb

  • n_int

  • reunion_of_core_inact_act_bitmask

Needed by:

  • etwo

  • fapq

  • fipq

  • two_e_dm_mo

list_core_inact_act_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core_inact_act  (n_core_inact_act_orb)
integer, allocatable    :: list_core_inact_act_reverse  (mo_num)

List of indices of the core inactive and active MOs

Needs:

  • mo_num

  • n_core_inact_act_orb

  • n_int

  • reunion_of_core_inact_act_bitmask

Needed by:

  • etwo

  • fapq

  • fipq

  • two_e_dm_mo

list_core_inact_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core_inact      (dim_list_core_inact_orb)
integer, allocatable    :: list_core_inact_reverse      (mo_num)

List of indices of the core and inactive MOs

Needs:

  • dim_list_core_inact_orb

  • mo_num

  • n_core_inact_orb

  • n_int

  • reunion_of_core_inact_bitmask

Needed by:

  • bielec_pqxx_array

  • bielec_pxxq_array

  • cholesky_no_total_transp

  • d0tu_alpha_ao

  • etwo

  • excit

  • fipq

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • occnum

  • super_ci_dm

  • umat

list_core_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_core    (dim_list_core_orb)
integer, allocatable    :: list_core_reverse    (mo_num)

List of MO indices which are in the core.

Needs:

  • dim_list_core_orb

  • mo_class

  • mo_num

  • n_core_orb

Needed by:

  • core_bitmask

  • core_energy

  • core_energy_erf

  • core_fock_operator

  • core_fock_operator_erf

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • 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

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

list_del

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_del     (dim_list_del_orb)
integer, allocatable    :: list_del_reverse     (mo_num)

List of MO indices which are deleted.

Needs:

  • dim_list_del_orb

  • mo_class

  • mo_num

  • n_del_orb

Needed by:

  • del_bitmask

list_del_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_del     (dim_list_del_orb)
integer, allocatable    :: list_del_reverse     (mo_num)

List of MO indices which are deleted.

Needs:

  • dim_list_del_orb

  • mo_class

  • mo_num

  • n_del_orb

Needed by:

  • del_bitmask

list_inact

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_inact   (dim_list_inact_orb)
integer, allocatable    :: list_inact_reverse   (mo_num)

List of MO indices which are inactive.

Needs:

  • dim_list_inact_orb

  • mo_class

  • mo_num

  • n_inact_orb

Needed by:

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • inact_bitmask

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

list_inact_act

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_inact_act       (n_inact_act_orb)
integer, allocatable    :: list_inact_act_reverse       (mo_num)

List of indices of the inactive and active MOs

Needs:

  • mo_num

  • n_inact_act_orb

  • n_int

  • reunion_of_inact_act_bitmask

list_inact_act_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_inact_act       (n_inact_act_orb)
integer, allocatable    :: list_inact_act_reverse       (mo_num)

List of indices of the inactive and active MOs

Needs:

  • mo_num

  • n_inact_act_orb

  • n_int

  • reunion_of_inact_act_bitmask

list_inact_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_inact   (dim_list_inact_orb)
integer, allocatable    :: list_inact_reverse   (mo_num)

List of MO indices which are inactive.

Needs:

  • dim_list_inact_orb

  • mo_class

  • mo_num

  • n_inact_orb

Needed by:

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • inact_bitmask

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

list_virt

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_virt    (dim_list_virt_orb)
integer, allocatable    :: list_virt_reverse    (mo_num)

List of MO indices which are virtual

Needs:

  • dim_list_virt_orb

  • mo_class

  • mo_num

  • n_virt_orb

Needed by:

  • cholesky_no_total_transp

  • eigenvectors_fock_matrix_mo

  • excit

  • fock_matrix_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • super_ci_dm

  • umat

  • virt_bitmask

list_virt_reverse

File : bitmask/core_inact_act_virt.irp.f

integer, allocatable    :: list_virt    (dim_list_virt_orb)
integer, allocatable    :: list_virt_reverse    (mo_num)

List of MO indices which are virtual

Needs:

  • dim_list_virt_orb

  • mo_class

  • mo_num

  • n_virt_orb

Needed by:

  • cholesky_no_total_transp

  • eigenvectors_fock_matrix_mo

  • excit

  • fock_matrix_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • super_ci_dm

  • umat

  • virt_bitmask

mo_coef_begin_iteration

File : bitmask/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

Useful to track some orbitals

Needs:

  • ao_num

  • mo_num

mpi_bit_kind

File : bitmask/mpi.irp.f

integer :: mpi_bit_kind

MPI bit kind type

n_act_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_act_orb

Number of active MOs

Needs:

  • mo_class

  • mo_num

  • mpi_master

Needed by:

  • act_2_rdm_aa_mo

  • act_2_rdm_ab_mo

  • act_2_rdm_bb_mo

  • act_2_rdm_spin_trace_mo

  • act_2_rdm_trans_spin_trace_mo

  • act_bitmask

  • bielec_pqxx_array

  • bielec_pqxx_no_array

  • bielec_pxxq_array

  • bielec_pxxq_no_array

  • bielecci

  • bielecci_no

  • cholesky_no_1_idx_transp

  • cholesky_no_2_idx_transp

  • cholesky_no_total_transp

  • core_fock_operator

  • core_fock_operator_erf

  • d0tu

  • d0tu_alpha_ao

  • dim_list_act_orb

  • eigenvectors_fock_matrix_mo

  • etwo

  • excit

  • fapq

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • list_act

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • n_c_a_prov

  • n_core_inact_act_orb

  • n_inact_act_orb

  • natorbsci

  • natorbsci_mos

  • nmonoex

  • nsomomax

  • occnum

  • one_ints_no

  • p0tuvx

  • p0tuvx_no

  • p0tuvx_peter

  • state_av_act_2_rdm_aa_mo

  • state_av_act_2_rdm_ab_mo

  • state_av_act_2_rdm_bb_mo

  • state_av_act_2_rdm_spin_trace_mo

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

  • super_ci_dm

  • umat

n_all_but_del_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_all_but_del_orb

Needs:

  • mo_class

  • mo_num

Needed by:

  • list_all_but_del_orb

n_core_inact_act_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_core_inact_act_orb

Number of core inactive and active MOs

Needs:

  • n_act_orb

  • n_core_orb

  • n_inact_orb

Needed by:

  • bielec_pqxx_array

  • bielec_pqxx_no_array

  • bielec_pxxq_array

  • bielec_pxxq_no_array

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • list_core_inact_act

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

  • two_e_dm_mo

n_core_inact_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_core_inact_orb

n_core + n_inact

Needs:

  • n_int

  • reunion_of_core_inact_bitmask

Needed by:

  • bielec_pqxx_array

  • bielec_pqxx_no_array

  • bielec_pxxq_array

  • bielec_pxxq_no_array

  • cholesky_no_total_transp

  • d0tu_alpha_ao

  • dim_list_core_inact_orb

  • etwo

  • excit

  • fipq

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • list_core_inact

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • n_c_a_prov

  • nmonoex

  • occnum

  • super_ci_dm

  • umat

n_core_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_core_orb

Number of core MOs

Needs:

  • mo_class

  • mo_num

  • mpi_master

Needed by:

  • core_bitmask

  • core_energy

  • core_energy_erf

  • core_fock_operator

  • core_fock_operator_erf

  • dim_list_core_orb

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • list_core

  • n_core_inact_act_orb

  • 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

  • pt2_f

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

n_del_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_del_orb

Number of deleted MOs

Needs:

  • mo_class

  • mo_num

  • mpi_master

Needed by:

  • del_bitmask

  • dim_list_del_orb

  • list_del

n_inact_act_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_inact_act_orb

n_inact + n_act

Needs:

  • n_act_orb

  • n_inact_orb

Needed by:

  • list_inact_act

n_inact_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_inact_orb

Number of inactive MOs

Needs:

  • mo_class

  • mo_num

  • mpi_master

Needed by:

  • dim_list_inact_orb

  • eigenvectors_fock_matrix_mo

  • fock_matrix_mo

  • full_occ_2_rdm_aa_mo

  • full_occ_2_rdm_ab_mo

  • full_occ_2_rdm_bb_mo

  • full_occ_2_rdm_spin_trace_mo

  • inact_bitmask

  • list_inact

  • n_core_inact_act_orb

  • n_inact_act_orb

  • state_av_full_occ_2_rdm_aa_mo

  • state_av_full_occ_2_rdm_ab_mo

  • state_av_full_occ_2_rdm_bb_mo

  • state_av_full_occ_2_rdm_spin_trace_mo

n_int

File : bitmask/bitmasks.irp.f

integer :: n_int

Number of 64-bit integers needed to represent determinants as binary strings

Needs:

  • mo_num

  • mpi_master

Needed by:

  • act_bitmask

  • cfg_seniority_index

  • ci_electronic_energy

  • closed_shell_ref_bitmask

  • coef_hf_selector

  • core_bitmask

  • core_inact_act_bitmask_4

  • del_bitmask

  • det_to_configuration

  • dettocsftransformationmatrix

  • diagonal_h_matrix_on_psi_det

  • dominant_dets_of_cfgs

  • double_exc_bitmask

  • exc_degree_per_selectors

  • fock_operator_closed_shell_ref_bitmask

  • fock_wee_closed_shell

  • full_ijkl_bitmask

  • full_ijkl_bitmask_4

  • generators_bitmask

  • global_selection_buffer

  • gradvec_old

  • h_apply_buffer_allocated

  • h_matrix_all_dets

  • h_matrix_cas

  • h_matrix_diag_all_dets

  • hessmat_old

  • hf_bitmask

  • inact_bitmask

  • inact_virt_bitmask

  • list_core_inact

  • list_core_inact_act

  • list_inact_act

  • max_degree_exc

  • mo_two_e_integrals_erf_in_map

  • mo_two_e_integrals_in_map

  • multi_s_dipole_moment

  • n_core_inact_orb

  • n_det_generators

  • n_dominant_dets_of_cfgs

  • n_elec_alpha_for_psi_configuration

  • one_e_dm_mo_alpha

  • one_e_tr_dm_mo

  • one_e_tr_dm_mo_alpha

  • orb_swap

  • ormas_bitmask

  • p0tuvx

  • p0tuvx_peter

  • psi_bilinear_matrix_values

  • psi_cas

  • psi_cas_sorted_bit

  • psi_configuration

  • psi_configuration_sorted

  • psi_configuration_to_psi_det

  • psi_csf_coef

  • psi_det

  • psi_det_alpha

  • psi_det_alpha_unique

  • psi_det_beta

  • psi_det_beta_unique

  • psi_det_generators

  • psi_det_hii

  • psi_det_sorted

  • psi_det_sorted_bit

  • psi_energy

  • psi_energy_two_e

  • psi_energy_two_e_trans

  • psi_non_cas

  • psi_non_cas_sorted_bit

  • psi_selectors

  • psi_selectors_diag_h_mat

  • ref_bitmask

  • ref_bitmask_energy

  • ref_closed_shell_bitmask

  • reunion_of_act_virt_bitmask

  • reunion_of_bitmask

  • reunion_of_core_inact_act_bitmask

  • reunion_of_core_inact_bitmask

  • reunion_of_inact_act_bitmask

  • s2_matrix_all_dets

  • s2_values

  • single_exc_bitmask

  • singles_alpha_csc

  • singles_alpha_csc_idx

  • singles_alpha_csc_map

  • singles_beta_csc

  • singles_beta_csc_idx

  • singles_beta_csc_map

  • unpaired_alpha_electrons

  • virt_bitmask

  • virt_bitmask_4

n_virt_orb

File : bitmask/core_inact_act_virt.irp.f

integer :: n_virt_orb

Number of virtual MOs

Needs:

  • mo_class

  • mo_num

  • mpi_master

Needed by:

  • cholesky_no_total_transp

  • dim_list_virt_orb

  • eigenvectors_fock_matrix_mo

  • excit

  • fock_matrix_mo

  • gradvec2

  • hessdiag

  • hessmat

  • hessmat_peter

  • list_virt

  • lowest_super_ci_coef_mo

  • mat_tmp_dm_super_ci

  • n_c_a_prov

  • nmonoex

  • super_ci_dm

  • umat

  • virt_bitmask

ormas_bitmask

File : bitmask/bitmasks_ormas.irp.f

integer(bit_kind), allocatable  :: ormas_bitmask        (N_int,ormas_n_space)

bitmask for each ormas space

Needs:

  • n_int

  • ormas_list_orb

  • ormas_n_orb

  • ormas_n_space

ormas_list_orb

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_list_orb       (ormas_max_n_orb,ormas_n_space)

list of orbitals in each ormas space

Needs:

  • ormas_n_orb

  • ormas_n_space

Needed by:

  • ormas_bitmask

ormas_max_e

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_max_e  (ormas_n_space)

max nelec in each active space

Needs:

  • elec_num

  • ezfio_filename

  • mpi_master

  • ormas_n_space

ormas_max_n_orb

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_n_orb  (ormas_n_space)
integer :: ormas_max_n_orb

number of orbitals in each ormas space

Needs:

  • mo_num

  • ormas_mstart

  • ormas_n_space

Needed by:

  • ormas_bitmask

  • ormas_list_orb

ormas_min_e

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_min_e  (ormas_n_space)

min nelec in each active space

Needs:

  • ezfio_filename

  • mpi_master

  • ormas_n_space

ormas_mstart

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_mstart (ormas_n_space)

first orbital idx in each active space

Needs:

  • ezfio_filename

  • mpi_master

  • ormas_n_space

Needed by:

  • ormas_n_orb

ormas_n_orb

File : bitmask/bitmasks_ormas.irp.f

integer, allocatable    :: ormas_n_orb  (ormas_n_space)
integer :: ormas_max_n_orb

number of orbitals in each ormas space

Needs:

  • mo_num

  • ormas_mstart

  • ormas_n_space

Needed by:

  • ormas_bitmask

  • ormas_list_orb

ref_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: ref_bitmask  (N_int,2)

Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask

Needs:

  • hf_bitmask

  • n_int

Needed by:

  • closed_shell_ref_bitmask

  • coef_hf_selector

  • diagonal_h_matrix_on_psi_det

  • exc_degree_per_selectors

  • psi_det_hii

  • psi_selectors_diag_h_mat

  • ref_bitmask_energy

  • ref_closed_shell_bitmask

reunion_of_act_virt_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: reunion_of_act_virt_bitmask  (N_int,2)

Reunion of the inactive and active bitmasks

Needs:

  • act_bitmask

  • n_int

  • virt_bitmask

Needed by:

  • generators_bitmask

reunion_of_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: reunion_of_bitmask   (N_int,2)

Reunion of the inactive, active and virtual bitmasks

Needs:

  • act_bitmask

  • inact_bitmask

  • n_int

  • virt_bitmask

reunion_of_core_inact_act_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: reunion_of_core_inact_act_bitmask    (N_int,2)

Reunion of the core, inactive and active bitmasks

Needs:

  • act_bitmask

  • n_int

  • reunion_of_core_inact_bitmask

Needed by:

  • core_inact_act_bitmask_4

  • list_core_inact_act

reunion_of_core_inact_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: reunion_of_core_inact_bitmask        (N_int,2)

Reunion of the core and inactive and virtual bitmasks

Needs:

  • core_bitmask

  • inact_bitmask

  • n_int

Needed by:

  • list_core_inact

  • n_core_inact_orb

  • n_det_generators

  • psi_det_generators

  • reunion_of_core_inact_act_bitmask

reunion_of_inact_act_bitmask

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: reunion_of_inact_act_bitmask (N_int,2)

Reunion of the inactive and active bitmasks

Needs:

  • act_bitmask

  • inact_bitmask

  • n_int

Needed by:

  • generators_bitmask

  • list_inact_act

unpaired_alpha_electrons

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: unpaired_alpha_electrons     (N_int)

Bitmask reprenting the unpaired alpha electrons in the HF_bitmask

Needs:

  • hf_bitmask

  • n_int

virt_bitmask

File : bitmask/core_inact_act_virt.irp.f

integer(bit_kind), allocatable  :: virt_bitmask (N_int,2)

Bitmask identifying the virtual MOs

Needs:

  • list_virt

  • n_int

  • n_virt_orb

Needed by:

  • inact_virt_bitmask

  • n_det_generators

  • psi_det_generators

  • reunion_of_act_virt_bitmask

  • reunion_of_bitmask

  • virt_bitmask_4

virt_bitmask_4

File : bitmask/bitmasks.irp.f

integer(bit_kind), allocatable  :: virt_bitmask_4       (N_int,4)

Needs:

  • n_int

  • virt_bitmask

Subroutines / functions

bitstring_to_hexa:

File : bitmask/bitmasks_routines.irp.f

subroutine bitstring_to_hexa( output, string, Nint )

Transform a bit string to a string in hexadecimal format for printing

Called by:

  • debug_cfg()

  • debug_det()

  • debug_spindet()

bitstring_to_list:

File : bitmask/bitmasks_routines.irp.f

subroutine bitstring_to_list( string, list, n_elements, Nint)

Gives the indices(+1) of the bits set to 1 in the bit string

Called by:

  • add_integrals_to_map()

  • add_integrals_to_map_erf()

  • create_microlist()

  • example_bitmask()

  • generate_cas_space()

  • getmobiles()

  • list_core_inact

  • list_core_inact_act

  • list_inact_act

  • ref_bitmask_energy

  • splash_p()

  • spot_hasbeen()

bitstring_to_str:

File : bitmask/bitmasks_routines.irp.f

subroutine bitstring_to_str( output, string, Nint )

Transform a bit string to a string for printing

Called by:

  • add_integrals_to_map_erf()

  • example_bitmask()

  • print_det()

  • print_det_one_dimension()

  • print_spindet()

broadcast_chunks_bit_kind:

File : bitmask/mpi.irp.f

subroutine broadcast_chunks_bit_kind(A, LDA)

Broadcast with chunks of ~2GB

clear_bit_to_integer:

File : bitmask/bitmasks_routines.irp.f

subroutine clear_bit_to_integer(i_physical,key,Nint)

set to 0 the bit number i_physical in the bitstring key

Called by:

  • example_bitmask()

  • ref_closed_shell_bitmask

configuration_to_str:

File : bitmask/bitmasks_routines.irp.f

subroutine configuration_to_str( output, string, Nint )

Transform the bit string of a configuration to a string for printing

Called by:

  • debug_cfg()

debug_cfg:

File : bitmask/bitmasks_routines.irp.f

subroutine debug_cfg(string,Nint)

Subroutine to print the content of a determinant in ‘+-’ notation and hexadecimal representation.

Calls:

  • bitstring_to_hexa()

  • configuration_to_str()

debug_det:

File : bitmask/bitmasks_routines.irp.f

subroutine debug_det(string,Nint)

Subroutine to print the content of a determinant in ‘+-’ notation and hexadecimal representation.

Called by:

  • build_fock_tmp()

  • example_determinants()

  • get_excitation_degree_vector_single_or_exchange_verbose()

  • get_particles_general()

  • number_of_holes_verbose()

  • number_of_particles_verbose()

  • routine_example_psi_det()

Calls:

  • bitstring_to_hexa()

  • print_det()

debug_spindet:

File : bitmask/bitmasks_routines.irp.f

subroutine debug_spindet(string,Nint)

Subroutine to print the content of a determinant in ‘+-’ notation and hexadecimal representation.

Calls:

  • bitstring_to_hexa()

  • print_spindet()

det_allowed_ormas:

File : bitmask/bitmasks_ormas.irp.f

logical function det_allowed_ormas(key_in)

return true if det has allowable ormas occupations

Needs:

  • n_int

  • ormas_bitmask

  • ormas_max_e

  • ormas_min_e

  • ormas_n_space

example_bitmask:

File : bitmask/example.irp.f

subroutine example_bitmask

subroutine that illustrates the main features available in bitmask

Needs:

  • list_act

  • list_core

  • list_inact

  • list_virt

  • mo_num

  • n_act_orb

  • n_core_orb

  • n_inact_orb

  • n_int

  • n_virt_orb

Calls:

  • bitstring_to_list()

  • bitstring_to_str()

  • clear_bit_to_integer()

  • set_bit_to_integer()

initialize_mo_coef_begin_iteration:

File : bitmask/track_orb.irp.f

subroutine initialize_mo_coef_begin_iteration

Initialize mo_coef_begin_iteration to the current mo_coef

Needs:

  • mo_coef

  • mo_coef_begin_iteration

Called by:

  • damping_scf()

  • roothaan_hall_scf()

is_a_1h:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_1h(key_in)

Needs:

  • n_int

is_a_1h1p:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_1h1p(key_in)

Needs:

  • n_int

is_a_1h2p:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_1h2p(key_in)

Needs:

  • n_int

is_a_1p:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_1p(key_in)

Needs:

  • n_int

is_a_2h:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_2h(key_in)

Needs:

  • n_int

is_a_2h1p:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_2h1p(key_in)

Needs:

  • n_int

is_a_2p:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_2p(key_in)

Needs:

  • n_int

is_a_two_holes_two_particles:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_a_two_holes_two_particles(key_in)

logical function that returns True if the determinant ‘key_in’ belongs to the 2h-2p excitation class of the DDCI space this is calculated using the act_bitmask that defines the active orbital space, the inact_bitmasl that defines the inactive oribital space and the virt_bitmask that defines the virtual orbital space

Needs:

  • act_bitmask

  • n_int

  • reunion_of_core_inact_bitmask

  • virt_bitmask

is_i_in_virtual:

File : bitmask/bitmask_cas_routines.irp.f

logical function is_i_in_virtual(i)

Needs:

  • n_int

  • virt_bitmask

is_integer_in_string:

File : bitmask/bitmasks_routines.irp.f

logical function is_integer_in_string(bite,string,Nint)

Calls:

  • set_bit_to_integer()

is_the_hole_in_det:

File : bitmask/find_hole.irp.f

logical function is_the_hole_in_det(key_in,ispin,i_hole)

Needs:

  • n_int

is_the_particl_in_det:

File : bitmask/find_hole.irp.f

logical function is_the_particl_in_det(key_in,ispin,i_particl)

Needs:

  • n_int

list_to_bitstring:

File : bitmask/bitmasks_routines.irp.f

subroutine list_to_bitstring( string, list, n_elements, Nint)

Returns the physical string “string(N_int,2)” from the array of occupations “list(N_int*bit_kind_size,2)

Called by:

  • act_bitmask

  • core_bitmask

  • del_bitmask

  • generate_cas_space()

  • hf_bitmask

  • inact_bitmask

  • orb_range_2_rdm_openmp_work_1()

  • orb_range_2_rdm_openmp_work_2()

  • orb_range_2_rdm_openmp_work_3()

  • orb_range_2_rdm_openmp_work_4()

  • orb_range_2_rdm_openmp_work_n_int()

  • orb_range_2_rdm_state_av_openmp_work_1()

  • orb_range_2_rdm_state_av_openmp_work_2()

  • orb_range_2_rdm_state_av_openmp_work_3()

  • orb_range_2_rdm_state_av_openmp_work_4()

  • orb_range_2_rdm_state_av_openmp_work_n_int()

  • orb_range_2_trans_rdm_openmp_work_1()

  • orb_range_2_trans_rdm_openmp_work_2()

  • orb_range_2_trans_rdm_openmp_work_3()

  • orb_range_2_trans_rdm_openmp_work_4()

  • orb_range_2_trans_rdm_openmp_work_n_int()

  • ormas_bitmask

  • virt_bitmask

modify_bitmasks_for_hole:

File : bitmask/modify_bitmasks.irp.f

subroutine modify_bitmasks_for_hole(i_hole)

modify the generators_bitmask in order that one can only excite the electrons occupying i_hole

Needs:

  • generators_bitmask

  • index_holes_bitmask

  • n_int

modify_bitmasks_for_hole_in_out:

File : bitmask/modify_bitmasks.irp.f

subroutine modify_bitmasks_for_hole_in_out(i_hole)

modify the generators_bitmask in order that one can only excite the electrons occupying i_hole

Needs:

  • generators_bitmask

  • index_holes_bitmask

modify_bitmasks_for_particl:

File : bitmask/modify_bitmasks.irp.f

subroutine modify_bitmasks_for_particl(i_part)

modify the generators_bitmask in order that one can only excite the electrons to the orbital i_part

Needs:

  • generators_bitmask

  • index_particl_bitmask

  • n_int

number_of_holes:

File : bitmask/bitmask_cas_routines.irp.f

integer function number_of_holes(key_in)

Function that returns the number of holes in the inact space

popcnt(
xor(
iand(

reunion_of_core_inact_bitmask(1,1), xor(

key_in(1,1), iand(

key_in(1,1), act_bitmask(1,1))

)

), reunion_of_core_inact_bitmask(1,1)) )

(key_in && act_bitmask) +———————+

electrons in cas xor key_in

electrons outside of cas && reunion_of_core_inact_bitmask

electrons in the core/inact space xor reunion_of_core_inact_bitmask

holes

Needs:

  • act_bitmask

  • n_int

  • reunion_of_core_inact_bitmask

number_of_holes_verbose:

File : bitmask/bitmask_cas_routines.irp.f

integer function number_of_holes_verbose(key_in)

function that returns the number of holes in the inact space

Needs:

  • act_bitmask

  • n_int

  • reunion_of_core_inact_bitmask

Calls:

  • debug_det()

number_of_particles:

File : bitmask/bitmask_cas_routines.irp.f

integer function number_of_particles(key_in)

function that returns the number of particles in the virtual space

Needs:

  • act_bitmask

  • n_int

  • virt_bitmask

number_of_particles_verbose:

File : bitmask/bitmask_cas_routines.irp.f

integer function number_of_particles_verbose(key_in)

function that returns the number of particles in the inact space

Needs:

  • act_bitmask

  • n_int

  • virt_bitmask

Calls:

  • debug_det()

ormas_occ:

File : bitmask/bitmasks_ormas.irp.f

subroutine ormas_occ(key_in, occupancies)

number of electrons in each ormas space

Needs:

  • n_int

  • ormas_bitmask

  • ormas_n_space

print_det:

File : bitmask/bitmasks_routines.irp.f

subroutine print_det(string,Nint)

Subroutine to print the content of a determinant using the ‘+-’ notation

Called by:

  • debug_det()

  • example_determinants()

  • print_generators_bitmasks_particles()

Calls:

  • bitstring_to_str()

print_det_one_dimension:

File : bitmask/bitmasks_routines.irp.f

subroutine print_det_one_dimension(string,Nint)

Subroutine to print the content of a determinant using the ‘+-’ notation

Calls:

  • bitstring_to_str()

print_generators_bitmasks_holes:

File : bitmask/modify_bitmasks.irp.f

subroutine print_generators_bitmasks_holes

Needs:

  • generators_bitmask

  • index_holes_bitmask

  • n_int

print_generators_bitmasks_particles:

File : bitmask/modify_bitmasks.irp.f

subroutine print_generators_bitmasks_particles

Needs:

  • generators_bitmask

  • index_particl_bitmask

  • n_int

Calls:

  • print_det()

print_spindet:

File : bitmask/bitmasks_routines.irp.f

subroutine print_spindet(string,Nint)

Subroutine to print the content of a determinant using the ‘+-’ notation

Called by:

  • debug_spindet()

Calls:

  • bitstring_to_str()

reorder_core_orb:

File : bitmask/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:

  • ao_num

  • ao_overlap

  • list_core

  • mo_coef

  • mo_coef_begin_iteration

  • mo_num

  • n_core_orb

Called by:

  • damping_scf()

  • roothaan_hall_scf()

Calls:

  • dsort()

set_bit_to_integer:

File : bitmask/bitmasks_routines.irp.f

subroutine set_bit_to_integer(i_physical,key,Nint)

set to 1 the bit number i_physical in the bitstring key

Called by:

  • example_bitmask()

  • is_integer_in_string()

  • orb_swap

set_bitmask_hole_as_input:

File : bitmask/modify_bitmasks.irp.f

subroutine set_bitmask_hole_as_input(input_bitmask)

set the generators_bitmask for the holes as the input_bitmask

Needs:

  • generators_bitmask

  • index_holes_bitmask

  • n_int

Touches:

  • generators_bitmask

set_bitmask_particl_as_input:

File : bitmask/modify_bitmasks.irp.f

subroutine set_bitmask_particl_as_input(input_bitmask)

set the generators_bitmask for the particles as the input_bitmask

Needs:

  • generators_bitmask

  • index_particl_bitmask

  • n_int

Touches:

  • generators_bitmask