#!/bin/bash
#--------------------------------------------------------------------------
# THIS SHELL SCRIPT PROVIDES INFORMATION ON VARIABLES OF THE MCTDH PROGRAM
#--------------------------------------------------------------------------

#--------------------------------------------------------------------------
# FUNCTION  helpf. Print help information.
#--------------------------------------------------------------------------
helpf() {
    echo 'Purpose: Provides information on MCTDH variables (Programmers Help).'
    echo 'Usage  :   phelp [-a -b -e -h] regex.'
    echo '   -h  :   Print this help text.'
    echo '   -a  :   (all)   Search for "^[a-z0-9]*$a1.*$".'
    echo '   -b  :   (begin) Search for "^$a1.*".'
    echo '   -e  :   (end)   Search for "^[a-z0-9]*$1 *$".'
    echo '   --  :   End of options. The argument may start with a -.'
    echo '  '
    echo '  phelp prints a description of MCTDH variable names that match'
    echo '  the regular expression "regex"'
    echo '  Example:'
    echo '           phelp psi'
    echo "           phelp -b z        (This prints all pointers)"
    echo "           phelp -e dim"
    echo "           phelp -a '[a-z]'  (This prints all descriptions)"
    echo ' '
    echo '  Try: phelp psi, phelp -b psi, phelp -e psi, and phelp -a psi'
    echo '  to understand the use of the options.'
    echo '  The search is case sensitive, use lower case throughout.'
    echo '  Upper case input is translated to lower case.'
    echo '  NB: The regular expressions are the sed ones.'
    echo
    echo '  The description lists the type of the variable, its dimension'
    echo '  (in case of arrays), and the file(s) where this variable is'
    echo '  declared or used. The listed filenames can also contain the'
    echo '  well-known bash wildcards. The special syntax'
    echo '    foo@bar.f'
    echo '  means that the variable is used in routine "foo" from file'
    echo '  "bar.f" .'
    echo "$minus40$minus40"
    exit
}
#-----------------------------------------------------------------------
minus40='----------------------------------------'
echo "$minus40$minus40"
all=0

#---------------------------------------------------------------------------
#  Read the options (if any).
#---------------------------------------------------------------------------
while getopts ":habe-:" opt; do
    case $opt in
    h  )  helpf ;;
    a  )  all=3 ;;
    b  )  all=1 ;;
    e  )  all=2 ;;
    -  )  arg=$OPTARG ;;
    \? )  echo ' Unknown option!'
          helpf ;;
    esac
done
shift $(($OPTIND - 1))
if [ -z "$arg" ] ; then arg=$1 ; fi
if [ -z "$arg" ] ; then helpf ; fi
a1=`echo $arg | tr '[:upper:]' '[:lower:]'`
if   [ $all -eq 0 ] ; then
    kw="^$a1 *$"
elif [ $all -eq 1 ] ; then
    kw="^$a1.*"
elif [ $all -eq 2 ] ; then
    kw="^[a-z0-9\-]*$a1 *$"
elif [ $all -eq 3 ] ; then
    kw="^[a-z0-9\-]*$a1.*$"
fi
sed  -e "/^#!\/bin/,/^###start##/d" $0 |
sed -n -e "/$kw/,/^---------------------------/p"
exit

# fool emacs' syntax coloring
cat <<'EOF'

############################################################################
###    ----  phelp  ----
###
###  The following list contains a description of  MCTDH variables.
###  The variable name must start at column 1.
###  The description must start at column 2.
###  The description starts with the type, the dimension (if any) and the
###  include file (if any). Alternatively to an include file one may give
###  the name of the file(s), where the variable occurs (if only few).
###  The description is closed by a line of '-' starting at column 1.
###
###start####################################################################

phelp
 This list contains a description of MCTDH variables.
-------------------------------------------------------------------------------
psi
 complex psi(dgldim)
 The array psi contains the MCTDH wavefunction, or (if dentype>0) the
 MCTDH density operator. The array psi contains first the A-vector(s)
 for each state (length: block(s), total length: adim) and then the
 single-particle functions for each mode and state (mode 1 state 1,
 mode 1 state 2, mode 2 state 1 etc. for a two state case).
 The pointer zetf(m,s) points to the spf of mode m and state s.
 The pointer zpsi(s) points to the A-vector of state s.
-------------------------------------------------------------------------------
dtpsi
 complex dtpsi(dgldim)
 The array dtpsi contains the the time-derivative of the A-vector
 and of the single-particle functions. (NB: this is not psi-dot).
 See 'psi' for more details.
-------------------------------------------------------------------------------
dentype
 integer  global.inc
 0=wavefunction,  1=density matrix type I,  2=density matrix type II.
-------------------------------------------------------------------------------
dofcount
 integer  adpop.F
 Number of the one dimensional densities that have to be calculated.
-------------------------------------------------------------------------------
dof2dimcount
 integer  adpop.F
 Number of the two dimensional densities that have to be calculated.
-------------------------------------------------------------------------------
dofnumber
 integer dofnumber(maxdim)  adpop.F
 This array contains the numbers of the degrees of freedom for the one
 dimensional densities that have to be calculated.
-------------------------------------------------------------------------------
dof2dimnumber
 integer dof2dimnumber(maxdim*2,2)  adpop.F
 This array contains the numbers of the degrees of freedom for the two
 dimensional densities that have to be calculated.
-------------------------------------------------------------------------------
zeigden
 integer zeigden(maxdim)  adpop.F
 Pointer to the density array for the one dimensional densities.
-------------------------------------------------------------------------------
zeig2dimden
 integer zeigden(maxdim*2)  adpop.F
 Pointer to the density array for the two dimensional densities.
-------------------------------------------------------------------------------
den1dim
 integer adpop.F
 Dimension of the density array for the one dimensional densities.
-------------------------------------------------------------------------------
den2dim
 integer adpop.F
 Dimension of the density array for the two dimensional densities.
-------------------------------------------------------------------------------
zeigdim
 integer adpop.F
 Pointer to the density array for the mr array.
-------------------------------------------------------------------------------
adiabpop
 real adiabpop(maxstate)  adpop.F
 Array for the adiabatic population of the electronic states.
-------------------------------------------------------------------------------
diapop
 real diapop(maxstate)  adpop.F
 Array for the diabatic population of the electronic states.
-------------------------------------------------------------------------------
outden
 integer outden(maxdim)  adpop.F
 Array for the output channels for the one dimensional densities.
-------------------------------------------------------------------------------
out2dimden
 integer out2dimden(maxdim*2)  adpop.F
 Array for the output channels for the two dimensional densities.
-------------------------------------------------------------------------------
maxdim
 integer   parameter(maxdim=30)  maxdim.inc
 Maximal number of degrees of freedom; (ndof .le. maxdim)
-------------------------------------------------------------------------------
maxsta
 integer  parameter(maxsta=16)  maxsta.inc
 Maximal number of electronic states; (nstate .le. maxsta)
-------------------------------------------------------------------------------
maxkoe
 integer  parameter(maxkoe=9600)  maxkoe.inc
 Maximal number of Hamiltonian terms
 (ktot+npacket .le. maxkoe) and  (kzahl(1)+nstate .le. maxkoe)
-------------------------------------------------------------------------------
nopdof
 integer  operdef.inc
 nopdof is the number of operator degrees of freedom, i.e. number of entries
 in the mode-line of the HAMILTONIAN-SECTION. nopdof is larger than ndof,
 because it accounts for the coefficients and -- if used -- the Time variable.
-------------------------------------------------------------------------------
nandof
 integer  aglobal.inc
 Number of DOF in analysis, e.g. ndof+1 if plots v time.
-------------------------------------------------------------------------------
nactdof
 integer  aglobal.inc
 Number of active dof in nmode modes, i.e. nactdof=nactdof+nspfdof(m)
 for m=1,nmode.
-------------------------------------------------------------------------------
nmode
 integer  griddat.inc
 Number of particles (modes) as defined implicitly in the SPF-BASIS-SECTION.
 One additional mode, meb, may be added, if there is an electronic basis.
 One additional mode, mpb, may be added, if there is a single-set packet basis.
-------------------------------------------------------------------------------
nhmode
 integer  heinterm.F
 Number of DOFs as defined in "modes" line of the HAMILTONIAN-SECTION.
-------------------------------------------------------------------------------
nanmode
 integer  aglobal.inc
 Number of modes in analysis, e.g. nmode + 1 if plots v time.
-------------------------------------------------------------------------------
nstate
 integer  griddat.inc
 Number of (electronic) states in a multi-set calculation.
 nstate=1 for a single-set run and nstate=gdim(neb) for a multi-set run.
 Note that in a multi-set multi-packet calculation the different packages
 are treated as if they were evolving on different diabatic potential
 energy surfaces. Thus nstate -> nstate*npacket for multi-set multi-packet
 runs. This multiplication is done in routine eininwf.
-------------------------------------------------------------------------------
npacket
 integer  griddat.inc
 number of wavepackets to be propagated simultaneously. Only for
 multi-set formalism. See also npackts.
-------------------------------------------------------------------------------
npackts
 integer  griddat.inc
 number of wavepackets to be propagated simultaneously. Only for
 single-set formalism. See also npacket.
-------------------------------------------------------------------------------
ktot
 integer  operdef.inc
 total number of Hamiltonian terms. This is similar to the number of lines
 in the HAMILTONIAN-SECTION(s). Because the MCTDH program may sum lines,
 ktot will in general be smaller. ktot = Sum[khtot(nham)].
-------------------------------------------------------------------------------
knpot
 integer in genoper/matchlab.F
 total number of natpot operators coming from a potfit calculation
-------------------------------------------------------------------------------
koned
 integer in genoper/matchlab.F
 total number of 1-D potential coming from a potfit calculation
-------------------------------------------------------------------------------
kzahl
 integer  kzahl(maxham)  operdef.inc
 kzahl(nham) : Number of correlated Hamiltonian expansion coefficients
 for the Hamiltonian nham. (nham=1 refers to the system Hamiltonian).
-------------------------------------------------------------------------------
khtot
 integer  khtot(maxham)  operdef.inc
 khtot(nham) : Number of terms for for operator nham.
 See also: ktot
-------------------------------------------------------------------------------
khzahl
 integer  khzahl(maxdim,maxsta,maxham)  operdef.inc
 khzahl(m,s,nham) : Number of uncorrelated coefficients for mode m,
 state s, and Hamiltonian number nham.
-------------------------------------------------------------------------------
hamilton
 integer  hamilton(maxdim,maxkoe)  operdef.inc
 hamilton(f,k) = h, number of k-th Hamiltonian term for dof f.
 f=1,nopdof, k=1,ktot
 for a Multi-D operator or a Mode operator
 hamilton(f,k) = number of k-th Hamiltonian term for the first degree of
 freedom and hamilton(f,k) = f for the others.

 h=hamilton(f,k) is negative for LMR terms. In this case set jLMR = -h and
 h=hamLMR(jLMR,j) where j=1 is for a right-hand (R) operator, j=2 for a
 middle (M) operator, and j=3 for a left-hand (L) operator.
-------------------------------------------------------------------------------
c1
 integer  parameter(c1=16)  global.inc
 Used for defining Character string lengths.
 c1=16, c2=32, c3=64, c4=80, c5=240
-------------------------------------------------------------------------------
c2
 integer  parameter(c2=32)  global.inc
 Used for defining Character string lengths.
 c1=16, c2=32, c3=64, c4=80, c5=240
-------------------------------------------------------------------------------
c3
 integer  parameter(c3=64)  global.inc
 Used for defining Character string lengths.
 c1=16, c2=32, c3=64, c4=80, c5=240
-------------------------------------------------------------------------------
c4
 integer  parameter(c4=80)  global.inc
 Used for defining Character string lengths.
 c1=16, c2=32, c3=64, c4=80, c5=240
-------------------------------------------------------------------------------
c5
 integer  parameter(c5=240)  global.inc
 Used for defining Character string lengths.
 c1=16, c2=32, c3=64, c4=80, c5=240
-------------------------------------------------------------------------------
maxkeylen
 integer  parameter(maxkeylen=200)  global.inc einglib.f
 Defines the maximum size of "keywords" (i.e. the tokens in MCTDH input files,
 which can very well also be filenames with long paths).
-------------------------------------------------------------------------------
tiny
 real  parameter(tiny=1.0d-9)  global.inc
 tiny is added to progver and filever numbers to ensure that version
 number is .ge. to that desired!
 Tiny is also used as a tolerance when real or complex numbers are compared.
-------------------------------------------------------------------------------
one
 integer  parameter(one=1)  global.inc
-------------------------------------------------------------------------------
zeroi
 integer  parameter(zeroi=0)  global.inc
-------------------------------------------------------------------------------
onei
 integer  parameter(onei=1)  global.inc
-------------------------------------------------------------------------------
twoi
 integer  parameter(towi=2)  global.inc
-------------------------------------------------------------------------------
threei
 integer  parameter(threei=3)  global.inc
-------------------------------------------------------------------------------
fouri
 integer  parameter(fouri=4)  global.inc
-------------------------------------------------------------------------------
fivei
 integer  parameter(fivei=5)  global.inc
-------------------------------------------------------------------------------
sixi
 integer  parameter(sixi=6)  global.inc
-------------------------------------------------------------------------------
seveni
 integer  parameter(seveni=7)  global.inc
-------------------------------------------------------------------------------
eighti
 integer  parameter(eighti=8)  global.inc
-------------------------------------------------------------------------------
ninei
 integer  parameter(ninei=9)  global.inc
-------------------------------------------------------------------------------
teni
 integer  parameter(teni=10)  global.inc
-------------------------------------------------------------------------------
oner
 real  parameter(oner=1.0d0)  global.inc
-------------------------------------------------------------------------------
true
logical  parameter(true=.true.)  global.inc
-------------------------------------------------------------------------------
false
logical  parameter(false=.false.)  global.inc
-------------------------------------------------------------------------------
iin
 integer  channels.inc
 read-write channel: input file (.inp file). iin=1
-------------------------------------------------------------------------------
ilog
 integer  channels.inc
 read-write channel: log file.  ilog=2
-------------------------------------------------------------------------------
irst
 integer  channels.inc
 read-write channel:  restart file.  irst=3
-------------------------------------------------------------------------------
itim
 integer  channels.inc
 read-write channel:  timing file.  itim=4
-------------------------------------------------------------------------------
idvr
 integer  channels.inc
 read-write channel:  dvr file.  idvr=7
-------------------------------------------------------------------------------
ipsi
 integer  channels.inc
 read-write channel: psi file.  ipsi=8
-------------------------------------------------------------------------------
ichk
 integer  channels.inc
 read-write channel:  check file.  ichk=9
-------------------------------------------------------------------------------
irho
 integer  channels.inc
 read-write channel:  gridpop file.  irho=10
-------------------------------------------------------------------------------
iaut
 integer  channels.inc
 read-write channel:  auto file.  iaut=11
-------------------------------------------------------------------------------
iaute
 integer  channels.inc
 read-write channel:  autoe file.  iaute=12
-------------------------------------------------------------------------------
iout
 integer  channels.inc
 read-write channel:  output file.  iout=13
-------------------------------------------------------------------------------
istp
 integer  channels.inc
 read-write channel:  steps file (integrator steps).  istp=14
-------------------------------------------------------------------------------
istop
 integer  channels.inc
 read-write channel:  stop file.  istop=15
-------------------------------------------------------------------------------
iupd
 integer  channels.inc
 read-write channel:  update file.  iupd=16
-------------------------------------------------------------------------------
ispeed
 integer  channels.inc
 read-write channel:  speed file.  ispeed=17
-------------------------------------------------------------------------------
irlx
 integer  channels.inc
 read-write channel:  rlx_info file (improved relaxation, convergence log)
 irlx=18
-------------------------------------------------------------------------------
iaut1
 integer  channels.inc
 read-write channel:  auto1 file (contains c_1 = <psi(0)| H |psi(t)>)
 iaut1=19
-------------------------------------------------------------------------------
iaut2
 integer  channels.inc
 read-write channel:  auto2 file (contains c_2 = <psi(0)|H^2|psi(t)>)
 iaut2=20
-------------------------------------------------------------------------------
idat
 integer  channels.inc
 read-write channel:  daten file (analyse, name/input file in mctdh)
 idat=21
-------------------------------------------------------------------------------
iop
 integer  channels.inc
 read-write channel:  operator text file (.op file).  iop=22
-------------------------------------------------------------------------------
ipar
 integer  channels.inc
 read-write channel: Hamiltonian parameter file.  ipar=23
-------------------------------------------------------------------------------
itmp
 integer  channels.inc
 scratch file used in building of operator.  itmp=24
-------------------------------------------------------------------------------
ioper
 integer  channels.inc
 read-write channel:  operator file.  ioper=25
-------------------------------------------------------------------------------
ictr
 integer  channels.inc
 read-write channel:  ctrace file.  ictr=26
-------------------------------------------------------------------------------
ienerd
 integer  channels.inc
 read-write channel: (a)diabatically corrected initial energy distribution
 ienerd=27
-------------------------------------------------------------------------------
inpot
 integer  channels.inc
 read-write channel: 'natpot' file.  inpot=28
-------------------------------------------------------------------------------
iolog
 integer  channels.inc
 read-write channel: op.log file.  iolog=29
-------------------------------------------------------------------------------
icroco
 integer  channels.inc
 cross file (cross-correlation function).  icroco=30
-------------------------------------------------------------------------------
iexpect
 integer  channels.inc
 read-write channel: expectation file.  iexpect=31
--------------------------------------------------------------------------------
iexpect1
 integer  channels.inc
 Second file for expectation values.  iexpect1=32
--------------------------------------------------------------------------------
ieigval
 integer  channels.inc
 read-write channel:  eigval file, Lanczos eigenvalues and intensities.
 ieigval=33
-------------------------------------------------------------------------------
ilancz
 integer  channels.inc
 read-write channel:  lanczvec file, Lanczos vectors (needed for continuation).
 ilancz=34
-------------------------------------------------------------------------------
ieigvec
 integer  channels.inc
 read-write channel:  eigvec file, eigenvectors of tridiagonal Lanczos matrix.
 ieigvec=35
-------------------------------------------------------------------------------
ipden
 integer  channels.inc
 read-write channel:  pdensity file (one particle density)
 ipden=36
-------------------------------------------------------------------------------
iorb
 integer  channels.inc
 read-write channel: orben file, orbital energies.  iorb=37
-------------------------------------------------------------------------------
iveig
 integer  channels.inc
 read-write channel: veigen file, eigenvalues and eigenvectors from "eigenf".
 iveig=38
-------------------------------------------------------------------------------
iit
 integer  channels.inc
 read-write channel:  'iteration' file (potfit).  iit=39
-------------------------------------------------------------------------------
ipw
 integer  channels.inc
 read-write channel:  'prodwei' file (potfit, separable weights)
 ipw=40
-------------------------------------------------------------------------------
ivpot
 integer  channels.inc
 read-write channel: 'vpot' file (potfit: potential on grid).  ivpot=41
-------------------------------------------------------------------------------
ippsi
 integer  channels.inc
 read-write channel: 'ppsi' file, un-contracted natpot.  ippsi=42
-------------------------------------------------------------------------------
iiwtt
 integer  channels.inc
 read-write channel: 'integral wtt' file. Int <Psi(t)|W_gamma|Psi(t)> dt
 iiwtt=43
-------------------------------------------------------------------------------
iwtt
 integer  channels.inc
 read-write channel:  Wtt file, (flux: <Psi(t)|W_gamma|Psi(t)> )
 iwtt=44
-------------------------------------------------------------------------------
iflx
 integer  channels.inc
 read-write channel:  flux file, reactive flux data.  iflx=45
-------------------------------------------------------------------------------
iexim
 integer  channels.inc
 read-write channel: implicit psi file data (obsolete).  iexim=46
-------------------------------------------------------------------------------
irp
 integer  channels.inc
 read-write channel: reaction probabilities (obsolete).  irp=47
-------------------------------------------------------------------------------
ipsi1
 integer  channels.inc
 read-write channel: second psi file (e.g. in overlap84).  ipsi1=48
-------------------------------------------------------------------------------
iaus
 integer  channels.inc
 read-write channel: output file for various data used in analyse programs.
 iaus=49
-------------------------------------------------------------------------------
idump
 integer  channels.inc  linint.F
 dump file handle for the quick open-close job, close immediately after use!
 idump=50
-------------------------------------------------------------------------------
ideb  channels.inc
 debug file -only for testing can be open throughout run time,
 should not be used in checked-in code!
 ideb=51
-------------------------------------------------------------------------------
iefifo
 integer  channels.inc
 FIFO for the electric field routine.  iefifo=52
-------------------------------------------------------------------------------
ipfifo
 integer  channels.inc
 FIFO for the prop.f   ipfifo=53
-------------------------------------------------------------------------------
itimp
 integer  channels.inc
 read-write channel:  timing file for parallel jobs, ptiming
 itimp=54
-------------------------------------------------------------------------------
iwpot
 integer  channels.inc
 'wpot' file, correlated weights read by "readcw".  iwpot=55
-------------------------------------------------------------------------------
itimmpi
 integer  channels.inc
 read-write channel:  timing file for MPI jopbs, mpitiming
 itimmpi=56
-------------------------------------------------------------------------------
ie1fifo
 integer  channels.inc
 FIFO for old electric field (optcntrl, simprop).  ie1fifo=57
-------------------------------------------------------------------------------
ip1fifo
 integer  channels.inc
 FIFO for prop.f (optcntrl, simprop).   ip1fifo=58
-------------------------------------------------------------------------------
iextpot
 integer  channels.inc
 read-write channel:  the ext-natpot file containing natural potentials
 iextpot=59
-------------------------------------------------------------------------------------------
iprintrho
 integer  channels.inc
 write channel: rho-ascii file.  iprintrho=60
-------------------------------------------------------------------------------------------
ioutbin
 integer  channels.inc
 write channel: binary outputs for the fine grid natural potentials
 ioutbin=61
-------------------------------------------------------------------------------------------
routine
 character  global.inc
 Name of the routine, where an error occurred. "routine" is used in the
 routines: errormsg, warnmsg, and warnmsg1.
-------------------------------------------------------------------------------
message
 character  global.inc
 String containing the message printed by one of the error handling
 routines: errormsg, warnmsg, and warnmsg1.
-------------------------------------------------------------------------------
inptit
 character  global.inc
 String read by rdinpf (inptit = input-title).
-------------------------------------------------------------------------------
nerr
 integer  parameter(nerr=15)  global.inc
 Dimension of chkerr.
-------------------------------------------------------------------------------
chkerr
 integer  chkerr(nerr)  global.inc
 Array used for checking system definition.
 chkerr(1)   : Error reading file
 chkerr(2)   : Dofs differ from system
 chkerr(3)   : DVR bases differ from system
 chkerr(4)   : Mode combinations differ from system
 chkerr(5)   : Electronic basis type differs from system
 chkerr(6)   : Spf basis differs from system
 chkerr(7)   : Dofs not subset of system dofs
 chkerr(8)   : ? not for this system
 chkerr(9)   : Psi type differs from system
 chkerr(10)  : Density matrix type differs from system
-------------------------------------------------------------------------------
name
 character  global.inc
 Name of directory in which the output files are stored.
 (Thus called "name-directory").
-------------------------------------------------------------------------------
inputfile
 character  global.inc
 Path of the inputfile (~.inp)
-------------------------------------------------------------------------------
options
 character  global.inc
 String containing the list of options.
-------------------------------------------------------------------------------
rname
 character  global.inc
 Name of the directory from which to take restart file.
-------------------------------------------------------------------------------
oname
 character  global.inc
 Name of the directory from which to take operator file.
-------------------------------------------------------------------------------
dname
 character  global.inc
 Name of the directory from which to take DVR file.
-------------------------------------------------------------------------------
operfile
 character  global.inc
 Path and name of oper file.
-------------------------------------------------------------------------------
vname
 character  global.inc
 Name of a vpot file to be read.
-------------------------------------------------------------------------------
wname
 character  global.inc
 Name of file to be read, which contains the correlated weights
-------------------------------------------------------------------------------
runtitle
 character  global.inc
 String containing the title of the run.
-------------------------------------------------------------------------------
laenge
 integer  global.inc
 Length of string name.
-------------------------------------------------------------------------------
inplaenge
 integer  global.inc
 Length of string inputfile.
-------------------------------------------------------------------------------
optlaenge
 integer  global.inc
 Length of string options.
-------------------------------------------------------------------------------
rlaenge
 integer  global.inc
 Length of string rname.
-------------------------------------------------------------------------------
olaenge
 integer  global.inc
 Length of string oname.
-------------------------------------------------------------------------------
dlaenge
 integer  global.inc
 Length of string dname.
-------------------------------------------------------------------------------
vlength
 integer  global.inc
 Length of string vname.
-------------------------------------------------------------------------------
wlength
 integer  global.inc
 Length of string wname.
-------------------------------------------------------------------------------
opflaenge
 integer  global.inc
 Length of string operfile.
-------------------------------------------------------------------------------
pi
 real  global.inc
 pi is defined as 4d0*atan(1d0).
-------------------------------------------------------------------------------
fs
 real  global.inc
 Time conversion factor, 41.3414, from a.u. to fs (x[a.u.] = fs*x[fs]).
 fs is set to 1, if the keyword "time-not-fs" is given in the Run-Section.
-------------------------------------------------------------------------------
ev
 real  global.inc
 Energy conversion factor, 27.2114, from a.u. to ev (x[a.u.] = x[eV]/ev).
 ev is set to 1, if the keyword "energy-not-ev" is given in the Run-Section.
-------------------------------------------------------------------------------
npar
 integer  global.inc
 Actual number of parameters, pre-defined, read as option, or defined
 in a Parameter-Section. (npar.le.maxpar).
-------------------------------------------------------------------------------
rpar
 real  rpar(maxpar)  global.inc
 rpar(n) : (real) value of the n-th parameter.
-------------------------------------------------------------------------------
apar
 character  apar(maxpar)  global.inc
 apar(n) : string with name of n-th parameter.
-------------------------------------------------------------------------------
workcdim
 integer  global.inc
 Length of the complex*16 scratch array workc.
-------------------------------------------------------------------------------
workrdim
 integer  global.inc
 Length of the real*8 scratch array workr.
-------------------------------------------------------------------------------
workldim
 integer  global.inc
 Length of the logical scratch array workl.
-------------------------------------------------------------------------------
workidim
 integer  global.inc
 Length of the integer scratch array worki.
-------------------------------------------------------------------------------
worksdim
 integer  global.inc
 Length of the complex*8 scratch array.
-------------------------------------------------------------------------------
workfdim
 integer  global.inc
 Length of the real*4 scratch array.
-------------------------------------------------------------------------------
neu
 logical  global.inc
 is set to 'true' if calculation is a new run.
-------------------------------------------------------------------------------
cont
 logical  global.inc
 is set to 'true' if calculation is a continuation run.
-------------------------------------------------------------------------------
restart
 logical  global.inc
 is set to 'true' if calculation is a restart run.
-------------------------------------------------------------------------------
test
 logical  global.inc
 is set to 'true' if calculation is a test run.
-------------------------------------------------------------------------------
test0
 logical  global.inc
 is set to 'true' if calculation is a test0 run.
-------------------------------------------------------------------------------
lovwr
 logical  global.inc
 if set to 'true', files in name directory are overwritten (if neu=.true.).
-------------------------------------------------------------------------------
logisopen
 logical  global.inc
 the log file is open
-------------------------------------------------------------------------------
lwarn
 logical  global.inc
 is set to 'true' in subroutine 'warnmsg'.
-------------------------------------------------------------------------------
lnpot
 logical  global.inc
 is set to 'true' if natural potentials are used.
-------------------------------------------------------------------------------
liopt
 logical  global.inc
 is set to 'true' when -I option is set, and input is read from name/input.
-------------------------------------------------------------------------------
ltime
 logical  global.inc
 is set to 'true' when timing of subroutines is performed (timing file).
-------------------------------------------------------------------------------
lpartim
 logical  posthr.inc
 if true, the timing file is more detailed in a single processor run or the
 ptiming file is created in a parallel run (shared memory parallelization).
-------------------------------------------------------------------------------
lpartim2
 logical  posthr.inc
 used to manage the defaults for the lpartim varialbe in serial or parallel
 runs (shared memory parallelization).
-------------------------------------------------------------------------------
lnormstop
 logical  runprop.inc
 if true, the keyword 'normstop' in run-section is used.
-------------------------------------------------------------------------------
lrundvr
 logical  global.inc
 A DVR file will be generated
-------------------------------------------------------------------------------
lrunoper
 logical  global.inc
 An OPER file will be generated
-------------------------------------------------------------------------------
lruninwf
 logical  global.inc
 A RESTART file will be generated
-------------------------------------------------------------------------------
lrunpes
 logical  global.inc
 A PES file will be generated
-------------------------------------------------------------------------------
lrunprop
 logical  global.inc
 A propagation will be made
-------------------------------------------------------------------------------
lrundiag
 logical  global.inc
 if true, the Hamiltonian is diagonalised using Lanczos
-------------------------------------------------------------------------------
lrddvr
 logical  global.inc
 The DVR file will be read
-------------------------------------------------------------------------------
lrdoper
 logical  global.inc
 The OPER file will be read
-------------------------------------------------------------------------------
lrdinwf
 logical  global.inc
 The RESTART file will be read
-------------------------------------------------------------------------------
ldeldvr
 logical  global.inc
 DVR file is deleted after use
-------------------------------------------------------------------------------
ldelop
 logical  global.inc
 OPER file is deleted after use
-------------------------------------------------------------------------------
lexact
 logical  global.inc
 numerically exact calculation
-------------------------------------------------------------------------------
lwpot
 logical  pglobal.inc
 lwpot is true, if correlated weights are read in (keyword readcw).
-------------------------------------------------------------------------------
lwrcw
 logical  pglobal.inc
 lwrcw is true, if correlated weights are to be writte to file.
-------------------------------------------------------------------------------
macheps
 real  global.inc
 Machine precision, i. e. smallest positive number for which
 1.0+macheps > 1.0. (macheps=2.2d-16).
-------------------------------------------------------------------------------
maxkey
 integer  parameter(maxkey=48)  global.inc
 Maxmal number of keywords per line.
-------------------------------------------------------------------------------
keyword
 character  keyword(maxkey)  global.inc
 keywords, transformed to lower case, as read by subroutine rdinpf.
-------------------------------------------------------------------------------
keyorig
 character  keyword(maxkey)  global.inc
 keywords, as read by subroutine rdinpf. No transformation to lower case.
-------------------------------------------------------------------------------
nrwdata
 integer  parameter(nrwdata=15)  global.inc
 Length of logical array dvrdata.
-------------------------------------------------------------------------------
dvrdata
 logical  dvrdata(nrwdata)  global.inc
 Logical steering which DVR data is to be read:
 dvrdata(1) = .true. ! read ort
 dvrdata(2) = .true. ! read trafo
 dvrdata(3) = .true. ! read dvrmat (dif1mat, dif2mat)
 dvrdata(4) = .true. ! read fftp (fft momentum)
 dvrdata(5) = .true. ! read hin (fft)
 dvrdata(6) = .true. ! read rueck (fft)
 dvrdata(7) = .true. ! read fftfak
 dvrdata(8) = .true. ! read jsph
 dvrdata(9) = .true. ! read msph
 dvrdata(10)= .true. ! read kinsph
 dvrdata(11)= .true. ! read exphin
 dvrdata(12)= .true. ! read exprueck
-------------------------------------------------------------------------------
lpsi
 logical  daten.inc
 If .true. the psi-file is opened and psi is saved.
-------------------------------------------------------------------------------
lctr
 logical  daten.inc
 If .true.  correlated trace is written to ctrace file (density operator).
-------------------------------------------------------------------------------
lauto
 logical  daten.inc
 If .true. the autocorrelation data written to file auto.
-------------------------------------------------------------------------------
lautoe
 logical  daten.inc
 If .true. the autocorrelation computed without highest natural orbitals
 is written to autoe-file.
-------------------------------------------------------------------------------
lautoord1
 logical  daten.inc
 If .true. the first order autocorrelation function <psi(0)|H|psi(t)>
 is computed.
-------------------------------------------------------------------------------
lautoord2
 logical  daten.inc
 If .true. the 2nd order autocorrelation function <psi(0)|H^2|psi(t)>
 is computed.
-------------------------------------------------------------------------------
lintstep
 logical  daten.inc
 If .true. integration step data written to file steps.
-------------------------------------------------------------------------------
loutfil
 logical  daten.inc
 If .true. the output to file output rather than to screen.
-------------------------------------------------------------------------------
lupdate
 logical  daten.inc
 If .true. the update times are written to file update (only if
 lconstvar is true).
-------------------------------------------------------------------------------
lgpop
 logical  daten.inc
 If .true. the (diagonal) 1D-density is written to the gridpop file..
-------------------------------------------------------------------------------
lpdens
 logical  daten.inc
 If .true. the one-particle density is written to the pdensity file.
-------------------------------------------------------------------------------
lspeed
 logical  daten.inc
 If .true. the CPU-times of the output intervals are  written to speed file.
-------------------------------------------------------------------------------
lstopf
 logical  daten.inc
 If .true. the stop file is opened.
-------------------------------------------------------------------------------
llanczvec
 logical  daten.inc
 If .true. the Lanczos vectors are saved in a diagonalisation run.
-------------------------------------------------------------------------------
leigvec
 logical  daten.inc
 If .true. the eigenvectors of the tridiagonal Lanczos matrix are saved
 in a diagonalisation run.
-------------------------------------------------------------------------------
out1
 real  daten.inc
 Time interval in fs for writing to output file.
-------------------------------------------------------------------------------
out2
 real  daten.inc
 Time interval in fs for writing to psi file.
-------------------------------------------------------------------------------
tfinal
 real  daten.inc
 Final time (in fs)of propagation (or relaxation).
-------------------------------------------------------------------------------
tinit
 real  daten.inc
 Initial time (in fs) of propagation (or relaxation). Default = 0.0
-------------------------------------------------------------------------------
nout2
 integer  daten.inc
 Total number of times at which the wavefunction is written to "psi" file.
 This is information needed for array dimensioning in some analyse routines.
-------------------------------------------------------------------------------
lautodoub
 logical  daten.inc
 The autocorrelation function is written twice during period "out1".
 (Only possible for CMF).
-------------------------------------------------------------------------------
lgpel
 logical  daten.inc
 If .true. the grid populations is written separately for each state.
-------------------------------------------------------------------------------
lpsiopt
 logical  lpsiopt(npsiopt)  daten.inc
 Options as to how (in which format) psi is to be saved.
  lpsisp=lpsiopt(1)    .true. if single precision
  lpsicm=lpsiopt(2)    .true. if in compact form
  lpsinat=lpsiopt(3)   .true. if psi saved as natural orbitals
  lselect=lpsiopt(4)   .true. if selected CI is used
-------------------------------------------------------------------------------
lpsisp
 logical
 lpsisp is .true. if psi is written in single precision
