CONGEN  5.0
Configuration generation for SCATCI
congen_driver Module Reference

Main CONGEN subroutines.

Functions/Subroutines

subroutine, public csfgen
 Central CONGEN subroutine. More...
 
subroutine, private csfout (ia, ib, megul, nndel, cr, nr)
 Store the wave function to file and reset arrays. More...
 
subroutine, private getcon (ntcon, nshcon, nrcon, nshgmx, npmax, nc, nelecg, nsym, nobt, nob, nobi, nsoi, shlmx1, exref, tcon, refcon, error)
 Check tcon data and form refcon array. More...
 
subroutine, private getcup (nshlt, def, nd, nshlp, cup, error)
 Set up coupling scheme. More...
 
subroutine, private getref (reforb, refgu, nrefo, nelec, refdet, nelr, nsoi, nob, shlmx, nsym, symtyp, nrfomx, e1, e2, e3)
 Form reference list of spin-orbital numbers. More...
 
subroutine, private icgcf
 Precomputes needed binomial coefficients. More...
 
subroutine, private stwrit (nelect, confpf, qntot, cdimx, icdi, ntso, symtyp, ndimx, indi, nrefo, nodimx, inodi, nsym, gutot, nbmx, isz, navail, idiag, megu, thres, lcdt, megul, lndt, nfto, nrerun, ltri, npflg, nndel, nob, nsoi, nsymp, refdet, nerfs, erfs, nrefop, reforb, refgu, nelp, lpp, sname, error, byproj, lndo, lcdo, iposit, nob0, npmult, ntgsym, mxtarg, nobe, nobp, nobv)
 Write information obtained from &state. More...
 
subroutine, private subdel (ndel, ndel1, ndel2, nndel)
 Read CSFs from input stream. More...
 
subroutine, private wfnin (nwfngp, nadel, nncsf, ncsf, lcdi, lndi, nelecg, ndprod, nrefog, npcupf, negmax, refdtg, nrfgmx, refgug, ntcon, reforg, nshgmx, nsymmx, mshl, gushl, pqn, cup, ndpmax, nshlp, nconmx, test, nrcon, nshcon, tcon, errorg)
 Set defaults for wave function group parameters. More...
 
subroutine, private wfnin0 (nelecp, defltc, nerfg, erfg, gname, qntar, errorg, ndpmax)
 Defaults to be reset before every wfngrp. More...
 
subroutine, private wrnmlt (k, sname, nrerun, megul, symtyp, mgvn, s, sz, r, pin, ncsf, byproj, lcdi, lndi, lcdo, lndo, lcdt, lndt, nfto, ltri, idiag, npflg, thres, nelect, nsym, nob, refdet, nftw, iposit, nob0, nobl, nob0l, nx, nobe, nobp, nobv)
 Final text information output. More...
 
subroutine, private wvwrit (nwfngp, gname, nelecg, defltc, irfcon, ndprod, symtyp, ntcon, navail, nrefog, nelecp, nshlp, qntar, nshlpt, nshgmx, mshl, gushl, pqn, cup, ncupp, npcupf, refdtg, nelp, ntconp, nshcon, nobt, reforb, refgu, test, nrcon, tcon, refcon, nerfg, erfg, ndpp, nrefop, errorg)
 Display information about the wave function group. More...
 

Function/Subroutine Documentation

◆ csfgen()

subroutine, public congen_driver::csfgen

Main driver routine: this is a transportable (Cray/IBM) version of CONGEN with the D2h symmetry for MOLECULE re-instated.

Definition at line 49 of file congen_driver.f90.

