CONGEN 5.0
Configuration generation for SCATCI
Loading...
Searching...
No Matches
congen_data.f90
Go to the documentation of this file.
1! Copyright 2019
2!
3! For a comprehensive list of the developers that contributed to these codes
4! see the UK-AMOR website.
5!
6! This file is part of UKRmol-in (UKRmol+ suite).
7!
8! UKRmol-in is free software: you can redistribute it and/or modify
9! it under the terms of the GNU General Public License as published by
10! the Free Software Foundation, either version 3 of the License, or
11! (at your option) any later version.
12!
13! UKRmol-in is distributed in the hope that it will be useful,
14! but WITHOUT ANY WARRANTY; without even the implied warranty of
15! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16! GNU General Public License for more details.
17!
18! You should have received a copy of the GNU General Public License
19! along with UKRmol-in (in source/COPYING). Alternatively, you can also visit
20! <https://www.gnu.org/licenses/>.
21!> \brief Module containing parameters / data required throughout the CONGEN program.
22!> \authors J Carr
23!> \date 2010
24!>
25!> This module defines many variables that for instance set hard-coded limits on various arrays used in the program
26!> that are not expected to need dynamic allocation (e.g. maximal number of irreducible representation), or other
27!> frequently used specific numbers (e.g. id of standard input unit or general math constants).
28!>
29!> Besides these parameters a lot of variables shared between CONGEN's routines are defined (and documented) here to
30!> avoid extensive argument lists.
31!>
33
34 use precisn, only : wp
35 use consts, only : xhalf
36
37 save
38
39 integer, parameter :: lg = 75 !< ??? used to dimension arrays below; also in CPLE[A,M].
40 integer, parameter :: nu = 20 !< Maximal number of irreducible representation (= max dimension of NOB etc.).
41 integer, parameter :: ny = 150 !< Used to dimension REFGU and REFORB in csfgen. Limit on input variable NREFO.
42 integer, parameter :: nz = 150 !< Used to dimension REFDET in \ref congen_driver::csfgen; maximum number of electrons.
43 integer, parameter :: jx = 75 !< Used to dimension many arrays in \ref congen_driver::csfgen; limit on the sum of elements in the NSHLP array.
44 integer, parameter :: jy = 10 !< Used to dimension various arrays in csfgen including NELECP and NSHLP.
45 !< Limit on input variable NDPROD.
46 integer, parameter :: jz = 10 !< Maximum number of constraints upon CSFs accepted (limit on input variable NTCON).
47 integer, parameter :: ky = 75 !< Used to dimension REFGUG and REFORG in congen_driver::csfgen. Limit on input variable NREFOG?
48 integer, parameter :: kz = 500 !< Used to dimension REFDTG in csfgen; limit on input variable NELECG?
49 integer, parameter :: mxtarg = 300 !< Maximum number of target state symmetries.
50
51 real(kind=wp), parameter :: root2 = 0.7071067811865475_wp !< Note that this is actually inverse square root!
52 real(kind=wp), parameter :: thresh1 = 1.e-10_wp !< Threshold used in \ref congen_distribution::cgcoef.
53 real(kind=wp), parameter :: thresh2 = 1.0e-30_wp !< Threshold used in \ref congen_projection::wfgntr.
54
55 integer, parameter :: nitem = 9 !< Number of interesting things printed per line in the PRINT* routines.
56 integer, parameter :: nftr = 5 !< Unit number for reading standard input.
57 integer :: nftw = 6 !< Unit number for printing; may be changed via the STATE namelist so not a parameter.
58
59 character(len=4), dimension(3), parameter :: blnk43 = &
60 (/ ' ', ' ', ' ' /)
61 character(len=8), dimension(7), parameter :: header = &
62 (/ 'SHELL NO', 'OCCSHL ', 'SYM ', 'GUSHL ', 'PQN ', 'QNSHL ', 'CUP ' /)
63 character(len=4), dimension(7), parameter :: rhead = &
64 (/ ' ', 'MSHL', 'PQN ', 'NES ', 'SO1 ', 'SO2 ', 'G/U ' /)
65
66 character(len=3), parameter :: lp = ' ( '
67 character(len=1), parameter :: star = '*'
68
69 character(len=1), dimension(132) :: head !< String with output page number and user-specific header text.
70 integer :: lppmax !< Pagination limit - how many lines between two headers.
71 integer :: lppr !< Global output line counter -- number of lines on current page.
72 integer :: npage !< Page counter, currently limited to 3 digits (see \ref congen_pagecontrol::addl).
73
74 integer :: lratio !< Ratio of real size to integer size. Used to manage workspace data.
75 integer :: icdi !< Position in workspace where the determinant coefficients start (one coeff per one determinant).
76 integer :: iexcon !< Position in workspace where EX constraints start.
77 integer :: indi !< Position in workspace where packed determinants start (each as size + replacements).
78 integer :: inodi !< Position in workspace where CSFs start (as number of determinants per CSF).
79 integer :: iqnstr !< Starting position in workspace for per-shell quantum numbers (e.g. \ref congen_distribution::cplem).
80 integer :: irfcon !<
81 integer :: ndel !< Workspace position used for the CSFs read from input.
82 integer :: ndel1 !< Workspace position used for reading CSFs from the input.
83 integer :: ndel2 !< Workspace position used for reading CSFs from the input.
84 integer :: gutot !< Total gerade (= +1) / ungerade (= -1) quantum number.
85 integer :: nisz !< Total S_z, set by CSFGEN, defaults to first element of \ref qntot.
86 integer :: nndel !< Number of workspace elements used for reservation of space needed when reading CSFs from input.
87 integer :: nnlecg !< The total number of electrons which are movable within the current wfn group.
88 integer :: symtyp !< Symmetry type, 0 = C_infv, 1 = D_infh, 2 = {D_2h, C_2v, C_s, E}.
89
90 integer, dimension(3,lg) :: cup !< Coupling scheme data. ???
91 integer, dimension(3,lg) :: pqnst !<
92 integer, dimension(lg) :: gushl !< Gerade/ungerade per shell.
93 integer, dimension(lg) :: mshl !< Symmetry number from zero to n-1 (mvalue).
94 integer, dimension(lg) :: occshl !< Compressed shell occupations, all zeros deleted and pseudo shells expanded.
95 integer, dimension(lg) :: qnshlr !< Total quantum numbers for all shells in the set of orbitals being processed.
96 integer, dimension(lg) :: spnmin !<
97 integer, dimension(lg) :: sshlst !<
98 integer, dimension(2,lg) :: kslim !<
99 integer, dimension(2,lg) :: mclim !<
100 integer, dimension(3,2*lg) :: qnshl !<
101 integer, dimension(3) :: qntar !< Coupling control for current wfn group. ???
102 integer, dimension(3) :: qntot !< Total quantum numbers.
103 integer, dimension(nu) :: shlmx1 !< Maximal occupancy of orbitals per symmetry.
104
105 integer, parameter :: jsmax = 20 !< Maximal order of precomputed binomial coefficients.
106 real(kind=wp), dimension((jsmax*jsmax + 3*jsmax + 4)/2) :: binom !< Table of precomputed Pascal triangle.
107 integer, dimension(jsmax+2) :: ind !< Pascal triangle row pointers into \ref congen_data::binom.
108
109 integer :: ift !< Used to signal to \ref congen_distribution::assign to initialize some variables.
110 integer :: nobt !< Total number of all orbitals considered in the calculation, essentially equal to sum(nob).
111 integer :: ntcon !<
112 integer :: nsym !< Number of symmetries given in input file (right-trimmed of those with zero orbitals).
113
114 integer, dimension(nu) :: nobi !< Running index of the first orbital in each symmetry.
115 integer, dimension(nu) :: nshsym !<
116 integer, dimension(jz) :: nrcon !<
117 integer, dimension(jz) :: test !< Determines which of the two types of constraints will be used.
118 integer, dimension(nu,lg) :: nst !< Pointer to shell index and order count; only used in \ref congen_distribution::assign.
119
120 integer :: confpf !< Print flag for the amount of print given of configurations and prototypes.
121 integer :: ncsf !< Total number of CSFs generated.
122 integer :: ne !<
123 integer :: nshl !< Number of shells in the set of orbitals currently being processed.
124 integer :: ntyp !< Prototype number, updated in \ref congen_distribution::distrb.
125 integer :: cdimx !< Maximal number of determinants.
126 integer :: ndist !< Number of distributions generated from set of shells (set in \ref congen_distribution::assign).
127 integer :: nstate !< Number of couplings computed in \ref congen_distribution::cplea or \ref congen_distribution::cplem.
128 integer :: megul !< File unit for binary output of generated configurations.
129 integer :: ncall !< Used to signal to "wfn" to initialize some variables.
130 integer :: ndimx !< Maximal number of workspace elements usable for packed determinant data.
131 integer :: nncsf !< Number of CSFs generated by \ref congen_distribution::wfn (total).
132 integer :: nodimx !< Maximal number of workspace elements usable for CSF information.
133 integer :: ntso !< Total number of spin-orbitals, given the orbitals and their maximal occupacy (from group properties).
134
135 integer, allocatable :: exdet(:) !< \todo Local to \ref congen_distribution::wfn - move it there!
136 integer, allocatable :: exref(:) !< Population of spin-orbitals (0 = not populated, 1 = populated).
137 integer, dimension(lg) :: nonew !<
138 integer, dimension(lg) :: norep !<
139 integer, dimension(nu) :: nsoi !< Running index of the first spin-orbital within given total symmetry.
140
141 integer :: iidis2 !<
142 integer :: lcdi !< Total number of determinants (including those already flushed to disk).
143 integer :: lndi !< Total number of integers forming packed determinants.
144 integer :: ni !< Number of determinants currently in memory.
145 integer :: nid !< Length of the integer array containing all packed determinants.
146 integer :: noi !< Number of determinants per CSF.
147 integer :: next !< Position in the workspace indicating the first unused element.
148 integer :: nx !< Full or remaining workspace size (depending on context).
149 integer :: idcp !<
150 integer :: idop !<
151 integer :: ieltp !<
152
153end module congen_data
Module containing parameters / data required throughout the CONGEN program.
integer ndel
Workspace position used for the CSFs read from input.
integer nobt
Total number of all orbitals considered in the calculation, essentially equal to sum(nob).
real(kind=wp), parameter root2
Note that this is actually inverse square root!
integer, dimension(nu) shlmx1
Maximal occupancy of orbitals per symmetry.
integer lndi
Total number of integers forming packed determinants.
integer, dimension(lg) norep
integer, dimension(jz) test
Determines which of the two types of constraints will be used.
integer, parameter jsmax
Maximal order of precomputed binomial coefficients.
integer, parameter nz
Used to dimension REFDET in congen_driver::csfgen; maximum number of electrons.
integer icdi
Position in workspace where the determinant coefficients start (one coeff per one determinant).
integer, dimension(lg) gushl
Gerade/ungerade per shell.
integer, parameter nftr
Unit number for reading standard input.
integer, dimension(nu, lg) nst
Pointer to shell index and order count; only used in congen_distribution::assign.
integer, parameter kz
Used to dimension REFDTG in csfgen; limit on input variable NELECG?
integer gutot
Total gerade (= +1) / ungerade (= -1) quantum number.
integer iqnstr
Starting position in workspace for per-shell quantum numbers (e.g. congen_distribution::cplem).
integer indi
Position in workspace where packed determinants start (each as size + replacements).
real(kind=wp), dimension((jsmax *jsmax+3 *jsmax+4)/2) binom
Table of precomputed Pascal triangle.
integer, parameter ny
Used to dimension REFGU and REFORB in csfgen. Limit on input variable NREFO.
integer lppmax
Pagination limit - how many lines between two headers.
integer nisz
Total S_z, set by CSFGEN, defaults to first element of qntot.
character(len=4), dimension(3), parameter blnk43
integer, dimension(lg) qnshlr
Total quantum numbers for all shells in the set of orbitals being processed.
integer ntyp
Prototype number, updated in congen_distribution::distrb.
character(len=1), dimension(132) head
String with output page number and user-specific header text.
integer ndel1
Workspace position used for reading CSFs from the input.
integer megul
File unit for binary output of generated configurations.
integer ntso
Total number of spin-orbitals, given the orbitals and their maximal occupacy (from group properties).
integer, parameter nitem
Number of interesting things printed per line in the PRINT* routines.
integer, dimension(:), allocatable exref
Population of spin-orbitals (0 = not populated, 1 = populated).
integer lppr
Global output line counter – number of lines on current page.
integer, dimension(2, lg) mclim
integer, parameter jz
Maximum number of constraints upon CSFs accepted (limit on input variable NTCON).
integer, dimension(3) qntot
Total quantum numbers.
integer, dimension(jz) nrcon
integer nstate
Number of couplings computed in congen_distribution::cplea or congen_distribution::cplem.
integer nndel
Number of workspace elements used for reservation of space needed when reading CSFs from input.
integer, dimension(jsmax+2) ind
Pascal triangle row pointers into congen_data::binom.
integer nshl
Number of shells in the set of orbitals currently being processed.
integer, dimension(:), allocatable exdet
integer confpf
Print flag for the amount of print given of configurations and prototypes.
integer, dimension(2, lg) kslim
integer nnlecg
The total number of electrons which are movable within the current wfn group.
integer, dimension(nu) nsoi
Running index of the first spin-orbital within given total symmetry.
integer, parameter jy
Used to dimension various arrays in csfgen including NELECP and NSHLP. Limit on input variable NDPROD...
integer ift
Used to signal to congen_distribution::assign to initialize some variables.
integer ndist
Number of distributions generated from set of shells (set in congen_distribution::assign).
integer, dimension(lg) nonew
integer nncsf
Number of CSFs generated by congen_distribution::wfn (total).
integer ndel2
Workspace position used for reading CSFs from the input.
character(len=3), parameter lp
integer, parameter nu
Maximal number of irreducible representation (= max dimension of NOB etc.).
integer npage
Page counter, currently limited to 3 digits (see congen_pagecontrol::addl).
integer, dimension(3, lg) pqnst
integer, dimension(nu) nobi
Running index of the first orbital in each symmetry.
integer, parameter mxtarg
Maximum number of target state symmetries.
integer lratio
Ratio of real size to integer size. Used to manage workspace data.
integer, dimension(lg) spnmin
integer cdimx
Maximal number of determinants.
integer nid
Length of the integer array containing all packed determinants.
integer, dimension(3, 2 *lg) qnshl
integer ndimx
Maximal number of workspace elements usable for packed determinant data.
integer nsym
Number of symmetries given in input file (right-trimmed of those with zero orbitals).
integer ncall
Used to signal to "wfn" to initialize some variables.
integer iexcon
Position in workspace where EX constraints start.
integer lcdi
Total number of determinants (including those already flushed to disk).
integer irfcon
integer, dimension(nu) nshsym
integer, dimension(3, lg) cup
Coupling scheme data. ???
integer, parameter ky
Used to dimension REFGUG and REFORG in congen_driver::csfgen. Limit on input variable NREFOG?
integer ncsf
Total number of CSFs generated.
integer nftw
Unit number for printing; may be changed via the STATE namelist so not a parameter.
real(kind=wp), parameter thresh2
Threshold used in congen_projection::wfgntr.
integer next
Position in the workspace indicating the first unused element.
integer, parameter jx
Used to dimension many arrays in congen_driver::csfgen; limit on the sum of elements in the NSHLP arr...
real(kind=wp), parameter thresh1
Threshold used in congen_distribution::cgcoef.
character(len=1), parameter star
integer noi
Number of determinants per CSF.
character(len=4), dimension(7), parameter rhead
integer nx
Full or remaining workspace size (depending on context).
character(len=8), dimension(7), parameter header
integer, dimension(lg) mshl
Symmetry number from zero to n-1 (mvalue).
integer, dimension(3) qntar
Coupling control for current wfn group. ???
integer nodimx
Maximal number of workspace elements usable for CSF information.
integer ni
Number of determinants currently in memory.
integer, parameter lg
??? used to dimension arrays below; also in CPLE[A,M].
integer, dimension(lg) sshlst
integer inodi
Position in workspace where CSFs start (as number of determinants per CSF).
integer symtyp
Symmetry type, 0 = C_infv, 1 = D_infh, 2 = {D_2h, C_2v, C_s, E}.
integer, dimension(lg) occshl
Compressed shell occupations, all zeros deleted and pseudo shells expanded.