-------------------------------------------------------------------------------
lpsicm
 logical
 lpsicm is .true. if psi is written in compact mode
-------------------------------------------------------------------------------
lpsinat
 logical
 lpsinat is .true. if psi is written in natural orbitals
-------------------------------------------------------------------------------
lselect
 logical
 lselect is .true. if selected CI is used
-------------------------------------------------------------------------------
leigvec
 logical  daten.inc
 If .true. the eigenvectors of the tridiagonal Lanczos matrix are saved
 in a diagonalisation run.
-------------------------------------------------------------------------------
pmatdim
 integer  hpsi.inc
 Length of hteil and hloch arrays containing <phi|h|phi> matrices.
-------------------------------------------------------------------------------
hpsidim
 integer  hpsi.inc
 Length of hpsi array. hpsi contains all h*phi producs.
 The actual size depends on the calculation mode. Roughly:
 Sum (modes) subdim(m)*(number of operators, operating on mode m)
-------------------------------------------------------------------------------
hlochdim
 integer  hpsi.inc
 Length of array containing mean-field. The actual size depends on
 the calculation mode.
-------------------------------------------------------------------------------
pmat
 integer  pmat(maxdim,maxkoe)  hpsi.inc
 pmat(m,k)  : pointer to <phi(i)|h|phi(j)> matrices for the m-th mode
              and k-th Hamiltonian coefficient in "HTeil".
              pmat is defined in zeighpsi@zeigprop.F .
              NB: For uncorrelated operators, k is replaced by
              zham(nham)+kzahl(nham)-1+s, i.e. (for s=1) by the
              first number above the correlated Hamiltonian terms.
              NB: pmat starts with 1 for each operator nham.
              NB: pmat(m,k+s)=0, if there is no uncorrelated operator
                  for mode m and state s.
-------------------------------------------------------------------------------
pmat2
 integer  pmat2(maxdim,maxkoe)  hpsi.inc
 Additional pointer, important for dissipative operators. (See pmat).
 pmat2 is defined in d2zeighpsi@zeigprop.F . To a large extent it is
 a re-ordered pmat.
-------------------------------------------------------------------------------
phloch
 integer  phloch(maxdim,maxkoe)  hpsi.inc
 phloch(m,k): Pointer to <phi(i)|h|phi(j)> matrices for m-th mode and
              k-th Hamiltonian term in "hloch"
-------------------------------------------------------------------------------
zhpsi
 integer  zhpsi(maxdim,maxkoe)  hpsi.inc
 zhpsi(m,k) : pointer to start of h|psi> vector. m=mode, k=hamiltonian-term.
-------------------------------------------------------------------------------
zhpsi2
 integer  zhpsi2(maxdim,maxkoe)  hpsi.inc
 zhpsi2(m,k): additional pointer, important for dissipative operators.
-------------------------------------------------------------------------------
dpmat
 integer  dpmat(maxdim,maxkoe,maxsta)  hpsi.inc
 dpmat(m,k,t) : pointer to <phi(i)|h|phi(j)> matrices for the m-th mode
                and k-th Hamiltonian coefficient in "HTeil".
 dpmat is defined in d1zeigprop and is used only for Type I densities.
-------------------------------------------------------------------------------
dphloch
 integer  dphloch(maxdim,maxkoe,maxsta)  hpsi.inc
 dphloch(m,k,t): Pointer to <phi(i)|h|phi(j)> matrices for m-th mode and
                 k-th Hamiltonian term in "hloch".
-------------------------------------------------------------------------------
dzhpsi
 integer  dzhpsi(maxdim,maxkoe,maxsta)  hpsi.inc
 dzhpsi(m,k,s) : pointer to start of h|psi> vector.
-------------------------------------------------------------------------------
dgldim
 integer  psidef.inc
 Length of array containing wavefunction.
 dgldim = Sum[ block(s) + Sum[dim(m,s)*subdim(m)] ]
-------------------------------------------------------------------------------
dmatdim
 integer  psidef.inc
 Length of array containing the density matrices.
 dmatdim = Sum[Sum[dim(m,s)*dim(m,s)]]
-------------------------------------------------------------------------------
d3matdim
 integer  psidef.inc
 Length of array containing dicht3 matrix. d3matdim = 2*Sum[Sum[2*dim(m,s)]]
-------------------------------------------------------------------------------
adim
 integer psidef.inc
 Cumulative length of all A vectors of all states. adim = Sum[block(s)].
-------------------------------------------------------------------------------
block
 integer block(maxsta) psidef.inc
 block(s)   : number of MCTDH A coefficients for state s.
-------------------------------------------------------------------------------
maxblock
 integer  psidef.inc
 Largest size of "block(s)". Also the largest vector required when
 operating on psi, e.g. in matrizen2 or 3 (see "maxmatwk" zeigprop
 for the exact size of "maxblock")
-------------------------------------------------------------------------------
fmblock
 integer  psidef.inc
 Full maxblock. Similar to maxblock but for the "long" vector in
 S-MCTDH (citype=1). For citype=0, fmblock=maxblock.
-------------------------------------------------------------------------------
maxspf
 integer  psidef.inc
 Largest number of single-particle functions. maxspf = Max_(m,s)[dim(m,s)].
-------------------------------------------------------------------------------
maxjindx
 integer  psidef.inc
 Maximum no. of J indices needed in selected CI calculation.
-------------------------------------------------------------------------------
phidim
 integer phidim(maxdim)  psidef.inc
 Length of phi-vector for mode m. phidim(m) = Sum_s[dim(m,s)*subdim(m)]
-------------------------------------------------------------------------------
maxphidim
 integer  psidef.inc
 Size of largest phi vector. maxphidim = max[phidim(m)].
-------------------------------------------------------------------------------
totphidim
 integer  psidef.inc
 overall size of single-particle functions vector.
 totphidim = Sum_m [phidim(m)] = dgldim-adim
-------------------------------------------------------------------------------
psitype
 integer  psidef.inc
 0 = MCTDH (default), 1 = numerically exact,  2 = s-mctdh (selected ci).
-------------------------------------------------------------------------------
citype
 integer  psidef.inc
 Type of selection used in S-MCTDH. 1 = static. 0 = normal MCTDH.
-------------------------------------------------------------------------------
cicut
 real  psidef.inc
 Cutoff for selection (S-MCTDH).
-------------------------------------------------------------------------------
ciweight
 real  ciweight(maxdim)  psidef.inc
 weight for selection (S-MCTDH).
-------------------------------------------------------------------------------
dim
 integer  dim(maxdim,maxsta)  psidef.inc
 dim(m,s) : number of single particle functions for mode m and state s.
 dim(m,s) is (implicitly) defined in the SPF-BASIS-SECTION.
 The largest value of dim(m,s), Max_(m,s)[dim(m,s)], is called maxspf.
-------------------------------------------------------------------------------
vdim
 integer  vdim(maxdim,maxsta)  psidef.inc
 Cumulative number of preceeding degrees of freedom.
-------------------------------------------------------------------------------
ndim
 integer  ndim(maxdim,maxsta)  psidef.inc
 Cumulative number of following degrees of freedom.
-------------------------------------------------------------------------------
zetf
 integer  zetf(maxdim,maxsta)   psidef.inc
 Pointer to start of single particle functions (in psi) for mode m
 and state s.
-------------------------------------------------------------------------------
zpsi
 integer  zpsi (maxsta) psidef.inc
 Pointer to the A-vector (in psi) for state s.
-------------------------------------------------------------------------------
dmat
 integer  dmat(maxdim,maxsta)  psidef.inc
 Pointer to start of dichte matrices for mode m and state s.
-------------------------------------------------------------------------------
d3mat
 integer  d3mat(maxdim,maxsta)  psidef.inc
 pointer to start of dichte3 matrices for mode m and state s.
-------------------------------------------------------------------------------
jvdim
 integer  jvdim(maxdim)  psidef.inc
 vdim for full jspace (S-MCTDH).
-------------------------------------------------------------------------------
jndim
 integer  jndim(maxdim)  psidef.inc
 ndim for full jspace (S-MCTDH).
-------------------------------------------------------------------------------
jdim
 integer  jdim(maxdim)  psidef.inc
 dim for full jspace (S-MCTDH).
-------------------------------------------------------------------------------
jblock
 integer   psidef.inc
 Total size of full jspace (S-MCTDH).
-------------------------------------------------------------------------------
ddim
 integer   ddim(maxdim,maxsta,maxsta)  psidef.inc
 ddim(m,s,t) : number of single particle functions for mode m and for
 state indices s and t. (density operators of type I).
-------------------------------------------------------------------------------
vddim
 integer   vddim(maxdim,maxsta,maxsta)  psidef.inc
 Cumulative number of preceeding degrees of freedom  for mode m and for
 state indices s and t. (density operators of type I).
-------------------------------------------------------------------------------
nddim
 integer   nddim(maxdim,maxsta,maxsta)  psidef.inc
 Cumulative number of following degrees of freedom  for mode m and for
 state indices s and t. (density operators of type I).
-------------------------------------------------------------------------------
dblock
 integer  dblock(maxsta,maxsta)  psidef.inc
 Number of MCTDH A coefficients for  state indices s and t.
 (density operators of type I).
-------------------------------------------------------------------------------
ddmat
 integer  ddmat(maxdim,maxsta,maxsta)  psidef.inc
 Pointer to start of dichte matrices for mode m and state indices s and t.
 (density operators of type I).
-------------------------------------------------------------------------------
dd3mat
 integer  dd3mat(maxdim,maxsta,maxsta)  psidef.inc
 Pointer to start of dichte3 matrices for mode m and state indices s and t.
 (density operators of type I).
-------------------------------------------------------------------------------
dzetf
 integer  dzetf(maxdim,maxsta,maxsta)  psidef.inc
 Pointer to start of single particle functions (in psi) for mode m
 and state indices s and t. (density operators of type I).
-------------------------------------------------------------------------------
dzpsi
 integer  dzpsi(maxsta,maxsta)  psidef.inc
 Pointer to A-vector (in psi)for state indices s and t. (all density operators).
-------------------------------------------------------------------------------
dlstate
 integer  psidef.inc
 Specifies the left_state, s, of an initial density operator.
 See on-line documentation "Input-Documentation/Init_WF-Section".
-------------------------------------------------------------------------------
drstate
 integer  psidef.inc
 Specifies the right_state, t, of an initial density operator.
 See on-line documentation "Input-Documentation/Init_WF-Section".
-------------------------------------------------------------------------------
temp
 real  psidef.inc
 Specifies the temperature of an initial density operator.
 See on-line documentation "Input-Documentation/Init_WF-Section".
-------------------------------------------------------------------------------
intrace
 real  psidef.inc
 Sum of the initial state populations (density operator).
-------------------------------------------------------------------------------
dmatsdim
 integer  psidef.inc
 dmatsdim = dmatdim*4
 Length of array containing the density matrices.
 dmatdim = Sum[Sum[dim(m,s)*dim(m,s)]]
-------------------------------------------------------------------------------
d3matsdim
 integer  psidef.inc
 d3matdim*2
 Length of array containing dicht3 matrix. d3matdim = Sum[Sum[2*dim(m,s)]]
-------------------------------------------------------------------------------
dims
 integer  dims(maxdim,maxsta)  psidef.inc
 dims(m,s) = dim(m,s)*2
-------------------------------------------------------------------------------
ndof
 integer  griddat.inc
 Total number of degrees of freedom. Defined implicitly in the
 Primitive-Basis-Section (einpbas.F). An electronic degree of
 freedom may be added in einsbas.F.
-------------------------------------------------------------------------------
feb
 integer  griddat.inc
 Number of that degree of freedom which describes the electronic basis.
 See also meb.
-------------------------------------------------------------------------------
fpb
 integer  griddat.inc
 Number of that degree of freedom which describes a single-set packet basis.
 See also mpb, feb and meb.
-------------------------------------------------------------------------------
fkoe
 integer  griddat.inc
 Number of that (pseudo) degree of freedom which describes the coefficient
 information (fkoe=nopdof=ndof+1).
-------------------------------------------------------------------------------
gdim
 integer  gdim(maxdim)  griddat.inc
 Number of grid points for DOF f.
-------------------------------------------------------------------------------
maxgdim
 integer  griddat.inc
 Max[gdim(f)]
-------------------------------------------------------------------------------
maxgdim2
 integer  griddat.inc
 Max[gdim(f)**2]
-------------------------------------------------------------------------------
leb
 logical  griddat.inc
 leb is set to true if operator contains an electronic basis. (See lmult).
 leb=true indicates a single-set calculation. leb is false for multi-set.
-------------------------------------------------------------------------------
lmult
 logical  griddat.inc
 multi-set calculation. (See leb)
-------------------------------------------------------------------------------
lmulpack
 logical  griddat.inc
 multi-packet calculation. Two or more wavepackets are propagated
 simultaneously.
-------------------------------------------------------------------------------
ortdim
 integer  griddat.inc
 Length of the array 'ort' which contains the grid positions.
 ortdim = Sum[subdim(m)].
-------------------------------------------------------------------------------
dvrdim
 integer  griddat.inc
 Length of array (e.g. trafo) containing DVR representations.
 dvrdim = Sum[subdim(m)*subdim(m)].
-------------------------------------------------------------------------------
fftdim
 integer  griddat.inc
 Length of arrays (e.g. hin, rueck, fftfak) containing FFT representations.
 fftdim = Sum[subdim(m)].
-------------------------------------------------------------------------------
expdim
 integer  griddat.inc
 Length of complex transformation array of EXP-DVRs.
 expdim = Sum[gdim(f)*kdim] where sum is only over modes using EXP-DVR.
 The default for kdim is gdim(f).
-------------------------------------------------------------------------------
sphdim
 integer  griddat.inc
 Length of arrays (e.g. jsph, msph) related to spherical harmonics
 primitive basis: sphdim = Sum[subdim(m)] where the sum runs over
 the spherical harmonics DVRs (basis(f).eq.6) only.
-------------------------------------------------------------------------------
kdim
 integer
 Number of grid points for K-DVR or Exp-DVR when combined with KLeg or
 Pleg, respectively, or with Wigner. In the case of Wigner DVR, kdim is
 the number of points in the 2nd combined DOF.
 The default for kdim is gdim(f).
-------------------------------------------------------------------------------
mmdim
 integer
 Number of grid points for K-DVR or Exp-DVR when combined with Wigner.
 This applies to the 3rd combined DOF.
 The default for kdim is gdim(f).
-------------------------------------------------------------------------------
mbaspar
 integer  parameter(mbaspar=6)  griddat.inc
 Maximum number of parameters used to define bases.
-------------------------------------------------------------------------------
modelabel
 character   modelabel(maxdim)  griddat.inc
 modelabel(f) contains the label assigned to the f-th degree of freedom.
-------------------------------------------------------------------------------
basis
 integer  basis(maxdim)  griddat.inc
 Basis type for DOF f.

 el,  HO, Leg, sin, FFT, exp, sphfbr, kleg,   k, pleg, rHO, Leg/r,
  0    1    2    3    4    5      6     7     8    9    11   12

 external, cos, Lagu1, Lagu2, Lagu3, Lagu4, Wigner,
    13      14    15     16     17     18     19

  -1 is for blank basis (phifbr).
-------------------------------------------------------------------------------
rpbaspar
 real  rpbaspar(mbaspar,maxdim)  griddat.inc
 Real parameters needed to define primitive basis.
 For a comprehensive description type: 'phelp pbaspar-all'
-------------------------------------------------------------------------------
ipbaspar
 integer  ipbaspar(mbaspar,maxdim)  griddat.inc
 Integer parameters needed to define primitive basis.
 For a comprehensive description type: 'phelp pbaspar-all'
-------------------------------------------------------------------------------
ldvr
 logical  ldvr(maxdim)  griddat.inc
 ldvr is set true if the basis is a DVR. ldvr is set in einpbas, dvrdat.
 ldvr=false if basis=-1,0,4,6 (phifbr,el,FFT,sphfbr).
-------------------------------------------------------------------------------
 modelabel
 character  modelabel(maxdim)  griddat.inc
 modelabel(f) gives the label of the f-th DOF. (DOF not mode!).
-------------------------------------------------------------------------------
xend
 real  xend(2,maxdim)  griddat.inc
 xend(1,f) contains the first grid point and xend(2,f) the last grid point
 of the grid of the f-th DOF.
-------------------------------------------------------------------------------
zort
 integer  zort(maxdim)  griddat.inc
 Pointer for ort-array pointing to the grid of DOF f.
-------------------------------------------------------------------------------
zdvr
 integer  zdvr(maxdim)  griddat.inc
 Pointer for dvr matrices (dif1mat, dif2mat, trafo) for DOF f.
-------------------------------------------------------------------------------
zfft
 integer  zfft(maxdim)  griddat.inc
 Pointers for FFT grid matrices for DOF f.
-------------------------------------------------------------------------------
zexp
 integer  zexp(maxdim)  griddat.inc
 Pointer for transformation matrixes (exphin,exprueck) for EXP-DVR for DOF f.
-------------------------------------------------------------------------------
zsph
 integer  zsph(maxdim)  griddat.inc
 Pointer for jsph, msph, kinsph matrices for DOF f.
-------------------------------------------------------------------------------
mass
 real   mass(maxdim)  griddat.inc
 mass(f) =  (reduced) mass for DOF f.
-------------------------------------------------------------------------------
jtot
 real   griddat.inc
 Total angular momentum (reserved parameter name).
-------------------------------------------------------------------------------
jbf
 real   griddat.inc
 (fixed) angular m or K quantum number. (Legendre DVR, coupled states).
-------------------------------------------------------------------------------
csmass
 real   griddat.inc
 mass to define a coupled-states centrifugal potential (potfit).
-------------------------------------------------------------------------------
lconm
 logical   griddat.inc
 Calculation contains combined SPFs, i.e. multidimensional particles.
-------------------------------------------------------------------------------
meb
 integer  griddat.inc
 The number of the mode (particle) that includes an electronic basis.
 See also feb and mpb.
-------------------------------------------------------------------------------
mpb
 integer  griddat.inc
 The number of the mode (particle) that includes a single-set packet basis.
 See also fpb, feb and meb.
-------------------------------------------------------------------------------
mkoe
 integer  griddat.inc
 The number of the "mode" that includes the Hamiltonian coefficients.
-------------------------------------------------------------------------------
sdim
 integer  griddat.inc
 Max[subdim(m)]
-------------------------------------------------------------------------------
sdim2
 integer  griddat.inc
 Max[subdim(m)**2] (for densities of type I only).
-------------------------------------------------------------------------------
sgdim
 integer  griddat.inc
 Max[supgdim(m)] (for densities of type I only).
-------------------------------------------------------------------------------
vgdim
 integer  vgdim(maxdim)  griddat.inc
 Number of grid points of DOFs preceeding the DOF f within some particle.
 subdim(m) = vgdim(f)*gdim(f)*ngdim(f), where m=dofspf(f)
-------------------------------------------------------------------------------
ngdim
 integer  ngdim(maxdim)  griddat.inc
 Number of grid points of DOFs following the DOF f within some particle.
 subdim(m) = vgdim(f)*gdim(f)*ngdim(f), where m=dofspf(f)
-------------------------------------------------------------------------------
subdim
 integer  subdim(maxdim)  griddat.inc
 Number of grid points for mode (particle) m.
-------------------------------------------------------------------------------
supgdim
 integer  supgdim(maxdim)  griddat.inc
 Number of grid points for mode m, subdim(m) = supgdim(m)^2, for densities
 of type I only.
-------------------------------------------------------------------------------
nspfdof
 integer  nspfdof(maxdim)  griddat.inc
 nspfdof(m) = number of DOFs in mode (particle) m.
-------------------------------------------------------------------------------
spfdof
 integer  spfdof(maxdim,maxdim)  griddat.inc
 spfdof(n,m)=f indicates, that the DOF f is the n-th DOF in the particle m.
-------------------------------------------------------------------------------
dofspf
 integer  dofspf(maxdim)  griddat.inc
 dofspf(f)=m indicates, that the DOF f belongs to the mode (particle) m.
-------------------------------------------------------------------------------
npotdof
 integer  npotdof(maxdim)  combined.inc
 npotdof(m) = number of DOFs in mode  m in potfit.
-------------------------------------------------------------------------------
potdof
integer  potdof(maxdim,maxdim) combined.inc
potdof(n,m)=f indicates, that the DOF f is the n-th DOF in the mode m.
-------------------------------------------------------------------------------
dofpot
integer  dofpot(maxdim)  combined.inc
dofpot(f)=m indicates, that the DOF f belongs to the mode m in potfit.
-------------------------------------------------------------------------------
maxsub
 integer parameter(maxsub=240)  timing.inc
 Maximum number of subroutines used in timing analysis. In case of shared
 memory parallelization the parallel routines are timed in each POSIX-thread.
 Hence, one may need to enlarge maxsub if a large number of POSIX-threads
 is used.
-------------------------------------------------------------------------------
nsub
 integer  timing.inc
 Actual number of subroutines used in timing analysis.
-------------------------------------------------------------------------------
subrout
 character  subrout(maxsub)  timing.inc
 subrout(t) = name of subroutine t.
-------------------------------------------------------------------------------
psubrout
 character  prubrout(maxsub) timing.inc
 psubrout(t) = name of parallel subroutine t.
-------------------------------------------------------------------------------
ncalls
 integer  ncalls(maxsub)  timing.inc
 ncalls(t): no. of calls to subroutine t.
-------------------------------------------------------------------------------
npcalls
 integer  npcalls(maxsub) timing.inc
 npcalls(t): no. of calls of the parallel subroutine t.
-------------------------------------------------------------------------------
tcalls
 real  tcalls(2,maxsub) timing.inc
 tcalls(1,t): cpu time spent in subroutine t.
 tcalls(2,t): system time spent in subroutine t.
-------------------------------------------------------------------------------
tpcalls
 real tpcalls(2,maxsub) timing.inc
 tpcalls(1,t): real time spent in subroutine (t mod nthread)
 tpcalls(2,t): sum of cpu time spent in subroutine (t mod nthread)
-------------------------------------------------------------------------------
rsttotusr
 real   timing.inc
 Total cpu time spent in previous part of the calculation.
-------------------------------------------------------------------------------
rsttotsys
 real   timing.inc
 Total system time spent in previous part of the calculation.
-------------------------------------------------------------------------------
toutput
 integer  timing.inc
 Variable assigning a number to the routine to be timed.
 subrout(toutput) = output.
-------------------------------------------------------------------------------
tstartup
 integer  timing.inc
 Variable assigning a number to the routine to be timed.
 subrout(tstartup) = startup.
-------------------------------------------------------------------------------
tfunk
 integer  timing.inc
 Variable assigning a number to the routine to be timed.
 subrout(tfunk) = funk.
-------------------------------------------------------------------------------
maxhtm
 integer  parameter(maxhtm=9600)  operdef.inc
 Maximum number of operators for building the Hamiltonian(s).
-------------------------------------------------------------------------------
maxfac
 integer  parameter(maxfac=1000)  operdef.inc
 Maximum number of factors/terms in an operator.
-------------------------------------------------------------------------------
maxdef
 integer  parameter(maxdef=240)  runoper.inc
 Maximum number of operators that can be defined.
-------------------------------------------------------------------------------
maxmuld
 integer  parameter(maxmuld=64)  operdef.inc
 Maximum number of multi-dimensional operators.
-------------------------------------------------------------------------------
maxham
 integer  parameter(maxham=64)  operdef.inc
 Maximum number of Hamiltonians.
-------------------------------------------------------------------------------
maxhpar
 integer  parameter(maxhpar=8)  operdef.inc
 Maximum number of parameters used to define operator-terms.
-------------------------------------------------------------------------------
maxhop
 integer  parameter(maxhop=9600)  operdef.inc
 Maximum number of labels used in operators.
-------------------------------------------------------------------------------
maxpes
 integer  parameter(maxpes=92)  operdef.inc
 Maximum number of potential energy surfaces.
-------------------------------------------------------------------------------
nopmode
 integer  operdef.inc
 Number of SPF degrees of freedom in operator. In general nopmode=nmode+1,
 because the last mode accounts for the coefficients. mkoe=nmode+1.
 If there is a multi-set electronic basis meb=nmode+2, and the addmode
 statement may increase nopmode further.
-------------------------------------------------------------------------------
zhop
 integer  zhop(maxhtm)  operdef.inc
 Pointer to operators stored in array hops.
-------------------------------------------------------------------------------
hterm
 integer  hterm(maxfac,maxhtm)  operdef.inc
 The variable hl=hterm(nh,h) is an integer number indexing the
 nh-th factor of the (in general 1D) operator h=hamilton(f,k) in the
 hoplab(hl) array. If hterm(nh,h)=0 the product of terms is finished and
 the zero is to be interpreted as a "+" sign. Another term or product
 of terms is added.
-------------------------------------------------------------------------------
hoplab
 character  hoplab(maxhop)  operdef.inc
 The character variable hoplab(hl) (see hterm) contains the symbolic
 expression (operator label) of the hl-th operator.
-------------------------------------------------------------------------------
htmdof
 integer  htmdof(maxhtm)  operdef.inc
 f=htmdof(h). f denotes the DOF of the h-th Hamiltonian term.
 If f=0, the h-th Hamiltonian term is not a 1D operator but a mode-
 or multi-mode-operator. (See htmmode and htmmuld).
-------------------------------------------------------------------------------
htmmode
 integer  htmmode(maxhtm)  operdef.inc
 m=htmmode(h). m denotes the mode (particle) of the h-th Hamiltonian term.
 If m=0, the h-th Hamiltonian term is not a mode- operator but a DOF-
 or multi-mode-operator. (See htmdof and htmmuld).
-------------------------------------------------------------------------------
htmmuld
 integer  htmmuld(maxhtm)  operdef.inc
 muld=htmmuld(h). muld denotes the multi-mode operator defined by the
 h-th Hamiltonian term. If muld=0, the h-th Hamiltonian term is not a
 multi-mode operator but a DOF- or mode-operator. (See htmdof and htmmode).
-------------------------------------------------------------------------------
htmfac
 integer  htmfac(maxhtm)  operdef.inc
 The operator h consist of htmfac(h) factors. A typical sequence of
 statements reads: h=hamilton(f,k); do n=1,htmfac(h); hl=hterm(nh,h)
-------------------------------------------------------------------------------
htmform
 integer  htmform(maxhtm)  operdef.inc
 htmform(h) is a flag that describes the form of a "hterm" operator.
 Usually htmform(h)=0 and the indices in the hterm(n,h)
 array point to operators in the hoplab(hl) list. If htmform(h)=1 however
 the integers point to other operators in the hterm array. This is used
 for combined modes where mode operators are products of DOF operators.
 However mode operators may also have htmform(h)=0 if they are a
 multi-dimensional function that fits the combined mode (e.g. certain
 operators in the angular part of the surface scattering operator). A
 further use is when CDVR is being used. Then the potential terms are all
 summed together in a multi-dimensional operator (spans over all the
 modes), and the type will be htmform(h)=1 if a product form operator is
 being summed, or htmform(h)=0 if the operator is a normal
 multi-dimensional function.
-------------------------------------------------------------------------------
htmsym
 integer  htmsym(maxhtm)  operdef.inc
 htmsym(h) : Symmetry of (1D) operator. (See also hsym).
 htmsym=1 -> hermitian, htmsym=-1 -> anti-hermitian, htmsym=0 -> no symmetry
-------------------------------------------------------------------------------
htmtype
 integer  htmtype(maxhtm)  operdef.inc
 htmtype(h) = type of matrix, from flowing list:

 -- 1D types -- (0-14) --
  0 = zero
  1 = unit
  2 = real vector (diagonal matrix)
  3 = imaginary vector (imaginary part stored as real)
  4 = complex vector
  5 = FFT, real vector
  6 = FFT, imaginary vector
  7 = FFT, complex vector
  8 = real matrix
  9 = imaginary matrix (imaginary part stored as real)
 10 = complex matrix
 11 = npotk term, i.e. a natural potential fourier transformed
 12 = real, side-diagonal matrix (stored as vector)
 13 = imaginary, side-diagonal matrix (stored as real vector)
 14 = complex, side-diagonal matrix (stored as vector)

 -- 2D combined-mode types for KLeg -- (15-29) --
 15 = real 3D tensor (for dth1, dth2)
 16 = real 3D tensor (for jpm)
 17 = real 3D tensor (for j^2)
 18 = real 3D tensor (for j_p and sJm)
 19 = real 3D tensor (for j_m and sJp, sJpk)
 20 = real 3D tensor (for jp^2)
 21 = real 3D tensor (for jm^2)
 22 = real 3D tensor (for jpjm)
 23 = real 3D tensor (for jmjp)

 -- 4D types for combined KLegs --
 30 = cjpm

 -- Reflection --
 31 = Rf
 32 = Rfm

 -- 3D combined-mode types for Wigner -- (40-50) --
 40 = real 4D tensor (for j^2)
 41 = real 4D tensor (for j_+, molecule-fixed)
 42 = real 4D tensor (for j_-, molecule-fixed)
 43 = real 4D tensor (for j+^2,molecule-fixed)
 44 = real 4D tensor (for j-^2,molecule-fixed)
 45 = real 4D tensor (for j+-, molecule-fixed)
 46 = real 4D tensor (for js_+, space-fixed)
 47 = real 4D tensor (for js_-, space-fixed)
 48 = real 4D tensor (for js+^2,space-fixed)
 49 = real 4D tensor (for js-^2,space-fixed)
 50 = real 4D tensor (for js+-, space-fixed)

 -- analytic potential --
 101 = multi-dimensional real diagonal analytic

 -- for coefficients --
 1   = unit
 2   = real number
 3   = imaginary number
 4   = complex number
 101 = time-dependent
-------------------------------------------------------------------------------
hoptype
 see htmtype
-------------------------------------------------------------------------------
ifile
 see hopfile
-------------------------------------------------------------------------------
ifunc
 see hopilab
-------------------------------------------------------------------------------
hopfile
 integer  hopfile(maxhop)  operdef.inc
 defines where function is in OPFUNCS library.
 hopfile is often called "ifile" in the program.
   1-100 : Operators defined only on grid.
 101-200 : Complex analytic functions.
 201-300 : Multi-dimensional potential energy surfaces.
 301-400 : Real analytic functions (1D).
 In particular:
     1   : Diagonal Potentials from file.
     2   : Non-diagonal potentials from file.
     3   : 1D non-local operators defined in "funcgrd"
     4   : Operators needed for the CH3I Hamiltonians, defined in "ch3igrd.f"
     5   : 2D non-local operators defined in "funckleg"
     6   : combined natural potentials.
     7   : 4D operators for combined KLegs
     8   : 3D non-local operators defined in "funcwig"
   101   : 1D complex analytic functions defined in "funcanlz"
   201   : Multi-dimensional PES defined in "funcsrf"
   202   : Products of trig. func. (for surface scat.), defined in "functhph"
   203   : Multi-dimensional PES defined in "usersrf" (similar to 201)
   301   : Real number
   302   : 1D real analytic functions defined in "funcanld"
   303   : 1D potential energy curves defined in "func1d"
   304   : 1D potential energy curves defined in "user1d" (similar to 303)
   305   : 1D potential energy curves defined in "fch3i" (CH3I)
   306   : 1D potential energy curves for I2Ar (private)
  -999   : multi-dimensional natpot or srffile
 hopilab(hl) defines then which operator is to be taken from file hopfile(hl).
-------------------------------------------------------------------------------
hopdim
 integer  operdef.inc
 Actual number of operators. hl=1...hopdim. hopdim must be .le. maxhop.
 hopdim,maxhop are protocoled at the beginning of the op.log file.
-------------------------------------------------------------------------------
hopipar
 integer  hopipar(maxhpar,maxhop)  operdef.inc
 hopipar(n,hl) gives the n-th integer parameter of the operator hl.
