lattice_models_utils Module



Contents


Interfaces

public interface swap_excitations

  • private subroutine swap_excitations_higher(nI, ex, nJ, ex2)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nI(nel)
    integer, intent(in) :: ex(:,:)
    integer, intent(out) :: nJ(nel)
    integer, intent(out), allocatable :: ex2(:,:)
  • private subroutine swap_excitations_singles(nI, ex, nJ, ex2)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nI(nel)
    integer, intent(in) :: ex(2)
    integer, intent(out) :: nJ(nel)
    integer, intent(out) :: ex2(2)

Functions

public function create_all_dets(n_orbs, n_alpha, n_beta) result(all_dets)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_alpha
integer, intent(in) :: n_beta

Return Value integer(kind=n_int), allocatable, (:)

public function create_heisenberg_fock_space_guga(n_orbs) result(heisenberg_fock)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs

Return Value integer(kind=n_int), allocatable, (:,:)

public function create_heisenberg_fock_space(n_orbs) result(heisenberg_fock)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs

Return Value integer(kind=n_int), allocatable, (:,:)

public function create_all_open_shell_dets(n_orbs, n_alpha, n_beta) result(open_shells)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_alpha
integer, intent(in) :: n_beta

Return Value integer(kind=n_int), allocatable, (:,:)

public function combine_spin_basis(n_orbs, n_first, n_second, n_total, first_basis, t_sort, n_doubles) result(spin_basis)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_first
integer, intent(in) :: n_second
integer, intent(in) :: n_total
integer(kind=n_int), intent(in) :: first_basis(:)
logical, intent(in) :: t_sort
integer, intent(in), optional :: n_doubles

Return Value integer(kind=n_int), (0:0,n_total)

private function general_product(alpha, beta, n_orbs) result(basis)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: alpha
integer(kind=n_int), intent(in) :: beta
integer, intent(in) :: n_orbs

Return Value integer(kind=n_int)

private function open_shell_product(alpha, beta, n_orbs) result(basis)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: alpha
integer(kind=n_int), intent(in) :: beta
integer, intent(in) :: n_orbs

Return Value integer(kind=n_int)

public function set_alpha_beta_spins(beta_mask, n_orbs, t_beta) result(beta_spins)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: beta_mask
integer, intent(in) :: n_orbs
logical, intent(in) :: t_beta

Return Value integer(kind=n_int)

public function create_one_spin_basis(n_orbs, n_spins) result(one_spin_basis)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_spins

Return Value integer(kind=n_int), allocatable, (:)

public function right_most_zero(i, n_orbs)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: i
integer, intent(in) :: n_orbs

Return Value integer

public function calc_n_double(n_orbs, n_alpha, n_beta) result(n_double)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_alpha
integer, intent(in) :: n_beta

Return Value integer, allocatable, (:)

public function get_opp_spin(ilut, spin_orb) result(opp_spin)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: spin_orb

Return Value real(kind=dp)

public function get_spin_opp_neighbors(ilut, spin_orb) result(spin_opp_neighbors)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:niftot)
integer, intent(in) :: spin_orb

Return Value real(kind=dp)

public function create_neel_state(ilut_neel) result(neel_state)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(out), optional :: ilut_neel(0:NIfTot)

Return Value integer, (nel)

public function create_neel_state_chain() result(neel_state)

Arguments

None

Return Value integer, (nel)

public function get_orb_from_kpoints_three(src, orb_a, orb_b) result(orb_c)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: src(3)
integer, intent(in) :: orb_a
integer, intent(in) :: orb_b

Return Value integer

public function find_minority_spin(spins) result(opp)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: spins(:)

Return Value integer

public function get_orb_from_kpoints(orbi, orbj, orba) result(orbb)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: orbi
integer, intent(in) :: orbj
integer, intent(in) :: orba

Return Value integer

public function get_ispn(src) result(ispn)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: src(2)

Return Value integer

public function make_ilutJ(ilutI, ex, ic) result(ilutJ)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilutI(0:niftot)
integer, intent(in) :: ex(2,ic)
integer, intent(in) :: ic

