This module is for the calculation of spin configurations according to genealogical coupling written by Ludger Inhester in 2016 at DESY CFEL
structure to keep precompute spin coupling matrices
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | nopenmax |
maximum numer of open shells |
|||
integer, | public | :: | multp |
spin multiplicity |
|||
integer, | public, | allocatable | :: | f(:) |
number of spin configurations for multp for given number of open shells |
||
integer, | public, | allocatable | :: | indn(:) |
starting index for n open shells |
||
real(kind=long), | public, | allocatable | :: | umatrix(:) |
array containing Umarix data |
||
real(kind=long), | public, | allocatable | :: | ucyclematrix(:) |
array containing Umarix data |
returns the number of possible spin configurations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nopen |
number of open shells |
||
integer, | intent(in) | :: | multp |
spin multiplicity |
number of configurations
returns the coefficient for determinant specified by determinant path P in csf specified by path T
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | t(:) | |||
integer, | intent(in) | :: | p(:) |
returns a readable string for printing out determinant specified by occupation and determinant path det
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | det(:) |
returns printable string for a given spin configuration
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | csf(:) |
make a table of coupling matrices for a set of transpositions of a set of maximal NopenMax un-paired electrons
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nopenmax | |||
integer, | intent(in) | :: | multp | |||
type(umatrixtable), | intent(out) | :: | ut |
deallocates Umatrixtable structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(umatrixtable), | intent(inout) | :: | ut |
returns the coupling matrix for translocation mu-<nu using the previously prepared table UT
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(umatrixtable), | intent(in) | :: | ut | |||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | mu | |||
integer, | intent(in) | :: | nu | |||
real(kind=long), | intent(out) | :: | u(:,:) |
returns the coupling matrix for translocation mu-<nu using the previously prepared table UT
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(umatrixtable), | intent(in) | :: | ut | |||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | mu | |||
integer, | intent(in) | :: | nu | |||
real(kind=long), | intent(out) | :: | u(:,:) |
returns the one-particle density matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=long), | intent(out) | :: | dm(:,:) | |||
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | dets(:,:) | |||
integer, | intent(in) | :: | csf(:) |
symmetrized two particle density matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=long), | intent(out) | :: | s_tpdm(:) | |||
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | dets(:,:) | |||
integer, | intent(in) | :: | csf(:) |
routine calculates the genealogical pathes for all high spin determinants for given multiplicity multp with Nopen open shells. pathes are returned in arrays dets(1:Nopen,:) example pathes for multp=2 and Nopen=3 1,2,1 means spin up up down 1,0,1 means spin up down up -1,0,1 means spin down up up
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nopen | |||
integer, | intent(in) | :: | multp | |||
integer, | intent(out), | allocatable | :: | dets(:,:) |
routine calculates the genealogical pathes for all configuration state functions for given multiplicity multp with Nopen open shells. pathes are returned in arrays csfs(1:Nopen, :) example pathes for multp=2 and Nopen=3 there are two spin configurations: 1,2,1 means spin configuration '//\' 1,0,1 means spin configuration '/\/'
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nopen | |||
integer, | intent(in) | :: | multp | |||
integer, | intent(out), | allocatable | :: | csfs(:,:) |
returns a determinant given in genealogical path as alpha and beta strings plus sign
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | det(:) | |||
integer, | intent(out) | :: | spin_string_a(:) | |||
integer, | intent(out) | :: | spin_string_b(:) | |||
integer, | intent(inout) | :: | sign |
compares two determinants specified by determinant path left_det(1:Nopen) right_det(1:Nopen) and occupation left_occ(:) and right_occ(:), respectively. only_left(1:M) and only_right(1:M) returns the orbital indices of electrons that are only present in left and right determinant only_left_spin(1:M) and only_right_spin(1:M) the respective spin of the electrons coef_sign returns the sign produced by flips to bring the determinants into best congruence. The array length M can be arbitrarily. When the number of electrons only present in one determinant exceeds M comparison is quit and coef_sign=0 is returned
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | coef_sign | |||
integer, | intent(out) | :: | only_left(:) | |||
integer, | intent(out) | :: | only_left_spin(:) | |||
integer, | intent(out) | :: | only_right(:) | |||
integer, | intent(out) | :: | only_right_spin(:) | |||
integer, | intent(in) | :: | left_occ(:) | |||
integer, | intent(in) | :: | left_det(:) | |||
integer, | intent(in) | :: | right_occ(:) | |||
integer, | intent(in) | :: | right_det(:) |
computes coupling matrix for transposition uj->ui oj is moved down to position oi
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(umatrixtable), | intent(in) | :: | ut | |||
integer, | intent(in) | :: | oi | |||
integer, | intent(in) | :: | oj | |||
integer, | intent(in) | :: | nsingle | |||
real(kind=long), | intent(out) | :: | u(:,:) | |||
logical, | intent(in), | optional | :: | yes_cache |