-------------------------------------------------------------------------------
hopilab
 integer  hopilab(maxhop)  operdef.inc
 hopilab(hl) is an integer-label for operators.
 hopilab is sometimes called "ifunc" in the program.
 The following is an (incomplete) overview:

   ---  hopfile=1  --- "callgrd" ---
   read-operators, real diagonal (e.g. natpots), (see hintern.F)

   ---  hopfile=2  --- "callgrd" ---
   read-operators, complex, full matrix,  (see hintern.F)

   ---  hopfile=3  --- "funcgrd" ---
 hopilab=1    : KEfft
 hopilab=2    : dqfft^*
 hopilab=3    : pfft
 hopilab=4    : unused
 hopilab=5    : KEdvr
 hopilab=6    : dqdvr^1, dth1, dth2, qdq
 hopilab=7    : dqdvr^2
 hopilab=8    : j^2
 hopilab=9    : j^2sph
 hopilab=10   : S*&*
 hopilab=10   : pdvr
 hopilab=12   : Z*&*
 hopilab=13   : jzsph
 hopilab=14   : jzzsph
 hopilab=15   : low
 hopilab=16   : rai
 hopilab=17   : num
 hopilab=18   : lwmorse
 hopilab=19   : ramorse
 hopilab=20   : flux
 hopilab=21   : Jp
 hopilab=22   : Jm
 hopilab=23   : Jx
 hopilab=24   : Jy
 hopilab=25   : pgauss
 hopilab=26   : cdq
 hopilab=27   : sdq
 hopilab=28   : udq
 hopilab=29   : qdq
 hopilab=30   : shift (old name: kshift)
 hopilab=31   : udq2
 hopilab=32   : sdq2
 hopilab=33   : uqdq
 hopilab=34   : csdq
 hopilab=35   : cdq2
 hopilab=36   : crea
 hopilab=37   : anni
 hopilab=38   : Rf
 hopilab=39   : hKEh
 hopilab=40   : hFRh


   ---  hopfile=4  --- "ch3igrd" ---
 hopilab=1    : tm4
 hopilab=2    : tm5
 hopilab=3    : tm6
 hopilab=4    : tm7
 hopilab=5    : tm8

   ---  hopfile=5  --- "funckleg" ---
 hopilab=1    : jm^2
 hopilab=2    : j_p
 hopilab=3    : j_m
 hopilab=4    : jpm
 hopilab=5    : jp^2
 hopilab=6    : jm^2
 hopilab=7    : jpjm
 hopilab=8    : jmjp
 hopilab=9    : dth1_kleg, dth2_kleg
 hopilab=10   : sJp = sin*J+
 hopilab=11   : sJm = sin*J-
 hopilab=12   : sJpk = (sin*Jp*k + k*sin*Jp)/2
 hopilab=13   : sJmk = (sin*Jm*k + k*sin*Jm)/2


   ---  hopfile=7  --- "func2kleg" ---
 hopilab=1    : cjpm

   ---  hopfile=101  --- "funcanalz" ---
 hopilab=1-3  : I
 hopilab=4    : CAP (LHS)
 hopilab=4    : CAP (RHS)
 hopilab=6    : Exp :  exp(i*a*(x-b))

   ---  hopfile=201  --- "funcsrf" ---
 hopilab=1    : nocl1srf, nocl1um
 hopilab=2-5  : lsth
 hopilab=6    : h4srf
 hopilab=7    : i2ar_0
 hopilab=8    : nocl1sch
 hopilab=9    : i2ar_dim
 hopilab=10   : hoosrf Jacobian Coordinates
 hopilab=11-14: bkmp2
 hopilab=15   : none
 hopilab=16   : c2hasec
 hopilab=17   : c2ha1, Collinear model, 2D
 hopilab=18   : c2ha1, 3D
 hopilab=19   : hoosrf Cartesian coordinates
 hopilab=20   : hoosrf Binding coordinates
 hopilab=21   : OBSOLETE
 hopilab=22   : WSLFH PES in Binding Coordinates
 hopilab=23   : WSLFH PES in Jacobian Coordinates
 hopilab=24   : YZCL PES in Binding Coordinates
 hopilab=25   : YZCL PES in Jacobian Coordinates
 hopilab=26   : tully CO-Cu surface
 hopilab=27   : LSTH PES : 3D model in Hyperspherical Coord.
 hopilab=28   : LSTH PES : 2D model in Hyperspherical Coord.
 hopilab=29   : PJT2 PES in Binding Coordinates
 hopilab=30   : PJT2 PES in Jacobian Coordinates: H-(OH)
 hopilab=31   : PJT2 PES in Jacobian Coordinates: O-(HH)
 hopilab=32   : WDSE PES in Binding Coordinates
 hopilab=33   : WDSE PES in Jacobian Coordinates
 hopilab=34   : cpp
 hopilab=35   : cmm
 hopilab=36   : readsrf (ascii)
 hopilab=37   : readsrf (binary)
 hopilab=38   : bmkp PES in Cartesian Coordinates
 hopilab=39   : bmkp PES in Jacobian Coordinates
 hopilab=40   : bmkp PES in reordered Jacobian Coordinates
 hopilab=41   : hfco
 hopilab=42   : DJ PES (H2-H2 4D)
 hopilab=43   : bmkp PES in Jacobian Coordinates / rigid rotors
 hopilab=44   : Normalized Gaussian in (x1-x2)
 hopilab=45   : Normalized 2D-Gaussian.
 hopilab=46   : PJT2.
 hopilab=47   : Regularized 1D-Coulomb.

   ---  hopfile=202  --- "functhph.f" --
 hopilab=1    : coshcosth
 hopilab=2    : sinhcosth
 hopilab=3    : cossinthcosphi
 hopilab=4    : cossinthsinphi
 hopilab=5    : sinsinthcosphi
 hopilab=6    : sinsinthsinphi
 hopilab=7    : reY
 hopilab=8    : imY

   ---  hopfile=203  --- "usersrf.F" --

   ---  hopfile=302  --- "funcanld" ---
 hopilab=1    : 1
 hopilab=2    : -1
 hopilab=3    : q[*] : (q-p)
 hopilab=4-5  : sin[*]
 hopilab=6-7  : cos[*]
 hopilab=8-9  : tan[*]
 hopilab=10   : legth
 hopilab=11   : exp
 hopilab=12   : gauss
 hopilab=13   : exp1
 hopilab=14   : expcos
 hopilab=15   : expcos1
 hopilab=16   : cos1
 hopilab=17   : c_p
 hopilab=18   : c_m
 hopilab=19   : qs  (sqrt(R-q^2)^n)
 hopilab=20   : asin
 hopilab=21   : acos
 hopilab=22   : atan
 hopilab=23   : step
 hopilab=24   : rstep
 hopilab=25   : tgauss
 hopilab=26   : motanh
 hopilab=27   : qtanh
 hopilab=28   : cosh
 hopilab=29   : sinh
 hopilab=30   : tanh
 hopilab=31   : switch1
 hopilab=32   : switch2
 hopilab=33   : external1d
 hopilab=34   : my1d
 hopilab=35   : asleg
 hopilab=36   : aslegth

   ---  hopfile=303  --- "func1d" ---
 hopilab=1    : v:NO
 hopilab=2    : v:H2
 hopilab=3    : morse, morse1
 hopilab=4    : cspot
 hopilab=5    : licn
 hopilab=6    : v:CH, CH (routine c2h.F)
 hopilab=7    : v:C2, C2 (routine c2hasec.F)
 hopilab=8    : vrho:H3, 1D potential in rho, hypersph. coord., H+H2
 hopilab=9    : vthe:H3, 1D potential in theta, hypersph. coord., H+H2
 hopilab=10   : v:HO
 hopilab=11   : v:OH
 hopilab=12   : vwdse:H2
 hopilab=13   : v:OF
 hopilab=14   : vbmkp:H2
 hopilab=15   : vdj:000 (H2-H2 Diep-Johnson expansion coefficients)
 hopilab=16   : vdj:022
 hopilab=17   : vdj:224

-------------------------------------------------------------------------------
npesopt
 integer  operdef.inc
 Actual number of PES. Limit: npesopt.le.maxpes .
-------------------------------------------------------------------------------
nhoppar
 integer  operdef.inc
 Actual number of parameters of an operator (e.g. cos[3.0]).
-------------------------------------------------------------------------------
zpesopts
 integer  zpesopts(2*maxhpar,maxpes)  operdef.inc
 zpesopts(n,np) points to the end of the character string of the n-th option
 within pesopts(np).
-------------------------------------------------------------------------------
nopts
 integer  nopts(maxpes)  operdef.inc
 Actual number of all options to operators (e.g. CAP[a,b,c]).
-------------------------------------------------------------------------------
hoprpar
 real  hoprpar(maxhpar,maxhop)  operdef.inc
 hoprpar(n,hl) gives the n-th integer parameter of the operator hl.
-------------------------------------------------------------------------------
hoppar
 real  hoppar(maxhpar,maxhop)  operdef.inc
 hoprpar(n,hl) gives the n-th parameter of the operator hl.
 The parameters are then stored in hoprpar and hopipar.
-------------------------------------------------------------------------------
pesopts
 character  pesopts(maxpes)  operdef.inc
 pesopts(np) contains the options of the np-th PES.
-------------------------------------------------------------------------------
lcutpes
 logical  operdef.inc
 lcutpes is set to true, if a potential is to be cut using pesmax and
 pesmin. (E.g. in Operator-Section:  V<10,eV, similar for potfit).
-------------------------------------------------------------------------------
pesmin
 real  operdef.inc
 Potential cut value. V = max(pesmin,V). See "lcutpes".
-------------------------------------------------------------------------------
pesmax
 real  operdef.inc
 Potential cut value. V = min(pesmax,V). See "lcutpes".
-------------------------------------------------------------------------------
iqconst
 integer  iqconst(maxdim)  operdef.inc
 Value the 'ghost mode' shall take when evaluating the potential.
 iqconst(f) : If 1, and dof is not in specified system, coordinate
 is set to value in rqconst(f).
 If 0, and dof is not in specified system, coordinate is set to 0.0d0.
 If dof is in specified system, this flag is ignored.
 (This seems to be not implemented yet!).
-------------------------------------------------------------------------------
vmin
 real  operdef.inc
 Minimum value of potential. Used in potfit/getpes.
-------------------------------------------------------------------------------
vmax
 real  operdef.inc
 Maximum value of potential. Used in potfit/getpes.
-------------------------------------------------------------------------------
mulddim
 integer  operdef.inc
 Actual number of multi-dimensional (muld) operators.
 More precisely: multi-dimensional sets of coordinates (grids).
 (mulddim .le. maxmuld).
-------------------------------------------------------------------------------
mulddof
 integer  mulddof(maxdim,maxmuld)  operdef.inc
 mulddof(gf,muld) contains the primitive-basis DOF which corresponds to
 the gf-th DOF of the (sorted) muld-th multi-dimensional grid.
 mulddof is the ordered form of mulddof2. In mulddof2 the order is
 as in the |i&j&k construct of the Hamlitonian line. In mulddof
 the order is like the order in the WF.
-------------------------------------------------------------------------------
mulddof2
 integer  mulddof2(maxdim,maxmuld)  operdef.inc
 mulddof2 is similar to mulddof, but the DOFs are sorted  in
 original order in which they appear in the Hamiltonian line.
 mulddof2(gf,muld) contains the primitive-basis DOF which corresponds
 to the gf-th DOF of the (original) muld-th multi-dimensional grid.
-------------------------------------------------------------------------------
muldsize
 integer  muldsize(maxmuld)  operdef.inc
 muldsize(nuld) : Size of the correlated product grid of the muld-th muld-grid.
-------------------------------------------------------------------------------
nmulddof
 integer  nmulddof(maxmuld)  operdef.inc
 nmulddof(muld) : Number of degrees of freedom of the muld-th muld-grid.
-------------------------------------------------------------------------------
grid
 integer  grid(maxdim)  heinterm.F, htmsetup.F, poteval.F
 Auxiliary variable for mapping DOFs to modes or muld terms.
 (See also mham).
-------------------------------------------------------------------------------
mham
 integer  mham(maxdim)  heinterm.F
 f=mham(mh). mham maps the operator DOFs to the primitive-basis DOFs.
 Needed if certain DOFs defined in Hamiltonian are ignored or reordered
 in the calculation.  f=mham(mh) means that DOF f in the calculation is
 DOF mh in the Hamiltonian. (See also grid)
-------------------------------------------------------------------------------
nham
 integer  heingabe.F, matchlab.F, heinutil.F, several analyse programs
 nham is the number of an "Hamiltonian" operator defined in an
 Hamiltonian-Section. nham=1 refers to the system Hamiltonian.
-------------------------------------------------------------------------------
hopsdim
 integer  operdef.inc
 Length of array  hops. (See hops).
-------------------------------------------------------------------------------
hops
 real   htmsetup.F, hphi.F, calcha.F (and many more)
 The array hops contains all DOF, mode, or muld operators.
 Complex vectors or matrices are stored as real and imaginary part separately.
-------------------------------------------------------------------------------
lcap
 logical  operdef.inc
 The calculation employs CAPs. This enforces the use of the Arnoldi-SIL
 if SIL is specified for the A-vector propagation.
-------------------------------------------------------------------------------
lcdvr
 logical  operdef.inc
 Any multidimensional Hamiltonian terms use the CDVR method.
-------------------------------------------------------------------------------
ltdvr
 logical  operdef.inc
 Any multidimensional Hamiltonian terms use the TDVR method
-------------------------------------------------------------------------------
lanalpes
 logical  operdef.inc
 An analytic PES will be generated (e.g. for CDVR). This means that the
 PES is not expanded on the primitive grid.
-------------------------------------------------------------------------------
koeff
 complex  koeff(maxkoe)  operdef.inc
 Array containing the coefficients of the MCTDH-expansion of the operator.
 Note that the coefficients are first stored in hops and the moved to
 koeff in rdoper.F .
-------------------------------------------------------------------------------
ki
 integer  ki(maxkoe)  operdef.inc
 ki(k) defines the initial (electronic) state for Hamiltonian term k.
 I.e. the Hamiltonian term k connects the states ki(k) with kf(k).
-------------------------------------------------------------------------------
kf
 integer  kf(maxkoe)  operdef.inc
 kf(k) defines the final (electronic) state for Hamiltonian term k.
 I.e. the Hamiltonian term k connects the states ki(k) with kf(k).
-------------------------------------------------------------------------------
complete
 logical  complete(maxdim)  operdef.inc
 If true, SPF basis is "complete" and (1-P)H phi =0. Thus the SPFs
 of that mode need not to be propagated.
-------------------------------------------------------------------------------
diag
 logical  diag(maxdim,maxkoe)  operdef.inc
 If diag(m,k) is true, then the associated operator is a unit operator.
 As the SPFs are orthonormal, the unit operator is not explicitly applied
 but ignored, except when the nodiag flag is given in the Hamiltonian-Section.
-------------------------------------------------------------------------------
hsym
 integer  hsym(maxdim,maxkoe)  operdef.inc
 hsym(m,k) indicates the symmetry of the associated operator. (See also htmsym).
 hsym=1 -> hermitian; hsym=-1 -> anti-hermitian; hsym=0 -> no symmetry.
 When the keyword "nohsym" is given in the Integrator-Section,
 then the logical usehsym is set false and symmetry will not be used.
-------------------------------------------------------------------------------
hlsym
 integer  hlsym(maxdim,maxkoe)  operdef.inc
 Similar to hsym, but indicating the symmetries of the hloch matrices.
-------------------------------------------------------------------------------
diagh
 integer  diagh(maxdim)  operdef.inc
 Auxiliary diag array used in d2mfields.F, i.e. for density operators
 of type II.
-------------------------------------------------------------------------------
kinop
 integer  kinop(maxdim,maxkoe)  operdef.inc
 kinop(f,k) controls whether a correlated Hamiltonian term is diagonal:
   kinop=1: fully non-diagonal
   kinop=0: diagonal
   kinop<0: side-diagonal with htmshift=k, where
            k>0: kinop=-2*k
            k<0: kinop= 2*k+1
 This is used to speed up the CMF-propagation of the SPFs.
-------------------------------------------------------------------------------
laddmode
 logical  laddmode(maxdim,maxham)  operdef.inc
 laddmode(m,nh) : logical set to true if the mode m is to be included
 into the operator nh. (See keyword 'addmode').
-------------------------------------------------------------------------------
hamlab
 character  hamlab(maxham)  operdef.inc
 String with name of nham-th Hamiltonian.
-------------------------------------------------------------------------------
zhun
 integer  zhun(maxdim,maxsta,maxham)  operdef.inc
 Pointer to start of uncorrelated terms in hamilton array
 zhun(m,s,nham) points to the m-th mode, s-th state, and nham-th Hamiltonian.
-------------------------------------------------------------------------------
ldissop
 logical  operdef.inc
 indicates if dissipative operators are involved.
-------------------------------------------------------------------------------
ldissin
 logical  operdef.inc
 indicates if input wishes dissipative treatment.
-------------------------------------------------------------------------------
ldproj
 logical  operdef.inc
 If true (this is the default!) the equations of motion for the propagation
 of the density operator are modified by inserting a projector on the
 SPF-space. This ensures that the trace is conserved.
-------------------------------------------------------------------------------
htmdim
 integer  operdef.inc
 Actual number of operators used to build the Hamiltonian(s).
 htmdim must be .le. maxhtm. htmdim,maxhtm are protocoled in the op.log file.
-------------------------------------------------------------------------------
zham
 integer zham(maxham)   operdef.inc
 The pointer zham(nham) points to the start of the nham-th Hamiltonian.
 E.g. k runs from zham(nham) to zham(nham)+kzahl(nham)-1 if looping over
 the correlated terms of the nham-th Hamiltonian.
-------------------------------------------------------------------------------
hamdim
 integer  operdef.inc
 Actual number of Hamiltonians. (hamdim .le. maxham).
-------------------------------------------------------------------------------
hamnum
 integer  hamnum(maxkoe)  operdef.inc
 hamnum(k)=nham, i.e. hamnum returns the Hamiltonian number for the k-th
 Hamiltonian term.
-------------------------------------------------------------------------------
nodiag
 logical nodiag(maxham)  operdef.inc
 If nodiag(nham) is true then the diag flag is not used.
 Note nodiag(1)=.false., i.e. the system Hamiltonian always uses diag.
-------------------------------------------------------------------------------
kfirst
 integer  kfirst(maxdim,maxkoe)  operdef.inc
 kfirst(m,k) points to the first occurrence of correlated operator term.
 kfirst is defined in operflag@zeigprop.F .
-------------------------------------------------------------------------------
kact
 integer  kact(maxkoe)  operdef.inc
 kact: 1: for wave-functions
       2: pure-left  (density operator)
       3: pure-right (density operator)
       4: left-right (density operator)
-------------------------------------------------------------------------------
ktwin
 integer  ktwin(maxkoe)  operdef.inc
  ktwin(k) points to the twin operator in a dissipative part.
-------------------------------------------------------------------------------
countpsi
 integer  operdef.inc
 Number of wavefunctions (psi-data-sets) written to psi-file
-------------------------------------------------------------------------------
indicap
 integer  indicap(maxdim)  operdef.inc
 indicap(f) denotes the grid-point of the f-th DOF where a CAP starts.
-------------------------------------------------------------------------------
autocap
 integer  autocap(maxkoe)  operdef.inc
 autocap(k)=-f denotes that the k-th Hamiltonian term in the f-th DOF is
 a CAP (or more precisely a imaginary or complex operator).
 autocap(k)=f denotes that the k-th Hamiltonian term in the f-th DOF is
 a ACAP, i.e. a automatic CAP.
-------------------------------------------------------------------------------
gpopcap
 real  gpopcap(maxdim)  operdef.inc
 Grid population at the point where the CAP starts.
 This information is used to switch the Acap on (see routine activcap).
-------------------------------------------------------------------------------
modc
 integer  operdef.inc
 The contracted mode of the natpots.
-------------------------------------------------------------------------------
vpdim
 integer  vpdim(maxdim)  operdef.inc
 Cumulative number of preceeding natural potentials.
 Note that the contracted mode is set to 1.
-------------------------------------------------------------------------------
pdim
 integer  pdim(maxdim)  operdef.inc
 pdim(m) denotes the number of natural potentials of (potfit) mode m.
 Note that pdim of contracted mode, pdim(modc) is set to modcdim.
 modcdim = Prod_(m.ne.modc)[potdim(m)]
-------------------------------------------------------------------------------
npdim
 integer  npdim(maxdim)  operdef.inc
 Cumulative number of following natural potentials.
 Note that the contracted mode is set to 1.
-------------------------------------------------------------------------------
opname
 character  runoper.inc
 Name of operator module (i.e. the .op file).
-------------------------------------------------------------------------------
oppath
 character  runoper.inc
 Path for operator file. NB: If the oppath is not explicitly given in the
 input file, then the current directory (i.e. the directory which hosts
 the input file) is assumed. If the program cannot find the operator file
 there, the path $MCTDH_DIR/operators is taken as default.
-------------------------------------------------------------------------------
parfile
 character  runoper.inc
 Name of a file with parameters for Hamiltonian. I.e. a parfile contains a
 a (lengthy) Parameter-Section.
-------------------------------------------------------------------------------
oplaenge
 integer  runoper.inc
 Length of string opname.
-------------------------------------------------------------------------------
opplaenge
 integer  runoper.inc
 Length of string oppath.
-------------------------------------------------------------------------------
parlaenge
 integer  runoper.inc
 Length of string parfile.
-------------------------------------------------------------------------------
maxrdf
 integer  parameter(maxrdf=64)  runoper.inc
 Maximal number of rdfiles. (read-files: containing information for the
 operator build up, e.g. natpot).
-------------------------------------------------------------------------------
nr
 integer  (appears at several places)
 Running number of rdfile (e.g. natpot). Typical use:
 do nr=1,nrdf
-------------------------------------------------------------------------------
nrdf
 integer  runoper.inc
 Actual number of rdfiles. (read-files: containing information for the
 operator build up, e.g. natpot).
-------------------------------------------------------------------------------
nrdfunc
 integer  runoper.inc
 Actual number of symbols read from rdfile. nrdfunc is the argument of
 rdtype and rdlab.
-------------------------------------------------------------------------------
rdtype
 integer  rdtype(maxhop)  runoper.inc
 Type of rdfile. (????)
-------------------------------------------------------------------------------
rdlab
 character  rdlab(maxhop)  runoper.inc
 Labels read from rdfile.
-------------------------------------------------------------------------------
rdfiles
 character  rdfiles(maxrdf)  runoper.inc
 Name  of rdfiles. (read-files: containing information for the
 operator build up, e.g. natpot).
-------------------------------------------------------------------------------
ndef
 integer  runoper.inc
 Actual number of external operator labels.
-------------------------------------------------------------------------------
deflabel
 character  deflabel(maxdef)  runoper.inc
 Label for the external operator. E.g. "V" for a natpot or a .srf-file.
 (See deflabop and hoplab).
-------------------------------------------------------------------------------
deflabop
 character  deflabop(maxdef)  runoper.inc
 Name of operator, e.g. "lsth", which is defined in a labels section.
 (See deflabel and hoplab).
-------------------------------------------------------------------------------
hopidef
 integer hopidef(maxhop)  operdef.inc
 hopidef(hl) contains a number which points to a user defined label
 stored in deflabel(hopidef(hl))
 (See deflabel and hopilab and hoplab).
-------------------------------------------------------------------------------
mrrdop
 integer  runoper.inc
 Dimension of real memory array (mr(mrrdop)) for external operators.
-------------------------------------------------------------------------------
rdopdim
 integer  runoper.inc
 Dimension of array rdop. rdop starts at mr(mrrdop).
-------------------------------------------------------------------------------
zrdop
 integer  zrdop(maxhop)  runoper.inc
 Pointers for operators read from files. n-th operator : rdop(zrdop(n)).
-------------------------------------------------------------------------------
minfac
 integer  runoper.inc
 Actual number of factors/terms in an operator. Must be .le. maxfac.
 minfac, maxfac are protocoled at the beginning of the op.log file.
-------------------------------------------------------------------------------
minkoe
 integer  runoper.inc
 Actual number of Hamiltonian terms. Must be .le. maxkoe.
 minkoe, maxkoe are protocoled at the beginning of the op.log file.
-------------------------------------------------------------------------------
aversion
 character  aglobal.inc
 String containing Version and Release number in order to call the
 appropriate alnalyse program. (Used in analysis.F).
-------------------------------------------------------------------------------
lpsi1
 logical  aglobal.inc
 If .true. space for a second psi-array provided. (zeigausw.F,memausw.F).
-------------------------------------------------------------------------------
lfilein
 logical  aglobal.inc
 If .true. path of psi-file is read into character psifile.
-------------------------------------------------------------------------------
ldmat
 logical  aglobal.inc
 If .true. space for a density-matrix provided. (memausw.F).
-------------------------------------------------------------------------------
ldmat1
 logical  aglobal.inc
 If .true. space for a second density-matrix provided. (memausw.F).
-------------------------------------------------------------------------------
lort
 logical  aglobal.inc
 If .true. space for ort array (i.e.grids) provided. (memausw.F).
-------------------------------------------------------------------------------
lpsigrd
 logical  aglobal.inc
 If .true. wavefunction to be used in grid representation (rather
 than in SPF representation).
-------------------------------------------------------------------------------
ltrafo
 logical  aglobal.inc
 If .true. space for trafo array (i.e.grids) provided. (memausw.F).
-------------------------------------------------------------------------------
lsphfbr
 logical  aglobal.inc
 If .true. space for spherical harmonics FBR arrays (i.e. jfbr, mfbr, kinfbr)
 provided. (memausw.F).
-------------------------------------------------------------------------------
spsidim
 integer  aglobal.inc
 Dimension of the single precision WF. (Similar to dgldim).
-------------------------------------------------------------------------------
griddim
 integer  aglobal.inc
 Dimension of (correlated) primitive product grid.
 griddim = nstate*Prod[subdim(m)].
-------------------------------------------------------------------------------
nopt
 integer  aglobal.inc
 nopt is no. of options read in pesinput (showsys.F).
 nopt is also used as local variable to count the number of options
 in several routines, e.g. eingutil.F,heinlab.F,funcanld.F,funcsrf.F .
-------------------------------------------------------------------------------
step
 integer  aglobal.inc
 Increment when running over data to be analysed. step=1 is default.
 With step=n only every n-th e.g. WF will be analysed, e.g in overlap,
 flux,crosscorr,etc.
-------------------------------------------------------------------------------
outform
 integer  aglobal.inc
 Format of the GNUPLOT output file, e.g. Movie, Step Trough, 3D Plot, etc.
 In showd1d:
 -S      : "Step through" by pressing RETURN. (default).       outform=0
 -T      : "3D time file" (grid file).                         outform=1
 -M      : "Movie", one picture every second.                  outform=2
 -I id   : "Index file", id=0 shows the first picture,         outform=3
 -Ma     : Mathematica file (for dynamic plots).               outform=4
 -P pnt  : "Point file", shows the population of the pnt-th    outform=5
-------------------------------------------------------------------------------
plottask
 integer  showsys, showpot and other analyse routines
 In showsys:
 (1)='adiabatic pes'
 (2)='diabatic pes '
 (3)='adiabatic wavefunction (abs^2, cut)'
 (4)='diabatic wavefunction (abs^2, cut)'
 (5)='diabatic reduced density '
-------------------------------------------------------------------------------
reim
 integer  aglobal.inc
 Switch between plotting real, imaginary, or both parts.
-------------------------------------------------------------------------------
indx
 integer  aglobal.inc
 Number of the data set to be plotted (GNUPLOT).
-------------------------------------------------------------------------------
laeout
 integer  aglobal.inc
 Length of string defining the output file.
-------------------------------------------------------------------------------
laein
 integer  aglobal.inc
 Length of string defining the input file.
-------------------------------------------------------------------------------
laein1
 integer  aglobal.inc
 Length of string defining the second input file.
-------------------------------------------------------------------------------
lenunit
 real  aglobal.inc
 Unit of length for plot
-------------------------------------------------------------------------------
eunit
 real  aglobal.inc
 Unit of energy for plot
-------------------------------------------------------------------------------
xmin
 real  aglobal.inc
 Lower coordinate value for plot.
-------------------------------------------------------------------------------
xmax
 real  aglobal.inc
 Upper coordinate value for plot.
-------------------------------------------------------------------------------
ymin
 real  aglobal.inc
 Lower ordinate value for plot.
-------------------------------------------------------------------------------
ymax
 real  aglobal.inc
 Upper ordinate value for plot.
-------------------------------------------------------------------------------
tfin
 real  aglobal.inc
 Upper time value for analyse. Stop if time of e.g. WF is larger than tfin.
-------------------------------------------------------------------------------
lgnu
 logical  aglobal.inc
 If .true. write GNUPLOT command lines to output file.
-------------------------------------------------------------------------------
lagnu
 logical  aglobal.inc
 If .true. GNUPLOT will be called automatically.
-------------------------------------------------------------------------------
lprint
 logical  aglobal.inc
 If .true. GNUPLOT plot will be printed.
-------------------------------------------------------------------------------
lswap
 logical  aglobal.inc
 If .true. swapfft will be excecuted. (put momentum in correct order).
-------------------------------------------------------------------------------
lnw
 logical  aglobal.inc
 If .true. no weights will be employed. Show 'naked' DVR values.
-------------------------------------------------------------------------------
lnatorb
 logical  aglobal.inc
 If .true. show natural orbitals (rather than SPFs).
-------------------------------------------------------------------------------
lpgrid
 logical  aglobal.inc
 If .true. GNUPLOT grid lines will be shown on the plot.
-------------------------------------------------------------------------------
linter
 logical  aglobal.inc
 If .true. interactive plotting will be enabled.
-------------------------------------------------------------------------------
fileout
 character  aglobal.inc
 String defining the output file.
-------------------------------------------------------------------------------
filein
 character  aglobal.inc
 String defining the input file.
-------------------------------------------------------------------------------
filein1
 character  aglobal.inc
 String defining the second input file.
-------------------------------------------------------------------------------
psifile
 character  aglobal.inc
 String defining the psi-file. Used in showsys, dengen, d12ad, joinpsi.
-------------------------------------------------------------------------------
unitlab
 character  unitlab(3)  aglobal.inc
 String array used or units.
-------------------------------------------------------------------------------
operator
 character  aglobal.inc
 Name of the operator to be applied. The operator must be defined
 in an Hamiltonian-Section_xxx, where xxx stands for the name.
-------------------------------------------------------------------------------
lend
 logical  aglobal.inc
 If .true. the end of a file is found.
-------------------------------------------------------------------------------
maxprop
 integer  parameter(maxprop=4)  aglobal.inc
 Maximal number of properties written to check file.
-------------------------------------------------------------------------------
lrdchk
 logical  lrdchk(3)  aglobal.inc
 If .true. following is read and stored to check file.
 lrdchk(1) state populations -> spop, energies -> euncorr, etot
 lrdchk(2) natural orbital populations -> dicht3
 lrdchk(3) properties -> prop
-------------------------------------------------------------------------------
sbaspar
 integer  parameter(sbaspar=6)  runinwf.inc
 Maximum number of parameters used to define bases for initial WF.
-------------------------------------------------------------------------------
spf1ddim
 integer  runinwf.inc
 length of spf1d array for 1D "SPF" functions. (See spf1d).
-------------------------------------------------------------------------------
spf1d
 complex  spf1d(spf1ddim)  genpsi.F
 When building the initial WF, one first builds in general 1D functions
 (stored in spf1d) which may then be combined to multidimensional SPFs.
-------------------------------------------------------------------------------
dzspf1d
 integer  dzspf1d(maxdim,maxsta,maxsta)  runinwf.inc
 Pointers for spf1d array for 1D "SPF" functions.
 (Density operators of type I).
-------------------------------------------------------------------------------
ddimf
 integer  ddimf(maxdim,maxsta,maxsta)  runinwf.inc
 Number of 1D SPFs to be generated. (Density operators of type I).
-------------------------------------------------------------------------------
dzpsi1d
 integer  dzpsi1d(maxsta,maxsta)  runinwf.inc
 Pointer to state wavefunction of 1D "SPFs". (Density operators of type I).
-------------------------------------------------------------------------------
zspf1d
 integer  zspf1d(maxdim,maxsta)  runinwf.inc
 Pointers for spf1d array for 1D "SPF" functions. (See spf1d).
-------------------------------------------------------------------------------
dimf
 integer  dimf(maxdim,maxsta)  runinwf.inc
 Number of 1D SPFs to be generated. (See spf1d).
-------------------------------------------------------------------------------
ladiab
 logical  runinwf.inc
 Set .true. if the keyword "correction" is set in the Init_WF-Section.
 I.e. if the corrected or uncorrected energy distribution of the initial WF
 is to be evaluated.
-------------------------------------------------------------------------------
lad
 logical  runinwf.inc
 Set .true. if adiabatic correction of the initial WF is required.
-------------------------------------------------------------------------------
ldia
 logical  runinwf.inc
 Set .true. if diabatic correction of the initial WF is required.
-------------------------------------------------------------------------------
lhh2
 logical  runinwf.inc
 Set .true. if special (a)diabatic correction of the initial WF
 for H + H2, H + D2 system is required.
-------------------------------------------------------------------------------
lbkmp2
 logical  runinwf.inc
 Similar to lhh2, but employing bkmp2 surface rather than lsth.
-------------------------------------------------------------------------------
ledstr
 logical  runinwf.inc
 Set .true. if the uncorrected energy distribution of the initial WF
 is required.
-------------------------------------------------------------------------------
lcallwf
 logical  runinwf.inc
 Set .true. if the  user supplied subroutine 'initWF' should be called
 to build the initial wavefunction.
-------------------------------------------------------------------------------
lbuildwf
 logical  runinwf.inc
 Set .true. if the initial wavefunction is build by genphi and gencoeff.
-------------------------------------------------------------------------------
lreadwf
 logical  runinwf.inc
 Set .true. if the initial wavefunction is read via the "read-inwf" block.
-------------------------------------------------------------------------------
lblocka
 logical  runinwf.inc
 Set .true. if the initial A-vectors are read in for a block-impr.-relaxation
 run.  Keyword "block-A".
-------------------------------------------------------------------------------
lblockspf
 logical  runinwf.inc
 Set .true. if the initial SPFs are read in for a block-impr.-relaxation run.
 Keyword "block-SPF".
-------------------------------------------------------------------------------
lorthopsi
 logical  runinwf.inc
 If set .true. the SPFs are Schmidt-orthogonalised at beginning of a
 restart run.
-------------------------------------------------------------------------------
lrealpsi
 logical  runinwf.inc
 If set .true. only the real part of the wavefunction is taken. SPFs are then
 Schmidt-orthogonalised and the A-vector is re-normalized. lrealpsi is set .true.
 if "realpsi" is given as an argument to "file", "read-inwf", or "block-SPF"
 See also lrealpsi2.
-------------------------------------------------------------------------------
lrealpsi2
 logical  runinwf.inc
 If set .true. only the real part of the wavefunction is taken at the end of
 geninwf. (After operate, orthogonalize, etc). The SPFs are then
 Schmidt-orthogonalised and the A-vector is re-normalized. lrealpsi2 is
 set .true. if "realpsi" is given as a keyword in the Init_WF-Section.
 See also lrealpsi.
-------------------------------------------------------------------------------
lveigen
 logical  runinwf.inc
 If set .true. the eigenvalues and vectors of a 1D-operator (defined in
 the build section) are written to the file veigen_modelabel.
-------------------------------------------------------------------------------
inwfop
 integer  inwfop(16)  runinwf.inc
 Number of operator (nham) used to modify an initial wavepacket.
 (See routines operate, opwf, opwfit). Up to 15 operators may act on the
 initial Wavefunction. inwfop(1) is applied first, inwfop(2) second, etc.
-------------------------------------------------------------------------------
inwfopnit
 integer  runinwf.inc
 Number of iterations when applying an operator to the initial WF.
 The default is inwfopnit=10.
-------------------------------------------------------------------------------
inwfoptol
 real  runinwf.inc
 Error tolerance when applying an operator to the initial WF.
 The default is inwfoptol=1.0d-8.
-------------------------------------------------------------------------------
addim
 integer  runinwf.inc
 addim = dim(2,1)*dim(3,1). Used for adiabatic correction (which is restricted
 to H+H2 etc). See adiab.F and wkadiabwkb in adiabwkb.F