References congen_pagecontrol::addl(), congen_data::cdimx, congen_data::confpf, csfout(), congen_data::cup, congen_distribution::distrb(), congen_data::exdet, congen_data::exref, getcon(), getcup(), getref(), congen_data::gushl, congen_data::gutot, congen_data::icdi, icgcf(), congen_data::iexcon, congen_data::ift, congen_data::indi, congen_data::inodi, congen_data::iqnstr, congen_data::irfcon, congen_data::jx, congen_data::jy, congen_data::jz, congen_data::ky, congen_data::kz, congen_data::megul, congen_data::mshl, congen_data::mxtarg, congen_data::ncall, congen_data::ncsf, congen_data::ndel, congen_data::ndel1, congen_data::ndel2, congen_data::ndimx, congen_pagecontrol::newpg(), congen_data::next, congen_data::nftr, congen_data::nftw, congen_data::nisz, congen_data::nncsf, congen_data::nndel, congen_data::nnlecg, congen_data::nobi, congen_data::nobt, congen_data::nodimx, congen_data::nrcon, congen_data::nsoi, congen_data::nsym, congen_data::ntcon, congen_data::ntso, congen_data::nu, congen_data::nx, congen_data::ny, congen_data::nz, congen_data::occshl, congen_data::pqnst, congen_projection::projec(), congen_data::qntar, congen_data::qntot, congen_data::shlmx1, congen_pagecontrol::space(), congen_data::sshlst, stwrit(), subdel(), congen_data::symtyp, congen_data::test, wfnin(), wfnin0(), wrnmlt(), and wvwrit().

Referenced by congen().

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

◆ csfout()

subroutine, private congen_driver::csfout ( integer, intent(out)  ia,
integer, intent(out)  ib,
integer, intent(in)  megul,
integer, intent(in)  nndel,
real(kind=wp), dimension(*), intent(in)  cr,
integer, dimension(*), intent(in)  nr 
)
private

Writes all determinants present in the CONGEN global arrays (i.e. for the current CSFs) to the output file. The data written are as follows:

     1. NOI           ... number of states
     2. NODI(1:NOI)   ... number of determinants per state
     3. NID           ... number of all determinants
     4. CR(1:NID)     ... determinant multiplicative factors
     5. NI            ... length of integer array defining all determinants
     6. NR(1:NI)      ... integer array defining all determinants as differences w.r.t. reference determinant

Note that this is not the only moment when these data are written. The subroutine congen_distribution::wfn does writing, too, whenever it detects that any further addition of determinants would exceed the storage.

Once the writing is done, this subroutine erases all determinant data.

Parameters
iaOn output, accumulated number of written determinants (value of congen_data::lcdi).
ibOn output, accumulated number of written integers describing the determinants (value of congen_data::lndi).
megulOutput file unit number.
nndelHow many CSFs were read from standard input. If non-zero, nothing will be written to the file and the variables ia and ib will be assigned just the current values of lcdi and lcdt.
crReal workspace array; determinant coefficients are expected to be located at index icdi and onwards.
nrReal workspace array; determinant array pointers are expected to be located at position inodi and onwards, while packed determinant descriptions are expected at position indi and onwards. More specifically, this is true if integer has the same byte size as the real data type. Otherwise the offsets are adjusted so that they allow for inodi - 1 or indi - 1 real numbers before start of the determinant integer data.

Definition at line 752 of file congen_driver.f90.

References congen_data::icdi, congen_data::iidis2, congen_data::indi, congen_data::inodi, congen_data::lcdi, congen_data::lndi, congen_data::lratio, congen_data::ni, congen_data::nid, and congen_data::noi.

Referenced by csfgen().

Here is the caller graph for this function:

◆ getcon()

subroutine, private congen_driver::getcon ( integer, intent(in)  ntcon,
integer, dimension(*), intent(inout)  nshcon,
integer, dimension(*), intent(in)  nrcon,
integer, intent(in)  nshgmx,
integer, intent(in)  npmax,
integer, intent(inout)  nc,
integer, intent(in)  nelecg,
integer, intent(in)  nsym,
integer, intent(in)  nobt,
integer, dimension(*), intent(in)  nob,
integer, dimension(*), intent(in)  nobi,
integer, dimension(*), intent(in)  nsoi,
integer, dimension(*), intent(in)  shlmx1,
integer, dimension(*), intent(in)  exref,
integer, dimension(3,nshgmx,*), intent(in)  tcon,
integer, dimension(nobt,*), intent(inout)  refcon,
logical, intent(out)  error 
)
private

Definition at line 789 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ getcup()

