OCT-MCTDH Documentation

General 

Using Optimal control theory together with MCTDH is realized through the shell script "optcntrl" that iteratively optimizes the electric field to achieve an optimization target. The script invokes the MCTDH main program for solving the time-dependent Schrödinger equation and a background process (efield) to evaluate the electric field during the propagation. Both programs are communicating through named pipes.

Starting an optimal control job

To start optcntrl on a platform where MCTDH is installed it just type:
optcntrl  [-opt]  input_file
Possible options can be obtained with
optcntrl -h
--------------------------------------------------------------------------------
Purpose    : Optimal control calculation by running MCTDH iteratively.

Usage      : optcntrl [ -D -n -r -R -w -c -x -h ] inputfile

  -D dir   : denotes the directory where files are written to,
             (name in .inp file ignored, default: current dir).
  -n niter   perform niter iterations (ignore value in input file)
  -r         Restart calculation. Perform additional iterations.
  -R         Restart calculation similar to -r, but start with a
             forward calculation (if crashed during forward).
  -w         Allow to overwrite existing data.
  -c         Clean the current directory.
  -x suf     Use MCTDH/analyse executables with ending '.suf'.
  -h         Print this help text.

 For restart runs, the input file is parsed but no temporary input
 files are created. The iteration number is obtained from file
 jfunc.
 If you want to stop the calculation, create an empty file 'stop'.
 I.e. type 'touch stop' while being in the working directory.
--------------------------------------------------------------------------------
The argument needed by optcntrl is the name of an input file which is structured analogously to the input files of the MCTDH main Program. The input file is processed by the optcntrl script and temporary input files for the MCTDH main program are generated. Indeed, most parts of the input file remain unchanged and are piped into the temporary input files. Hence, it is possible to use most of the keywords and keyword placing as described in the MCTDH input documentation - exceptions are outlined below.

Input Documentation

Besides the Sections known from the MCTDH input two additional sections. the OCT-SECTION containing control parameters and the TARGET-SECTION specifying the control target, have to be specified. Below only new sections and those that are modified compared to the original sections of the MCTDH main program are outlined. For other options refer to the MCTDH input documentation.

Sections

XXX Description
RUN  Propagation and output-times, sampling rate of the electrical field, etc
PRIMITIVE-BASIS Definition of primitive basis. See MCTDH input documentation
SPF-BASIS Definition of the single-particle function basis See MCTDH input documentation
OCT Control parameters, functional to be used, initial guess.
OPERATOR Which operator to be used. See MCTDH input documentation
INIT_WF How to generate the initial wavefunction. See MCTDH input documentation
TARGET The target operator or target states to be used
INTEGRATOR Which integrator to be used, and with what parameters. See MCTDH input documentation


RUN-SECTION

As within the MCTDH main program, the RUN-SECTION specifies the type of calculation to be performed, output to be written, etc. Within OCT two additional keywords for output can be specified.
Additional keywords
Keyword
Description
saveflds Save all fields obtained during forward propagation as "fieldf.i" where i is the number of the iteration.
targetpop  Save population of target state or operator obtained during forward propagation as "targetpop.i" where i is the number of the iteration.

For an optimal control run a number of keywords are required:
Required keywords
Keyword
Description
propagation Indicate a calculation of type propagation
optcntrl(=S) Indicates an optimal control run. S can be either pc to run in a predictor corrector mode or S=simprop. In the latter case simultaneous forward and backward propagations of the initial and target states are performed. This may be useful if the wave function to be saved becomes very large. With S=simprop saving the wave function can be avoided. Note: if S is not set or S=pc then also psi=double is required.
tfinal=R Sets the final time in fs where the control target has to be reached. Note that tinit should be zero.
tout=R Sets the time step for the sampling of the electric field. Note: if tpsi is given, then it has to be equal to tout.

The name keyword is not required in the RUN-SECTION. If name is given it specifies the work directory that contains all temporary files and output of the calculation. Otherwise the work directory is the directory from where the calculation is started.

As a consequence, external files specified in the input files such as natpot files in the operator file or files containing externally created initial and target states must be given either with absolute path or a path relative to the name directory. Exact calculations are not implemented yet, i.e., the keyword exact must not be used.