-------------------------------------------------------------------------------
azahl
 integer  runinwf.inc
 Number of A-coefficients to be read. (A-coeff....end-A-coeff block in
 Init_WF-Section.
-------------------------------------------------------------------------------
iza
 integer  runinwf.inc
 Input file line for start of A-coefficient list.
-------------------------------------------------------------------------------
izcll
 integer  runinwf.inc
 Input file line for start of "call" argument list.
-------------------------------------------------------------------------------
czahl
 integer  runinwf.inc
 Number of A-coefficients to be read. (call....end-call block in
 Init_WF-Section)
-------------------------------------------------------------------------------
maxedim
 integer  parameter(maxedim=100)  runinwf.inc
 Maximal number of eigenvalues (form spf1d) in adiabatic correction and
 in veigen (keyword eigenf).
-------------------------------------------------------------------------------
e0eigen
 real  runinwf.inc
 Lowest eigenvalue (or eigenvalue according to "pop") from diagonalising a
 1D operator with veigen.
-------------------------------------------------------------------------------
eeigen
 real  eeigen(maxedim)  runinwf.inc
 Eigenvalues (possibly re-ordered by pop) determined by veigen.
 Also used in adiabatic correction.
-------------------------------------------------------------------------------
sbasis
 integer  sbasis(maxdim)  runinwf.inc
 Basis identification number when building the initial WF. (See basis).
 sbasis(f) : sbasis type for DOF f.
 (phifbr), el, HO,  Leg, eigenf, sphfbr, kleg, k, map, Wigner, readspf
    -1      0   1    2     3      4       5    6   7     8        9
-------------------------------------------------------------------------------
isbaspar
 integer  isbaspar(sbaspar,maxdim,maxsta*maxsta)  runinwf.inc
 Integer parameters needed to define s-basis, i.e. the basis used to build
 the initial WF. isbaspar(i,f,p) where i is the parameter number, f the DOF,
 and p a combined index of packets and states.
 For a complete list type 'phelp sbaspar-all'.
-------------------------------------------------------------------------------
rsbaspar
 real  rsbaspar(sbaspar,maxdim,maxsta*maxsta)  runinwf.inc
 Real parameters needed to define s-basis, i.e. the basis used to build
 the initial WF.
 For a complete list type 'phelp sbaspar-all'.
-------------------------------------------------------------------------------
tfac
 real  runinwf.inc
 Partition factor for Jacobian coordinates. tfac = m1/(m1+m2) where m1 and
 m2 are the masses of the two atoms of the diatomic molecule.
 Default:  tfac=0.5 .
-------------------------------------------------------------------------------
ftr
 integer   runinwf.inc
 DOF-number of the translational degree of freedom.
 (Used for (a)diabatic correction).
-------------------------------------------------------------------------------
mtr
 integer   adiabwkb.F, transmf.F
 Particle (mode)-number of the translational degree of freedom.
 (Used for (a)diabatic correction).
-------------------------------------------------------------------------------
statetr
 integer   runinwf.inc
 Initial state to be used for (a)diabatic correction.
-------------------------------------------------------------------------------
intpsidim
 integer   runprop.inc
 Length of complex array needed by the integrator. (E.g. Krylov space).
-------------------------------------------------------------------------------
intrdim
 integer   runprop.inc
 Lenght of real array needed by rDAV and SIL (improved relaxation).
-------------------------------------------------------------------------------
mfsumdim
 integer   runprop.inc
 Length of array containing the sum over the mean-field
 matrices times the single-particle operator matrices.
 This is calculated only for diagonal and side-diagonal operator matrices.
 mfsumdim = Sum_s Sum_m [subdim(m)*dim(m,s)**2*nhtmshift(m)]
-------------------------------------------------------------------------------
spfovrdim
 integer   runprop.inc
 Length of array containing overlaps of SPFs (for auto).
 spfovrdim = Sum_m Sum_s Sum_s1 [dim(m,s1) dim(m,s)].
-------------------------------------------------------------------------------
inttyp
 integer   runprop.inc
 Integrator type (used when "lconst" is false).
 1=>ABM, 2=>BS, 3=>SIL, 4=>RK5, 5=>RK8
-------------------------------------------------------------------------------
intord
 integer   runprop.inc
 Maximum order of integrator (used when "lconst" is false)
-------------------------------------------------------------------------------
inttypea
 integer   runprop.inc
 Integrator used to propagate the A-vector.
 1=>ABM, 2=>BS, 3=>SIL, 4=>RK5, 5=>RK8, 6=>DAV
-------------------------------------------------------------------------------
inttypephi
 integer   runprop.inc
 Integrator used to propagate the Phi-vector.
 1=>ABM, 2=>BS, 3=>SIL (exact only), 4=>RK5, 5=RK8
-------------------------------------------------------------------------------
intordera
 integer   runprop.inc
 Order of integration of the A-vector. (The exact meaning of this variable
 depends on the integrator).
-------------------------------------------------------------------------------
intorderphi
 integer   runprop.inc
 Order of integration of the Phi-vector. (The exact meaning of this variable
 depends on the integrator).
-------------------------------------------------------------------------------
lanczorder
 integer   runprop.inc
 Number of Lanczos iterations in a diagonalisation run.
-------------------------------------------------------------------------------
maxsilorder
 integer   runprop.inc
 Maximum order that was actually used by SIL integrator (written to log file).
-------------------------------------------------------------------------------
rlaxnum
 integer   runprop.inc
 Number of the eigenstate (of the lanczos matrix) to which the improved
 relaxation shall converge. If rlaxnum=200, the algorithm tries to converge
 to a state similar to the initial state (keyword "follow"). Similarly,
 the keyword "lock" sets rlaxnum=300. If the keyword
 "full" is given (use all the Lanczos dimension in the first step),
 rlaxnum is additional increased by 10000. The keywords "ortho" and "quad"
 increase rlaxnum by 20000 and 40000, respectively.
 rlaxnum=-1 for normal relaxation.
-------------------------------------------------------------------------------
accuracy
 real  runprop.inc
 Integrator accuracy used for "all" propagation.
-------------------------------------------------------------------------------
accavec
 real  runprop.inc
 Integrator accuracy used for propagation of A-vector.
-------------------------------------------------------------------------------
accphi
 real  runprop.inc
 Integrator accuracy used for propagation of Phi-vectors.
-------------------------------------------------------------------------------
dt
 real  runprop.inc
 Initial integration step size for "all" integration (VMF).
-------------------------------------------------------------------------------
dtA
 real  runprop.inc
 Initial integration step size for A-vector integration.
-------------------------------------------------------------------------------
dtPhi
 real  runprop.inc
 Initial integration step size for Phi-vector integration.
-------------------------------------------------------------------------------
updatetime
 real  runprop.inc
 Time interval of the full CMF step. On input: initial update time.
-------------------------------------------------------------------------------
lnatur
 logical  runprop.inc
 If true, propagate in natural orbitals, i.e. density matrix kept diagonal.
-------------------------------------------------------------------------------
lrlx
 logical  runprop.inc
 If true, a relaxation calculation is performed.
-------------------------------------------------------------------------------
lipic
 logical  runprop.inc
 If true, interaction picture is used for propagation.
-------------------------------------------------------------------------------
lconst
 logical  runprop.inc
 If true, mean-fields etc. are kept constant (= lconstfix.or.lconstvar)
-------------------------------------------------------------------------------
lconstfix
 logical  runprop.inc
 If true, mean-fields are kept constant with fixed update time.
-------------------------------------------------------------------------------
lconstvar
 logical  runprop.inc
 If true, mean-fields are kept constant with variable update time.
 Error control is both for A and Phi.
-------------------------------------------------------------------------------
lcmfadaphi
 logical  runprop.inc
 If true, mean-fields are kept constant with adaptive update times
 and error control only for SPFs.
-------------------------------------------------------------------------------
lcmfadaa
 logical  runprop.inc
 If true, mean-fields are kept constant with adaptive update times
 and error control only for A-coefficients.
-------------------------------------------------------------------------------
lfunkl
 logical  runprop.inc
 If true, funk subroutine is employed, i.e. uncorrelated operators are on the
 left of the projector (i.e. 'h-proj').
-------------------------------------------------------------------------------
lfunkr
 logical  runprop.inc
 If true, funkr subroutine is employed, i.e. uncorrelated operators are on the
 right of the projector (i.e. 'proj-h').
-------------------------------------------------------------------------------
loldsilerr
 logical  runprop.inc
 If true, the standard SIL error criterion is used, otherwise an
 improved one is taken (Arnoldi-Lanczos only!)
-------------------------------------------------------------------------------
lnaturcmf
 logical  runprop.inc
 If true, the density matrix is diagonalised after each CMF-step and
 the SPFs are transformed to natural orbitals.
-------------------------------------------------------------------------------
lmf
 logical  runprop.inc
 If true, linear mean-field approach is used, otherwise the Dirac-Frenkel
 variational principle (density operator propagation).
-------------------------------------------------------------------------------
rlxenergy
 real  runprop.inc
 Energy subtracted from Hamiltonian in relaxation calculation.
-------------------------------------------------------------------------------
estart
 real  runprop.inc
 Initial energy, used to compute Delta-E, printed to output.
-------------------------------------------------------------------------------
currentmode
 integer   runprop.inc
 The mode that is currently integrated when using the CMF scheme.
-------------------------------------------------------------------------------
lprefactor
 logical  runprop.inc
 If true, the "funk" routines compute -i H|psi>, otherwise they
 calculate H|psi>.
-------------------------------------------------------------------------------
lsil
 logical  runprop.inc
 Tells "funk" routines, that they are called from SIL.
-------------------------------------------------------------------------------
lipictrafo
 logical  runprop.inc
 If true (and lipic is true), the "funk" routine return dtpsi in
 interaction picture, else in Schroedinger picture.
-------------------------------------------------------------------------------
lopro
 logical  runprop.inc
 If true, (which is the default) the new "opro" projector routine is used,
 else the old "projector" routine is taken. (See propwf/project.F).
-------------------------------------------------------------------------------
lallhterms
 logical  runprop.inc
 Logical specifying whether all or only kinetic Hamiltonian terms shall
 be computed (only used for CMF and density operator typ I).
-------------------------------------------------------------------------------
lgetenergy
 logical  runprop.inc
 If true, the energy is re-computed in "funkex" (exact propagation).
-------------------------------------------------------------------------------
usehsym
 logical  runprop.inc
 If true, (which is the default) operator symmetries will be used in
 building hteil matrices.
-------------------------------------------------------------------------------
lsym
 logical  used in phihphi and mfields
 lsym in phihphi and mfields is identical to usehsym. See usehsym.
-------------------------------------------------------------------------------
lbackr
 logical  runprop.inc
 If true, the orbitals are "back rotated" after relaxing them in a
 'improved relaxation' (Davidson) run.
-------------------------------------------------------------------------------
lquadphi
 logical  runprop.inc
 If true, the funkphi2 routine is used rather then the funkphi one
 in a 'improved relaxation' (Davidson) run.
-------------------------------------------------------------------------------
lortho
 logical  runprop.inc
 If true, the Lanczos (Krylov) vectors are explicitely re-orthogonalized.
 'improved relaxation' (SIL) run.
-------------------------------------------------------------------------------
lquad
 logical  runprop.inc
 If true, H^2 rather than H is build and diagonalized
 in a 'improved relaxation' (Davidson) run. Only for RDAV.
-------------------------------------------------------------------------------
lolsen
 logical  runprop.inc
 If true, the Olsen correction is applied to the residual vector
 in a 'improved relaxation' (Davidson) run. Only for RDAV.
-------------------------------------------------------------------------------
lautoblk
 logical  runprop.inc
 If true, start A-vectors for block-Davidson (multi-packet run) will
 be automatically generated.
-------------------------------------------------------------------------------
lsplitrst
 logical  runprop.inc
 If true, the restart file of a multi-packet run will be split into
 individual restart files (without packet DOF).
-------------------------------------------------------------------------------
lrealphi
 logical  runprop.inc
 If true, the real part of the SPFs will be taken after each orbital relaxation
 in a RDAV or RRDAV improved relaxation run. This logical is set by the realphi
 keyword in the Run-Section.
-------------------------------------------------------------------------------
lreflex
 logical  global.inc
 If true, the reflex trick for improved relaxation (malonaldehyde) is used.
-------------------------------------------------------------------------------
olsen
  See lolsen.
-------------------------------------------------------------------------------
quad
  See lquad.
-------------------------------------------------------------------------------
phicount
 integer  runprop.inc
 The relaxation of the orbitals will be performed phicount times
 before the Davidson diagonalisation. (impr. relaxation).
-------------------------------------------------------------------------------
indxdav
 integer  rdavstep.f, getdavmat.F
 The array indxdav(5000) contains the indices of the configurations,
 used in a preconditioning step. (improved relaxation, Davidson, RDAV).
-------------------------------------------------------------------------------
precon
 integer  runprop.inc
 precon denotes the dimension of the block-matrix uses as PreConditioner
 in a improved relaxation, Davidson, (RDAV) run.
-------------------------------------------------------------------------------
epsmat
 real  runprop.inc
 Value used for regularisation of density matrix (dicht1-dicht4).
 Default: epsmat = 1.d-8. Actual value used is epsrel=norm*epsmat
-------------------------------------------------------------------------------
epsrel
 real  density.F
 Actual value used for regularisation of density matrix (dicht1-dicht4).
 epsrel=norm*epsmat
-------------------------------------------------------------------------------
eps
 real  runprop.inc
 value used for regularisation of hnatur elements, i.e. natural orbital
 propagation. Default: eps = 1.d-8.
-------------------------------------------------------------------------------
epsupdate
 real  runprop.inc
 Accuracy used for adaptive constant mean-fields. (Second input parameter
 of CMF, CMF/var, CMF/varphi, or CMF/vara in Integrator-Section).
-------------------------------------------------------------------------------
psicut
 real  runprop.inc
 Coefficient cutoff if psi saved in compact form.
-------------------------------------------------------------------------------
lcaphterms
 logical  runprop.inc
 Switch for computing/skipping CAPs (density operator typ I).
-------------------------------------------------------------------------------
mfsum
 complex  mfsum(mfsumdim)  summf.F
 The array mfsum is used for storing the sum over the mean-field matrices times
 the diagonal single-particle potential operator matrices. (Eq.(90), review)
-------------------------------------------------------------------------------
zmfsum
 integer  zmfsum(maxdim,maxsta,maxsta)  runprop.inc
 zmfsum(m,s1,s): pointer to start of mfsum for mode m and states s,s1.
-------------------------------------------------------------------------------
zmfsum1
 integer  zmfsum1(maxdim,maxsta,maxsta,maxnhtmshift)  runprop.inc
 zmfsum1(m,s1,s,i): pointer to start of mfsum for mode m and states s,s1,
 with an additional index for the i-th htmshift value. The actual htmshift
 value is in ihtmshift(i,m). (The products of mean-field matrices times
 (side-)diagonal operators have to be summed separately for different
 side-diagonal shifts.)
 See also: htmshift, ihtmshift, nhtmshift
-------------------------------------------------------------------------------
zspfovr
 integer  zspfovr(maxdim,maxsta)  runprop.inc
 zspfovr(m,s): pointer to start of overlap matrix of single-particle
 functions <phi(m,s)|phi(m,s)> (autocorr.F).
-------------------------------------------------------------------------------
dzmfsum
 integer  dzmfsum(maxdim,maxsta,maxsta,maxsta)  runprop.inc
 dzmfsum(m,s1,s,t): pointer to start of mfsum for mode m and states s,s1.
 (density operators of type I).
-------------------------------------------------------------------------------
detot
 real  detot(maxsta)  runprop.inc
 Total energy per state (density operators).
-------------------------------------------------------------------------------
decorr
 real  decorr(maxsta)  runprop.inc
 Correlated energy per state (density operators).
-------------------------------------------------------------------------------
deuncorr
 real  deuncorr(maxsta)  runprop.inc
 Uncorrelated energy per state (density operators).
-------------------------------------------------------------------------------
nexpect
 integer  runprop.inc
 Number of operators of which an expectation-value is to be computed
-------------------------------------------------------------------------------
expectlab
 character  expectlab(5)  runprop.inc
 Labels, characterizing the operators of which an expectation-value is
 to be computed. (keyword "expect" in Run-Section).
-------------------------------------------------------------------------------
expvalue
 complex  expvalue(5)  runprop.inc
 Expectation-value(s) of the specified operators.
 (keyword "expect" in Run-Section).
-------------------------------------------------------------------------------
mcdicht1
 integer  mcdicht1  global.inc
 Pointer to the inverse of the density matrix stored in the mc(mcdim) array.
 Size: dmatdim
-------------------------------------------------------------------------------
mcdicht2
 integer  mcdicht2  global.inc
 Pointer to the density matrix stored in the mc(mcdim) array.
 Size: dmatdim
-------------------------------------------------------------------------------
mrdicht3
 integer  mrdicht3  global.inc
 Pointer to the eigenvalues of the density matrix stored in the
 mr(mrdim) array.
 Array size doubles; size: d2matdim
-------------------------------------------------------------------------------
mcdicht4
 integer  mcdicht4  global.inc
 Pointer to the eigenvectors of the density matrix stored in the
 mc(mcdim) array.
 Size: dmatdim
-------------------------------------------------------------------------------
nmulpot
 integer  nmulpot(maxham)  operdef.inc
 nmulpot(nham): Number of multi-dimensional potentials for Hamiltonian nham.
-------------------------------------------------------------------------------
lc
 integer  lc(maxkey)  global.inc
 Array containing the lengths of the keywords as read by subroutine rdinpf.
 See also the variables "keyword" and "keyorig" -- the length of keyword(i)
 should be lc(i).
-------------------------------------------------------------------------------
ic
 integer  ic  ein*.F, rdinpf@einglib.F
 Number of keywords on the current input line, as returned by subroutine
 rdinpf.
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
lcross
 logical lcross  daten.inc
 If true, the cross-correlation-function should be calculated on the fly.
-------------------------------------------------------------------------------
crossname
 character*160 crossname  global.inc
 Name of the directory from which to take the restart-file which is used
 as reference wavefunction for calculating the cross-correlation-function.
-------------------------------------------------------------------------------
crosslng
 integer crosslng  global.inc
 Length of the string "crossname".
-------------------------------------------------------------------------------
maxfver
 integer maxfver, parameter (maxfver=800), global.inc
 maxfver defines the length of the array filever.
-------------------------------------------------------------------------------
filever
 real*8 filever(maxfver)  global.inc
 filever(i) contains the file version number for file on channel i.
 Defines output formats etc.
 See also: tiny, maxfver
-------------------------------------------------------------------------------
progver
 real*8 progver  global.inc
 Code version number, defines output formats etc.
 See also: tiny
-------------------------------------------------------------------------------
chkdvr
 integer chkdvr iodvrdef.F iofile.F iorst.F rdoper.F rddvr.F rdnatpot.F
 This parameter will eventually be passed on to the subroutine "rddvrdef"
 where it specifies what to do with the DVR info which is read from the
 PSI or RESTART file. It can have the following values:
 -1: dvrinfo read, no action taken
 0 : dvrinfo read, no action taken except setting fdvr (comparing modelabels)
 1 : dvrinfo read, and stored in system data
 2 : dvrinfo checked against system data
 3 : dvrinfo checked as subset of system data
 4 : dvrinfo checked as subset of system data, but fdvr is
     used and not set (i.e. modelabels are ignored).
 5 : dvrinfo checked against system data (as check=2),
     but sin, FFT, and exp DVRs are identified by fcoin.
 6 : As 5, but differences in the numbers of electronic states are ignored.
 20,30,40,50,60: Similar to chkdvr=2,3,4,5,6
     but a check of dummy DOFs is avoided, if those are at the
     end of the primitive basis list. (dofspf must be set!)

 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
chkgrd
 integer chkgrd  iofile.F iorst.F rdoper.F
 This parameter will eventually be passed on to the subroutine "rdgrddef"
 where it specifies what to do with the grid definiton which is read from the
 PSI or RESTART file. It can have the following values:
 0 : grdinfo read, no action taken
 1 : grdinfo read, and stored in system data
 2 : grdinfo checked against system data
 3 : grdinfo checked against natpot file
 6 : grdinfo checked against system data while ignoring an electronic DOF.
     This is used for the read-inwf block and the block-spf keyword.
 20: Similar to check=2, but a check of dummy DOFs is avoided
     if those are at the end of the primitive basis list.

 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
chkpsi
 integer chkpsi  iofile.F iorst.F
 This parameter will eventually be passed on to the subroutine "rdpsidef"
 where it specifies what to do with the "further system definition (dim etc.)"
 which is read from the PSI or RESTART file. It can have the following values:
 0 : psiinfo read, no action taken
 1 : psiinfo read, and stored in system data
 2 : psiinfo checked against system data
 3 : psiinfo checked against system data, except nspf's, i.e. dim(n,s).
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
chkprp
 integer chkprp  iorst.F (rstinfo, rdrst)
 0 : propinfo is read but not stored
 1 : propinfo is read and stored
 By propinfo we mean logicals like lconst or lfunkr and all the
 integrator information.
-------------------------------------------------------------------------------
chkdat
 integer chkdat  iofile.F
 This parameter will eventually be passed on to one of the subroutines
 RDAUTEINFO, RDPSIINFO, RDCHKINFO, or RDRHOINFO, where it specifies what
 to do with some of the information read from the PSI file. What information
 exactly? That depends on the routine where it is used. For further details
 consult the routines mentioned above (with mcb). The general meaning of
 this parameter is this:
 0 : do nothing
 1 : store the information in the system data
 2 : compare the information with the system data
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
fdvr
 integer fdvr(maxdim) iodvrdef.F
 This parameter is necessary if the degrees of freedom are not given in the
 same order in the input file (primitive basis section).
 fdvr(f1)=f, where f=MCTDH-DOF and f1=natpot-DOF.
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
mdvr
 integer mdvr(maxdim) iogrddef.F
 This parameter is necessary if the modes are not given in the same
 order in the input file (spf basis section or natpot file).
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
mmode
 integer mmode(maxdim) iogrddef.F
 This parameter is necessary if the modes are not given in the same
 order in the input file (spf basis section or natpot file).
 mmode(m1)=m, where m=MCTDH-particle and m1=natpot-particle.
 This variable is not global and could have a different meaning in a
 different context.
-------------------------------------------------------------------------------
npsiopt
 integer parameter(npsiopt=6)  daten.inc
 Length of the array lpsiopt.
-------------------------------------------------------------------------------
lshort
 logical lshort gencoeff.F
 Flag, gives information about the format of the A-coeff option in the
 Init_wf-Section.
-------------------------------------------------------------------------------
optyp
 integer  optyp(12)   heinutil.F and other genoper files.
 optyp is used in two routines; rdfactors that splits up an
 operator read from the .op file into its factors :
 optyp(k) denotes the operation type of the k-th factor. *=1, /=2, +=3, -=4
 e.g.:  label=' h1*h2+h3-h4'  results in
   factor(1)=h1, factor(2)=h2, factor(3)=h3, factor(4)=h4
   optyp(1)=3,   optyp(2)=1,   optyp(3)=3,   optyp(4)=4, and storetm
 that stores the operator in hterm and hoplab. optyp(1)=3 indicates that the
 hterm has a positive sign (defined by the first factor) and is stored as
 it is. If optyp(1)=4, then the operator has a negative sign, and a -1.0*
 must be added at the beginning of the hterm entry.
-------------------------------------------------------------------------------
mcpsiref
 integer  global.inc
 Pointer to the location inside the mc() array which contains the
 reference wave-function used in calculating the cross-correlation function.
-------------------------------------------------------------------------------
psirefdim
 integer  crocofly.inc
 Size of the reference wave-function used in calculating the cross-
 correlation function on the fly.
-------------------------------------------------------------------------------
dif1mat
 real  dif1mat(gdim,gdim)  gendvr genoper opfuncs
 dif1mat is the matrix of first derivatives of a DVR representation.
 Note: for rHO and Leg DVRs the "first derivative" refers to a more
 complicated expression. dif1mat is stored as dvrmat(zdvr(f),1) which
 in turn is stored as mr(mrdvrmat).
-------------------------------------------------------------------------------
dif2mat
 real  dif2mat(gdim,gdim)  gendvr genoper opfuncs
 dif2mat is the matrix of second derivatives of a DVR representation.
 dif2mat is stored as dvrmat(zdvr(f),2) which in turn is stored as
 mr(mrdvrmat).
-------------------------------------------------------------------------------
trafo
 real  trafo(dvrdim)  trafo(gdim,gdim)   gendvr genoper geninwf
 trafo is the DVR-FBR transformation matrix. The transformation matrix
 for the f DOF is stored under trafo(zdvr(f)) which in turn is stored
 under mr(mrtrafo). Note: trafo(function,grid).
-------------------------------------------------------------------------------
ort
 real  ort(ortdim)  ort(gdim)
 ort contains the DVR grid-points. The grid for the f-th DOF is stored as
 ort(zort(f)) which in turn is stored as mr(mrort).
-------------------------------------------------------------------------------
linwf
 logical    mctdh/iorst.F
 if linwf is .true., data is for an initial wavefunction,
 and no information about integrator is written.
-------------------------------------------------------------------------------
lerr
 logical
 lerr is set .true., if an error is detected while parsing the input.
-------------------------------------------------------------------------------
lausw
 logical pglobal.inc
 to tell 'pzeiger' whether it is called from
          'potfit' (false) or from 'pauswert' (true)
-------------------------------------------------------------------------------
litf
 logical pglobal.inc
 litf is set .true., when  data is written to file 'iteration'
-------------------------------------------------------------------------------
lcw
 logical pglobal.inc
 lcw  is set .true., when correlated weights are used in potfit
-------------------------------------------------------------------------------
lwarn
 logical pglobal.inc
 lwarn  is set .true. in subroutine 'warnmsg'
-------------------------------------------------------------------------------
lit
 logical pglobal.inc
 lit  is set .true., when 'niters' iteration steps are performed
  without prompting the user
-------------------------------------------------------------------------------
lgit
 logical pglobal.inc
 lgit  is set .true., when  data shall be written to file 'pgitter'
-------------------------------------------------------------------------------
litia
 logical pglobal.inc
  interactive iteration modus
-------------------------------------------------------------------------------
lprodw
 logical pglobal.inc
 lprodw  is set .true., when  data shall be written to file 'prodwei'
 in potfit
-------------------------------------------------------------------------------
lsw
 logical pglobal.inc
 lsw  is set .true., when  separable weights are used in potfit
-------------------------------------------------------------------------------
lcspot
 logical pglobal.inc
 lcspot is set .true., when  coupled states centrifugal potential
 is included in potfit (keyword cspot)
-------------------------------------------------------------------------------
ploned
 logical pglobal.inc
 ploned  is set .true., when  one dimensional potentials
 are to be subtracted in potfit
-------------------------------------------------------------------------------
lshort
 logical pglobal.inc
 lshort is set .true., when  a short test run is executed
 (no calculations)
-------------------------------------------------------------------------------
lsp
 logical pglobal.inc
 lsp  is set .true., when the potential energy vector 'vvec' should be
 of the single precision real ('float') type in potfit
-------------------------------------------------------------------------------
lwo
 logical pglobal.inc
 lwo  is set .true., if one wants to calculate only the potential
 on the product grid and write it to a file. "write-only" option in potfit
-------------------------------------------------------------------------------
lwef
 logical pglobal.inc
 lwef  is set .true. when every fit should be written
 to a separate natpot file in potfit
-------------------------------------------------------------------------------
lreadvpot
 logical pglobal.inc
 lreadvpot  is set .true. when the vpot file is read rather then generated
-------------------------------------------------------------------------------
lgenvpot
 logical  pglobal.inc
 lgenvpot  is set to .true.,  when a vpot file
 should be generated unconditionally in potfit
-------------------------------------------------------------------------------
ldelvpot
 logical  pglobal.inc
 ldelvpot is set to .true.,  when the vpotfile should be deleted
 after the run of potfit
-------------------------------------------------------------------------------
loutfil
 logical  pglobal.inc
 loutfil is set to .true.,  when  the poutput file is opened
-------------------------------------------------------------------------------
loutl
 logical pglobal.inc
 if loutl is set to .true., a long form of the poutfit output file is written
-------------------------------------------------------------------------------
direct
 integer pglobal.inc
 In potfit, the contents of this variable determines the number of calls
 of the potential energy at run time. more calls need more time
 but less memory. direct.eq.0 designates the original version
 of potfit (a few calls, much memory), direct.eq.1 or
 direct.eq.2 indicates more calls but less memory usage.
 Direct is set via keyword 'direct' in the Run-Section of the input file.
-------------------------------------------------------------------------------
fitcount
 integer pglobal.inc
 In potfit, if lwef is true every fit is written to a separate file
 'natpot.iii', where 'iii' is the contents of 'fitcount' starting
  with zero for the first fit.
-------------------------------------------------------------------------------
npest
 integer pglobal.inc
 In potfit, npest is set via keyword 'pestiming'. if >0 the program calculates
 the exact potential and the fit 'npest' times over the complete
 grid. this is done after the first fit in order to compare the
 cpu times associated with the calculation of the exact potentials and the fit.
-------------------------------------------------------------------------------
niw
 integer pglobal.inc
 In potfit, niw is the number of grid points with non-zero 'iweight'
-------------------------------------------------------------------------------
sw
 real*8  potfit routines
 sw is the current separable weight.
-------------------------------------------------------------------------------
cw
 real*8  potfit routines
 cw is the current correlated weight (either one or zero, relevant region)
-------------------------------------------------------------------------------
wsum2
 real*8 pglobal.inc
 In potfit, wsum2 is the sum of squares of separable weights on
 grid points with non-zero 'iweight'
-------------------------------------------------------------------------------
swsum2
 real*8 pglobal.inc
 In potfit, iswsum2 is the sum of squares of separable weights.
 If there are no separable weights, swsum2 = vpotdim = No. of grid points.
 non-zero 'iweight' (also called 'cw').
-------------------------------------------------------------------------------
iwvmax
 real*8 pglobal.inc
 In potfit, energy cut off in [au]
-------------------------------------------------------------------------------
iwvmin
 real*8 pglobal.inc
 In potfit, energy cut off in [au]
-------------------------------------------------------------------------------
niters
 integer pglobal.inc
 In potfit, number of iteration steps in non-interactive iteration modus
-------------------------------------------------------------------------------
rmserr
 real*8 pglobal.inc
 In potfit, weighted and relevant rms-error
-------------------------------------------------------------------------------
urms
 real*8 pglobal.inc
 In potfit,  relevant rms-error
-------------------------------------------------------------------------------
allrms
 real*8 pglobal.inc
 In potfit,  rms-error
-------------------------------------------------------------------------------
maxerr
 real*8 pglobal.inc
 In potfit, modulus of relevant maximum error
-------------------------------------------------------------------------------
maxall
 real*8 pglobal.inc
 In potfit,  modulus of maximum error
-------------------------------------------------------------------------------
vpotdim
 integer runpfit.inc
 In potfit, Length of array containing exact potential data on grid
 vpotdim = Prod[gdim(m)]. In sp-energy calculations vpotdim = 1 (see zeigpfit).
-------------------------------------------------------------------------------
wpotdim
 integer runpfit.inc
 Length of array wpot containing weights defining relevant region
 if externally provided (keyword readcw).
-------------------------------------------------------------------------------
cdim
 integer runpfit.inc
 In potfit, Length of potential expansion coefficient vector
 cdim   = Prod[potdim(m)]
-------------------------------------------------------------------------------
oneddim
 integer runpfit.inc
 In potfit,  Length of array containing one-dimensional potential curves
 oneddim = Sum[gdim(m)]
-------------------------------------------------------------------------------
oned
 oned(oneddim) real*8
 In potfit, showpot, one-dimensional potential curves to be subtracted
 in the potential surface
-------------------------------------------------------------------------------
modcdim
 integer runpfit.inc
 In potfit, Number of contracted natural potentials
 modcdim = Prod_(m.ne.modc)[potdim(m)]
-------------------------------------------------------------------------------
coeffdim
 integer runpfit.inc
 In potfit,  Length of array containing potential expansion coefficients
 and later (the equal or larger) array containing the contracted natural
 potentials.
 coeffdim=modcdim*psubdim(modc), modcdim=Prod_(m.ne.modc)[potdim(m)]
-------------------------------------------------------------------------------
evecdim
 integer runpfit.inc
 In potfit, Length of array containing all (even if not used later on)
 natural potentials evecdim = Sum[psubdim(m)**2]
-------------------------------------------------------------------------------
evaldim
 integer runpfit.inc
 In potfit, Length of array containing all natural eigenvalues
-------------------------------------------------------------------------------
weightdim
 integer runpfit.inc
 In potfit,  Length of array containing the separable weight vectors
  weightdim = ortdim
-------------------------------------------------------------------------------
weight
 weight(weightdim) real*8 (see /potfit/weights.F for instance)
 In potfit, array containing the separable weight vectors
-------------------------------------------------------------------------------
weighti
 weighti(weightdim) real*8 (see /potfit/weights.F for instance)
 In potfit, array containing the inverse of separable weight vectors
-------------------------------------------------------------------------------
maxcldim
 integer runpfit.inc
 In potfit,  Max[cldim(m)] over all modes
-------------------------------------------------------------------------------
sumcldim
 integer runpfit.inc
 In potfit, Sum[cldim(m)] over all modes
-------------------------------------------------------------------------------
potdim
 integer potdim(maxdim) runpfit.inc
 In Potfit, number of relevant natural potentials for mode m
-------------------------------------------------------------------------------
cldim
 integer cldim(maxdim) runpfit.inc
 In Potfit, dimension of "long" coefficient vector used to
 calculate the density matrix for mode m during iteration
-------------------------------------------------------------------------------
c2v
 integer c2v(maxdim-1) runpfit.inc
 In Potfit, c2v holds dimension information used during the transformation of
 coefficients to potential energies, i.e., during the calculation
 of a potential energy fit.
-------------------------------------------------------------------------------
v2c
 integer v2c(maxdim,6)  runpfit.inc
 In Potfit, v2c holds information used during the transformation of
 potential energies to contracted coefficients, i.e.,
 during the calculation of contracted coefficients.
 col 1: degree of freedom F to be transformed
 col 2: size of the vector AFTER the transformation of F
 col 3: size of the dimensions < F BEFORE the trafo
 col 4: size of dimension F BEFORE the trafo
 col 5: size of dimensions > F BEFORE the trafo
 col 6: size of dimension F AFTER the trafo
-------------------------------------------------------------------------------
wdim
 integer wdim(maxdim) runpfit.inc
 In Potfit, dimension of the separable weight vector for mode m
-------------------------------------------------------------------------------
zevec
 integer zevec(maxdim) runpfit.inc
 In Potfit,  relative offset of the eigenvectors of rho(m)

 In MC-Potfit: integer zevec(nmode,maxspf)
 zevec(m,n) points to start of the nth eigenvector of rho(m)
-------------------------------------------------------------------------------
zweight
 integer zweight(maxdim) runpfit.inc
 In Potfit,  relative offset of the separable weight vector of mode m
-------------------------------------------------------------------------------
zcl
 integer zcl(maxdim) runpfit.inc
 In Potfit, relative offset of the "long" coefficient vector of mode m
-------------------------------------------------------------------------------
nodbef
 integer runpfit.inc
 In Potfit, number of modes before the contracted mode (nodbef=modc-1)
-------------------------------------------------------------------------------
nodaft
 integer runpfit.inc
 In Potfit, number of modes after the contracted mode (nodaft=npmode-modc)
-------------------------------------------------------------------------------
dimbef
 integer runpfit.inc
 In Potfit: dimbef = potdim(1)* ... * potdim(nodbef)
 See: dimaft, dimmodc, nodbef, nodaft, modc
-------------------------------------------------------------------------------
dimmodc
 integer runpfit.inc
 In Potfit, psubdim(modc)
-------------------------------------------------------------------------------
dimaft
 integer runpfit.inc
 In Potfit: dimaft = potdim(nodbef+2)* ... * potdim(ndof)
 See: dimbef, dimmodc, nodbef, nodaft, modc
-------------------------------------------------------------------------------
relnw
 real*8   relnw(maxdim)  integer runpfit.inc
 In Potfit, trace-sum of eigenvalues of mode m
-------------------------------------------------------------------------------
vgpdim
 integer vgpdim(maxdim)  runpfit.inc
 vgpdim(f) is the 'vor'-grid-dimension in dof order. (zeigpfit.F)
-------------------------------------------------------------------------------
vgmdim
 integer vgmdim(maxdim)  runpfit.inc
 vgpdim(f) is the 'vor'-grid-dimension in mode order. (zeigpfit.F)
-------------------------------------------------------------------------------
lpconm
 logical combined.inc
 In Potfit, lpconm is set to .true. when there
 are combined natpot operators
-------------------------------------------------------------------------------
npmode
 integer combined.inc
 In Potfit, number of modes (MCTDH particles)
-------------------------------------------------------------------------------
psubdim
 integer psubdim(maxdim) combined.inc
 In Potfit, number of grid points for mode m
-------------------------------------------------------------------------------
maxpsub
 integer combined.inc
 In Potfit, Max[psubdim(m)]
-------------------------------------------------------------------------------
maxpsub2
 integer combined.inc
 In Potfit, Max[psubdim(m)**2] but excluding the combined mode
-------------------------------------------------------------------------------
zmode
 integer zmode(maxdim) combined.inc
 In Potfit, zmode(m) is the pointer for ort matrix for mode m
-------------------------------------------------------------------------------
mchteil
 integer global.inc
 Pointer to the beginning of the hteil-matrices in array mc.
-------------------------------------------------------------------------------
zw
 integer zw(2)
 Used in d2calcha.F to point to intermediate results of the multiplication of
 hteil-matrices with psi in workspace.
-------------------------------------------------------------------------------
hzw
 integer
 Same as zw, see there.
-------------------------------------------------------------------------------
maxpar
 integer   parameter (maxpar=350)    global.inc
 maximal number of parameters. (npar.le.maxpar).
-------------------------------------------------------------------------------
sdm
 integer
 sdm = subdim(m) for some mode m. Used in analyse, genoper and mctdh.
-------------------------------------------------------------------------------
sdmc
 integer
 sdm = subdim(mcap) where mcap is the mode of the cap. Used in flux.
-------------------------------------------------------------------------------
mcap
 integer
 mode of the cap. (See also fcap). Used in flux.
-------------------------------------------------------------------------------
fcap
 integer
 DOF of the cap. (See also mcap). Used in flux.
-------------------------------------------------------------------------------
start
 integer
 Starting point of the cap. Used in flux.
-------------------------------------------------------------------------------
ostart
 real
 ostart=ort(start). Physical starting point of the cap. (See also start).
 Used in flux.
-------------------------------------------------------------------------------
vpot
 vpot(vpotdim) real*8 used in potfit (see /potfit/getpes.F for instance)
 includes the potential surface on a grid
-------------------------------------------------------------------------------
evec
 evec(evecdim) real*8 used in potfit and showpot
 includes all natural potentials
-------------------------------------------------------------------------------
eval
 eval(evaldim) real*8 used in potfit (see /potfit/vecs.F for instance)
 includes all natural eigenvalues of the natural potentials
-------------------------------------------------------------------------------
maxnctr
 integer plot.inc
 maximum number of contour lines in showpot
 (used in analyse/plotutils.F)
-------------------------------------------------------------------------------
nctr
 integer plot.inc
 number of contour lines in showpot
 (nctr.lt.maxnctr see analyse/plotutils.F)
-------------------------------------------------------------------------------
nctro
 integer plot.inc
 the default of the number of contour lines in showpot
 nctro = 21 see analyse/plotutils.F
-------------------------------------------------------------------------------
np
 integer in subroutine fdefanld (opfuncs/funcanld.F).
 This label numbers the 1d operators which require
 arguments (the value of np is written in the op.log file).
 np is not the number of arguments in each 1d operator
 for instance for morse[p1,p2,p3,p4,p5] np is not necessary
 equal to 5. If no argument is given, for instance cos and
 not cos[p], np = 0.
-------------------------------------------------------------------------------
sumtyp
 integer sumtyp(maxdim,maxkoe)
 The variable sumtyp appears in genoper/heinsort.F in two different meanings.
 In subroutines sumhtms, combhtm1d, and combhtms, sumtyp(f,k) has the
 following meaning:
 C--------------------------------------------------------------------
 C flag terms that or of different types for summation
 C sumtyp(f,k) = 0  if not to be added (e.g. a labeled term)
 C sumtyp(f,k) = 1  if FFT term
 C sumtyp(f,k) = 2  if DVR or potential 1D term
 C sumtyp(f,k) = 3  if DVR or potential mode term
 C sumtyp(f,k) = 4  if multi-D term
 C sumtyp(f,k) = 5  if CAP
 C sumtyp(f,k) = 6  if jm^2 is used
 C sumtyp(f,k) = 7  if j_+  is used
 C sumtyp(f,k) = 8  if j_-  is used
 C sumtyp(f,k) = 9  if analytic potential
 C symtyp(f,k) = 10 if jpm is used
 C--------------------------------------------------------------------

 In the subroutine sortmode, sumtyp(m,k) has the following meaning:
 C--------------------------------------------------------------------
 C flag terms that can be treated as product terms.
 C sumtyp(m,k) = 3  if diagonal term in a full multi-d analytic potential
 C sumtyp(m,k) = 2  if kleg * diagonal term
 C sumtyp(m,k) = 1  if diagonal (potential) term
 C sumtyp(m,k) = 0  otherwise
 C--------------------------------------------------------------------
-------------------------------------------------------------------------------
pbaspar-all
 Parameters to define the primitive basis set
 ------------------------------------
 HO, rHO (basis=1,basis=11)
 ipbaspar(1) = 0 -> hoxeq, hofreq, homass; 1 -> xi, xf
 rpbaspar(1)=hoxeq     (rpbaspar(1)=xi)
 rpbaspar(2)=hofreq    (rpbaspar(2)=xf)
 rpbaspar(3)=homass
 -------------------------------------
 Leg, Leg/R (basis=2,basis=12
 ipbaspar(1)=blz
 ipbaspar(2)=ibleg
 ipbaspar(3)=gdim         (only for Leg/R)
 rpbaspar(1)=theta-end    (only for Leg/R)
 rpbaspar(2)=theta-begin  (only for Leg/R)
 -------------------------------------
 sin (basis=3)
 ipbaspar(1)=0 -> default , 1 ->'sdq' , 2->'spin'
 rpbaspar(1)=xi
 rpbaspar(2)=xf
 -------------------------------------
 FFT (basis=4)
 rpbaspar(1)=xi
 rpbaspar(2)=xf
 -------------------------------------
 exp (basis=5)
 rpbaspar(1)=xi
 rpbaspar(2)=xf
 -------------------------------------
 sphfbr (basis=6)
 ipbaspar(1,)=sphtyp
 ipbaspar(2)=jmax
 ipbaspar(3)=joff    (off-set)
 ipbaspar(4)=gj      (gj = number of j-points)
 rpbaspar(1)=thrshld
 -------------------------------------
 KLeg (basis=7)
 ipbaspar(1)=ibleg
 -------------------------------------
 phifbr (basis=-1)
  ipbaspar(1)=mmax
  ipbaspar(2)=mincr
  ipbaspar(3)=mmin
 -------------------------------------
 K (basis=8)
 ipbaspar(1)=kmin
 ipbaspar(2)=kmax
 ipbaspar(3)=min(abs(kmin),abs(kmax)) or ipbaspar(3)=0 if kmin*kmax<0
 ipbaspar(4)=max(abs(kmin),abs(kmax))
 ipbaspar(5)=dk    (delta k, default = 1)
 -------------------------------------
 PLeg  (basis=9)
 ipbaspar(1)=ibleg
 ipbaspar(2)=kmin
 ipbaspar(3)=kmax
 ipbaspar(4)=kmax-kmin+1
 ipbaspar(5)=min(abs(kmin),abs(kmax)) .or. ipbaspar(5)=0 if(kmin*kmax<0)
 -------------------------------------
 lagu  (basis=15-18)
 ipbaspar(1)=0 -> default , 1 ->'xi-xf' , 2->'x0-xf'
 ipbaspar(2)=icut
 rpbaspar(1)=x0,     xi,   x0
 rpbaspar(2)=breite, xf,   xf
 ---------------------------------------
 Wigner (basis=19)
 ipbaspar(1)=ibleg
 ipbaspar(2)=kmin
 ipbaspar(3)=kmax
 ipbaspar(4)=kmax-kmin+1; that is, 'kdim'
 ipbaspar(5)=min(abs(kmin),abs(kmax))
             .or. ipbaspar(5)=0 if(kmin*kmax<0); that is, 'kmin2'
 ipbaspar(6)=mmmin
 ipbaspar(7)=mmmax
 ipbaspar(8)=mmmax-mmmin+1; that is, 'mmdim'
 ipbaspar(9)=min(abs(kmin),abs(kmax))
            .or. ipbaspar(5)=0 if(kmin*kmax<0); that is, 'mmmin2'
 rpbaspar(1)=xi    (if combined with fft; NOT YET IMPLEMENTED)
 rpbaspar(2)=xf    (if combined with fft; NOT YET IMPLEMENTED)
 --------------------------------------
 cos  (basis=14)
 rpbaspar(1)=xi
 rpbaspar(2)=xf
-------------------------------------------------------------------------------
 external  (basis=13)
 ipbaspar(1)=ifile      (file channel, ifile=60+f)
 ipbaspar(2)=filetype   (1=ascii, 2=binary)
 rpbaspar(1)=unitfactor (conversion factor when a unit is specified)
-------------------------------------------------------------------------------
sbaspar-all
 Parameters to define the initial SPFs
 ------------------------------------
  General
 isbaspar(4)=instate (electronic DOF)
 isbaspar(4)=pop
 isbaspar(5)=0 or 1;  0=default 1=periodic ;  (FFT and exp)
 isbaspar(6)=0 or 1 or 11;  0=no-sym 1=sym 11=sym+check ;  (eigenf)
 -------------------------------------
       Leg
 isbaspar(1)=slz
 isbaspar(2)=sl0
 isbaspar(3)=isleg
 isbaspar(4)=sl0-slz+1        if(isleg.eq.0), no. of in. pop. spf
 isbaspar(4)=(sl0-slz)/2 + 1  if(isleg.gt.0), no. of in. pop. spf
 ------------------------------------
         HO  Gauss
 isbaspar(1)=typ  (0,1,2 = all,odd,even)
 isbaspar(4)=pop
 isbaspar(5)=0 or 1;  0=default 1=periodic ;  (FFT and exp)
 rsbaspar(1)=gxeq
 rsbaspar(2)=gmom
 rsbaspar(3)=rwidth
 rsbaspar(4)=cwidth
 rsbaspar(5)=gmass
 -------------------------------------
        eigenf
 isbaspar(1) = ipot
 isbaspar(4) = pop
 isbaspar(6) = isym
 -------------------------------------
     sphfbr  (phifbr)
 isbaspar(1) = qnl0
 isbaspar(2) = qnm0
 -------------------------------------
      KLeg
 isbaspar(1) = sl0
 isbaspar(2) = isleg
 isbaspar(3) = iex
 isbaspar(5) = ilogprint
 isbaspar(6) = nspf (number of 1D SPFs if KLegs are combined; 0=auto)
 -------------------------------------
       K
 isbaspar(1) = slz
 isbaspar(2) = mmin
 isbaspar(3) = mmax
 isbaspar(5) = dm
 -------------------------------------
      Wigner
 isbaspar(1) = sl0
 isbaspar(2) = isleg (currently only nosym is supported)
 isbaspar(3) = iex
 isbaspar(5) = ilogprint
 -------------------------------------
            MAP
 isbaspar(1) = f2   (DOF to be mapped from)
 -------------------------------------
     readspf
 isbaspar(1) = nr   (index into readspffile array)

-------------------------------------------------------------------------------
htmoptyp
 integer  appears only in htmsetup.F
 htmoptyp=1  all 1D operators
 htmoptyp=2  all muld operators
 htmoptyp=3  sphFBR operators (but not the diagonal ones like
             j^2sph,jzsph,jzzsph. They are htmoptyp=1)
 htmoptyp=4  3D tensors j_p,j_m,jpm,jp^2,jm^2,jpjm,jmjp for KLeg and PLeg
 htmoptyp=5  Tensors for combined KLegs (cjpm)
 htmoptyp=6  4D (Wigner) tensors j^2wig, j_pwig, j_mwig, jp2wig
             jm2wig, jpmwig
-------------------------------------------------------------------------------
beer
 Not a keyword or parameter in MCTDH. Consume after work only.
 Remember, drinking and deriving can kill a friendship.
-------------------------------------------------------------------------------
onedipot
 integer  onedipot(maxdim) runpfit.inc
 onedipot(f) contains the operator number, hl, of the 1D potential
 substracted. If onedipot(f)=0, then no potential is substraced for the
 f-th degree of freedom.
-------------------------------------------------------------------------------
blz
 integer   einpbas.F, init2.F, genphi1.F, datout.F, etc
 blz is the m-quantum-number (l_z) of the Leg primitive basis.
 blz=ipbaspar(1,f) if basis(f) = 2 or 12. (Leg, Leg/R)
-------------------------------------------------------------------------------
ibleg
 integer   einpbas.F, init2.F, genphi1.F, datout.F, etc
 Symmetry parameter for Leg, KLeg and PLeg DVRs.
 ibleg=ipbaspar(2,f) if basis(f) = 2 or 12. (Leg, Leg/R)
 ibleg=ipbaspar(1,f) if basis(f) = 7 or 9. (KLeg, PLeg)
 ibleg=0 -> no symmetry
 ibleg=1 -> only odd l's
 ibleg=2 -> only even l's
-------------------------------------------------------------------------------
slz
 integer   eininwf.F, genphi1.F, etc
 slz is the m-quantum-number (l_z) of initial Legendre functions (build).
-------------------------------------------------------------------------------
isleg
 integer   eininwf.F, genphi1.F, etc
 Symmetry parameter for Leg and KLeg initial SPFs.
 Compare with slz and ibleg.
 isleg=0 -> no symmetry, all l's are used to build the initial SPFs.
 isleg=1 -> only odd  l's are used to build the initial SPFs.
 isleg=2 -> only even l's are used to build the initial SPFs.                  '
-------------------------------------------------------------------------------
hktype
 integer   hphi.F, hlochphi.F, function.F
 hktype governs which terms are included when operator is applied.
 0->all terms, 1->exclude CAP terms, 2->only CAP terms
-------------------------------------------------------------------------------
ktype
 integer   hphi.F, hlochphi.F, function.F, etc
 ktype governs which terms are included  when operator is applied.
 0->all terms, 1->Potential terms are excluded (i.e. only kinop calculated)
-------------------------------------------------------------------------------
li_blocksize
 integer linint.inc
 size of blocks in which linint variables are allocated, currently 8.
-------------------------------------------------------------------------------
li_total
 integer linint.inc
 total number of external1d functions used in run.
-------------------------------------------------------------------------------
li_allocd
 integer linint.inc
 total number of external1d function spaces allocated in run.
 Should be equal to li_total rounded up to multiples of li_blocksize.
-------------------------------------------------------------------------------
li_file
 integer*8 linint.inc
 dynamical array pointer holding strings with the filenames of external1d data.
-------------------------------------------------------------------------------
li_start
 integer*8 linint.inc
 dynamical array pointer holding doubles with external1d function argument
 start.
-------------------------------------------------------------------------------
li_step
 integer*8 linint.inc
 dynamical array pointer holding doubles with external1d function argument
 step length.
-------------------------------------------------------------------------------
li_buflen
 integer*8 linint.inc
 dynamical array pointer holding integers with buffer lengths for external1d
 data files.
-------------------------------------------------------------------------------
li_buffer
 integer*8 linint.inc
 dynamical array pointer holding pointers to buffers for external1d data files.
-------------------------------------------------------------------------------
li_init
 integer*8 linint.inc
 dynamical array pointer holding integers which are used as flags for
 external1d initialisation status.
-------------------------------------------------------------------------------
nrmstop
 real   runprop.inc
 The propagation is stopped, if the norm falls below nrmstop. (See lnormstop).
-------------------------------------------------------------------------------
constop
 real   runprop.inc
 The propagation is stopped, if the sum of the two last absolute energy
 differences is below constop. This is for improved relaxation with Dav.
-------------------------------------------------------------------------------
e1stop
 real   runprop.inc
 Last absolute energy difference in improved relaxation. (See constop).
-------------------------------------------------------------------------------
e2stop
 real   runprop.inc
 Before last absolute energy difference in improved relaxation. (See constop).
-------------------------------------------------------------------------------
lstop
 logical   runprop.inc
 lstop is set true, if the program finds a reason to stop the propagation
 at the next output interval.
-------------------------------------------------------------------------------
npd1
  integer   global.inc
  if set, the numbers npd1...npd4 specify the modes for which the pdensity
  is written. If zero, pdensity is written for all modes (provided the
  keyword pdensity is set in the run-section).
-------------------------------------------------------------------------------
npd2
 integer  global.inc
 See npd1
-------------------------------------------------------------------------------
npd3
 integer  global.inc
 See npd1
-------------------------------------------------------------------------------
npd4
 integer  global.inc
 See npd1
-------------------------------------------------------------------------------
npd4
 integer  global.inc
 See npd1
-------------------------------------------------------------------------------
mcautodtpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to dtpsiold used in
 routine autoout2high which computes higher order autocorrelation functions.
-------------------------------------------------------------------------------
mcautopsi
 integer  global.inc
 Pointer for complex memory array mc pointing to psiold used for auto=double
 and higher order autocorrelation functions.
-------------------------------------------------------------------------------
mcccdover
 integer  global.inc
 Pointer for complex memory array mc pointing to dover used for storing
 the overlaps when computing cross-correlation functins on fly.
-------------------------------------------------------------------------------
mccdvr2
 integer  global.inc
 Pointer for complex memory array mc pointing to cdvr2 used for CDVR.
-------------------------------------------------------------------------------
mccdvr4
 integer  global.inc
 Pointer for complex memory array mc pointing to cdvr4 used for CDVR.
-------------------------------------------------------------------------------
mcdicht4o
 integer   global.inc
 Pointer to a copy of the eigenvectors of the density matrix stored
 in the mc(mcdim) array.  Size: dmatdim
-------------------------------------------------------------------------------
mcdim
 integer  global.inc
 Length of the complex memory array mc.
-------------------------------------------------------------------------------
mrdim
 integer  global.inc
 Length of the real memory array mr.
-------------------------------------------------------------------------------
miwvec
 integer  global.inc
 Pointer to integer array wvec containing the POTFIT weights in compressed form
-------------------------------------------------------------------------------
mldim
 integer  global.inc
 Length of the logical memory array ml.
-------------------------------------------------------------------------------
msdim
 integer  global.inc
 Length of the complex*8 memory array ms.
-------------------------------------------------------------------------------
mfdim
 integer  global.inc
 Length of the single precision (real*4) memory array mf.
-------------------------------------------------------------------------------
mcexphin
 integer  global.inc
 Pointer for complex memory array mc pointing to exphin used as
 transformation matrix in exp-DVR.
-------------------------------------------------------------------------------
mcexprueck
 integer  global.inc
 Pointer for complex memory array mc pointing to exprueck used as
 transformation matrix in exp-DVR.
-------------------------------------------------------------------------------
mchc
 integer  global.inc
 Pointer for complex memory array mc pointing to the array hc.
-------------------------------------------------------------------------------
mchin
 integer  global.inc
 Pointer for complex memory array mc pointing to array hin used for FFT.
-------------------------------------------------------------------------------
mcrueck
 integer  global.inc
 Pointer for complex memory array mc pointing to array rueck used for FFT.
-------------------------------------------------------------------------------
mchloch
 integer  global.inc
 Pointer for complex memory array mc pointing to array hloch containing
 the mean-field matrices.  Size: hlochdim
-------------------------------------------------------------------------------
mchnatur
 integer  global.inc
 Pointer for complex memory array mc pointing to array hnatur used for
 natural orbitals calculations. Size: hlochdim
-------------------------------------------------------------------------------
mchpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array hpsi used for
 storing the h|phi> functions. Size: hpsidim
-------------------------------------------------------------------------------
mchunpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array hunpsi used for
 storing the action of the sum of all uncorrelated terms on the SPFs.
 Size: dgldim-adim (=totphidim)
-------------------------------------------------------------------------------
mcintpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array intpsi used for
 storing a complete wavefunction, e.g. during the operate algorithm.
 Size: dgldim
-------------------------------------------------------------------------------
mcipbt
 integer  global.inc
 Pointer for complex memory array mc pointing to array ipbt (interaction
 picture back transformation)  used e.g in iptrafo.F, ipbt(ortdim,nstate).
-------------------------------------------------------------------------------
mcipft
 integer  global.inc
 Pointer for complex memory array mc pointing to array ipbt (interaction
 picture forward transformation)  used e.g in iptrafo.F, ipft(ortdim,nstate).
-------------------------------------------------------------------------------
mcmfsum
 integer  global.inc
 Pointer for complex memory array mc pointing to array mfsum used for
 storing the sum over the mean-field matrices times the single-particle
 potential operator matrices with |phi>. Size: mfsumdim
-------------------------------------------------------------------------------
mcoldpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array oldpsi used for
 storing a complete wavefunction, e.g. during CMF propagation.
 Size: dgldim
-------------------------------------------------------------------------------
mcphi
 integer  global.inc
 Pointer for complex memory array mc pointing to array phi used for
 storing a complete set of SPFs (e.g. in calcha). Size: totphidim

-------------------------------------------------------------------------------
mcpredpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array psi (or psi1,psi2)
 used hold the predicted wavefunction in the CMF integration.
-------------------------------------------------------------------------------
mcoctpsi
 integer  global.inc
 Pointer for complex memory array mc pointing to array psi
 used hold the predicted wavefunction in a OCT-PC run.
 (Optimal control theory, predictor/corrector version).
-------------------------------------------------------------------------------
mcspf1d
 integer  global.inc
 Pointer for complex memory array mc pointing to array spf1d used for
 storing the sfp1d functions. These functions are needed to build the
 (probably combined) SPFs. Size: spf1ddim. Used in: genphi, genpsi, genrho1
-------------------------------------------------------------------------------
mcwmat
 integer  global.inc
 Pointer for complex memory array mc pointing to array wmat used for
 storing the W matrices needed to calculate the natural orbital hamiltonian
 term. Size: dmatdim
-------------------------------------------------------------------------------
mcworkc
 integer  global.inc
 Pointer for complex memory array mc pointing to array workc used as
 complex work array. Size: workcdim
-------------------------------------------------------------------------------
mfworkf
 integer  global.inc
 Pointer for single precision (real*4) memory array mf pointing to array
 workf used as single precision work array. Size: workfdim
-------------------------------------------------------------------------------
miworki
 integer  global.inc
 Pointer for integer memory array mi pointing to array worki used as
 integer work array. Size: workidim
-------------------------------------------------------------------------------
mrworkr
 integer  global.inc
 Pointer for real (real*8) memory array mr pointing to array workr used as
 real (real*8) work array. Size: workrdim
-------------------------------------------------------------------------------
msworks
 integer  global.inc
 Pointer for complex*8 memory array ms pointing to array works used as
 single-precision  complex work array. Size: workcdim
-------------------------------------------------------------------------------
miccjindx
 integer  global.inc
 Pointer for integer memory array mi pointing to the jindx array of a
 reference WF. Used in crocofly.F (cross-correlation).
-------------------------------------------------------------------------------
mifftfak
 integer  global.inc
 Pointer for integer memory array mi pointing to the fftfak array which
 holds the factors of the FFT factorisation.
-------------------------------------------------------------------------------
mihi
 integer  global.inc
 Pointer for integer memory array mi pointing to the array hi.
-------------------------------------------------------------------------------
mijindx
 integer  global.inc
 Pointer for integer memory array mi pointing to the jindx array used for
 psi=compact and for S-MCTDH (citype.gt.0).
-------------------------------------------------------------------------------
mijsph
 integer  global.inc
 Pointer for integer memory array mi pointing to the jsph. jsph(i) returns
 the j-quantum-number for the i-th grid point of the sphFBR.
-------------------------------------------------------------------------------
mimsph
 integer  global.inc
 Pointer for integer memory array mi pointing to the msph. msph(i) returns
 the m-quantum-number for the i-th grid point of the sphFBR.
-------------------------------------------------------------------------------
mlhl
 integer  global.inc
 Pointer for logical memory array ml pointing to the array hl.
-------------------------------------------------------------------------------
mlworkl
 integer  global.inc
 Pointer for logical memory array ml pointing to the logical work array workl.
-------------------------------------------------------------------------------
mrcdvr3
 integer  global.inc
 Pointer for real memory array mr pointing to the array cdvr3 used in getcdvr.
-------------------------------------------------------------------------------
mrdicht3o
 integer  global.inc
 Pointer for real memory array mr pointing to the array dicht3o which
 holds a copy of the eigenvalues of the density matrix.
-------------------------------------------------------------------------------
mrdvrmat
 integer  global.inc
 Pointer for real memory array mr pointing to the array dvrmat which
 holds all first and second order derivative matrices dif1mat and dif2mat.
-------------------------------------------------------------------------------
mreigerr
 integer  global.inc
 Pointer for real memory array mr pointing to the array eigerr which
 contains the error estimates for the Lanczos diagonalisation.
-------------------------------------------------------------------------------
mreigint
 integer  global.inc
 Pointer for real memory array mr pointing to the array eigint which
 contains the intensities obtained by Lanczos diagonalisation.
-------------------------------------------------------------------------------
mreigval
 integer  global.inc
 Pointer for real memory array mr pointing to the array eigval which
 contains the eigenvalues obtained by Lanczos diagonalisation.
-------------------------------------------------------------------------------
mrfftp
 integer  global.inc
 Pointer for real memory array mr pointing to the array fftp which
 contains the fft momenta.
-------------------------------------------------------------------------------
mrgpop1
 integer  global.inc
 Pointer for real memory array mr pointing to the array gpop1 which
 contains the grid-populations (output.F).
-------------------------------------------------------------------------------
mrgpop2
 integer  global.inc
 Pointer for real memory array mr pointing to the array gpop2 which
 contains the basi-set populations (output.F).
-------------------------------------------------------------------------------
mrhops
 integer  global.inc
 Pointer for real memory array mr pointing to the array hops which
 contains all DOF, mode, or muld operators.
-------------------------------------------------------------------------------
mrhr
 integer  global.inc
 Pointer for real memory array mr pointing to the array hr.
-------------------------------------------------------------------------------
mrhunev
 integer  global.inc
 Pointer for real memory array mr pointing to the array hunev which contains
 the eigenvector-matrix of the hamiltonian diagonalised in the interaction
 picture.
-------------------------------------------------------------------------------
mrhunew
 integer  global.inc
 Pointer for real memory array mr pointing to the array hunew which contains
 the eigenvalues of the hamiltonian diagonalised in the interaction picture.
-------------------------------------------------------------------------------
mrkinsph
 integer  global.inc
 Pointer for real memory array mr pointing to the array kinsph which contains
 the kinetic energy matrix for the sphFBR.
-------------------------------------------------------------------------------
mrort
 integer  global.inc
 Pointer for real memory array mr pointing to the array ort which contains
 the DVR grid-points.
-------------------------------------------------------------------------------
mrrk5wt
 integer  global.inc
 Pointer for real memory array mr pointing to the array rk5wt used as work
 space for the Runge-Kutta integrators.
-------------------------------------------------------------------------------
mrtrafo
 integer  global.inc
 Pointer for real memory array mr pointing to the array trafo which contains
 the DVR transformation matrices.
-------------------------------------------------------------------------------
mcdtpsi
 integer  flux.inc
 Pointer for complex memory array mc to reserve space for derivative WF dtpsi.
-------------------------------------------------------------------------------
mcdicht11
 integer  aglobal.inc
 Pointer for complex memory array mc to reserve space for comparison
 dicht matrix. (may not be used).
-------------------------------------------------------------------------------
mcdicht21
 integer  aglobal.inc
 Pointer for complex memory array mc to reserve space for comparison
 dicht matrix. (may not be used).
-------------------------------------------------------------------------------
mcdicht41
 integer  aglobal.inc
 Pointer for complex memory array mc to reserve space for comparison
 dicht matrix. (may not be used).
-------------------------------------------------------------------------------
mcpsi
 integer  aglobal.inc
 Pointer for complex memory array mc to reserve space for WF.
-------------------------------------------------------------------------------
mcpsi1
 integer  aglobal.inc
 Pointer for complex memory array mc to reserve space for comparison WF.
-------------------------------------------------------------------------------
mfgpop
 integer  aglobal.inc
 Pointer for real*4 memory array mf to reserve space for single-precision
 grid-populatin data. Size: 2*maxgdim. Used in showd1d.
-------------------------------------------------------------------------------
mijindx1
 integer  aglobal.inc
 Pointer for integer memory array mi pointing to the jindx1 array used for
 comparison WF indices when psi=compact or S-MCTDH (citype.gt.0).
-------------------------------------------------------------------------------
mrdicht31
 integer  aglobal.inc
 Pointer for real memory array mr to reserve space for comparison
 dicht matrix. (may not be used).
-------------------------------------------------------------------------------
mrpldata
 integer  aglobal.inc
 Pointer for real memory array mr to reserve space for plot-data.
 showd1d: pldata(maxgdim,maxdata1,nstate)
 showsys: srf(maxgdim,maxgdim,nstate,maxdata1)
-------------------------------------------------------------------------------
mrpldata1
 integer  aglobal.inc
 Pointer for real memory array mr to reserve space for plot-data.
 showsys: plotpes: wfunc(maxgdim,maxgdim,nstate,maxdata1)
-------------------------------------------------------------------------------
mrweight
 integer  aglobal.inc
 Pointer for real memory array mr pointing to the array weight which contains
 the DVR weights.
-------------------------------------------------------------------------------
mrwght
 integer  pglobal.inc
 Pointer for real memory array mr pointing to the array weight which contains
 the separable weights for potfit. (see mrwghti)
-------------------------------------------------------------------------------
mrwghti
 integer  pglobal.inc
 Pointer for real memory array mr pointing to the array weight which contains
 the inverse of separable weights for potfit. (see mrwght)
-------------------------------------------------------------------------------
mspsi
 integer  aglobal.inc
 Pointer for Complex*8 memory array ms pointing to the array spsi which
 contains the WF in single-precision.
-------------------------------------------------------------------------------
dvrord
 integer   parameter (dvrord=2)  griddat.inc
 Order up to which derivative matrices are stored in dvrmat.
-------------------------------------------------------------------------------
ftime
 integer  griddat.inc
 Number of that (pseudo) degree of freedom which contains the time.
 ftime=ndof+2.
-------------------------------------------------------------------------------
dvrmat
 real  dvrmat(dvrdim,dvrord)
 The array dvrmat contains the DVR derivative matrices dif1mat and dif2mat
 for all degrees of freedom.
-------------------------------------------------------------------------------
ccjindxdim
 integer  crocofly.inc
 Size of JINDX array of reference WF (cross-correlation).
-------------------------------------------------------------------------------
ccmaxblock
 integer  crocofly.inc
 max[block(s)] (see maxblock) for reference WF (cross-correlation).
-------------------------------------------------------------------------------
ccwcdim
 integer  crocofly.inc
 Size of work space neede for overlaps (cross-correlation).
-------------------------------------------------------------------------------
ddovmat
 integer  ddovmat(maxdim,maxsta,maxsta) crocofly.inc overlap.inc
 ddovmat(m,s,t) is a pointer for the dover array which stores the overlap
 matrices (ddovmat is for densities, dovmat is for WF).
-------------------------------------------------------------------------------
doverdim
 integer  crocofly.inc overlap.inc
 dimension of array dover which stores the overlap matrices.
-------------------------------------------------------------------------------
dovmat
 integer  dovmat(maxdim,maxsta) crocofly.inc overlap.inc
 dovmat(m,s) is a pointer for the dover array which stores the overlap
 matrices (ddovmat is for densities, dovmat is for WF).
-------------------------------------------------------------------------------
ebtype
 integer  crocofly.inc overlap.inc
 Type of electronic basis. ebtype=0 -> both WF have the same electronic basis.
 (e.g. single-set or multi-set) ebtype=1 -> different electronic bases.
-------------------------------------------------------------------------------
nst1
 integer  crocofly.inc overlap.inc
 The sum over all electronic states may be restricted to a sum from
 nst1 to nst2. Used in crocofly crosscorr fmat flux overlap and genphi.
-------------------------------------------------------------------------------
nst2
 integer  crocofly.inc overlap.inc
 The sum over all electronic states may be restricted to a sum from
 nst1 to nst2. Used in crocofly crosscorr fmat flux overlap and genphi.
-------------------------------------------------------------------------------
ovtype
 integer  crocofly.inc overlap.inc
 Type of overlap to be done. ovtype=0 -> normal. ovtype=1 -> use
 primitve product grid.
-------------------------------------------------------------------------------
lautoord1
 logical   daten.inc
 If true, the first order autocorrelation function will be calculated.
-------------------------------------------------------------------------------
lautoord2
 logical   daten.inc
 If true, the second order autocorrelation function will be calculated.
-------------------------------------------------------------------------------
lorben
 logical   daten.inc
 If true, orbital energies are saved to file orben.
-------------------------------------------------------------------------------
ltneg
 logical   diag.inc
 If true, negative times are used by assuming psi(-t) = psi(t)^*.
 ltneg=.true. if the option -t is set in diag84.
-------------------------------------------------------------------------------
eoffset
 real   diag.inc
 Offset energy for eigenvalues, used in diag.F
-------------------------------------------------------------------------------
epscut
 real   diag.inc
 Cut-off parameter for eigenvalues, used when building S^-1/2 matrix.
 epscut=1.d-10, set in diag.F
-------------------------------------------------------------------------------
full
 logical   flux.inc
 In flux, full is set true, if there is a projector oa all degrees of
 freedom except for the dissociating one. The projected WF is hence 1D.

 A logical full is also used in sillib.f . It is set true, when the
 keyword relaxation=full is given in the run-section.
-------------------------------------------------------------------------------
l2short
 logical   flux.inc
 The logical l2short is set true in flux (flxprj.F), when the projected WF
 is 2D and the dim's are not equal.                                           '
-------------------------------------------------------------------------------
lcorr
 logical   flux.inc
 Used in fmat and flux. lcorr=.true. if the operator is correlated.
-------------------------------------------------------------------------------
lcos
 logical   flux.inc
 Used in fmat and flux. lcos=.true. in flux, if a cosine damping is used.
 lcos=.true. in fmat, if the symmetric scalar product is assumed.
-------------------------------------------------------------------------------
lexp
 logical   flux.inc
 True iff exponential damping of gtau is used. Damping function is
 exp(-(t/tau)**n).
 See also: tauexp, iexp
-------------------------------------------------------------------------------
tauexp
 real*8    flux.inc
 Value of parameter tau, used in exponential damping of gtau.
 See also: lexp, iexp
-------------------------------------------------------------------------------
iexp
 integer   flux.inc
 Value of paramter n, used in exponential damping of gtau.
 See also: lexp, tauexp
-------------------------------------------------------------------------------
lgtt
 logical   flux.inc
 Is set true, when -v option of flux84 is given. (Re-compute only
 the theta part of gtau.)
-------------------------------------------------------------------------------
loper
 logical   flux.inc
 Set true, if an operator is specified for flux or fmat.
-------------------------------------------------------------------------------
lproj
 logical   flux.inc
 Set true, if a projector is specified for flux.
-------------------------------------------------------------------------------
lsmooth
 logical   flux.inc  plot.inc
 Set true in flux, if the -sm option is given.  Delta(E) will be averaged
 over 5 points.
 Set true in the show* routines, when the GNUPLOT shall be smoothed
 (-sm option).
-------------------------------------------------------------------------------
ltest
 logical   flux.inc
 Set true in flux, if only a test run is to be performed.
-------------------------------------------------------------------------------
ltonly
 logical   flux.inc
 Is set true, when -x option of flux84 is given. (Evaluate flux only
 for the theta part of gtau).
-------------------------------------------------------------------------------
lderiv
 logical   flux.inc
 True iff the -d option of flux84 is given.
 gtau will be computed from the spatial derivative of the wavefunction.
-------------------------------------------------------------------------------
lwtt
 logical   flux.inc
 Set true in flux, if only Wtt is to be computed (-wtt option).
-------------------------------------------------------------------------------
emax
 real   flux.inc  (used also in crosspec, autospec and sumspec)
 Upper bound of the energy interval.
-------------------------------------------------------------------------------
emin
 real   flux.inc  (used also in crosspec, autospec and sumspec)
 Lower bound of the energy interval.
-------------------------------------------------------------------------------
eoff
 real   flux.inc (used also in crosspec, autospec)
 Offset energy to shift the spectrum. (in au)
-------------------------------------------------------------------------------
eoff1
 real   flux.inc
 Offset energy to shift the spectrum. Like eoff but in units.
-------------------------------------------------------------------------------
tovl
 real   flux.inc
 Time neede to compute the overlaps (flux).
-------------------------------------------------------------------------------
ufac
 real   flux.inc
 Factor to transform the flux (see -u option of flux84).
-------------------------------------------------------------------------------
scpu
 character  global.inc
 String which contains the CPU stop-time in hh:mm:ss form (stop file, -tcpu)
-------------------------------------------------------------------------------
sstop
 character  global.inc
 String which contains the real stop-time in hh:mm form (stop file, -tstop)
-------------------------------------------------------------------------------
npdofft
 integer   operdef.inc
 Number of grid points used in fourier transformation. (potfit).
-------------------------------------------------------------------------------
pdofft
 integer   operdef.inc
 DOF, which should be fourier transformed. (potfit).
-------------------------------------------------------------------------------
natpotcut
 real   operdef.inc
 All natpot terms which are smaller than natpotcut are removed.
-------------------------------------------------------------------------------
npotcut
 real  npotcut(maxpes)  operdef.inc
 Natpot terms in the n-th natpot, which are smaller than npotcut(n)
 are removed.
-------------------------------------------------------------------------------
ncutted
 integer  ncutted(maxpes)  operdef.inc
 ncutted(n) is the number of cutted terms in the n-th natpot.
-------------------------------------------------------------------------------
rqconst
 real  rqconst(maxdim)  operdef.inc
 Coordinate is set to rqconst(f) (if iqconst(f)=1).
 (not fully implemented yet).
-------------------------------------------------------------------------------
timecap
 real   operdef.inc
 time 8in fs) after which the ACAP is allowed to be switched on.
-------------------------------------------------------------------------------
lft
 logical  lft(maxpes)  operdef.inc
 lft(n) is the logical flag if FT in the n-th natpot is used
 In autospec84 : lft is scalar; lft=.true. if -FT option is given.
-------------------------------------------------------------------------------
lcrsdiag
 logical   overlap.inc
 Set true, if the option -diag is set in crosscorr84.
-------------------------------------------------------------------------------
lcrsspf
 logical   overlap.inc
 Set true, if the option -spf is set in crosscorr84.
-------------------------------------------------------------------------------
lignore
 logical   daten.inc
 If true, 'Different primitive bases' error will be ignored.
 Used in overlap and crosscorr. Set by the -ig option.
 May be also set .true. in INIT_WF-SECTION by: file=filename,ignore
-------------------------------------------------------------------------------
lrst
 logical   overlap.inc
 If true, the restart file is used, rather than the psi file.
 Used in crosscorr and ortho. Set by the -r option.
-------------------------------------------------------------------------------
lrst1
 logical   overlap.inc
 If true, the restart file is used, rather than the psi file.
 Used in crosscorr. Set by the -R option. (-R time-dependent WF, -r ref. WF)
-------------------------------------------------------------------------------
lallov,
 logical   overlap.inc
 If true, overlap84 compute the overlaps between WFs according to their
 position on psi-file. (I.e. first WF with first WF, second with second).
 Times (tpsi) are ignored. Set by the -a option.
-------------------------------------------------------------------------------
lback
 logical   overlap.inc
 If true, the psi1 file are read in reverse order. I.e. the bra-states
 i.e. run backwards in time. Used in overlap. Set by the -b option.
-------------------------------------------------------------------------------
lcc
 logical   overlap.inc
 If true, the complex-conjugate of the WFs on the psi1 file is taken.
 I.e. the complex-symmetric scalar product is used. Set by the -c option.
-------------------------------------------------------------------------------
adim1
 integer   overlap.inc
 adim of comparison WF.
-------------------------------------------------------------------------------
dgldim0
 integer   overlap.inc
 dgldim of comparison WF (aoverlap).
-------------------------------------------------------------------------------
dgldim1
 integer   overlap.inc
-------------------------------------------------------------------------------
dmatdim1
 integer   overlap.inc
 dmatdim of comparison WF (overlap,aoverlap).
-------------------------------------------------------------------------------
init
 integer   overlap.inc
  Compute the overlap (crosscorr) using the init-th (rather than the first)
  reference WF. init is set by the -i option of crosscorr.
-------------------------------------------------------------------------------
mcdover
 integer   overlap.inc
 Pointer for complex memory array mc pointing to the array dover(doverdim).
-------------------------------------------------------------------------------
mcovr
 integer   overlap.inc
 Pointer for complex memory array mc pointing to the array ovr(dmatdim).
 ovr contains oberlaps, similar to dover.
-------------------------------------------------------------------------------
mcovr1
 integer   overlap.inc
 Pointer for complex memory array mc pointing to the array ovr1(dmatdim1).
 ovr1 contains oberlaps, similar to dover.
-------------------------------------------------------------------------------
dover
 complex  dover(doverdim)  crocofly,overlap,crosscorr,fmat,flux
 dover(dovmat(m,s)) (or similar) contains overlaps for mode m and state s.
-------------------------------------------------------------------------------
tabm
 integer   timing.inc
 Integer which points to the ABM integrator for the timing routines.
 subrout(tabm)='ABM'
-------------------------------------------------------------------------------
tbs
 integer   timing.inc
 Integer which points to the BS integrator for the timing routines.
 subrout(tbs)='BS'
-------------------------------------------------------------------------------
tdensity
 integer   timing.inc
 Integer which points to the density evaluation for the timing routines.
 subrout(tdensity)='Density'
-------------------------------------------------------------------------------
tfbrint
 integer   timing.inc
 Integer which points to the evaluation of the sphFBR integrals for
 the timing routines. subrout(tfbrint)='FBRint'
-------------------------------------------------------------------------------
tfunk0
 integer   timing.inc
 Integer which points to the evaluation of the funk0 routines for timing.
 subrout(tfunk0)='Funk0'
-------------------------------------------------------------------------------
tfunk1
 integer   timing.inc
 Integer which points to the evaluation of the funk0 routines for timing.
 subrout(tfunk1)='Funk1'
-------------------------------------------------------------------------------
tfunk2
 integer   timing.inc
 Integer which points to the evaluation of the funk2 routines for timing.
 subrout(tfunk2)='Funk2'
-------------------------------------------------------------------------------
tfunk3
 integer   timing.inc
 Integer which points to the evaluation of the funk3 routines for timing.
 subrout(tfunk3)='Funk3'
-------------------------------------------------------------------------------
tfunka
 integer   timing.inc
 Integer which points to the evaluation of the funka routines for timing.
 subrout(tfunk0)='Funka'
-------------------------------------------------------------------------------
tfunkex
 integer   timing.inc
 Integer which points to the evaluation of the funkex routines for timing.
 subrout(tfunk0)='Funkex'
-------------------------------------------------------------------------------
tfunkphi
 integer  tfunkphi(maxdim)  timing.inc
 Integer which points to the evaluation of the funkphi routines for timing.
 subrout(tfunkphi(m))='Funk-'//modelabel(f)(1:10)
-------------------------------------------------------------------------------
tfunkr
 integer   timing.inc
 Integer which points to the evaluation of the funkr routines for timing.
 subrout(tfunkr)='Funkr'
-------------------------------------------------------------------------------
tgendvr
 integer   timing.inc
 Integer which points to the DVR generation for timing.
 subrout(tgendvr)='genDVR'
-------------------------------------------------------------------------------
tgenoper
 integer   timing.inc
 Integer which points to the operator generation for timing.
 subrout(tgenoper)='genOPER'
-------------------------------------------------------------------------------
tcross
 integer   timing.inc
 Integer which points to the cross correlation computation for timing.
 subrout(tcross)='cross'
-------------------------------------------------------------------------------
torben
 integer   timing.inc
 Integer which points to the orbital engergy computation for timing.
 subrout(torben)='orben'
-------------------------------------------------------------------------------
ttrafo
 integer   timing.inc
 Integer which points to the psi-vector to natural orbital transformation for
 timing.
 subrout(ttrafo)='trafo'
-------------------------------------------------------------------------------
tmeig
 integer   timing.inc
 Integer which points to the mode eigenfunction computation for timing.
 subrout(tmeig)='meigen'
-------------------------------------------------------------------------------
tprecon
 integer   timing.inc
 Integer which points to the improved relaxation preconditioner computation for
 timing.
 subrout(tprecon)='precon'
-------------------------------------------------------------------------------
tinitwf
 integer   timing.inc
 Integer which points to the generation of the initial WF for timing.
 subrout(tinitwf)='initWF'
-------------------------------------------------------------------------------
tlanczos
 integer   timing.inc
 Integer which points to the lanczos routine (diagonalisation) for timing.
 subrout(tgenoper)='Lanczos'
-------------------------------------------------------------------------------
tmfields
 integer   timing.inc
 Integer which points to the mean-field routines for timing.
 subrout(tmfields)='MFields'
-------------------------------------------------------------------------------
topwf
 integer   timing.inc
 Integer which points to the operate routines for timing.
 subrout(topwf)='opWF'
-------------------------------------------------------------------------------
timportho
 integer   timing.inc
 Integer which points to the improve-orthonormality routines for timing.
 subrout(topwf)='ImpOrtho'
-------------------------------------------------------------------------------
trk5
 integer   timing.inc
 Integer which points to the Runge-Kutta (order 5) routine for timing.
 subrout(trk5)='RK5'
-------------------------------------------------------------------------------
trk8
 integer   timing.inc
 Integer which points to the Runge-Kutta (order 8) routine for timing.
 subrout(trk8)='RK8'
-------------------------------------------------------------------------------
tsil
 integer   timing.inc
 Integer which points to the SIL routine for timing.
 subrout(tsil)='SIL'
-------------------------------------------------------------------------------
tphihphi
 integer   timing.inc
 Integer which points to the Hamiltonian matrix element computation for timing.
 subrout(tphihphi)='phihphi'
-------------------------------------------------------------------------------
tcalcha
 integer   timing.inc
 Integer which points to the computation of the action of the Hamiltonian on
 the MCTDH-coefficients for timing.
 subrout(tcalcha)='calcha'
-------------------------------------------------------------------------------
tpmfields
 integer   timing.inc
 Integer which points to the mfields computation for the parallel timing.
 subrout(tpmfields)='mfields'
-------------------------------------------------------------------------------
tsummf
 integer   timing.inc
 Integer which points to the summf computation for timing.
 subrout(tsummf)='summf'
-------------------------------------------------------------------------------
tpsummf
 integer   timing.inc
 Integer which points to the parallel summf computation for timing.
 psubrout(tpsummf)='summf'
-------------------------------------------------------------------------------
thlochpi1m
 integer   timing.inc
 Integer which points to the hlochphi1m computation for the SPF propagation for
 timing.
 subrout(thlochphi1m)='hlochphi1m'
-------------------------------------------------------------------------------
tpfunkphi
 integer   timing.inc
 Integer which points to the Funkphi computation for the SPF propagation
 for timing.
 subrout(tpfunkphi)='Funkphi'
-------------------------------------------------------------------------------
tpfunka2
 integer   timing.inc
 Integer which points to the funka2 calculation for the parallel timing.
 subrout(tpfunka2)='funka2'
-------------------------------------------------------------------------------
tpprecon
 integer   timing.inc
 Integer which points to the preconditioner computation for the parallel
 timing.
 subrout(tpprecon)='parprecon'
-------------------------------------------------------------------------------
tdsteqr
 integer   timing.inc
 Integer which points to the QR-Algorithm for the diagonalization of real
 symmetric matrices for timing.
 subrout(tdsteqr)='dsteqr'
-------------------------------------------------------------------------------
tpdsteqr
 integer   timing.inc
 Integer which points to the QR-Algorithm for the diagonalization of real
 symmetric matrices for parallel timing.
 subrout(tpdsteqr)='dsteqr'
-------------------------------------------------------------------------------
tmpi
 integer   timing.inc
 Integer which points to the cpu time of the slave node in an MPI-parallel run
 for timing.
 subrout(tmpi)='mpicpu'
-------------------------------------------------------------------------------
dynbytes
 integer  dynbytes(6)
 Dynamical bytes. dynbytes is passed to caller (or calldvr,calloper,etc).
 dynbytes(1) ... dynbytes(6) is the mumber of bytes allocated by malloc
 for the arrays  mc, mr, mi, ml, ms, mf .
-------------------------------------------------------------------------------
inctr
 complex  psidef.inc
 inctr is the initial correlated trace used in d1traceout.F
-------------------------------------------------------------------------------
hin
 complex   hin(fftdim)
 hin contains the FFT coefficients needed for a FFT-forward (hin)
 transformation. In 'call fft(..' hin should go with .false. .
 hin is set in fftinit : hin(n)=exp( dcmplx(0.d0,2.d0*pi*n)/dble(dim) )
 NB: "hin .false." is to be used for the transformation phi(p) -> phi(r)
-------------------------------------------------------------------------------
rueck
 complex   hin(fftdim)
 hin contains the FFT coefficients needed for a FFT-backward (rueck)
 transformation. In 'call fft(..' hin should go with .true. .
 rueck is set in fftinit : rueck(n)=exp( dcmplx(0.d0,-2.d0*pi*n)/dble(dim) )
 NB: "rueck .true." is to be used for the transformation phi(r) -> phi(p)
-------------------------------------------------------------------------------
fftfak
 integer fftfak(fftdim)
 fftfak contains the prime-factor decomposition of gdim.
 fftfak is set in fftinit (source/lib/utilities/fft.f).
-------------------------------------------------------------------------------
hloch
 complex  hloch(hlochdim)
 hloch contains the mean-field matrices. See Eqs. (66,67) of the MCTDH
 review for a definition.
-------------------------------------------------------------------------------
hteil
 complex  hteil(pmatdim)
 hteil contains all the matrix-elements <phi(i)|h|phi(j)>. pmat(m,k) points
 points to this matrix for mode m and operator k.
-------------------------------------------------------------------------------
hpsi
 complex  hpsi(hpsidim)
 hpsi contains all products h|phi>. hpsi(zhpsi(m,k)) contain such a product
 for mode m and operator k. Note that the state s is implicitly part of k.
-------------------------------------------------------------------------------
hunpsi
 complex  hunpsi(dgldim-adim))
 hunpsi contains all products h|phi> for the uncorrelated operators h.
 Since for each mode there is (at most) one uncorrelated operator,
 hunpsi has the same structure as psi, except that the A-vector is missing.
