Possible options can be obtained with
optcntrl [-opt] input_file
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.
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 |
|
|
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:
|
|
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.
|
|
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. |
If the expectation value of a target operator is to be optimized the only keyword given in this section is:
|
|
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). |
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.
packets=n
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-sectionThe entry field in the Time column has to be specified in the LABELS-SECTION:
LABELS-SECTION field = external1d{fieldf.dat} END-LABELS-SECTIONThe file fieldf.dat is generated by optcntrl and holds the sampled electrical field.
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
# HEAD # HEAD do iiter=1,maxiter iiter, (dble(ovlp(j)),imag(ovlp(j)),abs(ovlp(j))**2,j=1,ntarget) end do
# HEAD do iiter=1,maxiter iiter, jfuncp, jfunce, jfuncp + jfunce end dowhere jfunce is the contribution of the field in au and jfuncp= |sum_i <Psi_i(T)|Psi_tar,i>|^2
# HEAD do iiter=1,maxiter iiter,(abs(ovlp(j))**2, j=1, ntarget), jfuncp, jfunce, jfuncp + jfunce end dowhere jfuncp= sum_i |<Psi_i(T)|Psi_tar,i>|^2
do i=-3,nfin+2 i*tout, (fld(i,j), j=1, 3) end dowhere the 3rd and 4th columns contain the predicted fields. Time is given in au.
do i=1,nfin i*tout, sum, (ovtar(j), j=1, ntarget) end dowhere sum is the total target state population, i.e., jfuncp , and ovtar(j)=<Psi_j(t)|O_j|Psi_j(t)> of target operator O_j, with O_j being e.g. the projector onto target state j. Time is given in au.