subroutine, private congen_driver::getcup ( integer, intent(in)  nshlt,
integer, intent(in)  def,
integer, intent(in)  nd,
integer, dimension(nd), intent(in)  nshlp,
integer, dimension(3,nshlt), intent(inout)  cup,
logical, intent(out)  error 
)
private

Definition at line 853 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ getref()

subroutine, private congen_driver::getref ( integer, dimension(5,*), intent(in)  reforb,
integer, dimension(*), intent(in)  refgu,
integer, intent(in)  nrefo,
integer, intent(in)  nelec,
integer, dimension(*), intent(inout)  refdet,
integer, intent(inout)  nelr,
integer, dimension(*), intent(in)  nsoi,
integer, dimension(*), intent(in)  nob,
integer, dimension(*), intent(in)  shlmx,
integer, intent(in)  nsym,
integer, intent(in)  symtyp,
integer, intent(in)  nrfomx,
logical, intent(out)  e1,
logical, intent(out)  e2,
logical, intent(out)  e3 
)
private

This subroutine construct the "reference determinant", which is nothing else than a list of unique numbers, one for each electron, where each number corresponds to one of molecular spin-orbitals defined by the &state namelist of CONGEN. The spin-orbitals are labeled sequentially across all symmetries, where all spin-orbitals sharing an orbital (but differing by spin) are kept together with consecutive indices. The order of spins within groups corresponding to a single orbital is "alpha spin, then beta spin". On successful return, the array refdet contains the reference list with indices sorted from smallest to largest.

This subroutine can run into several error conditions that are indicated by logical flags e1, e2, e3 (.true. means that the error occured). They are all related to inconsistencies in the input file.

Parameters
reforbReference determinant quintets specification (1 = M-value of shell, 2 = pqn, 3 = number of electrons in shell, 4 = spin orb 1, 5 = spin orb 2)
refguInversion symmetry numbers for orbitals (+1 = gerade, -1 = ungerade). Only used for symtyp = 1 (D_infh).
nrefoNumber of quintets in reforb.
nelecInput value of number of electrons.
refdetList of spin-orbital numbers (one for each electron, in increasing order) in reference determinant.
nelrComputed number of electrons from reforb(3,i).
nsoiInitial value of spin orb 1 for all symmetries (index runs through all symmetries).
nob?
symtypPoint group (0 = C_infv, 1 = D_infh, 2 = D_2h,C_2v,C_s,E).
shlmxShell occupancy limit for each symmetry.
nsymNumber of available irreducible representations.
nrfomxMax number of orbitals for ref state in arrays reforb and refgu.
e1Output error flag: nrefo out of range.
e2Output error flag: nelr does not match nelec.
e3Output error flag: Errors in reforb and refgu arrays.

Definition at line 967 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ icgcf()

subroutine, private congen_driver::icgcf
private

Calculates the Pascal triangle of a given order. The binomial coefficients are stored in the array binom as concatenated lines of the Pascal triangle, where the consecutive lines share the common value of 1. The array ind contains pointers to line beginnings. The leading elements of the two arrays are:

    ind = 1, 1, 2, 4, 7, ...
  binom = 1, 1, 2, 1, 3, 3, 1, 4, 6, 4, 1, ...

Definition at line 1123 of file congen_driver.f90.

References congen_data::binom, congen_data::ind, and congen_data::jsmax.

Referenced by csfgen().

Here is the caller graph for this function:

◆ stwrit()