-------------------------------------------------------------------------------
dicht1
 complex  dicht1(dmatdim)
 inverse of MCTDH density matrix
-------------------------------------------------------------------------------
dicht2
 complex  dicht2(dmatdim)
 MCTDH density matrix
-------------------------------------------------------------------------------
dicht3
 real  dicht3(d3matdim)
 eigenvalues and regularised eigenvalues of MCTDH density matrix (dicht2).
 dicht3(dim,1) : eigenvalues
 dicht3(dim,2) : regularised eigenvalues
-------------------------------------------------------------------------------
dicht4
 complex  dicht4(dmatdim)
 eigenvectors of MCTDH density matrix
-------------------------------------------------------------------------------
hopz  complex* hopz(maxgdim2) (dimension may vary)
 hopz is a complex operator (gdim*gdim-matrix).
 The array hopz is usually a part of workc.
-------------------------------------------------------------------------------
lnonorm
 logical   runinwf.inc
 If true, the operate normalisation factor will be removed.
 (Keyword: operate_no-norm)
-------------------------------------------------------------------------------
operatenorm
 real   runinwf.inc
 Normalisation factor of operate. (See lnonorm)
-------------------------------------------------------------------------------
lreonly
 logical  operdef.inc
 if true, only real parts will be output to expectation.
 (Keyword "real-only", argument of expect).
