Purpose: Read an MCTDH oper file and convert to a
         Hamiltonian canonical polyadic decomposition (HCPD)
         which is subsequently optimized using ALS.

  Usage:  compactoper [-h|-?|-ver]  [-mnd -o -l -c -C -CC
                                 -r -R -s -n -g -w -f -spd -ev -d -v -D]
   vers:  Program version (e.g. 85 for version 8.5)
    d/D:  Indicates a debug version
      P:  Compiled with OpenMP support.

 optn: -h           : Print this help-text.
       -?           : Print this help-text.
       -ver         : Version information.

       -mnd         : Make Name Directory. Creates the name directory, if not existent.
       -w           : Allow overwrite.
       -f           : Override error messages in case kinetic energy is
                      suspected. See note 2 below. Default: not set.
       -c           : Continue obtimizing an existing HCPD file.
       -C           : Same as -c but reset iteration counter.
       -CC     : Same as -C but reads the initial CPD/HCPD-file from directory .
       -pes         : The operator is a potential and read from
                      a "pes" file instead of an "oper" file
                      The resulting file will be a "cpd" file rather
                      than a "hcpd" file.
       -r      : Rank of the resulting CPD/HCPD-fit.
                      Default: half the number of terms
                      of the original read-in operator.
       -H           : Enforce HCPD fit to be Hermitian using
                      Hermitian and Hermitian conjugate single
                      particle operators.
                      (requires rank to be an even number).
       -H1     : Initial guess (and any on-the fly added)
                      single particle operators are initialized as
                       0: random
                       1: random, hermitian
                      -1: random, anti-hermitian
                      default: random. Cannot be used with -H option.
       -O      : Use Hamiltonian  from the oper file (default ="system")
       -a     : Regularization, default:  sqrt(machine_precision).
       -s [,S]: Stop if |oper-fit| is less than .
                      Default: not set.  may bear a
                      unit S [au, eV, meV, cm-1]. default a.u.
       -o           : Write overlap matrix of the fit basis on exit.
                      Default: not set.
       -l           : Write coefficients of the fit on exit.
                      Default: not set.
       -z      : Compress with error  before optimization.
                      Compression is done using an SVD of the single-
                      particle operators,  is the sum of the
                      squared singular values that are neglected
                      devided by the sum of all squared singular values.
       -spd   : Solve ALS using Cholesky decomposition with
                      uniform regularization on the diagonal.
                      If neither -spd nor -ev is set, then -spd with
                      regularization=sqrt(machine_precision) is assumed.
       -ev    : Solve ALS using eigen-decomposition with
                      regularization of smallest eigenvalues.
       -n      : Maximum number of iterations of ALS optimizer, default 1000.
       -g : Do not start with full rank but with rank  
                      and increase every  iterations by the same amount.
                      If an initial guess is read from file the starting rank
                      will be that of the fit from file but the rank increment
                      will be as given by .
       -x      : Use iterative subspace extrapolation (DIIS) with 
                      vectors (default: not set)

       -I      : Read original operator file  from . Default: current directory
       -J      : Read dvr file  from . Default: same as oper file.
       -D     : Write output to . Default: current directory.

       -noblas      : This program relies heavily on being linked to an
                      optimized and parallel BLAS/LAPACK installation.
                      Use this flag if you compiled with OpenMP support.
                      but linked to the default BLAS/LAPACK library.

      IMPORTANT (1):
         Using a parallel BLAS/LAPACK library is usually sufficient
         for a good performance. Using OpenMP on top of this for
         other parts of the program may lead to some speed up
         especially for large fit and operator ranks (it may
         however also slow the program down in some cases).

      IMPORTANT (2):
         Do not use this program on kinetic energy operators!
         Even if the resulting number of terms is smaller, MCTDH calculations
         are likely much slower. Use this program on operators where
         all or most single-particle-operators are matrices (like in SQR)
         or if all single-particle-operators are diagonal (see -pes option).