OCT-SECTION

The OCT-SECTION contains control parameters and parameters determining the initial guess field. Also the type of functional to be used is specified here.
Keyword
Description
guess=R R1 (S) Parameters for the initial field. R: field strength (prefactor), R1 frequency of the field, S: (optional) units of R,R1 - either "eV", "au" or "cm-1". There must not be further keywords in this line of the input file.
penalty = R R is the penalty factor for strong fields. R has to be given in au (Note that the SI unit of the penalty factor is m^2 s/V^2.)
iterations = I Sets the total number of Iterations to be performed.
operator=S The operator S used as dipole operator.
functype=S Optional keyword for optimizations with multiple target states. S can be chosen as "alignphs" or "default". If S=alignphs the population part of the control functional will be |sum_i <Psi_i(T)|Psi_tar,i>|^2, i.e., the phases of the single contributions will be aligned during the optimization process. In case of S=default the functional will be sum_i |<Psi_i(T)|Psi_tar,i>|^2.


TARGET-SECTION

The target section can be used to either construct a target state, or to specify a target operator. If a target state is constructed, the TARGET-SECTION will be treated as an INIT_WF-SECTION. (see MCTDH input documentation)

If the expectation value of a target operator is to be optimized the only keyword given in this section is:
Keyword
Description
operator=S Optimize the expectation value of operator S. S has to be time-independent
(OCT is not yet implemented for time-dependent target operators).
If operator is set, all other lines in this section are ignored.


Multi-Target optimizations

Multi target optimizations can be performed using the multi-packet algorithm. Within the SPF-BASIS-SECTION the keyword
packets=n
has to be set,where n is the number of targets and initial states. Accordingly, within the INIT_WF-SECTION and the TARGET-SECTION multi-packet wave functions have to be constructed.


Operator file

The operator file must contain at least two operators, the system operator - including the dipole operator multiplied with the electric field - and a separate operator containing dipole operator alone. If the control target is to maximize the expectation value of an operator, e.g. the projector on an electronic state, this operator has to be defined as a separate operator as well.

Example input: System and dipole operator using a 2-D modified Henon-Heiles Potential

# System Hamiltonian
HAMILTONIAN-SECTION
---------------------------------------
  modes         |  X   | Y    | Time
---------------------------------------
1.0             |  KE  | 1    | 1
0.5             |  q^2 | 1    | 1
-lambda/3.0     |  q^3 | 1    | 1
lambda^2/16.0   |  q^4 | 1    | 1
1.0             |  1   | KE   | 1
0.5             |  1   | q^2  | 1
lambda^2/16.0   |  1   | q^4  | 1
lambda          |  q   | q^2  | 1
lambda^2/8.0    |  q^2 | q^2  | 1
 -mu            | 1    | q    | field
 mu/2.0         | q    | q    | field
---------------------------------------
end-hamiltonian-section


# Dipole operator as above but without electric field
HAMILTONIAN-SECTION_dipole
---------------------------------------
    modes       |  X   | Y
---------------------------------------
 mu             | 1    | q
-mu/2.0         | q    | 1
---------------------------------------
end-hamiltonian-section
The entry field in the Time column has to be specified in the LABELS-SECTION:
LABELS-SECTION
field = external1d{fieldf.dat}
END-LABELS-SECTION
The file fieldf.dat is generated by optcntrl and holds the sampled electrical field.

Using natpots as dipole operators

When using a multi-dimensional natpot as dipole operator, it is expanded into a table of single-mode operators within MCTDH. To ensure that this does not lead to overwriting the "field" entry the modes contained in natpots should be filled with dummy entries.

Example: V is the label for a natpot file spanning the modes X and Y:

HAMILTONIAN-SECTION
---------------------------------------
  modes         |  X   | Y    | Time
---------------------------------------
1.0             |  KE  | 1    | 1
1.0             |  1   | KE   | 1
...

1.0             |  V   | 1    | field     # entry for mode Y
                                          # filled with dummy '1'
---------------------------------------
end-hamiltonian-section


Output files

Besides the usual usual output created by MCTDH several Output files are written. The list below gives a short overview about the files and their structure.
overlaps
jfunc
fieldf.<i>
targetpop.<i>

Example Inputs