Capabilities and Usage

Program Capabilities

The Heidelberg MCTDH package is more than just a program implementing the MCTDH wavepacket propagation method. Although this lies at the heart of the programs, the package has developed into a general tool for the study of nuclear dynamics. Here is a short list of some of the capabilities of the program:

In general, the input is made using ascii files. This enables a system to be set up with the minimum of effort. In particular, simple model system can be studied without any need to program. Options available include

Special features of the MCTDH wavepacket propagation are that:

Starting the Program

To start the program on a platform for which you have compiled it just type:
mctdh<ver>  [-opt]  arguments

where  ver is the version number (and optionally a "d" or a name) and  arguments specifies any arguments required by the program.

To find the possible options and arguments required for a program, the argument -h can be used. For example, to find the possible options for the MCTDH program version 8 release 5 type:

mctdh86 -h

As the help text says, typically an argument specifying the input file is required. Assume your input file is named test.inp and your current directory is the directory on which test.inp resides, then you may just type:

mctdh86 test
mctdh86 test.inp

In case you have employed the options "-d" and "-n myver" in the compilation of the program (see Compiling the Program in Installation and Compilation), and your input file is not stored in your current directory but in the one specified by  path, then you will have to type:

mctdh86d_myver path/test

Note that the usual bash shortcuts are allowed to specify the path, e.g. the constructs ../test or ~/test are possible.

You may also run the input file through the C preprocessor (CPP) prior to interpretation. This way, you can share basis sets, initial states or any other settings between several input files by using a statement of the form
#include ""
This assures automatic consistency for the settings in the include file(s). To invoke CPP prior to interpretation by MCTDH, type

mctdh86 -cpp test.inp

The output of CPP is saved in a temporary file in the directory where the input file resides. Please make sure that this directory has write permission for MCTDH. In addition to this, MCTDH saves the settings as it understands them in the file input in the name directory. You can check this to see whether MCTDH received the correct settings and CPP worked as desired.
Note that, when the -cpp option is used, it may be possible that CPP gets confused by comments starting with a hash character '#'. To be on the safe side, use C-style comments of the form
/* some comment */
Note that MCTDH interprets '/*' like '#', i.e. everything which follows til the end of the line is a comment and is thus ignored. The end-of-comment sign */ is only needed for CPP. Thus a comment /*..*/ must not go over several lines, on has to bracket each line individually.
For an example see inputs/allene_b.inp and inputs/
On top of include files, you may of course use any other of the multiple powerful features of CPP, such as environment variable dependencies or macros. A full documentation of CPP can be found on this Free Software Foundation webpage.

As a final example, a continuation run may be started as:

mctdh86 -c -I name -tfinal 250.0d0

The input is now taken from the file name/input rather than requiring a  .inp file. 

The use of options is often more convenient than changing the input file. For example, parameters are used to specify the input or the Hamiltonian. If different values are required for different calculations, one can either have different files specifying the different operators, or else different calculations can be started using the -p option, followed by a parameter name and a parameter value. E.g.:

mctdh85 -p jtot 8 -p omega 0.35,eV test.inp

NB: Parameters are always real numbers.

Finally, the command

mctdh86 -ver

prints information about the program version, included potential energy surfaces, and the date and time of the compilation. And the command

mctdh86 -max

lists the set of the currently used maximal parameter values.

Input Parameters

The input file contains lines of input keywords and parameters. These are detailed in the Input documentation. Parameters may alternatively supplied a options. See above.

Output Data

Data files are created in a directory specified in the .inp file. Which data files are created depends on the keywords in the RUN-SECTION of the input file. See "Run-section" in the Input documentation.

The format of the various files is governed by the program version number, and are detailed in the Output documentation.


In order to apply a desired Hamiltonian, it is necessary to have an appropriate operator file. In this file, the operator is defined using symbols to represent the various one- or multi-dimensional operators. For simple operators, these symbols are known to the program, and are called "internal terms". Other operators can be defined and read from other sources as "external terms". For details see Hamiltonian documentation.

Stopping the Program

During a calculation the program can be stopped in a controlled way such that the calculation can be resumed later. This is done employing the stop file.