MPI-SCATCI  2.0
An MPI version of SCATCI
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. More...
 
subroutine finalize_manager (this)
 Release all memory used by the instance. More...
 
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. More...
 
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 800 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 462 of file CSF_module.F90.

Here is the call graph for this function:

◆ 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 292 of file CSF_module.F90.

Here is the call graph for this function:

◆ destroy_orbitals()

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

Definition at line 457 of file CSF_module.F90.

Here is the caller graph for this function:

◆ 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 488 of file CSF_module.F90.

Here is the call graph for this function:

◆ 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
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 567 of file CSF_module.F90.

Here is the caller graph for this function:

◆ get_beta()

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

Definition at line 551 of file CSF_module.F90.

Here is the caller graph for this function:

◆ 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 810 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 675 of file CSF_module.F90.

Here is the caller graph for this function:

◆ 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 593 of file CSF_module.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 618 of file CSF_module.F90.

Here is the caller graph for this function:

◆ 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 576 of file CSF_module.F90.

Here is the caller graph for this function:

◆ partition()

subroutine csf_module::partition ( integer, dimension(:), intent(inout)  A,
integer, intent(out)  marker,
real(wp), intent(inout)  phase 
)
private

Definition at line 849 of file CSF_module.F90.

Here is the caller graph for this function:

◆ print_all_csfs()

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

Definition at line 445 of file CSF_module.F90.

◆ print_csf()

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

Definition at line 440 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 522 of file CSF_module.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qsortdets()

recursive subroutine csf_module::qsortdets ( integer, dimension(:), intent(inout)  A,
real(wp), intent(inout)  phase 
)
private

Definition at line 835 of file CSF_module.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
private

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 502 of file CSF_module.F90.