MPI-SCATCI 2.0
An MPI version of SCATCI
Loading...
Searching...
No Matches
CSF_module Module Reference

CSF module. More...

Data Types

type  CSFManager
 Configuration state function factory. More...
type  CSFObject
 Single configuration state function. More...
type  CSFOrbital
 Single determinant. More...

Functions/Subroutines

subroutine read_csf_body (this, option, orbital)
 Reads the CSFs.
subroutine finalize_manager (this)
 Release all memory used by the instance.
subroutine create_csfs (this, csf, orbital_sequence, num_ci_target_sym, continuum_projection)
 This subroutine seperates out the CSFs and creates individual objects out of them.
subroutine print_csf (this)
subroutine print_all_csfs (this, csf)
subroutine destroy_orbitals (this)
subroutine compare_excitations_fast (this, that, num_electrons, coeff, num_excitations, output_dtrs)
integer function does_it_obey_slater (this, that)
subroutine toggle_determinant (this, det0, det1, nints)
integer function pzero (det1, det2, nint)
elemental integer function get_beta (det)
elemental integer function get_alpha (det)
integer function n_excitations (det1, det2, nint)
subroutine get_excitation (det1, det2, exc, degree, phase, nint)
subroutine get_single_excitation (det1, det2, exc, phase, nint)
subroutine get_double_excitation (det1, det2, exc, phase, nint)
subroutine assign_pointer (targ, point, nints)
subroutine get_determinants (this, dtrs, nelec)
recursive subroutine QsortDets (a, phase)
subroutine Partition (a, marker, phase)

Detailed Description

CSF module.

Authors
A Al-Refaie, J Benda
Date
2017 - 2019

This module handles reading and storing of configuration state functions from CONGEN. It provides a clean way of handling CSFs than multiple arrays! Hopefully!

When MPI-3 shared memory is available, the configurations (CSFManager::int64dtrs) and coefficients (CSFManager::coeffs) are stored in an array shared across all processes.

Note
16/01/2019 - Jakub Benda: Unifom coding style and expanded documentation.

Function/Subroutine Documentation

◆ assign_pointer()

subroutine CSF_module::assign_pointer ( integer(longint), dimension(nints), intent(in), target targ,
integer(longint), dimension(:), intent(out), pointer point,
integer, intent(in) nints )
private

Definition at line 831 of file CSF_module.F90.

◆ compare_excitations_fast()

subroutine CSF_module::compare_excitations_fast ( class(csforbital), intent(in) this,
class(csforbital), intent(in) that,
integer, intent(in) num_electrons,
real(wp), intent(out) coeff,
integer, intent(out) num_excitations,
integer, dimension(4), intent(out) output_dtrs )
private

Definition at line 493 of file CSF_module.F90.

◆ create_csfs()

subroutine CSF_module::create_csfs ( class(csfmanager), intent(inout), target this,
type(csfobject), dimension(:), intent(inout), allocatable, target csf,
integer, dimension(this % num_csfs) orbital_sequence,
integer, dimension(:), intent(in) num_ci_target_sym,
integer, dimension(:), intent(in) continuum_projection )
private

This subroutine seperates out the CSFs and creates individual objects out of them.

Authors
A Al-Refaie, J Benda
Date
2017 - 2019

The unpacked determinants forming each CSF are stored as bit fields in CSFManager::int64dtrs (potentially shared across the MPI processes participating in the diagonalization) of length equal to the number of spin-orbitals and values 0 and 1 representing absence or presence of an electron in the spin-orbital. The coefficients of these determinants are then adjusted to be compatible with ascending order of spin-orbitals in the determinant (may result in sign flip).

Parameters
[in,out]thisManager object to update.
[in,out]CSFConfiguration set to construct (will be allocated).
[in]orbital_sequencePointer to orbital sequence (KPT).
[in]num_ci_target_symNumber of CI components of each target symmetry (NCTGT).
[in]continuum_projectionLambda value of the continuum orbitals associated with each target state (MCONT).

Definition at line 306 of file CSF_module.F90.

◆ destroy_orbitals()

subroutine CSF_module::destroy_orbitals ( type(csforbital) this)
private

Definition at line 488 of file CSF_module.F90.

◆ does_it_obey_slater()

