unit_test_helper_excitgen Module



Contents


Variables

Type Visibility Attributes Name Initial
procedure(calc_pgen_t), public, pointer :: calc_pgen

Interfaces

public interface RandomFcidumpWriter_t

  • private pure function construct_RandomFciDumpWriter_t(n_spat_orbs, nI, sparse, sparseT, filepath, uhf, hermitian) result(res)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: n_spat_orbs
    integer, intent(in) :: nI(:)
    real(kind=dp), intent(in) :: sparse
    real(kind=dp), intent(in) :: sparseT
    character(len=*), intent(in), optional :: filepath
    logical, intent(in), optional :: uhf
    logical, intent(in), optional :: hermitian

    Return Value class(RandomFcidumpWriter_t), allocatable

  • private pure function construct_GAS_RandomFciDumpWriter_t(GAS_spec, nI, sparse, sparseT, filepath, uhf, hermitian) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: GAS_spec
    integer, intent(in) :: nI(:)
    real(kind=dp), intent(in) :: sparse
    real(kind=dp), intent(in) :: sparseT
    character(len=*), intent(in), optional :: filepath
    logical, intent(in), optional :: uhf
    logical, intent(in), optional :: hermitian

    Return Value class(RandomFcidumpWriter_t), allocatable


Abstract Interfaces

abstract interface

  • private function calc_pgen_t(nI, ilutI, ex, ic, ClassCount2, ClassCountUnocc2) result(pgen)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nI(nel)
    integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
    integer, intent(in) :: ex(2,2)
    integer, intent(in) :: ic
    integer, intent(in) :: ClassCount2(ScratchSize)
    integer, intent(in) :: ClassCountUnocc2(ScratchSize)

    Return Value real(kind=dp)

abstract interface

  • private subroutine to_unit_writer_t(this, iunit)

    Arguments

    Type IntentOptional Attributes Name
    class(Writer_t), intent(in) :: this
    integer, intent(in) :: iunit

Derived Types

type, public ::  Writer_t

Components

Type Visibility Attributes Name Initial
character(len=512), public :: filepath

Type-Bound Procedures

procedure , public , :: write Subroutine
procedure (to_unit_writer_t) , public :: write_to_unit

type, public, extends(Writer_t) ::  FciDumpWriter_t

Components

Type Visibility Attributes Name Initial
character(len=512), public :: filepath

Type-Bound Procedures

procedure , public , :: write Subroutine
procedure (to_unit_writer_t) , public :: write_to_unit

type, public, extends(FciDumpWriter_t) ::  RandomFcidumpWriter_t

Components

Type Visibility Attributes Name Initial
character(len=512), public :: filepath
integer, public :: n_el
integer, public :: n_spat_orb
real(kind=dp), public :: sparse
real(kind=dp), public :: sparseT
type(SpinProj_t), public :: total_ms
logical, public :: uhf
logical, public :: hermitian

Constructor

private pure function construct_RandomFciDumpWriter_t (n_spat_orbs, nI, sparse, sparseT, filepath, uhf, hermitian)
private pure function construct_GAS_RandomFciDumpWriter_t (GAS_spec, nI, sparse, sparseT, filepath, uhf, hermitian)

Type-Bound Procedures

procedure , public , :: write Subroutine
procedure , public , :: write_to_unit => RandomFcidumpWriter_t_write Subroutine

type, public, extends(Writer_t) ::  InputWriter_t

Components

Type Visibility Attributes Name Initial
character(len=512), public :: filepath

Type-Bound Procedures

procedure , public , :: write Subroutine
procedure (to_unit_writer_t) , public :: write_to_unit

Functions

private pure function construct_RandomFciDumpWriter_t(n_spat_orbs, nI, sparse, sparseT, filepath, uhf, hermitian) result(res)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_spat_orbs
integer, intent(in) :: nI(:)
real(kind=dp), intent(in) :: sparse
real(kind=dp), intent(in) :: sparseT
character(len=*), intent(in), optional :: filepath
logical, intent(in), optional :: uhf
logical, intent(in), optional :: hermitian

Return Value class(RandomFcidumpWriter_t), allocatable

private pure function construct_GAS_RandomFciDumpWriter_t(GAS_spec, nI, sparse, sparseT, filepath, uhf, hermitian) result(res)

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec
integer, intent(in) :: nI(:)
real(kind=dp), intent(in) :: sparse
real(kind=dp), intent(in) :: sparseT
character(len=*), intent(in), optional :: filepath
logical, intent(in), optional :: uhf
logical, intent(in), optional :: hermitian

Return Value class(RandomFcidumpWriter_t), allocatable


Subroutines

public subroutine test_excitation_generator(sampleSize, pTot, pNull, numEx, nFound, t_calc_pgen, start_nI)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sampleSize
real(kind=dp), intent(out) :: pTot
real(kind=dp), intent(out) :: pNull
integer, intent(out) :: numEx
integer, intent(out) :: nFound
logical, intent(in) :: t_calc_pgen
integer, intent(in), optional :: start_nI(nEl)

public subroutine init_excitgen_test(ref_det, fcidump_writer, setdefaults)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ref_det(:)
class(FciDumpWriter_t), intent(in) :: fcidump_writer
logical, intent(in), optional :: setdefaults

whether or not to set the default flags in this function IMO this should be done using test fixtures and not in this function, but much of the existing tests rely on it being here

public subroutine finalize_excitgen_test()

Arguments

None

public subroutine generate_random_integrals(iunit, n_el, n_spat_orb, sparse, sparseT, total_ms, uhf, hermitian)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iunit
integer, intent(in) :: n_el
integer, intent(in) :: n_spat_orb
real(kind=dp), intent(in) :: sparse
real(kind=dp), intent(in) :: sparseT
type(SpinProj_t), intent(in) :: total_ms
logical, intent(in), optional :: uhf

specify if the FCIDUMP is UHF specify if the FCIDUMP is hermitian

Read more…
logical, intent(in), optional :: hermitian

specify if the FCIDUMP is UHF specify if the FCIDUMP is hermitian

Read more…

public subroutine generate_uniform_integrals()

Arguments

None

public subroutine set_ref()

Arguments

None

public subroutine free_ref()

Arguments

None

public subroutine delete_file(path)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

private subroutine RandomFcidumpWriter_t_write(this, iunit)

Arguments

Type IntentOptional Attributes Name
class(RandomFcidumpWriter_t), intent(in) :: this
integer, intent(in) :: iunit

private subroutine write(this)

Arguments

Type IntentOptional Attributes Name
class(Writer_t), intent(in) :: this