-------------------------------------------------------------------------------
lreonly1
 logical  operdef.inc
 if true, only real parts will be output to expect1.
 (Keyword "real-only", argument of expect1).
-------------------------------------------------------------------------------
nexpect1
 integer   operdef.inc
 Number of operators, the expectation-values of which are written to expect1.
-------------------------------------------------------------------------------
lshowsys
 logical   plot.inc
 true, if showsys is running.
-------------------------------------------------------------------------------
lshowpot
 logical   plot.inc
 true, if showpot is running.
-------------------------------------------------------------------------------
lshowd1d
 logical   plot.inc
 true, if showd1d is running.
-------------------------------------------------------------------------------
cname
 character cname(maxcomp)   compdat.inc
 cname contains the paths of the name directories of comparison data sets.
-------------------------------------------------------------------------------
ccicut
 real*8   ccicut(maxcomp)    compdat.inc
 cicut values (S-MCTDH, cutoff for selection) of comparison data sets.
-------------------------------------------------------------------------------
cciweight
 real*8   ccicut(maxcomp)    compdat.inc
 ciweight values (S-MCTDH, weight for selection) of comparison data sets.
-------------------------------------------------------------------------------
clpsiopt
 logical  clpsiopt(npsiopt,maxcomp)   compdat1.inc
 lpsiopt (options as to how (in which format) psi is to be saved) of
 comparison data sets.
-------------------------------------------------------------------------------
clselect
 logical  clselect(maxcomp)    compdat1.inc
-------------------------------------------------------------------------------
cout1
 real*8  cout1(maxcomp)    compdat1.inc
 out1  of comparison data sets.
-------------------------------------------------------------------------------
cout2
 real*8   cout2(maxcomp)   compdat1.inc
 out2  of comparison data sets.
-------------------------------------------------------------------------------
ctinit
 real*8   ctinit(maxcomp)    compdat1.inc
 tinit (initial propagation time) of comparison data sets.
-------------------------------------------------------------------------------
ltslice
 logical   plot.inc
 if .true. data is for set of time-slices
-------------------------------------------------------------------------------
plotform
 integer  plot.inc
 0 = single plot , 1 = step-through set , 2 = movie
-------------------------------------------------------------------------------
autoz
 logical  plot.inc
 if true, gnuplot auto-range is enabled.
-------------------------------------------------------------------------------
autozo
 logical  plot.inc
 if true, gnuplot auto-range is enabled for overlay plot.
-------------------------------------------------------------------------------
lcntr
 logical  plot.inc
 if true, contour lines will be shown.
-------------------------------------------------------------------------------
lgrid
 logical  plot.inc
 if true, grid lines will be shown. (gnuplot)
-------------------------------------------------------------------------------
lhid3d
 logical  plot.inc
  if true, hidden 3D effect is enabled. (gnuplot)
-------------------------------------------------------------------------------
lkey
 logical  plot.inc
  if true, keys (legende) are shown. (gnuplot)
-------------------------------------------------------------------------------
lmultipl
 logical  plot.inc
  if true, multiple plots (overlay plots) are shown. (gnuplot)
-------------------------------------------------------------------------------
loverlay
 logical  plot.inc
  if true, the present splot call is the overlay plots (pes).
-------------------------------------------------------------------------------
ctrname
 character   psidef.inc
 Operator name used for ctrace.
-------------------------------------------------------------------------------
unit
 character  aglobal.inc
 String, containing some unit.
-------------------------------------------------------------------------------
lnodirect
 logical  runinwf.inc
 If true (default), then the direct version of operate (subroutine opwf)
 will not be called.
-------------------------------------------------------------------------------
dta
 real  psidef.inc
 initial time step for A-vector integration.
-------------------------------------------------------------------------------
dtphi
 real  psidef.inc
 initial time step for phi integration.
-------------------------------------------------------------------------------
workcdims
 integer  psidef.inc
 Pointer used in opwf. workcdims = workcdim - dmatdim - 3*dmatsdim
-------------------------------------------------------------------------------
workrdims
 integer  psidef.inc
 Pointer used in opwf. workrdims = workrdim - d3matsdim
-------------------------------------------------------------------------------
ldiffer
 logical ldiffer(maxdim)  chnpot.inc ; chnpot.F
 ldiffer(f) is TRUE, if old and new grids for dof f are different.
-------------------------------------------------------------------------------
intmode
 integer intmode(maxdim)  chnpot.inc ; chnpot.F
 Interpolation method for dof f in Chnpot program:
 intmode(f)=1 -> spline interpolation
 intmode(f)=2 -> angular (cosine, sine or fourier) interpolation
-------------------------------------------------------------------------------
angmode
 integer angmode(maxdim)  chnpot.inc ; chnpot.F
 Type of angular interpolation for dof f in Chnpot program:
 angmode(f)=1 -> cosine
 angmode(f)=2 -> sine
 angmode(f)=3 -> fourier
-------------------------------------------------------------------------------
method
 character*20 method(maxdim)  chnpot.inc; chnpot.F
 Interpolation method in characters in Chnpot program. Possible values are:
 method(f)='cubic spline','cosine','sine' and 'fourier'.
-------------------------------------------------------------------------------
mmax
 integer mmax(maxdim)  chnpot.inc ; chnpot.F
 Parameter for angular interpolation in Chnpot program.
  mmax(f)=max(50,2*gdim(f)) - default
 If spline interpolation is used (intmode(f)=1) mmax(f)=0.
-------------------------------------------------------------------------------
mrcoeff
 integer  mrcoeff  pglobal.inc
 In Potfit, pointer to coefficients in array mr.
------------------------------------------------------------------------------
mrcoeff_2
 integer  mrcoeff_2  chnpot.inc
 In Chnpot.F, pointer to coefficients for the new grid in array mr.
-------------------------------------------------------------------------------
mrort2
 integer  mrort  global.inc
 Length of array containing all grid points.
-------------------------------------------------------------------------------
mrort2
 integer  mrort2  chnpot.inc
 In Chnpot.F, length of array containing all grid points for the new grid.
-------------------------------------------------------------------------------
zort2
 integer  zort2(maxdim)  chnpot.inc
 In Chnpot.F, pointer to the grid of dof f in ort2 array.
-------------------------------------------------------------------------------
dimmodc2
 integer  chnpot.inc
 In Chnpot.F, gdim(modc) for the new grid.
-------------------------------------------------------------------------------
coeffdim_2
 integer  chnpot.inc
 In Chnpot.F, same as coeffdim, i.e. Prod_(m.ne.modc)[potdim(m)]*gdim(modc),
 for the new grid.
-------------------------------------------------------------------------------
ortdim2
 integer  chnpot.inc
 In Chnpot.F, length of array 'ort2' for the new grid: ortdim2=Sum[psubdim2(m)].
-------------------------------------------------------------------------------
zevec2
 integer  zevec2(maxdim)  chnpot.inc
 In Chnpot.F, pointer to eigenvectors for mode m in evec2 array.
-------------------------------------------------------------------------------
evecdim2
 integer chnpot.inc
 In Chnpot.F, length of array containing all natural potentials
 evecdim2 = Sum[psubdim2(m)**2]
-------------------------------------------------------------------------------
psubdim2
 integer  psubdim2(maxdim)  chnpot.inc
 In Chnpot.F, number of grid points for mode m for the new grid.
-------------------------------------------------------------------------------
gdim2
 integer  gdim2(maxdim)  chnpot.inc
 In Chnpot.F, number of grid points for DOF f for the new grid.
-------------------------------------------------------------------------------
evaldim2
 integer  chnpot.inc
 In Chnpot.F, length of array containing all natural eigenvalues for the new
 grid.
-------------------------------------------------------------------------------
zmode2
 integer zmode2(maxdim)  chnpot.inc
 In Chnpot, pointer for ort matrix for mode m of the new grid.
-------------------------------------------------------------------------------
ipbaspar2
 integer  ipbaspar2(mbaspar,maxdim) chnpot.inc
 In Chnpot, integer parameters to define primitive basis for the new grid.
-------------------------------------------------------------------------------
basis2
 integer  basis2(maxdim)  chnpot.inc
 In Chnpot, basis type for DOF f for the new grid.
 For detail type 'phelp basis'.
-------------------------------------------------------------------------------
rpbaspar2
 real*8  rpbaspar2(mbaspar,maxdim)  chnpot.inc
 In Chnpot, real parameters to define primitive basis for the new grid.
-------------------------------------------------------------------------------
coeffdimft
 integer  runpfit.inc
 In Potfit. If FT-feature is used,
  coeffdimft = coeffdim/potdim(pdofft)*psubdim(pdofft),
 otherwise is equal to coeffdim.
-------------------------------------------------------------------------------
kft1
 integer  operdef.inc
 kft1,kft2 are dofs in MCTDH, which coupled in Potfit through FT-natpot terms.
-------------------------------------------------------------------------------
kft2
 integer  operdef.inc
 kft1,kft2 are dofs in MCTDH, which coupled in Potfit through FT-natpot terms.
-------------------------------------------------------------------------------
kpft1
 integer  operdef.inc
 Corresponding dof in Potfit, which combined with dof kft1 in MCTDH.
-------------------------------------------------------------------------------
kpft2
 integer  operdef.inc
 Corresponding dof in Potfit, which combined with dof kft2 in MCTDH.
-------------------------------------------------------------------------------
ftcon
 integer  ftcon(maxpes)  operdef.inc
 ftcon(n) is the corresponding dof in MCTDH, which corresponds to the
 contracted dof=spfdof(1,modc) in Potfit for the n-th natpot
-------------------------------------------------------------------------------
kdimft
 integer  operdef.inc
 New dimension of FT-natpot terms, which is needed in MCTDH. If no symmetry
 in FT is used (lftsym=False), it is the maximum (in MCTDH needed) number of
 delta_m : (mmax) + 1, if symmetry is used (lftsym=True), kdim=mmax/2+1.
-------------------------------------------------------------------------------
mdimft
 integer  mdimft(maxpes)  operdef.inc
 mdimft(n) is the kdimft for the n-th natpot
-------------------------------------------------------------------------------
hdim
 integer  diag.inc ; diag.F
 Size of reduced Hamiltonian matrices in Diag program.
-------------------------------------------------------------------------------
product
 integer  diag.inc ; diag.F
 Indicates the type of scalar products used in Fmat.
 product = 1, if symmetric scalar product is used
         = 2, if hermitian scalar product is used
-------------------------------------------------------------------------------
product_2
 integer  diag.inc ; diag.F
 If ltneg=TRUE, indicates the type of second set of scalar products
 calculated by Fmat.
 product_2 = 1, if symmetric scalar product is used
           = 2, if hermitian scalar product is used
-------------------------------------------------------------------------------
klo
 integer  flux.inc, diag.inc
 Low limit (of psi-output) for calculating Wtt (in Flux) or Mtt (in Fmat)
 matrices.
-------------------------------------------------------------------------------
khi
 integer  flux.inc, diag.inc
 High limit (of psi-output) for calculating Wtt (in Flux) or Mtt (in Fmat)
 matrices.
-------------------------------------------------------------------------------
mlow
 integer  diag.inc ; diag.F
 Low limit for Mtt matrix elements in Diag program.
-------------------------------------------------------------------------------
mhigh
 integer  diag.inc ; diag.F
 High limit for Mtt matrix elements in Diag program.
-------------------------------------------------------------------------------
mstep
 integer  diag.inc ; diag.F
 Step for Mtt matrix elements in Diag program.
-------------------------------------------------------------------------------
eunit
 character  diag.inc ; diag.F
 Energy unit in characters.
 Possible values are : au, mH, ev, mev, cm-1, kcal/mol, kj/mol.
 All the list see by the command 'mhelp -s unit'.
-------------------------------------------------------------------------------
mcover
 integer  diag.inc ; diag.F
 Pointer to overlap matrix elements in complex (mc) array in Diag program.
-------------------------------------------------------------------------------
mcham
 integer  diag.inc ; diag.F
 Pointer to hamiltonian matrix elements in complex (mc) array in Diag program.
-------------------------------------------------------------------------------
mcintensity
 integer  diag.inc ; diag.F
 Pointer to intensity vector in complex (mc) array in Diag program.
-------------------------------------------------------------------------------
mceigenvec
 integer  diag.inc ; diag.F
 Pointer to eigenvectors in complex (mc) array in Diag program.
-------------------------------------------------------------------------------
mceigenval
 integer  diag.inc ; diag.F
 Pointer to eigenvalues in complex (mc) array in Diag program.
-------------------------------------------------------------------------------
midim
 integer  global.inc
 Length of array mi containing all integer variables.
-------------------------------------------------------------------------------
mrdim
 integer  global.inc
 Length of array containing all real*8 variables.
-------------------------------------------------------------------------------
mcdim
 integer  global.inc
 Length of array containing all complex*16 variables.
-------------------------------------------------------------------------------
mldim
 integer  global.inc
 Length of array containing all logical variables.
-------------------------------------------------------------------------------
lquadpop
 logical  daten.inc
 Flag for the calculation-type of the gridpops, spops,...
 If true, rho^2 rather than rho is used to evaluate gridpops, spops,...
 Default: .false.
-------------------------------------------------------------------------------
mmodc
 integer  mmodc(maxpes)  operdef.inc
 mmodc(n) is the the corresponding contracted mode in MCTDH (modc in Potfit)
 for the n-th natpot.
-------------------------------------------------------------------------------
vmdim
 integer vmdim(maxdim,maxpes)  operdef.inc
 vmdim(m,n) is the cumulative number of preceeding natural potentials
 for mode m and natpot n in MCTDH (vpdim(m) in Potfit ).
 Need in "fast" algorithm.
-------------------------------------------------------------------------------
mdim
 integer mdim(maxdim,maxpes)  operdef.inc
 mdim(m,n) is the number of natural potentials for mode m and natpot number n
 in MCTDH (pdim(m) in Potfit). Need in "fast" algorithm.
-------------------------------------------------------------------------------
nmdim
 integer nmdim(maxdim,maxpes)  operdef.inc
 nmdim(m,n) is the cumulative number of following natural potentials
 for mode m and natpot n in MCTDH (npdim(m) in Potfit).
 Need in "fast" algorithm.
-------------------------------------------------------------------------------
mft1
 integer operdef.inc
 Mode in MCTDH, which containes dof kft1.
-------------------------------------------------------------------------------
mft2
 integer operdef.inc
 Mode in MCTDH, which containes dof kft2.
-------------------------------------------------------------------------------
lgrdft
 logical  operdef.inc
 TRUE, if in Potfit the grid of FT is read from a file.
-------------------------------------------------------------------------------
grdft
 real*8 grdft(1000)  operdef.inc
 Grid points for FT in Potfit.
-------------------------------------------------------------------------------
lfnat
 logical   iogrddef.F  iodvrdef.F  iodvrdef.F
 lfnat is true if the main program is mctdh.
-------------------------------------------------------------------------------
pmodeft
 integer   operdef.inc
 Mode of DOF, which should be fourier transformed. (potfit).
-------------------------------------------------------------------------------
pminft
 integer   operdef.inc
 Initial value of delta_m's in FT-natpot terms. (potfit).                     '
-------------------------------------------------------------------------------
maxsubdim
 Do you mean "sdim" ?
-------------------------------------------------------------------------------
evaltype
 integer prop.F, prop1.F, integrat.F, d1integrat.F
 0 => VMF propagation, funkl, h-proj
 1 => VMF propagation, funkr, proj-h
 4 => if (lexact): Numerically exact propagation
      else: CMF, Phi-propagation (one SPF)
 5 => CMF, A-propagation
 6 => ML-CMF
-------------------------------------------------------------------------------
lz
 logical  htmsetup.F, asshop.F
 lz is set .true. if there is a complex potential.
-------------------------------------------------------------------------------
lenorb
 logical   runprop.inc
 lenorb is set .true. if energy-orbitals are to be used. (kewword energyorb)
-------------------------------------------------------------------------------
instate
 integer   eininwf.F gencoeff.F
 instate = initial electronic state. isbaspar(4,feb,1) = instate
-------------------------------------------------------------------------------
iex
 integer   eininwf.F  genphi1.F
 switch for selecting the excite routine
-------------------------------------------------------------------------------
lreal
 logical   operdef.inc
 lreal is .true. if RDAV is chosen. (real Hamiltonian).
-------------------------------------------------------------------------------
lrreal
 logical   operdef.inc
 lrreal is .true. if RRDAV is chosen. (real Hamiltonian, real arithmetic).
-------------------------------------------------------------------------------
leinint
 logical   runprop.inc
 if .true. the integrator section will be read in a continuation run.
-------------------------------------------------------------------------------
rlxshift
 real   runprop.inc
 Energy shift used in subroutine wrtrlxdav. (keyword rlxunit).
-------------------------------------------------------------------------------
rlxunit
 character*16   runprop.inc
 Energy-unit used in wrtrlxdav.
-------------------------------------------------------------------------------
rlxemin
 real   runprop.inc
 lower energy bound for selecting states in a relaxation=lock run (DAV).
-------------------------------------------------------------------------------
rlaxemax
 real   runprop.inc
 upper energy bound for selecting states in a relaxation=lock run (DAV).
-------------------------------------------------------------------------------
mearray
 integer mearray(maxme,4)
 array containing the parameters for meigenf (mode-eigenfunctions).
 mearray(mez,1) = memode  ;   mearray(mez,2) = meham
 mearray(mez,3) = menum   ;   mearray(mez,4) = medim
-------------------------------------------------------------------------------
mez
 integer   runinwf.inc
 mez is the number of mode-operators to be diagonalised (meigenf).
-------------------------------------------------------------------------------
memode
 integer   runinwf.inc
 memode is the mode-number used in meigenf.
-------------------------------------------------------------------------------
menum
 integer   runinwf.inc
 menum is similar to rlaxnum but used in meigenf. (See rlaxnum).