subroutine, private congen_driver::stwrit ( integer, intent(in)  nelect,
integer, intent(in)  confpf,
integer, dimension(3), intent(in)  qntot,
integer, intent(in)  cdimx,
integer, intent(in)  icdi,
integer, intent(in)  ntso,
integer, intent(in)  symtyp,
integer, intent(in)  ndimx,
integer, intent(in)  indi,
integer, intent(in)  nrefo,
integer, intent(in)  nodimx,
integer, intent(in)  inodi,
integer, intent(in)  nsym,
integer, intent(in)  gutot,
integer, intent(in)  nbmx,
integer, intent(in)  isz,
integer, intent(in)  navail,
integer, intent(in)  idiag,
integer, intent(in)  megu,
real(kind=wp), intent(in)  thres,
integer, intent(in)  lcdt,
integer, intent(in)  megul,
integer, intent(in)  lndt,
integer, intent(in)  nfto,
integer, intent(in)  nrerun,
integer, intent(in)  ltri,
integer, dimension(6), intent(in)  npflg,
integer, intent(in)  nndel,
integer, dimension(nu), intent(in)  nob,
integer, dimension(nu), intent(in)  nsoi,
integer, intent(in)  nsymp,
integer, dimension(*), intent(in)  refdet,
integer, intent(in)  nerfs,
logical, dimension(9), intent(in)  erfs,
integer, intent(in)  nrefop,
integer, dimension(5,*), intent(in)  reforb,
integer, dimension(*), intent(in)  refgu,
integer, intent(in)  nelp,
integer  lpp,
character(len=80)  sname,
logical, intent(inout)  error,
integer, intent(in)  byproj,
integer, intent(in)  lndo,
integer, intent(in)  lcdo,
integer, intent(in)  iposit,
integer, dimension(nu), intent(in)  nob0,
integer  npmult,
integer, intent(in)  ntgsym,
integer, intent(in)  mxtarg,
integer, dimension(nu), intent(in)  nobe,
integer, dimension(nu), intent(in)  nobp,
integer, dimension(nu), intent(in)  nobv 
)
private

This subroutine is called by csfgen after the &state namelist is read, workspace allocated and reference determinant formed. Its purpose is to summarize the so far read input data on standard output (or other unit specified by nftw) and also to print information about the reference determinant.

This subroutine does not alter any of its arguments except for error, which is set to .true. if an error condition occured and to .false. otherwise.

Definition at line 1161 of file congen_driver.f90.

References congen_pagecontrol::addl(), congen_pagecontrol::ctlpg1(), congen_pagecontrol::newpg(), congen_data::nftw, congen_data::nu, congen_data::rhead, and congen_pagecontrol::space().

Referenced by csfgen().

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

◆ subdel()

subroutine, private congen_driver::subdel ( integer, dimension(*), intent(inout)  ndel,
integer, dimension(*), intent(inout)  ndel1,
integer, dimension(*), intent(inout)  ndel2,
integer, intent(inout)  nndel 
)
private

Definition at line 1308 of file congen_driver.f90.

References congen_data::nftr, and congen_data::nftw.

Referenced by csfgen().

Here is the caller graph for this function:

◆ wfnin()

subroutine, private congen_driver::wfnin ( integer, intent(out)  nwfngp,
integer, intent(out)  nadel,
integer, intent(out)  nncsf,
integer, intent(out)  ncsf,
integer, intent(out)  lcdi,
integer, intent(out)  lndi,
integer, intent(out)  nelecg,
integer, intent(out)  ndprod,
integer, intent(out)  nrefog,
integer, intent(out)  npcupf,
integer, intent(in)  negmax,
integer, dimension(*), intent(out)  refdtg,
integer, intent(in)  nrfgmx,
integer, dimension(*), intent(out)  refgug,
integer, intent(out)  ntcon,
integer, dimension(5,*), intent(out)  reforg,
integer, intent(in)  nshgmx,
integer, intent(in)  nsymmx,
integer, dimension(*), intent(out)  mshl,
integer, dimension(*), intent(out)  gushl,
integer, dimension(3,*), intent(out)  pqn,
integer, dimension(3,*), intent(out)  cup,
integer, intent(in)  ndpmax,
integer, dimension(*), intent(out)  nshlp,
integer, intent(in)  nconmx,
integer, dimension(*), intent(out)  test,
integer, dimension(*), intent(out)  nrcon,
integer, dimension(*), intent(out)  nshcon,
integer, dimension(3,nshgmx,*), intent(out)  tcon,
logical, intent(out)  errorg 
)
private

Definition at line 1377 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ wfnin0()

subroutine, private congen_driver::wfnin0 ( integer, dimension(*), intent(out)  nelecp,
integer, intent(out)  defltc,
integer, intent(in)  nerfg,
logical, dimension(*), intent(out)  erfg,
character(len=80), intent(out)  gname,
integer, dimension(3), intent(out)  qntar,
logical  errorg,
integer, intent(in)  ndpmax 
)
private