integer function CSF_module::does_it_obey_slater ( class(csfobject), intent(in) this,
class(csfobject), intent(in) that )
private

Definition at line 519 of file CSF_module.F90.

◆ finalize_manager()

subroutine CSF_module::finalize_manager ( class(csfmanager), intent(inout), target this)
private

Release all memory used by the instance.

Authors
J Benda
Date
2019 - 2022
Parameters
[in,out]thisManager object to update.

Definition at line 250 of file CSF_module.F90.

◆ get_alpha()

elemental integer function CSF_module::get_alpha ( integer(longint), intent(in) det)
private

Definition at line 598 of file CSF_module.F90.

◆ get_beta()

elemental integer function CSF_module::get_beta ( integer(longint), intent(in) det)
private

Definition at line 582 of file CSF_module.F90.

◆ get_determinants()

subroutine CSF_module::get_determinants ( class(csforbital), intent(in) this,
integer, dimension(nelec), intent(out) dtrs,
integer, intent(in) nelec )
private

Definition at line 841 of file CSF_module.F90.

◆ get_double_excitation()

subroutine CSF_module::get_double_excitation ( integer(longint), dimension(nint), intent(in) det1,
integer(longint), dimension(nint), intent(in) det2,
integer, dimension(4), intent(out) exc,
double precision, intent(out) phase,
integer, intent(in) nint )
private

Definition at line 706 of file CSF_module.F90.

◆ get_excitation()

subroutine CSF_module::get_excitation ( integer(longint), dimension(nint,2), intent(in) det1,
integer(longint), dimension(nint,2), intent(in) det2,
integer, dimension(4), intent(out) exc,
integer, intent(out) degree,
double precision, intent(inout) phase,
integer, intent(in) nint )
private

Definition at line 624 of file CSF_module.F90.

◆ get_single_excitation()

subroutine CSF_module::get_single_excitation ( integer(longint), dimension(nint), intent(in) det1,
integer(longint), dimension(nint), intent(in) det2,
integer, dimension(2), intent(inout) exc,
double precision, intent(out) phase,
integer, intent(in) nint )
private

Definition at line 649 of file CSF_module.F90.

◆ n_excitations()

integer function CSF_module::n_excitations ( integer(longint), dimension(nint), intent(in) det1,
integer(longint), dimension(nint), intent(in) det2,
integer, intent(in) nint )
private

Definition at line 607 of file CSF_module.F90.

◆ Partition()

subroutine CSF_module::Partition ( integer, dimension(:), intent(inout) a,
integer, intent(out) marker,
real(wp), intent(inout) phase )
private

Definition at line 880 of file CSF_module.F90.

◆ print_all_csfs()

subroutine CSF_module::print_all_csfs ( class(csfmanager), intent(in) this,
class(csfobject), dimension(:), intent(in) csf )
private

Definition at line 476 of file CSF_module.F90.

◆ print_csf()

subroutine CSF_module::print_csf ( class(csfobject), intent(in) this)
private

Definition at line 454 of file CSF_module.F90.

◆ pzero()

integer function CSF_module::pzero ( integer(longint), dimension(nint), intent(in) det1,
integer(longint), dimension(nint), intent(in) det2,
integer, intent(in) nint )
private

Definition at line 553 of file CSF_module.F90.

◆ QsortDets()

recursive subroutine CSF_module::QsortDets ( integer, dimension(:), intent(inout) a,
real(wp), intent(inout) phase )
private

Definition at line 866 of file CSF_module.F90.

◆ read_csf_body()

subroutine CSF_module::read_csf_body ( class(csfmanager), intent(inout) this,
class(options), intent(in) option,
class(orbitaltable), intent(in), target orbital )

Reads the CSFs.

Authors
A Al-Refaie
Date
2017

Reads all configurations from CONGEN output using the SCATCI's RDWF routine and stores them in the CONGEN format. The translation from CONGEN format to MPI-SCATCI internal (bitset) representation is done in create_csfs.

Definition at line 161 of file CSF_module.F90.

◆ toggle_determinant()

subroutine CSF_module::toggle_determinant ( class(csfmanager), intent(in) this,
integer det0,
integer(longint), dimension(nints) det1,
integer, intent(in) nints )
private

Definition at line 533 of file CSF_module.F90.