-------------------------------------------------------------------------------
medim
 integer   runinwf.inc
 medim is the maximal number of Lanczos iteration to be performed
 for meigenf. Default: medim=subdim.
-------------------------------------------------------------------------------
meham
 integer   runinwf.inc
 meham is the Hamiltonian number (nham) used in meigenf.
-------------------------------------------------------------------------------
mestate
 integer   runinwf.inc
 mestate is the electronic state used in meigenf.
-------------------------------------------------------------------------------
maxme
 integer   runinwf.inc   parameter (maxme=12)
 maxme is the maximal number of meigenf calls allowed.
-------------------------------------------------------------------------------
limportho
 logical   runprop.inc
 whether to call the orthonormality-improving post-processor.
-------------------------------------------------------------------------------
ncomp
 integer   compdat.inc
 no. of comparison data sets to be used. ncomp=0,1,2
-------------------------------------------------------------------------------
lftp
 logical   operdef.inc
 If true,  Fourier-transform the natural potentials (potfit).
-------------------------------------------------------------------------------
lfast
 logical  lfast(maxpes)  operdef.inc
 True if the "Fast" algorithm for H(npot)*A is used.
------------------------------------------------------------------------------
lfastall
 logical  lfastall  operdef.inc
 True if the "Fast" algorithm is used for all natpots.
------------------------------------------------------------------------------
nterm
 integer  nterm(maxpes)  operdef.inc
 nterm(n) is the number of the first natpot term of the n-th natpot.
-------------------------------------------------------------------------------
ntermlast
 integer  ntermlast(maxpes)  operdef.inc
 ntermlast(n) is the number of the last natpot term of the n-th natpot.
-------------------------------------------------------------------------------
natpmode
 integer  natpmode(maxdim,maxpes)  operdef.inc
 natpmode(i,n) is the array of the terms which are pre-multiplied
 for the given n-th natpot. Need if "Fast" is used.
-------------------------------------------------------------------------------
fastorder
 integer  fastorder(maxpes)  operdef.inc
 fastorder(n) is the order of the "Fast" algorithm for the n-th natpot.
-------------------------------------------------------------------------------
fastprem
 integer  fastprem(maxkoe)  ooerdef.inc
 fastprem(j) is the array of pre-multiplied terms. Need if "Fast" is used.
-------------------------------------------------------------------------------
fastnum
 integer  fastnum(maxkoe)  operdef.inc
 fastnum(i) is the array of terms to be taken with a given pre-multiplied
 term. Need if "Fast" is used.
-------------------------------------------------------------------------------
fastdim
 integer  fastdim(maxkoe)  operdef.inc
 fastdim(i) is the dimension of fastnum array (number of all terms to be
 taken) for the given pre-multiplied term. Need if "Fast" is used.
-------------------------------------------------------------------------------
zfp
 integer  zfp(maxpes)
 zfp(n) is the pointer to the fastprem array for the natpot n.
-------------------------------------------------------------------------------
zfn
 integer  zfn(maxpes)
 zfn(n) is the pointer to the fastnum array for the natpot n.
-------------------------------------------------------------------------------
zfd
 integer  zfd(maxpes)
 zfd(n) is the pointer to the fastdim array for the natpot n.
-------------------------------------------------------------------------------
mdimf
 integer  mdimf(maxdim,maxpes)  operdef.inc
 mdimf(m,n) is the number of pre-multiplied terms for mode m and natpot n.
 Need if "Fast" is used.
-------------------------------------------------------------------------------
natops
 integer  operdef.inc
 Number of all natpot operators used in MCTDH.
-------------------------------------------------------------------------------
deltam
 integer  deltam(maxkoe)  operdef.inc
 Array of delta_m quantum numbers for the FT-natpot terms, for the natpot
 which is currently read.
-------------------------------------------------------------------------------
delm
 integer  delm(maxkoe)  operdef.inc
 delm(h) is the delta_m quantum number, saved as parameter of the term h in
 contracted natpot dof. Need if FT-natpot terms are present.
-------------------------------------------------------------------------------
samecoeff
 integer  samecoeff(maxkoe)  operdef.inc
 samecoeff(h)=h2, where h and h2 are contr. natpot terms, which are the same,
 but have oposite delta_m's, i.e. delm(h2)=-delm(h). Need if FT-natpot terms
 are present.                                                                 '
-------------------------------------------------------------------------------
listdim
 integer  joinpsi.inc
 Maximum number of psi-files to be joined in Joinpsi program (default is 30).
-------------------------------------------------------------------------------
filenum
 integer  joinpsi.inc
 Number of psi-files to be joined in Joinpsi program.
-------------------------------------------------------------------------------
vdim1
 integer  vdim1(maxdim,maxsta,listdim)  joinpsi.inc
 In Joinpsi.F dim1(m,s,j) is the number of single particle functions for
 mode m and state s for the psi-file j.
-------------------------------------------------------------------------------
vdim1
 integer  vdim1(maxdim,maxsta,listdim)  joinpsi.inc
 In Joinpsi.F vdim1(m,s,j) is the cumulative number of single particle functions
 of preceeding degrees of freedom for mode m and state s for the psi-file j.
-------------------------------------------------------------------------------
ndim1
 integer  ndim1(maxdim,maxsta,listdim)  joinpsi.inc
 In Joinpsi.F ndim1(m,s,j) is the cumulative number of single particle functions
 of following degrees of freedom for mode m and state s for the psi-file j.
-------------------------------------------------------------------------------
zpsi1
 integer  zpsi1(maxsta,listdim)  joinpsi.inc
 In Joinspi.F zpsi1(s,j) is the pointer to wavefunction for state s for the
 psi-file j.
-------------------------------------------------------------------------------
zetf1
 integer zetf1(maxdim,maxsta,listdim)  joinpsi.inc
 In Joinpsi.F zetf1(m,s,j) is the pointer to start of single particle functions
 for mode m and state s for the psi-file j.
-------------------------------------------------------------------------------
dgldim1
 integer  dgldim1(listdim)  joinpsi.inc
 In Joinpsi.F dgldim1(j) is the length of array containing wavefunction for the
 psi-file j.
-------------------------------------------------------------------------------
block1
 integer  block1(maxsta,listdim)  joinpsi.inc
 In Joinpsi.F block1(s,j) is the number of MCTDH A coefficients for state s for
 the psi-file j.
-------------------------------------------------------------------------------
t0
 real*8  t0(listdim)  joinpsi.inc
 In Joinpsi.F t0(j) is the initial writing time for the psi-file j.
-------------------------------------------------------------------------------
lnf
 logical  joinpsi.inc
 Logical flag in Joinpsi.F . lnf=.true. , if number of single particle functions
 for total joined psi-file are forced to some values. Otherwise, the maximum
 number from all  psi-files will be chosen.
-------------------------------------------------------------------------------
msymmtr
 integer  msymmtr(2*maxdim)  psidef.inc
 This array defines wich modes or dofs are to be symmetrized.
 "persist" adds 65536 to msymmtr and "dav" adds 2*65536.
 m=mod(msymmtr(j),65536)/256
 f=mod(msymmtr(j),256)
 if 0<f<200, sym1d
 if f=0,     sym2d
 if f=200    sym3d
 if f=201    sym2kleg
 if f=202    nsym2d
 if m=200    symcoeff  ((a)symmetrization of A-vector)
 A negative value of msymmtr(j) indicates asymmetrization (not for 3D).
-------------------------------------------------------------------------------
nsym2dnorm
 real*8 nsym2dnorm(maxdim,maxnsym2d) in runinwf.inc
 This array stores the norm of the functions calculated using "nsym2d"
 Currently maxnsym2d has been set to '100'
-------------------------------------------------------------------------------
limmc
 integer  operdef.inc
 If limmc>0 then the mc-array (=workc) will be limited to limmc MB.
 This is only for the genoper step. (THIS IS OBSOLETE!!!)
-------------------------------------------------------------------------------
ldirmuld
 logical  operdef.inc
 if true, direct algorithm used for multi-dimensional operators.
 I.e. the muld-operator is not stored but evaluated at each point.
-------------------------------------------------------------------------------
lcoin
 logical    iodvrdef.F
 lcoin is set true (in subroutine fcoin) if gridpoints coincide although
 bases differ. See icoin.
-------------------------------------------------------------------------------
icoin
 integer    iodvrdef.F
 icoin is set in subroutine fcoin. Two bases are compared.
 icoin=-1 : bases (substantially) differ
 icoin=0  : bases are identical
 icoin=1  : Leg and KLeg are not to be distinguished
 icoin=2  : sin, FFT or exp  are not to be distinguished
 icoin=3  : Leg and PLeg are not to be distinguished
-------------------------------------------------------------------------------
axis
 integer  axis(3)   plot.inc
 axis(1)   : number of the mode selected for the x axis of the plot
 axis(2)   : number of the mode selected for the y axis of the plot
 axis(3)   : number of the mode selected for the min/max search
-------------------------------------------------------------------------------
lptime
 logical    plot.inc
 lpltime: if true, plot is property versus time
-------------------------------------------------------------------------------
lplener
 logical    plot.inc
 lplener: if true, plot is property versus energy
-------------------------------------------------------------------------------
lplcoo
 logical    plot.inc
 lplcoo: if true, plot is property versus coordinate
-------------------------------------------------------------------------------
lplcoo2
 logical    plot.inc
 lplcoo2: if true, plot is property versus 2D coordinate
-------------------------------------------------------------------------------
lplcootim
 logical    plot.inc
 lplcootim: if true, plot is property versus coordinate and time
-------------------------------------------------------------------------------
lplcoo2tim
 logical    plot.inc
 lplcoo2tim: if true, plot is property versus 2D coordinate and time
-------------------------------------------------------------------------------
lstate
 logical    plot.inc
 lstate: if true, data is for more than one state.
-------------------------------------------------------------------------------
multiname
 character  plot.inc
 name of .xyz file to be plotted (showsys).
-------------------------------------------------------------------------------
loverlay
 logical    plot.inc
 controls whether plot or overlay is being plotted
-------------------------------------------------------------------------------
lmultipl
 logical    plot.inc
 if .true. multiplot is made, i.e. adding the plot read from file multiname.
-------------------------------------------------------------------------------
nplstate
 integer    plot.inc
 no. of data sets to be plotted (showsys).
-------------------------------------------------------------------------------
plstate
 integer  plstate(maxsta)  plot.inc
 Index-array. plstate(n) : nth plot is the plstate(n) electronic state.
-------------------------------------------------------------------------------
nplottask
 integer   plot.inc
 no. of possible plottasks.
-------------------------------------------------------------------------------
cplottask
 character*40   plot.inc
 label describing the possible plots that can be made.
-------------------------------------------------------------------------------
prcmd
 character   plot.inc
 print command (e.g. pprcmd or filename).
-------------------------------------------------------------------------------
pprcmd
 character   plot.inc
 printer command (e.g. lpr).
-------------------------------------------------------------------------------
alabel
 character   plot.inc
 string containing axis labels.
-------------------------------------------------------------------------------
allmlabels
 character   plot.inc
 string containing all system mode labels.
-------------------------------------------------------------------------------
rcut
 real*8  rcut(maxdim)   plot.inc
 rcut(i): location of the grid point at which mode i is cut.
-------------------------------------------------------------------------------
icut
 integer icut(maxdim)   plot.inc
 icut(i): number of the grid point at which mode i is cut.
 If mode i is not cut, i.e. if it is associated with the x(y)-axis,
 then icut(i)=-1(-2).
-------------------------------------------------------------------------------
ncut
 integer  aglobal.inc
 limits the maximal number of Wf to be read by showsys (-n option).
-------------------------------------------------------------------------------
nskip
 integer  aglobal.inc
 number of Wf to be skipped when reading the psi-file. (-skip option).
-------------------------------------------------------------------------------
idmode
 integer  idmode(maxdim) psidef.inc
 idmode(m)=0 : normal case, idmode(m)=m1 : the mode m is identified with
 the mode m1. The SPFs of mode m are not propagated, but copied from
 mode m1. NB idmode(m)>0 sets complete(m)=.true.
-------------------------------------------------------------------------------
amapwf
 integer  amapwf(maxsta,2,8)  runinwf.inc
 Stores the state-numbers for the A-vector, used in a read-inwf block.
 First index: state, second index: 1=from, 2=to, third index: number of file.
 Example:  amapwf(3,1,2) : s=3 of restart from second file.
           amapwf(4,2,1) : s=4 of WF. The data used is indicated by (4,1,1).
-------------------------------------------------------------------------------
smapwf
 integer  smapwf(maxsta,2,8)  runinwf.inc
 First index: state, second index: 1=from, 2=to, third index: number of file.
 Example:  smapwf(3,1,2) : s=3 of restart from second file.
           smapwf(4,2,1) : s=4 of WF. The data used is indicated by (4,1,1).
-------------------------------------------------------------------------------
fcon
 integer  heinsort.F
 fcon is the DOF for contraction, i.e. the DOF where the hamilton-line differs.
-------------------------------------------------------------------------------
lproject
 logical  pglobal.inc
 In potfit: true for projection runs
-------------------------------------------------------------------------------
maxproj
 integer  parameter(maxproj=20)  pglobal.inc
 In potfit: maximum number of projectors allowed
-------------------------------------------------------------------------------
maxprojdof  parameter(maxprojdof=3)  pglobal.inc
 In potfit: maximum number of degrees of freedom that a projector can
 project away
-------------------------------------------------------------------------------
maxprojpar  parameter(maxprojpar=2)  pglobal.inc
 In potfit: The functions which are used to project the potential onto certain
 degrees of freedom can have at most this number of parameters (but parameters
 of different type are counted separately).
-------------------------------------------------------------------------------
nproj
 integer  pglobal.inc
 In potfit: number of projectors defined. (nproj.le.maxproj)
-------------------------------------------------------------------------------
nprojdof
 integer  nprojdof(maxproj)  pglobal.inc
 In potfit: nprojdof(p) is the number of degrees of freedom that the p-th
 projector projects away.
-------------------------------------------------------------------------------
projlab
 character*(c1)  projlab(maxproj)  pglobal.inc
 In potfit: projlab(p) is the label of the p-th projector. If this is "ABC",
 the corresponding vpot file will be called "vpot_ABC".
-------------------------------------------------------------------------------
projscale
 real*8  projscale(maxproj)  pglobal.inc
 In potfit: projscale(p) is the scale factor for the p-th projector.
 Set with "scale =" in the PROJECTOR definition.
-------------------------------------------------------------------------------
projdof
 integer  projdof(maxproj,maxprojdof)  pglobal.inc
 In potfit: projdof(p,q) is the internel DOF number (as defined by the
 PBASIS-SECTION) of the q-th degree of freedom that the p-th projector
 projects away.  This is set while parsing the PROJECTION-SECTION in
 "peinproj".
-------------------------------------------------------------------------------
projifunc
 integer  projifunc(maxproj,maxprojdof)  pglobal.inc
 In potfit: projifunc(p,q) is the function index of the function which is used
 to project onto the q-th degree of freedom by the p-th projector. Defined in
 "projfuncparse" from the definition in the input file.
 Currently implemented values:
   ifunc=1  associated Legendre polynomials
   ifunc=2  cosine transform
   ifunc=3  Gaussian
   ifunc=4  read function from file
   ifunc=5  sine transform
 Additional integer (real*8, ...) parameters of these functions are stored in
 the array projipar (projrpar, ...).
-------------------------------------------------------------------------------
projipar
 integer  projipar(maxproj,maxprojdof,maxprojpar)  pglobal.inc
 In potfit: projipar(p,q,n) is the n-th integer parameter of the function which
 is used to project onto the q-th degree of freedom by the p-th projector. See
 also projifunc.
-------------------------------------------------------------------------------
projcpar
 character*(c4)  projcpar(maxproj,maxprojdof,maxprojpar)  pglobal.inc
 In potfit: projrpar(p,q,n) is the n-th string parameter of the function which
 is used to project onto the q-th degree of freedom by the p-th projector. See
 also projifunc.
-------------------------------------------------------------------------------
projrpar
 real*8  projrpar(maxproj,maxprojdof,maxprojpar)  pglobal.inc
 In potfit: projrpar(p,q,n) is the n-th real parameter of the function which
 is used to project onto the q-th degree of freedom by the p-th projector. See
 also projifunc.
-------------------------------------------------------------------------------
projlpar
 integer  projlpar(maxproj,maxprojdof,maxprojpar)  pglobal.inc
 In potfit: projipar(p,q,n) is the n-th logical parameter of the function which
 is used to project onto the q-th degree of freedom by the p-th projector. See
 also projifunc.
-------------------------------------------------------------------------------
maxvprojdim
 integer  runpfit.inc
 In potfit: maximum size of a projected grid,
 = max_p{vpotdim/[prod_q(gdim(projdof(p,q)))]}
-------------------------------------------------------------------------------
mrvproj
 integer  pglobal.inc
 In potfit: pointer to real*8 array vproj which contains the projected
 potential
-------------------------------------------------------------------------------
mrvperr
 integer  pglobal.inc
 In potfit: pointer to real*8 array vperr which contains the RMS
 difference between the original full potential and the "reconstructed"
 full potential (reconstructed from the projected potentials).
 See also: lprojerr
-------------------------------------------------------------------------------
lchkmc
 logical  pglobal.inc
 In potfit and showpot: true if an error is caused if the mode combinations in
 the read vpot file differ from the system's. (switched off by option -ig)   '
-------------------------------------------------------------------------------
lprojerr
 logical  pglobal.inc
 In potfit: true if an error measure is calculated for projection runs.
 See also: projerrfile
-------------------------------------------------------------------------------
projerrfile
 character*(c5)  pglobal.inc
 In potfit: name of the file which contains the error vpot, can be set
 with the keyword "projerr = ..." in the RUN-SECTION.
 Default: "projerr.vpot"
-------------------------------------------------------------------------------
maxprjfdim
 integer  runpfit.inc
 In potfit: maximum size of storage for projector functions
-------------------------------------------------------------------------------
lwrsrf
 logical  aglobal.inc
 In vminmax: .true. if full potential should be written to file
-------------------------------------------------------------------------------
lprojascii
 logical  pglobal.inc
 In potfit: .true. if the projected potentials should also be written as
 ASCII files. Set in PEINRUN through the keyword "projascii".
-------------------------------------------------------------------------------
npignore
 integer  npignore(maxrdf)    runoper.inc
 if npignore(nr) is .gt. 0, "ignore" is set for the natpot with the
 readfile number nr. This means modelabels are ignored for this natpot.
 The value of npignore(nr) denotes the number h-terms which include
 the nr-th natpot.
-------------------------------------------------------------------------------
npmuld
 integer   npmuld(maxrdf,maxrdf)    runoper.inc
 npmuld(nr,i) contains the muld (i.e. htmmuld(h) for the i-th h which contains
 the natpot) number of the nr-th natpot. The second argument, i, counts the
 number of times the nr-th natpot is included in a h-term.
 Used for copying mulddof2 to fdvr, e.g.:
 call cpvxi(mulddof2(1,npmuld(nr,i)),fdvr,ndof).
-------------------------------------------------------------------------------
htmadof
 integer  htmadof(maxhtm)  operdef.inc
 htmadof(h) is the "associated" DOF for the h-th Hamiltonian term.
 This specifies the first DOF that the term acts on, for cases where the
 term acts only on part of the mode, e.g.
 - 2D KLeg terms (J+ etc.) in modes with more than one KLeg
 - (side-)diagonal terms where htmndof(h).ne.0
 Other than that, htmadof(h) should equal htmdof(h).
-------------------------------------------------------------------------------
htmndof
 integer  htmndof(maxhtm)  operdef.inc
 htmndof(h) gives the number of DOFs that the h-th Hamiltonian term acts on.
 Normally, htmndof(h)=0 which means that "traditional" rules apply: it acts
 on one DOF if htmdof(h).ne.0, and it acts on the full mode (i.e. on nspfdof(m)
 DOFs) if htmmode(h).ne.0 . But if htmndof(h).ne.0, then the term acts only
 on part of the mode, namely on the given number of DOFs, starting with
 htmadof(h).
-------------------------------------------------------------------------------
mevec
 integer  showpot.inc
 set by showpot option -evec. The natural potentials of the mevec-th mode
 are written to file evec. If mevec=99 then the natpots of all modes,
 except the contraced one, are written to files.
-------------------------------------------------------------------------------
lcontr
 logical  showpot.inc
 In showpot: true if the contracted natural potentials shall be writen
 to file contracted. Option -contr
-------------------------------------------------------------------------------
lvpot
 logical  showpot.inc
 In showpot: true if a vpot file exists.
-------------------------------------------------------------------------------
maxklegspf
 integer  multkleg.inc
 Maximum number of SPFs for KLeg/K DOFs. Needed to set the size of the arrays
 multkleg_j, multkleg_m. Only relevant if there are multi-KLeg modes and
 symmetrization is used.
-------------------------------------------------------------------------------
lsymmultkleg
 logical (maxdim) multkleg.inc
 lsymmultkleg(m)=.true. if mode m is a symmetrized multi-KLeg mode.
 Set in chkinwf.
-------------------------------------------------------------------------------
multkleg_j
 integer (maxdim,maxklegspf) multkleg.inc
 During generation of the 1D SPFs, multkleg_j(f,e) stores the value of j
 for the e-th SPF of the f-th DOF (which is a KLeg DOF). Needed in
 gensymmultkleg to figure out which combinations of (j,m) are allowed to
 create symmetrized multi-KLeg SPFs.
-------------------------------------------------------------------------------
multkleg_m
 integer (maxdim,maxklegspf) multkleg.inc
 During generation of the 1D SPFs, multkleg_m(f,e) stores the value of m
 for the e-th SPF of the f-th DOF (which is a KLeg DOF). Needed in
 gensymmultkleg to figure out which combinations of (j,m) are allowed to
 create symmetrized multi-KLeg SPFs.
-------------------------------------------------------------------------------
loptcntrl
 logical  runprop.inc
 loptcntrl is set in the RUN-SECTION by the keyword "optcntrl".
 if .true.  an OCT run is performed. (OCT=Optimal Control Theory).
 Data is exchanged via fifos between efield and mctdh.
-------------------------------------------------------------------------------
loctpc
 logical  runprop.inc
 loctpc is set in the RUN-SECTION by the keyword "optcntrl=pc".
 if .true. (and if loptcntrl is .true.) an OCT-PC run is performed,
 i.e. every single step of the propagation is repeated with the updated
 electric field.
-------------------------------------------------------------------------------
mrcut
 integer  pglobal.inc
 In potfit, memory pointer for the array in mr which contains the
 tensor cut (this is just for speeding up potfit, see the difference
 between routines getvfit and getvfit2).
-------------------------------------------------------------------------------
maxnhtmshift
 parameter (maxnhtmshift=100)  global.inc
 Maximum number of different htmshift values occuring for the operator
 terms of one mode.
 A suggested value for this would be the maximum over m of the number of
 different shift[...] operators acting on mode m, plus one.
 See also: htmshift, ihtmshift, nhtmshift
-------------------------------------------------------------------------------
nhtmshift
 integer (maxdim)  operdef.inc
 Number of different htmshift values occuring for the operator terms of
 mode number m = nhtmshift(m).
 See also: htmshift, ihtmshift
-------------------------------------------------------------------------------
ihtmshift
 integer (maxnhtmshift,maxdim)  operdef.inc
 ihtmshift(i,m) is the i-th htmshift value occuring among the operator
 terms for mode number m.
 This array is needed to reduce the storage requirements for the sums over
 mean-field matrices times particle operators (during CMF propagation).
 See also: htmshift, nhtmshift
-------------------------------------------------------------------------------
htmshift
 integer (maxhtm)  operdef.inc
 Side-diagonal operator matrices (i.e. matrices where only one side diagonal
 is occupied) are stored not as full matrices, but only the elements on
 the occupied side diagonal are stored (as a vector). htmshift(h) specifies
 which is the occupied side-diagonal. htmshift>0 (<0) is for side diagonals
 below (above) the main diagonal.
-------------------------------------------------------------------------------
lsymorb
 logical   runinwf.inc
 is true, if keyword "symorb" is set in Init_WF-Section.
-------------------------------------------------------------------------------
symorb1
 integer   runinwf.inc
 mode number of first set of SPFs to be symmetrised (or mixed) with a
 second set. See keyword "symorb" in Init_WF-Section.
-------------------------------------------------------------------------------
symorb2
 integer   runinwf.inc
 mode number of second set of SPFs to be symmetrised (or mixed) with a
 second set. See keyword "symorb" in Init_WF-Section.
-------------------------------------------------------------------------------
gmatf1
 integer   global.inc
 number of first DOF for which the G-matrix (of the kinetic energy)
 is to be evaluated. Argument of keyword "gengmat".
-------------------------------------------------------------------------------
gmatf2
 integer   global.inc
 number of second DOF for which the G-matrix (of the kinetic energy)
 is to be evaluated. Argument of keyword "gengmat".
-------------------------------------------------------------------------------
lnatpopstop
 logical   runprop.inc
 true if the propagation should be stopped when the lowest natural population
 of one mode (or all modes) exceeds a threshold.
 See also: natpopstop, natpopstopmode, natpopstopstate
-------------------------------------------------------------------------------
natpopstop
 real*8   runprop.inc
 Threshold for stopping the propagation when a certain natural population
 is reached.
 See also: lnatpopstop
-------------------------------------------------------------------------------
natpopstopmode
 integer   runprop.inc
 If lnappopstop is set, check whether the lowest natural population of this
 mode exceeds the given threshold (see natpopstop), and then stop the
 propagation. Possible values:
  -1 : stop if any one mode exceeds threshold
   0 : stop if all modes exceed threshold
  >0 : stop if exactly this mode exceeds threshold
 See also: lnatpopstop, natpopstop, natpopstopstate
-------------------------------------------------------------------------------
natpopstopstate
 integer   runprop.inc
 See natpopstopmode. If natpopstopstate=0, the check mentioned there applies
 to all states (default). Otherwise it applies only to the given state.
-------------------------------------------------------------------------------
lskip1dav
 logical    runprop.inc
 If set, the first Davidson diagonalisation is skipped and the improved
 relaxation starts with orbital relaxation.
-------------------------------------------------------------------------------
qrlimit
 integer    posthr.inc
 This is the limit for the parallel diagonalizer set with the dsyev-keyword
 (shared memory parallelization).
-------------------------------------------------------------------------------
ldsyev
 logical    posthr.inc
 If .true. and if pthreads are used, the routine dsyev will be parallelized
 (shared memory parallelization).
-------------------------------------------------------------------------------
lgetdavmat
 logical    posthr.inc
 If .true. and if pthreads are used, the routine getdavmat that is part of
 the preconditioner will be parallelized (shared memory parallelization).
-------------------------------------------------------------------------------
lmfields
 logical    posthr.inc
 If .true. and if pthreads are used, the routine mfields will be parallelized
 (shared memory parallelization).
-------------------------------------------------------------------------------
lphihphi
 logical    posthr.inc
 If .true. and if pthreads are used, the routine phihphi will be parallelized
 (shared memory parallelization).
-------------------------------------------------------------------------------
lhlp1m
 logical    posthr.inc
 If .true. and if pthreads are used, the routine hlochphi1m will be
 parallelized for the propagation of the single particle functions (shared
 memory parallelization).
-------------------------------------------------------------------------------
lhlochp
 logical    posthr.inc
 If .true. and if pthreads are used, the routine hlochphi will be parallelized
 (shared memory parallelization).
-------------------------------------------------------------------------------
lfunka
 logical    posthr.inc
 If .true. and if pthreads are used, the routines funka2 or calcha will be
 parallelized, depending on the calculation type (propagation/relaxation)
 (shared memory parallelization).
-------------------------------------------------------------------------------
lmpifunka2
 logical    mpi.inc
 If .true. and if MPI is used, the routine funka2 is parallelized (distributed
 memory parallelization).
-------------------------------------------------------------------------------
lmpicalcha
 logical    mpi.inc
 If .true. and if MPI is used, the routine calcha is parallelized (distributed
 memory parallelization).
-------------------------------------------------------------------------------
lmpiphihphi
 logical    mpi.inc
 If .true. and if MPI is used, the routine phihphi is parallelized (distributed
 memory parallelization).
-------------------------------------------------------------------------------
lmpihlochphi
 logical    mpi.inc
 If .true. and if MPI is used, the routine hlochphi1m is parallelized
 (distributed memory parallelization).
-------------------------------------------------------------------------------
lmpimfields
 logical    mpi.inc
 If .true. and if MPI is used, the routine mfields is parallelized (distributed
 memory parallelization).
-------------------------------------------------------------------------------
lmpidsyev
 logical    mpi.inc
 If .true. and if MPI is used, the routine dsyev is parallelized (distributed
 memory parallelization).
-------------------------------------------------------------------------------
lmpigetdavmat
 logical    mpi.inc
 If .true. and if MPI is used, the routine getdavmat is parallelized
 (distributed memory parallelization).
-------------------------------------------------------------------------------
lmpistarted
 logical    mpi.inc
 If .true. the MPI parallelization is started (distributed memory
 parallelization).
-------------------------------------------------------------------------------
lmpistarted
 logical    mpi.inc
 If .true. for each MPI prozess a ptiming file is created (distributed combined
 with shared memory parallelization).
-------------------------------------------------------------------------------
lmpikey
 logical    mpi.inc
 If .true. the variable intordermpi was set by the user (distributed memory
 parallelization).
-------------------------------------------------------------------------------
lmpidavrun
 logical    mpi.inc
 Is .true. while the MPI parallel version of the Davidson or Block-Davidsion
 improved relaxation step is used (distributed memory parallelization).
-------------------------------------------------------------------------------
lmpidav
 logical    mpi.inc
 If .true. the MPI parallel version of the Davidson or Block-Davidsion
 improved relaxation step is used (distributed memory parallelization).
-------------------------------------------------------------------------------
lfunkphi
 logical    posthr.inc
 If .true. and if pthreads are used, the routines for the SPF-propagation will
 be parallelized (shared memory parallelization).
-------------------------------------------------------------------------------
lmemcalcha
 logical    posthr.inc
 If .true. and if pthreads are used, a different parallelization of the calcha
 routine is used. This routine uses more memory for a more efficient
 parallelization (shared memory parallelization).
-------------------------------------------------------------------------------
lmemmfields
 logical    posthr.inc
 If .true. and if pthreads are used, a different parallelization of the mfields
 routine is used. This routine uses more memory for a more efficient
 parallelization (shared memory parallelization).
-------------------------------------------------------------------------------
lsummf2
 logical    posthr.inc
 If .true. and if pthreads are used, a different parallelization of the summf
 routine is used. Resulting in a more efficient parallelization if modes with a
 large primitive grid are present (shared memory parallelization).
-------------------------------------------------------------------------------
ldsyevkey
 logical    posthr.inc
 If .true. a user defined lower bound for the parallel QR-Algorithm is used
 (shared memory parallelization).
-------------------------------------------------------------------------------
lbcount
 integer    posthr.inc
 Global counter for the parallelized loops (shared memory parallelization).
-------------------------------------------------------------------------------
lbcount2
 integer    posthr.inc
 See lbcount. (shared memory parallelization)
-------------------------------------------------------------------------------
lsummf
 logical    posthr.inc
 If .true. and if pthreads are used, the routine summf will be parallelized
 (shared memory parallelization).
-------------------------------------------------------------------------------
lthread
 logical    posthr.inc
 If .true. pthreads are used (shared memory parallelization).
-------------------------------------------------------------------------------
lmpi
 logical    mpi.inc
 If .true. MPI is used (distributed memory parallelization).
-------------------------------------------------------------------------------
lstarted
 logical    posthr.inc
 If .true. then the pthreads are started (shared memory parallelization).
-------------------------------------------------------------------------------
lexpectval
 logical    posthr.inc
 If .true. then the routines phihphi and calcha are called from subroutine
 expectvalue (shared memory parallelization).
-------------------------------------------------------------------------------
task
 integer    posthr.inc
 task contains the number of the subroutine that has to be called by the
 threads. (e.g. if task=1, then phihphi is called) (shared memory
 parallelization)
-------------------------------------------------------------------------------
semcount
 integer    posthr.inc
 counter variable for the semaphores (shared memory parallelization).
-------------------------------------------------------------------------------
pardynbyte
 integer    pardynbyte(2)    posthr.inc
 Dynamical bytes for parallel calculation. pardynbyte is passed to the threads.
 The memory that is used exclusively by a thread is allocated within the
 threads (shared memory parallelization).
-------------------------------------------------------------------------------
addparmemc
 integer    posthr.inc
 Size of the additional complex array for the shared memory parallelization
 (shared memory parallelization).
-------------------------------------------------------------------------------
addparmemr
 integer    posthr.inc
 Size of the additional real array for the shared memory parallelization
 (shared memory parallelization).
-------------------------------------------------------------------------------
addparmemi
 integer    posthr.inc
 Size of the additional integer array for the shared memory parallelization
 (shared memory parallelization).
-------------------------------------------------------------------------------
ctstep
 integer    posthr.inc
 Step size for the shared memory parallelized loops (shared memory
 parallelization).
-------------------------------------------------------------------------------
parworkcdim
 integer    posthr.inc
 Dimension of the parworkc array (shared memory parallelization).
-------------------------------------------------------------------------------
parworkrdim
 integer    posthr.inc
 Dimension of the parworkr array (shared memory parallelization).
-------------------------------------------------------------------------------
parworkidim
 integer    posthr.inc
 Dimension of the parworki array (shared memory parallelization).
-------------------------------------------------------------------------------
parworkc
 complex    parworkc(parworkcdim)
 Complex work array that is used in each thread. It contains all complex
 arrays that are used by each thread exclusively (shared memory
 parallelization).
-------------------------------------------------------------------------------
parworkr
 real       parworkr(parworkrdim)
 Real work array that is used in each thread. It contains all real arrays that
 are used by each thread exclusively (shared memory parallelization).
-------------------------------------------------------------------------------
parworki
 integer    parworki(parworkidim)
 Integer work array that is used in each thread. It contains all integer arrays
 that are used by each thread exclusively (shared memory parallelization).
-------------------------------------------------------------------------------
wczeiger
 integer
 wczeiger is calculated in distributor. This is the pointer that points to the
 workc array. Its value depends on the lexpectval variable.
-------------------------------------------------------------------------------
htzeiger
 integer
 htzeiger is calculated in distributor. This is the pointer that points to the
 hteil array. Its value depends on the lexpectval variable.
-------------------------------------------------------------------------------
distribint
 integer    distribint(11)      distributor.inc
 Global integer variables used to communicate between the main program and the
 threads.
-------------------------------------------------------------------------------
distriblog
 logical    distributor.inc
 Global logical varialbe used to communicate between the main program and the
 threads.
-------------------------------------------------------------------------------
distribdbl
 real       distributor.inc
 Global real variable used to communicate between the main program and the
 threads.
-------------------------------------------------------------------------------
distribprc
 logical    distributor.inc
 Global logical variable used to determine where the parallel diagonalizer is
 used either in the preconditioner or the r/bdavstep routine.