This subroutine is called from csfgen before every attempt to read next &wfngrp namelist. It erases all previous values to avait new input.

Parameters
nelecpNumber of electrons per electron set within the wave function group.
defltcUse of user-specified intermediate coupling.
nerfgSize of the array erfg.
erfgArray of error condition flags.
gnameArbitrary namelist text description (max 80 characters).
qntarTriplet of total quantum numbers for the wave function.
errorgError flag (not used).
ndpmaxSize of the array nelecp.

Definition at line 1447 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ wrnmlt()

subroutine, private congen_driver::wrnmlt ( integer, intent(in)  k,
character(len=80), intent(in)  sname,
integer, intent(in)  nrerun,
integer, intent(in)  megul,
integer, intent(in)  symtyp,
integer, intent(in)  mgvn,
real(kind=wp), intent(in)  s,
real(kind=wp), intent(in)  sz,
real(kind=wp), intent(in)  r,
real(kind=wp), intent(in)  pin,
integer, intent(in)  ncsf,
integer, intent(in)  byproj,
integer, intent(in)  lcdi,
integer, intent(in)  lndi,
integer, intent(in)  lcdo,
integer, intent(in)  lndo,
integer, intent(in)  lcdt,
integer, intent(in)  lndt,
integer, intent(in)  nfto,
integer, intent(in)  ltri,
integer, intent(in)  idiag,
integer, dimension(6), intent(in)  npflg,
real(kind=wp), intent(in)  thres,
integer, intent(in)  nelect,
integer, intent(in)  nsym,
integer, dimension(*), intent(in)  nob,
integer, dimension(*), intent(in)  refdet,
integer  nftw,
integer, intent(in)  iposit,
integer, dimension(*), intent(in)  nob0,
integer, dimension(nx), intent(in)  nobl,
integer, dimension(nx), intent(in)  nob0l,
integer, intent(in)  nx,
integer, dimension(nx), intent(in)  nobe,
integer, dimension(nx), intent(in)  nobp,
integer, dimension(nx), intent(in)  nobv 
)
private

Definition at line 1473 of file congen_driver.f90.

Referenced by csfgen().

Here is the caller graph for this function:

◆ wvwrit()

subroutine, private congen_driver::wvwrit ( integer, intent(in)  nwfngp,
character(len=80), intent(in)  gname,
integer, intent(in)  nelecg,
integer, intent(in)  defltc,
integer, intent(in)  irfcon,
integer, intent(in)  ndprod,
integer, intent(in)  symtyp,
integer, intent(in)  ntcon,
integer, intent(in)  navail,
integer, intent(in)  nrefog,
integer, dimension(*), intent(in)  nelecp,
integer, dimension(*), intent(in)  nshlp,
integer, dimension(3), intent(in)  qntar,
integer, intent(in)  nshlpt,
integer, intent(in)  nshgmx,
integer, dimension(*), intent(in)  mshl,
integer, dimension(*), intent(in)  gushl,
integer, dimension(3,*), intent(in)  pqn,
integer, dimension(3,*), intent(in)  cup,
integer, intent(in)  ncupp,
integer, intent(in)  npcupf,
integer, dimension(*), intent(in)  refdtg,
integer, intent(in)  nelp,
integer, intent(in)  ntconp,
integer, dimension(*), intent(in)  nshcon,
integer, intent(in)  nobt,
integer, dimension(5,*), intent(in)  reforb,
integer, dimension(*), intent(in)  refgu,
integer, dimension(*), intent(inout)  test,
integer, dimension(*), intent(in)  nrcon,
integer, dimension(3,nshgmx,*), intent(in)  tcon,
integer, dimension(*), intent(in)  refcon,
integer, intent(in)  nerfg,
logical, dimension(11), intent(in)  erfg,
integer, intent(in)  ndpp,
integer, intent(in)  nrefop,
logical, intent(inout)  errorg 
)
private

Definition at line 1522 of file congen_driver.f90.

References congen_pagecontrol::addl(), congen_pagecontrol::newpg(), congen_data::nftw, congen_data::rhead, and congen_pagecontrol::space().

Referenced by csfgen().

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