#!/bin/bash

#--------------------------------------------------------------------------
# THIS SHELL SCRIPT PROVIDES INFORMATION ON VARIABLES OF THE MCTDH PROGRAM
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# FUNCTION  helpf. Print help information.
#--------------------------------------------------------------------------
helpf() {
    echo 'Purpose: Provides help information on MCTDH-keywords.'
    echo 'Usage  :   phelp [-a -b -e -h] regex.'
    echo '   -h  :   Print this help text.'
    echo '   -a  :   (all)   Search for ".*$1.*".'
    echo '   -b  :   (begin) Search for "^$1.*".'
    echo '   -e  :   (end)   Search for ".*$1$".'
    echo '   -s S:   Display all keywords of section S.'
    echo '  '
    echo '  mhelp prints a description of an MCTDH keyword that match'
    echo '  the regular expression "regex"'
    echo '  The search is case sensitive, thus use lower case troughout.'
    echo '  Upper case input is translated to lower case.'
    echo "  Examples: mhelp ho ;  mhelp 'ho [a-z].*' "
    echo '            mhelp -a ho ;  mhelp -b ho ;  mhelp -e ho'
    echo '            mhelp -s unit'
    echo ' NB: The regular expressions are the sed ones.'
    echo "$minus40$minus40"
    exit
}
#-----------------------------------------------------------------------

minus40='----------------------------------------'
echo "$minus40$minus40"
all=0

#---------------------------------------------------------------------------
#  Read the options (if any).
#---------------------------------------------------------------------------
while getopts ":habes" opt; do
    case $opt in
    h  )  helpf ;;
    a  )  all=3 ;;
    b  )  all=1 ;;
    e  )  all=2 ;;
    s  )  all=4 ;;
    \? )  echo ' Unknown option!'
          helpf ;;
    esac
done
shift $(($OPTIND - 1))