Return Value integer(kind=n_int), (0:niftot)

public function find_elec_in_ni(nI, orb) result(elec)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(in) :: orb

Return Value integer

public function get_occ_neighbors(ilut, orb) result(occ_neighbors)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: orb

Return Value real(kind=dp)

public function get_spin_density_neighbors(ilut, orb) result(spin_dens_neighbors)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: orb

Return Value real(kind=dp)


Subroutines

private subroutine swap_excitations_higher(nI, ex, nJ, ex2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(in) :: ex(:,:)
integer, intent(out) :: nJ(nel)
integer, intent(out), allocatable :: ex2(:,:)

private subroutine swap_excitations_singles(nI, ex, nJ, ex2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(in) :: ex(2)
integer, intent(out) :: nJ(nel)
integer, intent(out) :: ex2(2)

public subroutine pick_spin_opp_elecs(nI, elecs, p_elec)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: elecs(2)
real(kind=dp), intent(out) :: p_elec

public subroutine pick_from_cum_list(cum_arr, cum_sum, ind, pgen)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: cum_arr(:)
real(kind=dp), intent(in) :: cum_sum
integer, intent(out) :: ind
real(kind=dp), intent(out) :: pgen

public subroutine gen_all_excits_r_space_hubbard(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

private subroutine spin_purify(n_excits_in, det_list_in, n_excits_out, det_list_out)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_excits_in
integer(kind=n_int), intent(in) :: det_list_in(0:NIfTot,n_excits_in)
integer, intent(out) :: n_excits_out
integer(kind=n_int), intent(out), allocatable :: det_list_out(:,:)

private subroutine gen_all_doubles_rs_hub_hop_transcorr(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

public subroutine gen_all_singles_rs_hub(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

private subroutine gen_all_singles_rs_hub_hop_transcorr(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

public subroutine gen_all_singles_rs_hub_default(nI, n_excits, det_list, sign_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)
real(kind=dp), intent(out), optional, allocatable :: sign_list(:)

public subroutine create_hilbert_space_realspace(n_orbs, n_alpha, n_beta, n_states, state_list_ni, state_list_ilut)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_orbs
integer, intent(in) :: n_alpha
integer, intent(in) :: n_beta
integer, intent(out) :: n_states
integer, intent(out), allocatable :: state_list_ni(:,:)
integer(kind=n_int), intent(out), allocatable :: state_list_ilut(:,:)

public subroutine pick_spin_opp_holes(ilutI, orbs, p_orb)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
integer, intent(out) :: orbs(2)
real(kind=dp), intent(out) :: p_orb

public subroutine pick_random_hole(ilutI, orb, p_orb, spin)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
integer, intent(out) :: orb
real(kind=dp), intent(out) :: p_orb
integer, intent(in), optional :: spin

public subroutine gen_all_excits_k_space_hubbard(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

public subroutine create_hilbert_space_kspace(n_alpha, n_beta, n_orbs, nI, n_states, state_list_ni, state_list_ilut)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_alpha
integer, intent(in) :: n_beta
integer, intent(in) :: n_orbs
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_states
integer, intent(out), allocatable :: state_list_ni(:,:)
integer(kind=n_int), intent(out), allocatable :: state_list_ilut(:,:)

public subroutine pick_three_opp_elecs(nI, elecs, p_elec, opt_sum_ms)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: elecs(3)
real(kind=dp), intent(out) :: p_elec
integer, intent(out), optional :: opt_sum_ms

public subroutine pick_spin_par_elecs(nI, elecs, p_elec, opt_ispn)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: elecs(2)
real(kind=dp), intent(out) :: p_elec
integer, intent(out), optional :: opt_ispn

public subroutine gen_all_triples_k_space(nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

public subroutine gen_all_doubles_k_space(ni, n_excits, det_list, sign_list)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ni(nel)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)
real(kind=dp), intent(out), optional, allocatable :: sign_list(:)