-------------------------------------------------------------------------------
nthread
 integer    posthr.inc
 Set in the run-section with the key word usepthreads. Specifies the number
 of pthreads that are used (shared memory parallelization).
-------------------------------------------------------------------------------
nmpi
 integer    mpi.inc
 Specifies the number of MPI prozesses that are used (distributed memory
 parallelization).
-------------------------------------------------------------------------------
mpirank
 integer    mpi.inc
 Specifies the rank of the MPI prozesses (distributed memory parallelization).
-------------------------------------------------------------------------------
intordermpi
 integer    mpi.inc
 Number of Davidson vectors (length of Krylov and HKrylov array) per MPI
 prozess (distributed memory parallelization).
-------------------------------------------------------------------------------
maxthread
 integer  parameter(maxthread=8)  posthr.inc
 Maximal number of pthreads (shared memory parallelization).
-------------------------------------------------------------------------------
thnum
 integer posthr.inc
 counter variable for creating and joining of pthreads (shared memory
 parallelization).
-------------------------------------------------------------------------------
thn
 integer thn(maxthread) posthr.inc
 array to label the different pthreads (shared memroy parallelisation)
-------------------------------------------------------------------------------
threadid
 integer thn(maxthread) posthr.inc
 array to store the id's for the different threads that are created by the
 system (shared memory parallelisation).                                   '
-------------------------------------------------------------------------------
lresol
 logical    autospec.F  crosspec.F
 If .true. the resolution curve is plotted, rather then the spectrum.
-------------------------------------------------------------------------------
k-all

   ktot
    integer  operdef.inc
    total number of Hamiltonian terms. This is similar to the number of lines
    in the HAMILTONIAN-SECTION(s). Because the MCTDH program may sum lines,
    ktot will in general be smaller. ktot = Sum[khtot(nham)].
   ---------------------------------------------------------

   khtot
    integer  khtot(maxham)  operdef.inc
    khtot(nham) : Number of terms for operator nham.
   ---------------------------------------------------------

   kzahl
    integer  kzahl(maxham)  operdef.inc
    kzahl(nham) : Number of correlated Hamiltonian expansion coefficients
    for the Hamiltonian nham. (nham=1 refers to the system Hamiltonian).
   ---------------------------------------------------------

   khzahl
    integer  khzahl(maxdim,maxsta,maxham)  operdef.inc
    khzahl(m,s,nham) : Number of uncorrelated coefficients
    for mode m, state s, and Hamiltonian number nham.
   ---------------------------------------------------------

   nmulpot
    integer  nmulpot(maxham)  operdef.inc
    nmulpot(nham): Number of multi-dimensional potentials for Hamiltonian nham.
   ---------------------------------------------------------

   zham
    integer zham(maxham)   operdef.inc
    The pointer zham(nham) points to the start of the nham-th Hamiltonian.
    E.g. k runs from zham(nham) to zham(nham)+kzahl(nham)-1 if looping over
    the correlated terms of the nham-th Hamiltonian.
   ---------------------------------------------------------

  No. of correlated terms : kzahl(nham)+nmulpot(nham)
  No. of uncorrelated terms for mode m and state s : khzahl(m,s,nham)
  khtot(nham) = kzahl(nham) + nmulpot(nham) + Sum_{m,s} [khzahl(m,s,nham)]
  ktot = Sum_nham [khtot(nham)]
  zham(nham) + khtot(nham) = zham(nham+1)
-------------------------------------------------------------------------------
iwei
 integer  iwei(maxdim)  runpfit.inc
 iwei(f) contains the type-number of the separable weigth of DOF f.
 iwei(f)=0 indicates, that all weights are 1 for DOF f.
-------------------------------------------------------------------------------
wpar
 real*8  wpar(maxwpar,maxdim)  runpfit.inc
 wpar(n,f) contains the n-th parameter of the separable weigth of DOF f.
 maxwpar=6.
-------------------------------------------------------------------------------
facit
 real*8   runpfit.inc
 facit contains a value which is assigned via the keyword "iteration-factor"
 in peinrun (run-section of potfit).
-------------------------------------------------------------------------------
symcv
 integer  symcv(maxdim)  psidef.inc
 Array specifying partial symmetrization of A-vector. If symcv(m1)=symcv(m2)
 then modes m1 and m2 are to be (a)symmetrized.
-------------------------------------------------------------------------------
symcount
 integer  symcoeff, runinwf, propcmfadarlx
 symcount counts the calls to symcoeff. If symcv(m)=symcount, the mode m
 is to be (a)symmetrized.
-------------------------------------------------------------------------------
nmod
 integer nmod,  integrat.F, prop1.F, rdavlib.f, davutils.f
 nmod is used when the A-vector is symmetrized.
 nmod=0 --> no (a)symmetrization
 nmod is the number of modes without counting electr. or packets modes.
-------------------------------------------------------------------------------
mrfld
 integer (oct.inc)
 Pointer to electric field for optimal control jobs.
 Used in OCT programs (source/oct/)
-------------------------------------------------------------------------------
mrpnlty
 integer (oct.inc)
 Pointer to pulse envelope for optimal control jobs.
 Used in OCT programs (source/oct/)
-------------------------------------------------------------------------------
mrref
 integer (oct.inc)
 Pointer to reference field for optimal control jobs.
 Used in OCT programs (source/oct/)
-------------------------------------------------------------------------------
mrlagr
 integer (oct.inc)
 Pointer to Lagrange multiplier for optimal control jobs with filtering.
 Used in OCT programs (source/oct/)
------------------------------------------------------------------------------
mrpref
 integer (oct.inc)
 Pointer to the filtered reference field for optimal control jobs.
 with filtering. Used in OCT programs (source/oct/)
------------------------------------------------------------------------------
itarfile
 integer (oct.inc)
 Output channel for time-dependent target population.
 (optimal control, efield.F).
------------------------------------------------------------------------------
idipfile
 integer (oct.inc)
 Output channel for time-dependent dipole matrix of target and initial state.
 (optimal control, efield.F).
------------------------------------------------------------------------------
iovlpfile
 integer (oct.inc)
 Output channel for time-dependent overlap of target and initial state.
 (optimal control, efield.F).
------------------------------------------------------------------------------
irawfldfile
 integer (oct.inc)
 Output channel for the time-dependent output of the mkfield routine.
 (optimal control, efield.F).
------------------------------------------------------------------------------
nfin
 integer (oct.inc)
 Size of one-dimensional real arrays that hold the field, pulse envelope, etc.
 Used in OCT programs (source/oct/)
------------------------------------------------------------------------------
nfin1
 integer (oct.inc)
 Size of one-dimensional real arrays that hold the field, pulse envelope, etc.
 Used in OCT programs (source/oct/)
------------------------------------------------------------------------------
iiter
 integer (oct.inc)
 Counting of iterations within optimal control jobs.
 Used in OCT programs (source/oct/)
------------------------------------------------------------------------------
extorder
 integer (oct.inc)
 Order of extrapolation of the optimal field.
 Used in efield.F (source/oct/)
------------------------------------------------------------------------------
ntarop
 integer (oct.inc)
 Operator used as target operator.
 Used in efield.F (source/oct/)
------------------------------------------------------------------------------
pnlty
 real*8 (oct.inc)
 Penalty factor for optimal control jobs.
------------------------------------------------------------------------------
ltarop
 logical (oct.inc)
 Flag that target is an operator (optimal control)
------------------------------------------------------------------------------
lmultar
 logical (oct.inc)
 Flag that multiple targets have to be optimized (optimal control)
------------------------------------------------------------------------------
lwrpop
 logical (oct.inc)
 Flag for writing time-dependent target population (optimal control)
------------------------------------------------------------------------------
lalgnphs
 logical (oct.inc)
 Flag for aligning phases of multiple targets (optimal control)
------------------------------------------------------------------------------
lpnlty
 logical (oct.inc)
 Flag that a penalty-factor has been provided (optimal control)
------------------------------------------------------------------------------
lpnltyfnc
 logical (oct.inc)
 Flag that a penalty-function (pulse envelope) has been provided
 (optimal control)
------------------------------------------------------------------------------
lreffnc
 logical (oct.inc)
 Flag that a reference-function has been provided
 (optimal control)
------------------------------------------------------------------------------
lreffnc
 logical (oct.inc)
 Flag to suppress writing to log in subroutine rstinfo
------------------------------------------------------------------------------
ltdovlp
 logical (oct.inc)
 Flag to use time-dependent overlap to calculate the field.
 (optimal control)
------------------------------------------------------------------------------
lwrdipmtx
 logical (oct.inc)
 Flag to write time-dependent dipole matrix element
 <psi_tar(t)|mu|psi_init(t)>. (optimal control)
------------------------------------------------------------------------------
lwrrawfld
 logical (oct.inc)
 Flag to write time-dependent raw field
 -Im <psi_in|psi_tar><psi_tar|mu|psi_in>
 (optimal control)
------------------------------------------------------------------------------
lwrovlp
 logical (oct.inc)
 Flag to write time-dependent overlap of initial and target states
 <psi_in(t)|psi_tar(t)> (optimal control)
------------------------------------------------------------------------------
llagrfnc
 logical (oct.inc)
 Flag to load tle Lagrange multiplier within Krotov algorithm with filtering.
 (optimal control)
------------------------------------------------------------------------------
lkrotov
 logical (oct.inc)
 Flag to use the Krotov algorithm.
 (optimal control)
------------------------------------------------------------------------------
tarop
 character*(c2) (oct.inc)
 label of the target operator (if target is an operator)
 (optimal control)
------------------------------------------------------------------------------
filpnlty
 character*(c5) (oct.inc)
 Name of the file holding the sampled penalty-function (pulse envelope)
 (optimal control)
------------------------------------------------------------------------------
filref
 character*(c5) (oct.inc)
 Name of the file holding the sampled reference-function
 (optimal control)
------------------------------------------------------------------------------
fillagr
 character*(c5) (oct.inc)
 Name of the file holding the sampled Lagrange multiplier
 (optimal control with filtering)
------------------------------------------------------------------------------
maxfldop
 integer parameter(maxfldop=12) (oct.inc)
 Maximum number of function definitions using FUNCTION-SECTION
 (optimal control)
------------------------------------------------------------------------------
fldfunclab
 character*(c2) fldfunclab(maxfldop)  (oct.inc)
 Names of functions using FUNCTION-SECTION
 (optimal control)
------------------------------------------------------------------------------
lrdfnc
 logical  (oct.inc)
 Flag to read functions from FUNCTION-SECTION
 (optimal control)
------------------------------------------------------------------------------
fldoptype
 integer fldoptype(maxfldop)   (oct.inc)
 Type of operation fo perform on sampled 1d data
 Used in fldop.F
------------------------------------------------------------------------------
fldoptype
 integer fldoptype(maxfldop)   (oct.inc)
 Integer parameter for operation on sampled 1d data
 Used in fldop.F
------------------------------------------------------------------------------
nfldop
 integer  (oct.inc)
 Number of operation to perform on sampled 1d data (like nham).
 Used in fldop.F
------------------------------------------------------------------------------
fldrparam
 real*8 fldrparam(maxfldop)   (oct.inc)
 Real parameter for operation on sampled 1d data
 Used in fldop.F
------------------------------------------------------------------------------
fldaddprm
 character*(c2) fldaddprm(maxfldop)   (oct.inc)
 Additional parameters for operation on sampled 1d data
 Used in fldop.F
------------------------------------------------------------------------------
mcfld
 integer (oct.inc)
 Pointer to the sampled 1D field in complex*16 buffer
 Used in fldop.F
------------------------------------------------------------------------------
mcfld1
 integer (oct.inc)
 Pointer to the sampled 1D field in complex*16 buffer
 Used in fldop.F
------------------------------------------------------------------------------
mcref
 integer (oct.inc)
 Pointer to the sampled 1D reference field in complex*16 buffer
 Used in fldop.F
------------------------------------------------------------------------------
lminus
 logical (oct.inc)
 Operatate 1-operator on 1D field.
 Used in fldop.F
------------------------------------------------------------------------------
scoeff
 complex*16 scoeff(8) (sumrst.inc)
 Coefficients for superposition of (up to 8) wavefunctions
------------------------------------------------------------------------------
snorm
 real*8  (sumrst.inc)
 Norm of the superposition of wavefunctions
------------------------------------------------------------------------------
lsnormalize
 logical  (sumrst.inc)
 Normalize the superposition of wavefunctions
------------------------------------------------------------------------------
maxdgldim
 integer  (sumrst.inc)
 Maximum of dgldim of input wavefunctions for superposition
------------------------------------------------------------------------------
smaxdgldim
 integer  (sumrst.inc)
 Maximum dgldim superposition
------------------------------------------------------------------------------
sdgldim
 integer  (sumrst.inc)
 dgldim of superposition wavefunction
------------------------------------------------------------------------------
sadim
 integer  (sumrst.inc)
 adim of superposition wavefunction
------------------------------------------------------------------------------
smaxadim
 integer  (sumrst.inc)
 Maximum adim of superposition wavefunction
------------------------------------------------------------------------------
smaxblock
 integer  (sumrst.inc)
 maxblock of superposition wavefunction
------------------------------------------------------------------------------
smaxspf
 integer  (sumrst.inc)
 maxspf of superposition wavefunction
------------------------------------------------------------------------------
sdmatdim
 integer  (sumrst.inc)
 dmatdim of superposition wavefunction
------------------------------------------------------------------------------
sd3matdim
 integer  (sumrst.inc)
 d3matdim of superposition wavefunction
------------------------------------------------------------------------------
smaxdovdim
 integer  (sumrst.inc)
 maxdovdim of superposition wavefunction
------------------------------------------------------------------------------
smaxdmatdim
 integer  (sumrst.inc)
 maxdmatdim of superposition wavefunction
------------------------------------------------------------------------------
smaxd3matdim
 integer  (sumrst.inc)
 maxd3matdim of superposition wavefunction
------------------------------------------------------------------------------
mcspsi
 integer  (sumrst.inc)
 Pointer to superposition wavefunction in complex*16 buffer
------------------------------------------------------------------------------
svdim
 integer svdim(maxdim,maxsta)  (sumrst.inc)
 vdim of superposition wavefunction
------------------------------------------------------------------------------
sndim
 integer sndim(maxdim,maxsta)  (sumrst.inc)
 ndim of superposition wavefunction
------------------------------------------------------------------------------
szetf
 integer szetf(maxdim,maxsta)  (sumrst.inc)
 zetf of superposition wavefunction
------------------------------------------------------------------------------
spdim
 integer spdim(maxdim,maxsta)  (sumrst.inc)
 dim of superposition wavefunction which is needed in sumrst.F
------------------------------------------------------------------------------
szpsi
 integer szpsi(maxsta)  (sumrst.inc)
 zpsi of superposition wavefunction
------------------------------------------------------------------------------
sblock
 integer sblock(maxsta)  (sumrst.inc)
 block of superposition wavefunction
------------------------------------------------------------------------------
ilmr
 integer iLMR  operdef.inc
 iLMR is the actual number of LMR-terms present. (See hamLMR).
------------------------------------------------------------------------------
maxlmr
 integer parameter (maxLMR=120)  operdef.inc
 maxLMR is the maximal allowed number of LMR-terms. (See hamLMR).
------------------------------------------------------------------------------
hamlmr
 integer hamLMR(maxLMR,3)  operdef.inc
 hamLMR(i,n) contains the h-terms of the i-th LMR (left-middle-right)
 operator. R: n=1, M: n=2, L: n=3.
--------------------------------------------------------------------------------
lpesfile
 logical  pglobal.inc
 if .true. potfit is requested to read a 'pes' file
 pdefault.F: lpesfile = .false.
--------------------------------------------------------------------------------
lpesfilepath
 logical  pglobal.inc
 if .true. potfit is requested to read a pes file at PATH=pesfilepath
 pdefault.F: lpesfilepath = .false.
--------------------------------------------------------------------------------
lwrallevec
 logical  pglobal.inc
 if .true. subroutine wrevecall writes natural potentials for all modes including modc
 pdefault.F: lwrallevec = .false.
--------------------------------------------------------------------------------
ldvronly
 logical  pglobal.inc
 if .true. only the DVR is computed and written to 'dvr' file
 default.F: ldvronly = .false.
--------------------------------------------------------------------------------
lfiterr
 logical  pglobal.inc
 if .false. the computation of errors is disabled
 default.F: lfiterr = .true.
--------------------------------------------------------------------------------
leigval
 logical  pglobal.inc
 if .true. the 'nat-weights' ASCII file containing the natural weights is generated
 pdefault.F: leigval = .false.
-------------------------------------------------------------------------------------------
lprintrho
 logical  pglobal.inc
 if .true. the 'rho-ascii' ASCII file containing the density matrix elements is generated
 pdefault.F: lprintrho = .false.
-------------------------------------------------------------------------------------------
lmgpf
 logical  pglobal.inc
 if .true. indicates that a MGPF calculation is being performed
 pdefault.F: lmgpf = .false.
-------------------------------------------------------------------------------------------
lfinemode
 logical  pglobal.inc
 if .true. a single potfit for the mode N on the fine grid is performed and the natural
 potentials are written in the binary file 'fmodN' (N in i2.2 fortran format)
 pdefault.F: lfinemode = .false.
-------------------------------------------------------------------------------------------
lonlydcoeff
 logical  pglobal.inc
 if .true. the D tensor is computed and written to the binary file 'fdcoeff'
 pdefault.F: lonlydcoeff = .false.
-------------------------------------------------------------------------------------------
ldcoeff
 logical  pglobal.inc
 if .false. do not compute the D tensor
 pdefault.F: ldcoeff = .true.
-------------------------------------------------------------------------------------------
lfullcoarse
 logical  pglobal.inc
 if .true. natural potentials are computed on full representation (exact) and
 written to the binary files 'cfullN' (N in i2.2 fortran format)
 Note that the D tensor is not computed
 pdefault.F: lfullcoarse = .false.
-------------------------------------------------------------------------------------------
lfinemode
 logical  pglobal.inc
 if .true. A single potfit calculation for mode N is performed. The resulting
 natural potentials are written to the binary file fmodN (N-th mode in i2.2
 fortran format). This procedure is devised to provide the natural potentials
 for mode N on the fine grid while the rest remain on the coarse one.
 pdefault.F: lfinemode = .false.
-------------------------------------------------------------------------------------------
lextpot
 logical  pglobal.inc
 if .true. both natural potentials and contracted coefficients are read from the
 external files ext-natpot and fdcoeff, respectively and fitting error is disabled
 pdefault.F: lextpot = .false.
-------------------------------------------------------------------------------------------
lcutnpot
 logical  pglobal.inc
 if .true. an existing natpot file is read and the number of natural potentials is
 reduced according to the choice in the NATPOT-SECTION in the potfit input file
 NOTE: Internally, in wrfit.F, the array pdim refers to the dimensions read in the
 natpot file whereas potdim refers to the user requested dimensions
 pdefault.F: lcutnpot = .false.
-------------------------------------------------------------------------------------------
lrdnpot
 logical  pglobal.inc
 if .true. potfit reads an existing natpot
 pdefault.F: lrdnpot = .false.
-------------------------------------------------------------------------------------------
lnpotpath
 logical  pglobal.inc
 if .true. potfit reads the natpot file at npotpath (absolute path + name)
 pdefault.F: lnpotpath = .false.
-------------------------------------------------------------------------------------------
lspenergy
 logical  pglobal.inc
 if .true. potfit computes a single point potfit and PES energy and compares.
 The point is given by the set indices isppoint
 pdefault.F: lspenergy = .false.
-------------------------------------------------------------------------------------------
igpoint
 integer  igpoint(ndof)
 vector of ndof integers representing the indices of a grid point
-------------------------------------------------------------------------------------------
gpoint
 real*8  gpoint(ndof)
 vector of ndof reals representing the coordinates of the grid
 point described by igpoint
-------------------------------------------------------------------------------------------
isppoint
 integer  isppoint(maxdim) spenergy.inc
 vector of maxdim integers representing the indices of a grid point
 Initialized in peinrun
-------------------------------------------------------------------------------------------
sppoint
 real*8  sppoint(maxdim)
 vector of maxdim reals representing the coordinates of the grid
 point described by isppoint
 Initialized in peinrun
-------------------------------------------------------------------------------------------
ptspepes
 integer  timing.inc
 Variable assigning a number to the routine to be timed.
 subrout(ptspepes)='spenergypes'
-------------------------------------------------------------------------------------------
ptspefit
 integer  timing.inc
 Variable assigning a number to the routine to be timed.
 subrout(ptspefit)='spenergyfit'
-------------------------------------------------------------------------------------------
workdim2
 integer zeigpfit.F
 Dimension of the auxiliary array work2. IN the general case
 defined as workdim2 = max(maxpsub2+2*maxpsub,coeffdim,work2a,work2b),
 in sp-energy value calculated as needed in getvfit.
-------------------------------------------------------------------------------------------
work2
 real*8 work2(workdim2)
 Auxiliary array
-------------------------------------------------------------------------------------------
vvec
 real*8 vvec(vpotdim)
 Potential energy vector
-------------------------------------------------------------------------------------------
evec
 real*8 evec(evecdim)
 Vector containing the single particle functions
-------------------------------------------------------------------------------------------
loned
 logical loned(maxdim)
 Vector indicating whether one dimensional potentials are to be subtracted
-------------------------------------------------------------------------------------------
tm_zero
 integer  global.inc
 tm_zero contains the unix-time (seconds) at start of the run.
 tm_zero is set in mdefaults. It is used for keyword twall.
-------------------------------------------------------------------------------------------
lcutalong
 logical  pglobal.inc
 if .true. potfit computes a cut along the PES for a given DOF.
 The rest of the DOFs are set up to the values given in the isppoint array.
 pdefault.F: lcutalong = .false.
-------------------------------------------------------------------------------------------
lsoftcutpes
 logical  operdef.inc
 lsoftcutpes is set to true, if a potential is to be cut using the expression:
     pesmax * (1.d0 + log(abs(v/pesmax)))
-------------------------------------------------------------------------------------------
mpitask
 integer (local, see mpiprop.F)
 Indicates the task that is to be performed by the slaves when using MPI parallelization

 Task  Serial equivalent   Description
 ******************************************************************
   0    --                 Terminate MPI slaves
   1    funka2             Calculate dA/dt
   2    calcha             Calculate H*A for all correlated terms
   3    mfields            Calculate the mean fields (hloch)
   4    brdavstep
   5    rdavstep
   6    getdavmat
   7    DSTEQR             Lapack: diaginalize tridiagonal matrix
   8    phihphi            Calculate <phi_ik|h_k^r|phi'_jk> (hteil)
   9    hlochphi           Calculate <H>_k |phi_k>
  10    ecalcha
  11    ehlochphi
  12    cdavstep
  13    summf              Sum mean-fields
  21    --                 Broadcast hloch tensor
  22    --                 Broadcast hteil tensor
  23    --                 Broadcast mfsum tensor
  41    bdavstep
 999    timing             MPI Timing
-------------------------------------------------------------------------------------------
lmpimfields
 logical (mpi.inc)
 If .true., use MPI to calculate the mean fields. (Needs an mpirun, of course)
 See also 'no-mfields' keyword in RUN-SECTION documentation.
-------------------------------------------------------------------------------------------
lmpiupdt
 logical lmpiupdt(nmpiupdtlen), mpi.inc
 Used to optimize MPI communication. Currently only used for calling
 hlochphi during improved relaxation.(mpitask=9).  Flags are used to indicate
 if information needs to be updated in the MPI slaves, thus used to initialize
 communicaton only on demand
-------------------------------------------------------------------------------------------
nmpiupdtlen
 integer parameter(nmpiupdtlen=2), mpi.inc
 Length of the Array lmpiupdt.
-------------------------------------------------------------------------------------------
nnat
 integer, used in htmsetup.F and logop.F
 nnat is the number of a natpot. Useful if there are more than one natpots.
-------------------------------------------------------------------------------------------
lwrnpot
 logical  operdef.inc
 if true, full information on natpots will be printed to op.log.
 Otherwise only irst and last line of each natpot.
 lwrnpot=false by default, it is set true via the keyword print-npot.
-------------------------------------------------------------------------------------------
freeze
 integer, freeze(maxdim)   global.inc
 freeze contains the numbers of the modes to be frozen in an impr.relax. calculation.
-------------------------------------------------------------------------------------------
cstartup
 character*(c5)  global.inc
 This character variable contains the time when the job was started.
-------------------------------------------------------------------------------------------
lctensor
 logical  pglobal.inc
 if true, computes evec for ALL modes (including modc) as well as the ctensor
-------------------------------------------------------------------------------------------
mctens
 integer  runpfit.inc
 Requested number of SPPs for the contracted mode when calculation of the C-tensor is required
-------------------------------------------------------------------------------------------
cvecdim
 integer  pglobal.inc
 Length of the array for the C-tensor:
     cvecdim = Prod_(m)[potdim(m)]  with m = 1, f
-------------------------------------------------------------------------------------------
cvec
 real*8 cvec(cvecdim)
 Array containiing the elements of the C-tensor
-------------------------------------------------------------------------------------------
lgetdiag
 locical  posthr.inc
 Use pthreads for bgetdiagonal. Default: false
-------------------------------------------------------------------------------------------
lmpigetdiag
 locical  mpi.inc
 Use MPI in bgetdiagonal. Default: true
-------------------------------------------------------------------------------------------
maxreadspf
 integer  parameter(maxreadspf=10)  runinwf.inc
 Maximum number of readspf keywords (build-section).
-------------------------------------------------------------------------------------------
nreadspf
 integer  runinwf.inc
 Actual number of readspf keywords (build-section), nreafspf <= maxreadspf
-------------------------------------------------------------------------------------------
readspffile
 character*(c5), dimension(maxreadspf)
 Filenames for readspf (build-section)
-------------------------------------------------------------------------------------------
wpf
 real*8 wpf(maxdim,maxpes) operdef.inc
 wpf(j,np) contains the reduce-weight for the j-th (natpot) DOF and the np-th natpot.
-------------------------------------------------------------------------------------------
npotmodes
 In MC-Potfit npottype.f90:
 Number of modes for which SPPs are used. If a contracted mode is present,
 npotmodes = nmode - 1, otherwise npotmodes = nmode
-------------------------------------------------------------------------------------------
ntotspf
 In MC-Potfit npottype.f90:
 Total number of SPP. ntotspf = sum(potdim), where potdim(modc) == 0
-------------------------------------------------------------------------------------------
lomega
 logical (mcpfitparams.f90) default: true
 If true the product of the SPP are calculated for all sampling points and all
 configurations. The result is stored in the Omega(N,J), where N is the sampling point
 and J is the configuration. If false, these products are calculated on the fly as
 needed. See also lomegat for transpose(Omega).
-------------------------------------------------------------------------------------------
lomegat
 logical (mcpfitparams.f90) default: true
 If true the product of the SPP are calculated for all sampling points and all
 configurations. The result is stored in the OmegaT (J,N), where N is the sampling point
 and J is the configuration. and OmegaT is the transpose of Omega.
 If false, these products are calculated on the fly as
 needed.
-------------------------------------------------------------------------------------------
lomegaSPP
 logical (mcpfitparams.f90) default: true
 If true for calculating reduced densities of the potential, the potential is evaluated
 and stored in a matrix V(n,i), where n is the index of a Monte-Carlo sampling point
 and i as the index if the grid point of the (combined) mode for which the densiy is
 to be calculated. Then rho(i,j) = dot_product(V(:,i), V(:,j)).
 If false, the potential is evalueted on the fly as needed.
-------------------------------------------------------------------------------------------
lloadevecs
 logical (mcpfitparams.f90) default: false
 If true, the sampling of the reduced density matrix is skipped and the densities are
 read from file.
-------------------------------------------------------------------------------------------
lasciidensity
 logical (mcpfitparams.f90) default: false
 If true, the reduced density matrices are stored in ASCII format. If false in binary form.
-------------------------------------------------------------------------------------------
lesample
 logical (mcpfitparams.f90)  default: false
 If true, calculate energies of the sampling-points while checking the samples
 (This is not parallelized with MPI - avoid on HPC machines)
-------------------------------------------------------------------------------------------
nsamplespp
 integer (mcpfitparams.f90)
 The number of sampling points used to calculate reduced densities
 with Monte-Carlo integration
-------------------------------------------------------------------------------------------
nsamplecoeff
 integer (mcpfitparams.f90)
 The number of Monte-Carlo sampling points used to calculate the natpot coefficients
-------------------------------------------------------------------------------------------
nsampletest
 integer (mcpfitparams.f90)
 The number of Monte-Carlo sampling points used to test a Monte-Carlo Potfit against
 the true potential.
-------------------------------------------------------------------------------------------
nstepspp
 integer (mcpfitparams.f90) default: 1
 When generating a Metropolis sampling for the Monte-Carlo integration of the
 reduced densities, then each nstepspp'th accepted point is used as a samling point.
 Also, when reading sampling points from a file, each nstepspp'th point in the
 file is used as a sampling point.
-------------------------------------------------------------------------------------------
nstepcoeff
 integer (mcpfitparams.f90) default: 1
 When generating a Metropolis sampling for the calculation of the natpot coefficients,
 then each nstepcoeff'th accepted point is used as a samling point.
 Also, when reading sampling points from a file, each nstepcoeff'th point in the
 file is used as a sampling point.
-------------------------------------------------------------------------------------------
nsteptest
 integer (mcpfitparams.f90) default: 1
 When generating a Metropolis sampling for testing the natpot against the true
 potential, then each nsteptest'th accepted point is used as a samling point.
 Also, when reading sampling points from a file, each nsteptest'th point in the
 file is used as a sampling point.
-------------------------------------------------------------------------------------------
nskipfirstspp
 integer (mcpfitparams.f90) default: 0
 When generating a Metropolis sampling for the Monte-Carlo integration of the
 reduced densities, the first nskipfirstspp accepted points are not used.
 Also, when reading sampling points from a file, the first nskipfirstspp points
 file are irgnored.
-------------------------------------------------------------------------------------------
nskipfirstcoeff
 integer (mcpfitparams.f90) default: 0
 When generating a Metropolis sampling for the calculation of the natpot coefficients,
 the first nskipfirstcoeff accepted points are not used as samling points.
 Also, when reading sampling points from a file, each nskipfirstcoeff points in the
 file are ignored
-------------------------------------------------------------------------------------------
nskipfirsttest
 integer (mcpfitparams.f90) default: 0
 When generating a Metropolis sampling for testing the natpot against the true
 potential, the first nskipfirsttest accepted points are not used as samling points.
 Also, when reading sampling points from a file, the first nskipfirsttest points in the
 file are ignored.
-------------------------------------------------------------------------------------------
betaspp
 real*8 (mcpfitparams.f90)
 When generating a Metropolis sampling for the Monte-Carlo integration of the
 reduced densities, betaspp is the temperature multiplied with the Boltzmann konstant.
-------------------------------------------------------------------------------------------
betacoeff
 real*8 (mcpfitparams.f90)
 When generating a Metropolis sampling for the calculation of the natpot coefficients,
 betacoeff is the temperature multiplied with the Boltzmann konstant.
-------------------------------------------------------------------------------------------
betatest
 real*8 (mcpfitparams.f90)
 When generating a Metropolis sampling for testing the natpot against the true
 potential, betatest is the temperature multiplied with the Boltzmann konstant.
-------------------------------------------------------------------------------------------
smethodspp
 integer (mcpfitparams.f90)
 Method for obtaining the sampling points for calculating the reduced densities:
  1  Read points from file
  2  Metropolis sampling (Boltzmann distribution)
  3  Uniform distribution
-------------------------------------------------------------------------------------------
smethodcoeff
 integer (mcpfitparams.f90)
 Method for obtaining the sampling points for calculating the natpot coefficients
  1  Read points from file
  2  Metropolis sampling (Boltzmann distribution)
  3  Uniform distribution
-------------------------------------------------------------------------------------------
smethodtest
 integer (mcpfitparams.f90)
 Method for obtaining the sampling points for testing the natpot against the true
 potential
  1  Read points from file
  2  Metropolis sampling (Boltzmann distribution)
  3  Uniform distribution
-------------------------------------------------------------------------------------------
idxfilespp
 character(len==240) (mcpfitparams.f90)
 File to write to or read from the sampling points for the Monte-Carlo integration of the
 reduced densities.
-------------------------------------------------------------------------------------------
idxfilecoeff
 character(len==240) (mcpfitparams.f90)
 File to write to or read from the sampling points for calculating the natpot coefficients.
-------------------------------------------------------------------------------------------
idxfiletest
 character(len==240) (mcpfitparams.f90)
 File to write to or read from the sampling points for testing the natpot against the true
 potential.
-------------------------------------------------------------------------------------------
lomppotential
 logical (mcpfitparams.f90) default true
 Flag to indicate weather the potential routine is thread safe. If true, the
 potential routine is called in parallel using OpenMP.
-------------------------------------------------------------------------------------------
lsamplingonly
 logical (mcpfitparams.f90) default false
 If true, only the sampling points are generated, nothing else is done.
-------------------------------------------------------------------------------------------
lsamesets
 logical (mcpfitparams.f90) default false
 If true, the same sampling poins are used for all tasks: calculating the reduced densiies,
 calculating the coefficients, and testing the natpot against the true potential.
-------------------------------------------------------------------------------------------
invertmethod
 integer (mcpfitparams.f90) default 1
 If invertmethod == 1: calculate the SPP overlap matrix and solve the equation cor
 the coefficients using linear algebra subroutines (LAPACK).
 If invertmethod == 2: do not calculate the SPP overlap matrix but use the
 Conjugate Gradients algorithm to solve for the coefficients.
-------------------------------------------------------------------------------------------
cgtolerance
 real*8 (mcpfitparams.f90) default 1.d-12
 If invertmethod == 2 the error tolerance of the Conjugate Gradients algorithm.
-------------------------------------------------------------------------------------------
cgmaxiter
 integer (mcpfitparams.f90) default 1000
 If invertmethod == 2 the maximum number of iterations
 of the Conjugate Gradients algorithm.
-------------------------------------------------------------------------------------------
lsubstractpes
 logical (mcpfitparams.f90) default false
 If true, a potential of a PES is substracted after evaluation of the potential rotuine.
-------------------------------------------------------------------------------------------
mcseed
 integer (mcpfitparams.f90) default: from system time
 Seed for the randon number generator.
-------------------------------------------------------------------------------------------
potential
 procedure, pointer (mcpfitparams.f90)
 Pointer to the function that evaluated the potential of a grid point.
-------------------------------------------------------------------------------------------
phops
 real*8, pointer (mcpfitparams.f90)
 Pointer to the 'hops' array of MCTDH. See 'phelp hops'.
-------------------------------------------------------------------------------------------
pdvr
 type(dvr_t), pointer (mcpfitparams.f90)
 Pointer to a DVR object.
-------------------------------------------------------------------------------------------