if [ -z "$1" ] ; then helpf ; fi
a1=`echo $1 | 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}.*#"
elif [ $all -eq 4 ] ; then
    kw="^[a-z0-9].* # $a1"
fi

sed  -e "/^#!\/bin/,/^###start##/d" $0 |
sed -n -e "/${kw}/,/^---------------------------/p"

exit

############################################################################
###    ----  mhelp  ----
###
###  The following list contains a description of  MCTDH keywords.
###  The keyword must start at column 1, followed by '#' on column 20
###  and the section name.
###  The description must start at column 2.
###  The description is closed by a line of '-' starting at column 1.
###
###start####################################################################


------------------------------------------------------------------------------
au                  # units
 atomic units, 1 (may be omitted)
------------------------------------------------------------------------------
mH                  # units
 milli Hartree, 1000.d0
------------------------------------------------------------------------------
ev                  # units
 electron volts, 27.21138386
------------------------------------------------------------------------------
mev                 # units
 milli electron volts, 27211.38386
------------------------------------------------------------------------------
cm-1                # units
 wave number cm^-1,  2.1947463137d+5
------------------------------------------------------------------------------
kcal/mol            # units
 kcal/mol, 627.503
------------------------------------------------------------------------------
kj/mol              # units
 kJoule/mol, 2.6255d+3
------------------------------------------------------------------------------
Kelvin              # units
 Kelvin, 3.15777d+5
------------------------------------------------------------------------------
nmwl                # units
 wavelength in nanometer, 45.56336
------------------------------------------------------------------------------
invev               # units
 1/ev, 1/27.21138386 = 0.036749325398
------------------------------------------------------------------------------
invfs               # units
 1/fs, 41.34137333656 = 1/0.024188843265
------------------------------------------------------------------------------
aj                  # units
 atto Joule, 1.602177d-1*ev
------------------------------------------------------------------------------
amu                 # units
 atomic mass unit, 1822.88848325
------------------------------------------------------------------------------
p-mass              # units
 mass of proton,   1836.15267247
------------------------------------------------------------------------------
h-mass              # units
 mass of Hydrogen atom, 1837.15264409
------------------------------------------------------------------------------
d-mass              # units
 mass of Deuterium atom, 3671.482934845
------------------------------------------------------------------------------
angst               # units
 Angstroem, 0.52917720859
------------------------------------------------------------------------------
pm                  # units
 picometer, 52.917720859
------------------------------------------------------------------------------
nm                  # units
 nanometer, 0.052917720859
------------------------------------------------------------------------------
deg                 # units
 degree, pi/180.0
------------------------------------------------------------------------------
angst-1             # units
 Angstroem^-1, 1.88972613289
------------------------------------------------------------------------------
pm-1                # units
 picometer^-1, 0.0188972613289
------------------------------------------------------------------------------
nm-1                # units
 nanometer^-1, 18.8972613289
------------------------------------------------------------------------------
ev*amu              # units
 sqrt(2mE)
------------------------------------------------------------------------------
fs                  # units
 femtosecond, 1/41.34137333656 = 0.0241888432651
------------------------------------------------------------------------------
debye               # units
 debye=0.39343,   x[a.u.] = x[debye]*debye
------------------------------------------------------------------------------
name                # run
 name = name-directory hosting all output files. The name of the calculation.
------------------------------------------------------------------------------
wavefunction        # run
 The system is described by a wavefunction (default).
------------------------------------------------------------------------------
density1            # run
 The system is described by a type I density operator.
------------------------------------------------------------------------------
density2            # run
 The system is described by a type II density operator.
------------------------------------------------------------------------------
gendvr              # run
 A DVR file will be generated.
------------------------------------------------------------------------------
genoper             # run
 An operator file will be generated.
------------------------------------------------------------------------------
genpes              # run
 An pes-operator file will be generated. This operator file, which contains
 the potential only, can be used by showsys and vminmax.
------------------------------------------------------------------------------
gengmat             # run
 An pes-operator file will be generated. This operator file contains
 the (I1,I2) element of the G-matrix. gengmat=I1,I2
------------------------------------------------------------------------------
geninwf             # run
 An initial wavefunction will be generated.
------------------------------------------------------------------------------
propagation         # run
 Propagation in real time. propagation sets gendvr,genoper, and geninwf.
------------------------------------------------------------------------------
relaxation          # run
 relaxation (= [I|S](,S1(,S2(,S3)))). I=0...99, S=follow, or S=lock,
 S1,S2,S3=full,ortho,quad,backrotate,quadphi,cn,skip1dav
 If no argument is given, a propagation in imaginary time is performed, i.e.
 a relaxation to the ground state. Arguments must only be given, if the CMF
 integration scheme is used. See on-line docu for further details.
------------------------------------------------------------------------------
continuation        # run
 A continuation of the run will be performed. (option: -c)
 continuation=integrator : Read additionally the integrator-section. (opt -ci)
------------------------------------------------------------------------------
diagonalization     # run
 Lanczos diagonalization. diagonalization=I, I = number of Lanczos-iterations.
------------------------------------------------------------------------------
exact               # run
numerically exact wavepacket calculation.
------------------------------------------------------------------------------
readdvr             # run
  readdvr(=S); DVR information is read from directory S. (Default: from name)
------------------------------------------------------------------------------
readoper            # run
 readoper(=S), ; operator is read from directory S.  (Default: from name)
------------------------------------------------------------------------------
readinwf            # run
  readinwf(=S); initial WF is read from directory S.  (Default: from name)
------------------------------------------------------------------------------
deldvr              # run
 The DVR file will be deleted at the end.
------------------------------------------------------------------------------
deloper             # run
 The OPER file will be deleted at the end.
------------------------------------------------------------------------------
tfinal              # run
 tfinal = R; final propagation time.
------------------------------------------------------------------------------
tinit               # run
 tinit = R; initial propagation time. (default=0).
------------------------------------------------------------------------------
tout                # run
 tout = R; The output will be written every R fs.
------------------------------------------------------------------------------
tpsi                # run
 tpsi = R; The wavefunction will be written every R fs. (default: R=tout)
------------------------------------------------------------------------------
tstop               # run
 tstop = S; stop-time (real-time, hh:mm).
------------------------------------------------------------------------------
tcpu                # run
 tcpu = S; stop-time (cpu-time)
 Format:  hh:mm:ss or Is or Im, e.g. 120s, 2m, 00:02:00 are equivalent.
------------------------------------------------------------------------------
usepthreads         # run
 usepthreads = I (,S(,S1(,S2))). I=# of threads, S,S1,S2=no-summf,
 no-funka,no-mfields,no-phihphi,no-hlochphi,no-hlochphi1m,
 no-funkphi,no-getdavmat,no-dsyev,mem-calcha,mem-mfields,summf2,dsyev = I2.
 If just the integer
 argument I is given a parallel (shared memory) MCTDH calculation will be
 performed using I pthreads (I may be 1). The further optional
 arguments S disable the parallelization of the different subroutines or
 alternative routines are used. The mem-calcha and mem-mfields keywords
 enable MCTDH to use more memory for a more efficient parallelisation. The
 summf2 keyword makes MCTDH use a different parallelisation of the summf
 routine. The dsyev = I2 keyword determines the minimum size of the matrices
 that are diagonalized in parallel.
------------------------------------------------------------------------------
usempi              # run
 usempi (,S(,S1(,S2))). S,S1,S2=no-mfields,no-funka2,no-calcha,no-getdavmat,
 no-dsyev,no-dav,no-phihphi,no-hlochphi,dav = I.
 If just the keyword usempi is given a parallel (distributed memory) MCTDH
 calculation will be performed. Additionally the calculation must be invoked
 by mpirun. The further optional arguments S disable the parallelization of
 the different subroutines. The dav = I keyword determines the maximum number
 of A-vectors that can be stored on a node during an improved relaxation run.
 See also usepthreads.
------------------------------------------------------------------------------
normstop            # run
 normstop = R; stop if norm<R.
------------------------------------------------------------------------------
energy-not-ev       # run
 The eV-conversion factor is set to 1.
 (E.g. when using a model Hamiltonian with dimensionless coordinates).
------------------------------------------------------------------------------
time-not-fs         # run
 The fs-conversion factor is set to 1.
 (E.g. when using a model Hamiltonian with dimensionless coordinates).
------------------------------------------------------------------------------
title               # run
 title = S; title of the run.
------------------------------------------------------------------------------
output              # run
 output will be written to the file name/output. (default)
------------------------------------------------------------------------------
orben               # run
 orbital energies will be written to the file name/orben.
------------------------------------------------------------------------------
no-output           # run
 output will be written to the screen. (no ouput file).
------------------------------------------------------------------------------
screen               # run
 output will be written to the screen. (no ouput file).
------------------------------------------------------------------------------
pdensity            # run
 pdensity (=I1(,I2(,I3(,I4)))). The one-particle density will be written.
 to the file name/pdensity. If arguments are given, the pdensity will be
 created for the specified mode-numbers only.
------------------------------------------------------------------------------
gridpop             # run
 gridpop (=el); grid populations are written to file name/gridpop.
 If the argument 'el' is given, the grid populations are not summed over the
 electronic states.
------------------------------------------------------------------------------
speed               # run
 CPU-time used within an output interval is written to file name/speed.
 'speed' is default and thus need not to be given.
------------------------------------------------------------------------------
no-speed            # run
 The file name/speed is not created.
------------------------------------------------------------------------------
stop                # run
 The file name/stop is created. (default)
------------------------------------------------------------------------------
no-stop             # run
 The file name/stop is not created.
------------------------------------------------------------------------------
psi                 # run
 The wavefunction (or density operator) is written to the file name/psi.
 psi (= S (, S1 or R)); (S,S1=single,double,natur,compact,R=cutoff)
------------------------------------------------------------------------------
auto                # run
 The autocorrelation-function is written to the file name/auto.
 auto (= S (,S1 (,S2))); (S,S1,S2=no,once,twice,error,order1,order2)
------------------------------------------------------------------------------
cross               # run
 The cross-correlation-function is written to the file name/cross.
 cross (= S); (S=path to reference WF). If no arg. is given, name is assumed.
------------------------------------------------------------------------------
timing              # run
 Program timing information is written to file name/timing. (default)
------------------------------------------------------------------------------
ptiming             # run
 ptiming (=all)
 Setting this keyword provides additional timing information.
 For a serial MCTDH-run all parallelized routines are included in the timing
 file. If pthreads are used then the ptiming file is created. This file
 includes timing information for each thread. The ptiming file is not read by
 a continuation run but recreated. In an MPI parallel run the mpitiming file
 is created containing timing information for each MPI prozess. If ptiming=all
 is set then a ptiming file for each MPI prozess is created.
------------------------------------------------------------------------------
no-timing           # run
 The file name/timing is not created.
------------------------------------------------------------------------------
no-ptiming          #run
 the file name/ptiming is not created
------------------------------------------------------------------------------
steps               # run
 integrator step sizes are written to file name/steps.
------------------------------------------------------------------------------
update              # run
 CMF update times for the mean-fields are written to file name/update.
------------------------------------------------------------------------------
lanczvec            # run
 Lanczos vectors are written to file name/lanczvec (diagonalization run).
------------------------------------------------------------------------------
eigvec              # run
 eigenvectors of tridiagonal  Lanczos T-matrix are written to name/eigvec.
------------------------------------------------------------------------------
veigen              # run
 eigenvectors and eigenvalues of a 1D operator are written to file
 name/veigen. The 1D-operator is specified by the eigenf keyword (init_wf).
 The eigenfunctions of meigenf are written to meigen_memode_mestate.
------------------------------------------------------------------------------
all                 # run
 All the (optional) files will be opened.
------------------------------------------------------------------------------
expect              # run
 expect = S (,S1 (, S2, ...)).Expectation value of operator(s) S (S1,S2..)
 are written to file name/expectation. If the string S is 'real-only',
 only the real parts of the expectation values will be written.
------------------------------------------------------------------------------
expect1             # run
 expect1 = S (,S1 (, S2, ...)).Expectation value of operator(s) S (S1,S2..)
 are written to file name/expect1. If the string S is 'real-only',
 only the real parts of the expectation values will be written.
------------------------------------------------------------------------------
quadpop             # run
 if set, the grid populations and state populations are calculated using
 rho^2 rather than rho. This keyword is needed, if a traceless density
 operator is propagated. Otherwise, all populations are zero. Only for
 Density Operators of Tye I. (Tye II is OK, anyway).
------------------------------------------------------------------------------
rlxunit             # run
 sets the energy-unit and  shift for the rlx_info file.
 rlxunit=S(,R), where the string S denotes the unit (eV, cm-1,etc) and
 the real number R denotes the energy-shift to be subtracted.
------------------------------------------------------------------------------
rlxemin             # run
 sets a lower energy bound when searching for the Davidson state of
 maximal overlap with the initial WF. (relaxation=lock).
 rlxemin=R(,S), where the string S denotes the unit (eV, cm-1,etc) and
 the real number R denotes the energy-limit.
 Note: an energy shift is added, when set by rlxunit.
------------------------------------------------------------------------------
rlxemax             # run
 sets an upper energy bound when searching for the Davidson state of
 maximal overlap with the initial WF. (relaxation=lock).
 rlxemax=R(,S), where the string S denotes the unit (eV, cm-1,etc) and
 the real number R denotes the energy-limit.
 Note: an energy shift is added, when set by rlxunit.
------------------------------------------------------------------------------
precon              # run
 defines the dimension of a block of the Hamiltonian matrix used as
 pre-conditioner in an RDAV relaxation run. precon=I, where I=dimension.
------------------------------------------------------------------------------
split-rst           # run
 if set, the restart file of a block-Davidson calculation is split
 into individual restart files called rst000, rst001, etc.
------------------------------------------------------------------------------
opname              # operator
  opname=S; The operator with name S.op will be used.
------------------------------------------------------------------------------
oppath              # operator
 oppath=S; The path S will be used to find the operator file.
------------------------------------------------------------------------------
limit-mc            # operator
 limit-mc=I; The size of the array mc is limited to I MB. Default: I=200.
------------------------------------------------------------------------------
parfile             # operator
 parfile=S; The parameters are read from file S.
------------------------------------------------------------------------------
v<                  # operator
 V<R; R = Energy cut-off (exact calculations only).
------------------------------------------------------------------------------
v>                  # operator
 V>R; R = Energy cut-off (exact calculations only).
------------------------------------------------------------------------------
closed              # operator
 Density operators are propagated in a closed system.
------------------------------------------------------------------------------
open                # operator
 Density operators are propagated in an open system.
------------------------------------------------------------------------------
projection          # operator
 Modified equations of motion for the coefficients are used for Type II
 density-operator propagation in order to conserve the trace. (default).
------------------------------------------------------------------------------
no_projection       # operator
 switch off projection (projection is default). (density-operator Type II)
------------------------------------------------------------------------------
alter-parameters    # operator
 alter the  PARAMETER-SECTION of the .op file.
------------------------------------------------------------------------------
alter-labels        # operator
 alter the LABELS-SECTION of the .op file.
------------------------------------------------------------------------------
analytic_pes        # operator
 If set, the potential energy surface is not expanded on the grid.
 Should be set if the CDVR method is used.
------------------------------------------------------------------------------
cutoff              # operator
 cutoff=R.  All (real diagonal) operator terms smaller than cutoff are
 removed. Default R=tiny (i.e. 1.d-9). Units are allowed.
 For natpots use natpotcut.
------------------------------------------------------------------------------
natpotcut           # operator
 natpotcut=R.   Or: natpotcut{V1,V2,..}=S.
 All natpots smaller than natpotcut are removed. Units are allowed.
 Default R=tiny (i.e. 1.d-9)
------------------------------------------------------------------------------
fast                # operator
 The "fast" algorithm for H(natpot)*A operation is used. (only for natpots)
 Parameters: lab{n} , where lab is the label assigned to a natpot in a
 Labels-Section, and where n denotes the order. If n is not given, the maximal
 order n=min(4,nmode-2) will be used. If the label lab is not given,
 fast will be applied to all natpots.
------------------------------------------------------------------------------
natpot              # operator (Labels-Section)
 natpot{S1,S2} . S1 = path-name of directory containing the natpot. If
 S1=name, the name-directory is assumed. S2 = ignore. This optional
 parameter tells the program to ignore the natpot modelabels.
 The assignment to the DOFs must then be made by a |i&j&k construct
 (i,j,k=1,2,3,...) in the Hamiltonian-Section.
------------------------------------------------------------------------------
multi-set           # spf-basis
 use the multi-set formalism. (default: single-set).
------------------------------------------------------------------------------
single-set          # spf-basis
 use the single-set formalism. (default).
------------------------------------------------------------------------------
packets             # spf-basis
  packets=I (,S); I independent wavepackets are simultaneously propagated.
                  S=single-set or S=multi-set
------------------------------------------------------------------------------
id                  # spf-basis
  modelabel(s) = id,I
  where I denotes the number of the (combined) mode which is identified
  with the present mode. The present mode is then not computed.
------------------------------------------------------------------------------
el                  # primitive-basis
 Electronic basis.
------------------------------------------------------------------------------
ho                  # primitive-basis
 Harmonic oscillator (Hermite) DVR.
 Parameters: hoxeq, hofreq, homass. (equilibrium position, frequency, mass)
 Alternative Parameters: 'xi-xf', first grid point, last grid point.
------------------------------------------------------------------------------
rho                 # primitive-basis
 Radial Harmonic oscillator (odd-Hermite) DVR.
 Parameters: hoxeq, hofreq, homass. (left hand boundary, frequency, mass)
------------------------------------------------------------------------------
leg                 # primitive-basis
 Rotator (Legendre) DVR. Parameters: blz, S. S=all,even,odd.
------------------------------------------------------------------------------
leg/r               # primitive-basis
 Leg-DVR for a restricted range on angles.
 Parameters: blz, S, theta1, theta2. S=all,even,odd.
------------------------------------------------------------------------------
sin                 # primitive-basis
 Sine (Chebyshev) DVR. Parameters: xi, xf, S. S=short,long. (short is default)
------------------------------------------------------------------------------
fft                 # primitive-basis
 Fast Fourier transform collocation.
 Parameters: xi, xf, S. S=linear,periodic,s-periodic.
 Alternative Parameters: S, S=2pi,s-2pi,2pi/I, s-2pi/I. I=integer.
------------------------------------------------------------------------------
exp                 # primitive-basis
 Exponential DVR.
 Parameters: xi, xf, S. S=linear,periodic,s-periodic.
 Alternative Parameters: S, S=2pi,s-2pi,2pi/I, s-2pi/I. I=integer.
 Optional Parameters:  k=kmin,kmax. (only for combination with PLeg).
------------------------------------------------------------------------------
sphfbr              # primitive-basis
 Spherical harmonics FBR. (j,theta). Parameters: jmax, S. S=nosym,sym.
------------------------------------------------------------------------------
phifbr              # primitive-basis
 Spherical harmonics FBR. (m,phi). Parameters: mmax, mincr.
------------------------------------------------------------------------------
kLeg                # primitive-basis
 Extended Legendre DVR. (2D). Parameter: S, S=all,odd,even.
------------------------------------------------------------------------------
k                   # primitive-basis
 K-quantum number appearing with KLeg-DVR. Parameters: kmin, kmax.
------------------------------------------------------------------------------
pleg                # primitive-basis
 2D (theta,phi) Legendre DVR.  Parameter: S, S=all,odd,even.
------------------------------------------------------------------------------
lagu                # primitive-basis
 Laguerre DVR.  Same as Lagu1. See Lagu1.
------------------------------------------------------------------------------
lagu1               # primitive-basis
 Laguerre DVR.  Parameter: x0, b, icut. (initial point, width, cut-parameter).
 Alternative Parameters: 'xi-xf', first grid point, last grid point, icut.
 Alternative Parameters: 'x0-xf', initial point, last grid point, icut.
------------------------------------------------------------------------------
lagu2               # primitive-basis
 Laguerre DVR.  See Lagu1.
------------------------------------------------------------------------------
lagu3               # primitive-basis
 Laguerre DVR.  See Lagu1.
------------------------------------------------------------------------------
lagu4               # primitive-basis
 Laguerre DVR.  See Lagu1.
------------------------------------------------------------------------------
cos                  # primitive-basis
 Cosine DVR. Similar to exp-DVR, but enforcing even solutions.
 Parameters: xi, xf, S. S=long,short.
 Alternative Parameters: 2pi/I. I=integer.
------------------------------------------------------------------------------
extern               # primitive-basis
 External DVR. Read from file. Parameter: file-name, 'ascii'|'binary', unit.
 'ascii' is default and unit is optional.
------------------------------------------------------------------------------
file                # init_wf
 file=S(,S1..), Initial WF is read from file S/restart. Parameters: S,S1,S2
 S = path of directory. S1 = orthopsi (default) or noorthopsi
 S2 = ignore, S3 = realpsi. The strings S1, S2 and S3 are optional.
 If ignore is given, the check "primitive basis sets differ" is
 ignored (dangerous!).
 If realpsi is given, only the real-part of the WF is used and
 Schmidt-orthogonalized.
------------------------------------------------------------------------------
build               # init_wf
 Initial wavefunction is build using data given in the build ... end-build
 block.
------------------------------------------------------------------------------
block-spf           # init_wf
 block-spf=S(,S1..),
 Initial SPFs are read from file S/restart for a multi-packet single-set run,
 i.e. in particular for block-improved-relaxation.
 S1 = orthopsi (default) or noorthopsi or realpsi.
 Give "noorthopsi" if "block-a" is used.
------------------------------------------------------------------------------
block-a             # init_wf
 block-a=S(,S1..),
 Initial A-vectors are read from files S,S1,.. for a multi-packet single-set
 run, i.e. in particular for block-improved-relaxation.
 The files must be restart files of non-block form. The number of
 restart files must exactly match the block size.
 There may be more than one block-a statement.
 Give "noorthopsi" in the accompanying "block-spf" statement.
------------------------------------------------------------------------------
read-inwf           # init_wf
 Initial wavefunction is read from one or several restart files. The details
 are given in a read-inwf ... end-read-inwf block. It is possible to take
 the SPFs (or the coefficients) for different electronic states from different
 restart files.
------------------------------------------------------------------------------
call                # init_wf
 A user written subroutine is called for generating the initial WF.
------------------------------------------------------------------------------
correction          # init_wf
 Generation of the energy distribution (adwkb-file) and (a)diabatic correction
 of the inital WF. Parameters: S1(,S2), S1,S2 = edstr, dia, ad, hh2, hh2-bkmp2
------------------------------------------------------------------------------
trans               # init_wf
 Specify dof and state of the translational mode. Parameters: I1,(I2)
------------------------------------------------------------------------------
tfac                # init_wf
 Parameter: R; R=m1/(m1+m2). m1,m2 = atom masses of diatom.
------------------------------------------------------------------------------
a-coeff             # init_wf
 Following lines (within A-coeff .... end-A-coeff) define initial A-vector.
------------------------------------------------------------------------------
ho                  # init_wf
 Harmonic oscillator eigenfunctions (n=0,1,2,...) as inital SPF.
 Parameters: x0, p0, frequ., mass, pop=p
------------------------------------------------------------------------------
ho odd              # init_wf
 Odd harmonic oscillator eigenfunctions (n=1,3,5...) as inital SPF.
 Parameters: x0, p0, frequ., mass, pop=p
------------------------------------------------------------------------------
ho even             # init_wf
 Even harmonic oscillator eigenfunctions (n=0,2,4,...) as inital SPF.
 Parameters: x0, p0, frequ., mass, pop=p
------------------------------------------------------------------------------
gauss               # init_wf
 Gaussian wavepacket as inital SPF.
 Parameters: x0, p0, width, pop=p
------------------------------------------------------------------------------
leg                 # init_wf
 Legendre polynomial as inital SPF.
 Parameters: m, l, S. S=nosym,sym.
------------------------------------------------------------------------------
sphfbr              # init_wf
 Spherical harmonics as inital SPF. Requires a sphfbr primitive basis.
 Parameter: j.
------------------------------------------------------------------------------
phifbr              # init_wf
 Indicates second coordinate of sphfbr.  Requires a sphfbr primitive basis.
 Parameter: m
------------------------------------------------------------------------------
eigenf              # init_wf
 Use the eigenfunctions of a 1D Hamiltonian as initial SPFs.
 Parameters: S, pop=p. S=name of a 1D Hamiltonian.
------------------------------------------------------------------------------
kleg                # init_wf
 Associated Legendre polynomial as initial (2D) SPF.
 Parameters: l, S. S=nosym,sym.
------------------------------------------------------------------------------
k                   # init_wf
 Body fixed magnetic quantum number for KLeg.
 Parameters: K-initial, Kmin, Kmax, deta-K.
------------------------------------------------------------------------------
s-mctdh             # init_wf
 Use selective MCTDH (see Eq.(21) of JCP 112,8322 (2000)).
 Parameter: R, R=cutoff.
------------------------------------------------------------------------------
operate             # init_wf
 Apply an operator to the initial WF generated by build or read via file=.
 Parameter: S, S=name of operator.
------------------------------------------------------------------------------
operate_iter        # init_wf
 Parameter: I, I=Maximum no. of iterations. Default = 10.
------------------------------------------------------------------------------
operate_tol         # init_wf
 Parameter: R, R=Convergence tolerance. Default = 1.0d-8.
------------------------------------------------------------------------------
operate_no-norm     # init_wf
 The normalization factor is re-installed. The initial WF is no longer
 normalized.
------------------------------------------------------------------------------
operate_direct      # init_wf
 The direct part of the "operate" is done. Iterative part follows.
------------------------------------------------------------------------------
operate_no-direct   # init_wf
 The direct part of the "operate" is omitted. Iterative part only. (default)
------------------------------------------------------------------------------
orthogonalize       # init_wf
 Parameter: S (,S1,...), path(s) of foreign restart file(s).
 Orthogonalize the initial WF against the WF(s) read from foreign
 foreign restart file(s).
------------------------------------------------------------------------------
map                 # init_wf
 Use the initial SPFs from an other dof.
 Parameter: S, S=Modelabel of the DOF from where to map.
------------------------------------------------------------------------------
pop                 # init_wf
 Use the p-th initial SPFs for building the initial Hartree product.
 Parameter: p (,S(,S1)), p=number of SPF starting from 1. S=sym, take
 only every second eigenfunction as SPF (only for eigenf). S1=check,
 perform a symmetry check (only for eigenf).
------------------------------------------------------------------------------
sym1d               # init_wf
 sym1d=I (,I1,S,..) ; I denotes the DOF to be symmetrized. S=persist.
------------------------------------------------------------------------------
asym1d              # init_wf
 asym1d=I (,I1,..) ; I denotes the DOF to be asymmetrized. S=persist.
------------------------------------------------------------------------------
parity              # init_wf
 parity=I (,I1,..) ; I denotes the DOF to be (a)symmetrized. S=persist.
 parity symmetrizes 1D functions which are predominantly symmetric and
 anti-symmetrizes functions which are predominantly anti-symmetric.
------------------------------------------------------------------------------
sym2d               # init_wf
 sym2d=I (,I1,S,..) ; I denotes the 2D-combined mode to be
                      symmetrized. S=persist.
------------------------------------------------------------------------------
asym2d              # init_wf
 asym2d=I (,I1,S,..) ; I denotes the 2D-combined mode to be
                       asymmetrized. S=persist.
------------------------------------------------------------------------------
sym3d               # init_wf
 sym3d=I (,I1,S,..) ; I denotes the 3D-combined mode to be
                      symmetrized. S=persist.
------------------------------------------------------------------------------
symcoeff            # init_wf
 symcoeff (=S1,S2) ; The A-vector is symmetrized (in InitWF step).
                     S=dav ; Each Davidson-vector (Krylov) is symmetrized.
                     S=persist ; Symmetrization after each CMF step.
------------------------------------------------------------------------------
asymcoeff           # init_wf
 asymcoeff (=S) ; S=persist. The A-vector is asymmetrized.
------------------------------------------------------------------------------
symorb              # init_wf
 symorb=I1,I2 ; I1,I2=particle (mode) numbers of the sets of SPFs to be mixed.
------------------------------------------------------------------------------
meigenf             # init_wf
 Diagonalize a mode-Hamiltonian and use the eigenfunctions as initial SPFs.
 Parameters: I,S,I1|S1(,S2,I2) I=mode-number, S=Hamiltonian-label,
 I1=Number of eigenstate which is taken as first SPF (counting from 0).
 S1="follow", S2="full", I2=dimension of Lanczos space (default: subdim).
------------------------------------------------------------------------------
init_state          # init_wf
 init_state = I  specifies the initial electronic state (build-block)
------------------------------------------------------------------------------
left_state          # init_wf
 left_state = I  specifies the initial electronic ket-state (build-block)

------------------------------------------------------------------------------
right_state         # init_wf
 right_state = I  specifies the initial electronic bra-state (build-block)

------------------------------------------------------------------------------
temperature         # init_wf
 temperature = R  specifies the initial temperature for density (build-block)
------------------------------------------------------------------------------
print               # init_wf
 Print some information to the log file on how multi-dimensional mode-functions
 are build from 1D-functions. (build-block)
------------------------------------------------------------------------------
eps_inv             # integrator
 Parameter: R, R is the value used to regularize the density matrix.
 (Default: 10-8. See eq.(82) review.)
------------------------------------------------------------------------------
eps_no              # integrator
 Parameter: R, R is the value used to regularize the "natural orbital
 Hamiltonians". (Default: 10-8)
------------------------------------------------------------------------------
proj-h              # integrator
 1D Hamiltonians not extracted (See eq.(45) review).
------------------------------------------------------------------------------
h-proj              # integrator
 1D Hamiltonians are extracted (See eq.(44) review).
------------------------------------------------------------------------------
natorb              # integrator
 Natural orbitals are propagated in place of spfs.
------------------------------------------------------------------------------
energyorb           # integrator
 Energy orbitals are propagated in place of spfs. (Default for DAV)
------------------------------------------------------------------------------
enorb               # integrator
 Short form for 'energyorb'
 Energy orbitals are propagated in place of spfs. (Default for DAV)
------------------------------------------------------------------------------
stdorb              # integrator
 Standard orbitals (spfs) are propagated. (Default, except for DAV)
------------------------------------------------------------------------------
interpic            # integrator
 Spfs are propagated using the interaction picture.
------------------------------------------------------------------------------
simple-proj         # integrator
 The simple projector is used. (no inversion).
------------------------------------------------------------------------------
cdvr                # integrator
 Multi-dimensional potential terms will be evaluated by CDVR.
------------------------------------------------------------------------------
tddvr               # integrator
 Multi-dimensional potential terms will be evaluated by TDDVR.
------------------------------------------------------------------------------
update              # integrator
 Sets SIL step size for "exact". Parameter: R (Default R=tout).
------------------------------------------------------------------------------
vmf                 # integrator
 Variable mean fields. Mean fields are calculated at each integration step.
------------------------------------------------------------------------------
cmf                 # integrator
 Constant mean fields. Mean fields are calculated only each update step.
 CMF is equivalent to CMF/var for propagation and relaxation, but is
 equivalent to CMF/varphi for improved relaxation.
------------------------------------------------------------------------------
cmf/fix             # integrator
 Mean fields are kept constant over tau=R. Parameter: R
------------------------------------------------------------------------------
cmf/var             # integrator
 Error-control on both, SPFs and A-vector. (See CMF).
 Parameters: R,R1; R=initial update time, R1=accuracy.
------------------------------------------------------------------------------
cmf/varphi          # integrator
 Error-control only on SPFs. (See CMF).
 Parameters: R,R1; R=initial update time, R1=accuracy.
------------------------------------------------------------------------------
cmf/vara            # integrator
 Error-control only on A-vector. (See CMF).
 Parameters: R,R1; R=initial update time, R1=accuracy.
------------------------------------------------------------------------------
abm                 # integrator
 Adams-Bashforth-Moulton integrator. ABM/S with S=all,spf,A. ABM is equivalent
 to ABM/all. Parameters: I,R,R1; I=order, R=accuracy, R1=initial step.
------------------------------------------------------------------------------
bs                  # integrator
 Bulirsch-Stoer integrator. BS/S with S=all,spf,A. BS is equivalent
 to BS/all. Parameters: I,R,R1; I=order, R=accuracy, R1=initial step.
------------------------------------------------------------------------------
sil                 # integrator
 Short iterative Lanczos integrator. SIL/S with S=all,A.
 Parameters: I,R(,S); I=order, R=accuracy, S=standard,novel.
------------------------------------------------------------------------------
csil                # integrator
 Arnoldi-Lanczos integrator. "sil" chooses automatically between the real and
 complex Lanczos version. csil forces the use of the complex one.
 Parameters: I,R(,S); I=order, R=accuracy, S=standard,novel.
------------------------------------------------------------------------------
nohsym              # integrator
 The symmetry of the operators determined by the program is not used  when
 calculating the operator matrix elements.
------------------------------------------------------------------------------
imp-ortho           # integrator
 The ortho-normality of the SPFs is improved by a perturbative correction.
 Works only for RK5 and RK8 integrators.
------------------------------------------------------------------------------
ignore              #
 see "file" and "natpot"
------------------------------------------------------------------------------
autoblock           # init_wf
 A set of suitable A-vectors for a Block-Davidson run is
 automatically generated.
------------------------------------------------------------------------------
read1d              # operator (Labels-Section)
 read1d{S1,S2} . S1 = path of file containing the data, per
 grid-point one number in one line. S2 = "ascii" or "binary".
------------------------------------------------------------------------------
readsrf             # operator (Labels-Section)
 readsrf{S1,S2} . S1 = path of file containing the data, per
 grid-point one number in one line. S2 = "ascii" or "binary".
 See HTML docu (Hamiltonian Documentation/Labels Section) for ordering
 of the data. Use read1d for one dimensional potentials.
------------------------------------------------------------------------------
external1d          # operator (Labels-Section)
 external1d{S1} . S1 = path-name of file containing the data.
 Each line contains two numbers, (x,V) or (t,E-field), etc.
 The data on file will be interpolated.
------------------------------------------------------------------------------
realphi             # run
 After each orbital relaxation, the real part of the SPFs will be taken.
 This is useful, if FFT or PLeg are used in an rDAV or rrDAV run.
------------------------------------------------------------------------------
print-npot          # operator
 Full information on natpots is printed to op.log file.
------------------------------------------------------------------------------
freeze              # run
 freeze=I1(,I2,..)  The numbers I1, I2,.. define the modes to be frozen,
 i.e. these modes are not propagated or relaxed. Useful for Impr.Relax.
------------------------------------------------------------------------------
reduce-pf           # operator
 reduce-pf = I R1 R2 ... I denotes the number of a natpot and R1 is the
 cutting weight for natpot mode 1, etc.
------------------------------------------------------------------------------
skip1dav            # run
 See relaxation
------------------------------------------------------------------------------
converged           # run
 converged= R(,S) . An improved relaxation will be stopped if the sum of the
 two last absolute energy changes is < R in unit S.
------------------------------------------------------------------------------
natpotstop          # run
 natpopstop=R(,I(,I1)) . The propagation will be stopped when the lowest
 natural population for the mode number I exceeds the threshold R.
------------------------------------------------------------------------------
sym2kleg            # init_WF
 sym2kleg = I (,I1,...) . I = Number of 4D-mode (2x KLeg/K) which is to
 be symmetrized such that phi(θ1,k1,θ2,k2) = phi(θ2,k2,θ1,k1).
------------------------------------------------------------------------------
asym2kleg           # init_WF
 sym2kleg = I (,I1,...) . I = Number of 4D-mode (2x KLeg/K) which is to
 be asymmetrized such that phi(θ1,k1,θ2,k2) = -phi(θ2,k2,θ1,k1).
------------------------------------------------------------------------------
twall               # run
 twall = S . Similar to tcpu, but the elapsed wall-time (i.e. real time)
 is compared with twall.
------------------------------------------------------------------------------


------------------------------------------------------------------------------


------------------------------------------------------------------------------


------------------------------------------------------------------------------


------------------------------------------------------------------------------


------------------------------------------------------------------------------


------------------------------------------------------------------------------
