KEMBAR78
MCTDH Users Guide | PDF | Typefaces | Applied And Interdisciplinary Physics
0% found this document useful (0 votes)
32 views209 pages

MCTDH Users Guide

The Heidelberg MCTDH Package User's Guide provides comprehensive instructions for using the multi-dimensional quantum dynamics software, including tutorials on various calculations such as absorption spectra and reaction probabilities. It covers topics from defining calculations and setting up Hamiltonians to analyzing results and optimizing functions. This version, released on August 7, 2024, is authored by a team from the Theoretical Chemistry Institute in Heidelberg, Germany.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views209 pages

MCTDH Users Guide

The Heidelberg MCTDH Package User's Guide provides comprehensive instructions for using the multi-dimensional quantum dynamics software, including tutorials on various calculations such as absorption spectra and reaction probabilities. It covers topics from defining calculations and setting up Hamiltonians to analyzing results and optimizing functions. This version, released on August 7, 2024, is authored by a team from the Theoretical Chemistry Institute in Heidelberg, Germany.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 209

The Heidelberg MCTDH Package:

A set of programs for


multi-dimensional quantum dynamics.

User’s Guide

Version 8
Release 6 Revision 7

Authors:
G. A. Worth, M. H. Beck, A. Jäckle, H.–D. Meyer, F. Otto, M. Brill, and O. Vendrell

Address:
Theoretische Chemie, Physikalisch–Chemisches Institut,
Im Neuenheimer Feld 229, D–69120 Heidelberg, Germany
Email: Hans-Dieter.Meyer@pci.uni-heidelberg.de

August 7, 2024
Contents

List of Tables VI

List of Figures VII

List of Examples VIII

Copyright IX

1 Introduction 1

2 An MCTDH tutorial 3
2.1 Determining the absorption spectrum for the photodissociation of NOCl . . . 3
2.2 Determining state populations for the photo-excitation of pyrazine . . . . . . 7
2.3 Determining reaction probabilities for the exchange reaction of H+H2 . . . . 9
2.4 Determining the vibrational spectrum of LiCN . . . . . . . . . . . . . . . . . 10
2.5 Determining the vibrational spectrum of CO2 by filter-diagonalisation . . . . 12
2.6 Determining eigenstates by improved relaxation . . . . . . . . . . . . . . . . 14
2.7 Determining eigenstates by block improved relaxation . . . . . . . . . . . . 15
2.8 Propagating a statistical ensemble to simulate systems at
finite temperature and investigate thermal effects . . . . . . . . . . . . . . . 18
2.9 Using potfit and chnpot to fit a surface to ab initio data points . . . . . . . . 19
2.9.1 Transforming the ab initio data to product form . . . . . . . . . . . . 19
2.9.2 Interpolating the natural potential to a new primitive grid . . . . . . . 20
2.10 Optimizing an external field with Optimal Control Theory (OCT) . . . . . . . 21
2.11 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3 Defining the type of calculation to be made 23


3.1 Specifying the task for MCTDH . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Specifying the desired output . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3 Propagating a wavepacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.4 Relaxing a wavepacket to produce the lowest eigenstate . . . . . . . . . . . . 25
3.5 Improved relaxation. Generation of excited eigenstates * . . . . . . . . . . . 26
3.6 Performing a numerically exact calculation . . . . . . . . . . . . . . . . . . 29
3.7 Diagonalising the Hamiltonian using the Lanczos algorithm . . . . . . . . . . 30
3.8 Starting a calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

I
II Contents

3.9 Continuing or stopping a calculation * . . . . . . . . . . . . . . . . . . . . . 31


3.10 Using parallel shared memory hardware * . . . . . . . . . . . . . . . . . . . 31
3.11 Using parallel distributed memory hardware * . . . . . . . . . . . . . . . . . 34

4 Selecting a DVR/FBR-representation for the primitive basis 38


4.1 Available DVR/FBR-representations . . . . . . . . . . . . . . . . . . . . . . 38
4.2 Hermite and radial Hermite DVR . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3 Legendre DVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Sine DVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 Exponential DVR and fast Fourier transform . . . . . . . . . . . . . . . . . . 41
4.6 Spherical harmonics FBR * . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.7 Restricted Legendre DVR * . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.8 Extended Legendre DVR and Two-Dimensional Legendre DVR * . . . . . . 44
4.9 Three-Dimensional rotational DVR * . . . . . . . . . . . . . . . . . . . . . . 45

5 Defining the single-particle basis 47


5.1 Specifying the number of single-particle functions . . . . . . . . . . . . . . . 47
5.2 Selecting degrees of freedom from a large system * . . . . . . . . . . . . . . 48
5.3 Combining modes to produce multi-dimensional single-particle functions . . 48

6 Setting up the Hamiltonian 50


6.1 The operator file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2 Defining numerical constants . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.3 Using symbolic expressions to define the Hamiltonian . . . . . . . . . . . . . 53
6.4 Defining labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.5 Implementing user-defined 1D-operators . . . . . . . . . . . . . . . . . . . . 56
6.6 Defining new symbolic expressions * . . . . . . . . . . . . . . . . . . . . . 56
6.7 Implementing separable potentials * . . . . . . . . . . . . . . . . . . . . . . 58
6.8 Implementing non-separable potentials (potential surfaces)* . . . . . . . . . 60
6.9 Incorporating natural potentials . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.10 Using complex absorbing potentials (CAPs) . . . . . . . . . . . . . . . . . . 64
6.11 Altering a Hamiltonian from input file or command line * . . . . . . . . . . . 66
6.12 Setting up auxiliary operators * . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.13 DOF, mode, and muld potentials . . . . . . . . . . . . . . . . . . . . . . . . 69
6.14 Golden rules for writing operator files . . . . . . . . . . . . . . . . . . . . . 71

7 Generating the initial wavepacket 73


7.1 Building Gaussian functions as initial functions . . . . . . . . . . . . . . . . 73
7.2 Setting up Legendre functions as initial functions . . . . . . . . . . . . . . . 74
7.3 Setting up extended Legendre functions as initial functions . . . . . . . . . . 75
7.4 Generating spherical harmonics as initial functions . . . . . . . . . . . . . . 75
7.5 Generating Wigner functions as initial functions . . . . . . . . . . . . . . . . 76
7.6 Generating eigenfunctions of a one-dimensional Hamiltonian . . . . . . . . 77
7.7 Reading the initial wavepacket from file . . . . . . . . . . . . . . . . . . . . 78
7.8 Diagonalising a multi-dimensional operator to create multi-dimensional SPFs* 79
Contents III

7.9 Generating an initial wavepacket using an operator* . . . . . . . . . . . . . . 79


7.10 Creating a set of initial wavepackets * . . . . . . . . . . . . . . . . . . . . . 80
7.11 Setting up (a)diabatically corrected initial wavepackets * . . . . . . . . . . . 80

8 Optimal choice on-the-fly of unoccupied single-particle functions 82


8.1 Initial optimal orbitals (InitOrb) . . . . . . . . . . . . . . . . . . . . . . . 82
8.2 Dynamical SPFs (spawn) . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

9 Choosing an integration scheme 85


9.1 Using the VMF integration scheme in an MCTDH calculation . . . . . . . . 85
9.2 Using the CMF integration scheme in an MCTDH calculation . . . . . . . . 86
9.3 Description of the available integrators . . . . . . . . . . . . . . . . . . . . . 87
9.4 Fine-tuning the integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
9.4.1 Propagating in natural or interaction picture orbitals * . . . . . . . . 89
9.4.2 Suitable integrator settings for improved relaxation . . . . . . . . . . 89
9.4.3 Evaluating potentials using the TDDVR or CDVR method * . . . . . 90

10 Treating non-adiabatic systems 91


10.1 Setting up the Hamiltonian for a non-adiabatic system . . . . . . . . . . . . . 91
10.2 Defining the primitive basis for a non-adiabatic system . . . . . . . . . . . . 92
10.3 Defining the single-particle basis for a non-adiabatic system . . . . . . . . . 92
10.4 Building the initial wavepacket for a non-adiabatic system . . . . . . . . . . 95

11 Treating bosonic systems 96


11.1 Setting up the Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
11.2 Modifying the input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

12 Analysing the results employing the Analyse programs 101


12.1 The Analysis Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
12.2 Interpreting the MCTDH output . . . . . . . . . . . . . . . . . . . . . . . . 102
12.3 Checking the accuracy of a calculation . . . . . . . . . . . . . . . . . . . . . 104
12.3.1 Checking the primitive basis size . . . . . . . . . . . . . . . . . . . . 104
12.3.2 Checking the single-particle function basis size . . . . . . . . . . . . 106
12.4 Checking the efficiency of a calculation . . . . . . . . . . . . . . . . . . . . 107
12.5 Watching the system’s evolution . . . . . . . . . . . . . . . . . . . . . . . . 107
12.6 Determining photo-dissociation and photo-absorption spectra . . . . . . . . . 109
12.6.1 Electronic excitations . . . . . . . . . . . . . . . . . . . . . . . . . . 109
12.6.2 IR-spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
12.7 Computing excitation and reaction probabilities . . . . . . . . . . . . . . . . 110
12.8 Monitoring state populations of non-adiabatic systems . . . . . . . . . . . . 112
12.8.1 Diabatic populations . . . . . . . . . . . . . . . . . . . . . . . . . . 112
12.8.2 Adiabatic populations computed with adpop . . . . . . . . . . . . . . 113
12.8.3 Adiabatic populations computed with adproj . . . . . . . . . . . . . 114
12.9 Plotting 2D cuts through the system density . . . . . . . . . . . . . . . . . . 117
12.10Plotting cuts through the potential energy surfaces . . . . . . . . . . . . . . . 118
IV Contents

13 Using the Potfit program 120


13.1 Transforming a potential to product form . . . . . . . . . . . . . . . . . . . . 120
13.2 Using ab initio data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
13.2.1 Using ab initio data directly with the mctdh program . . . . . . . . . 124
13.2.2 Using the potfit program . . . . . . . . . . . . . . . . . . . . . . . . 125
13.3 Extra flexibility, combining potfit and chnpot . . . . . . . . . . . . . . . . . 126
13.3.1 Dealing with an arbitrary primitive grid . . . . . . . . . . . . . . . . 126
13.3.2 Transforming between two natural potentials with chnpot . . . . . . 126
13.4 Manipulating potentials with the projection program * . . . . . . . . . . . . 128
13.4.1 Input and output files * . . . . . . . . . . . . . . . . . . . . . . . . . 128
13.4.2 Generating a Fourier-transformed potential * . . . . . . . . . . . . . 131
13.4.3 Using a Fourier-transformed potential in MCTDH * . . . . . . . . . 132
13.5 Downsizing previous potfits: the cutnpot and rdnpot functions . . . . . . . . 134

14 Using the Monte-Carlo Potfit program 135


14.1 Monte-Carlo Potfit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
14.2 Compiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
14.3 Selecting the sampling method . . . . . . . . . . . . . . . . . . . . . . . . . 136
14.3.1 Sampling methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
14.3.2 Remark on the Metropolis algorithm . . . . . . . . . . . . . . . . . . 138
14.3.3 Choosing a sampling method . . . . . . . . . . . . . . . . . . . . . . 138
14.3.4 Re-using and pre-sampling trajectories . . . . . . . . . . . . . . . . 140
14.3.5 Re-using densities or SPP . . . . . . . . . . . . . . . . . . . . . . . 140
14.4 Solving for the coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
14.4.1 Using conjugate gradients to solve for the coefficients . . . . . . . . 141
14.5 Reducing memory consumption . . . . . . . . . . . . . . . . . . . . . . . . 142
14.6 Restoring molecular symmetries . . . . . . . . . . . . . . . . . . . . . . . . 143
14.6.1 Simple symmetries . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
14.6.2 Coordinate-based expressions . . . . . . . . . . . . . . . . . . . . . 144
14.6.3 Periodic boundary conditions . . . . . . . . . . . . . . . . . . . . . 145
14.6.4 The usersym keyword . . . . . . . . . . . . . . . . . . . . . . . . 145
14.6.5 Using intermediate extended grids . . . . . . . . . . . . . . . . . . . 146
14.6.6 Symmetry checking . . . . . . . . . . . . . . . . . . . . . . . . . . 146
14.7 Implementing a surface outside the MCTDH operator library . . . . . . . . . 147
14.7.1 Using TANA for coordinate transformations . . . . . . . . . . . . . . 147
14.7.2 Linking to TANA (and other libraries) . . . . . . . . . . . . . . . . 148
14.8 Checking convergence and fit quality . . . . . . . . . . . . . . . . . . . . . 149
14.8.1 Convergence of the SPP . . . . . . . . . . . . . . . . . . . . . . . . 149
14.8.2 Convergence of the Coefficients . . . . . . . . . . . . . . . . . . . . 149
14.8.3 Testing the fit with other trajectories . . . . . . . . . . . . . . . . . . 151
14.9 Output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

15 Thermal averaging 155


Contents V

A The concept of the input file 157

B The Structure of the Programs 160

C The built-in symbolic expressions 161

D Structure of the WF array 175

E Installing the MCTDH package 176

F The svn-repository of the Heidelberg MCTDH package 181


F.1 Useful svn commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

List of MCTDH references 184

Index 195
List of Tables

2.1 Vibrational energies of CO2 computed with MCTDH/FD. . . . . . . . . . . . 14

4.1 Available DVR/FBR-representations for the primitive basis. . . . . . . . . . . 39

6.1 Selection of built-in symbolic expressions. . . . . . . . . . . . . . . . . . . . 54

9.1 Available integrators in dependence of the calculation type . . . . . . . . . . 86


9.2 Optimal orders for the ABM and BS integrators . . . . . . . . . . . . . . . . 88

10.1 Built-in symbolic expressions for non-adiabatic systems . . . . . . . . . . . 92

12.1 FWHM values of the window functions g̃k times the length of the autocorre-
lation function. Remember that the length of the autocorrelation function is
twice the propagation time, if the t/2-trick is used. . . . . . . . . . . . . . . . 109

14.1 Sampling methods and parameters . . . . . . . . . . . . . . . . . . . . . . . 139


14.2 Solvers for the coefficients. . . . . . . . . . . . . . . . . . . . . . . . . . . 141
14.3 Preconditioners for conjugate Gradients. . . . . . . . . . . . . . . . . . . . . 142
14.4 Output files of mcpotfit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

A.1 Input sections required for different calculation types . . . . . . . . . . . . . 157


A.2 Description of the calculation types. . . . . . . . . . . . . . . . . . . . . . . 158

C.1 Simple one-dimensional operators . . . . . . . . . . . . . . . . . . . . . . . 162


C.2 Operator symbols which require no arguments . . . . . . . . . . . . . . . . . 163
C.3 One-dimensional operators which require arguments . . . . . . . . . . . . . 169
C.4 One-dimensional potential energy curves . . . . . . . . . . . . . . . . . . . . 170
C.5 Two-dimensional operators (surface scattering) . . . . . . . . . . . . . . . . 171
C.6 Two-dimensional operators (C+ , C− ) . . . . . . . . . . . . . . . . . . . . . 171
C.7 Some general multi-dimensional operators . . . . . . . . . . . . . . . . . . 171
C.8 One-dimensional operators (Rf, Rfm, hKEh, hFRh, hdqh, hdqRh, dqR, dq2R) 172
C.9 Matrix operator symbols, used for an electronic degree of freedom . . . . . . 174

VI
List of Figures

2.1 The NOCl S1 absorption spectrum . . . . . . . . . . . . . . . . . . . . . . . 4


2.2 Overlay Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Diabatic state populations of pyrazine . . . . . . . . . . . . . . . . . . . . . 7
2.4 The pyrazine S2 absorption spectrum . . . . . . . . . . . . . . . . . . . . . . 8
2.5 H+H2 reaction probability . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6 The vibrational spectrum of LiCN . . . . . . . . . . . . . . . . . . . . . . . 11
2.7 The vibrational spectrum of CO2 . . . . . . . . . . . . . . . . . . . . . . . . 13
2.8 The 4D pyrazine absorption spectrum . . . . . . . . . . . . . . . . . . . . . 19

12.1 The natural orbital populations as a function of time for NOCl . . . . . . . . 107
12.2 The density as a function of time for NOCl . . . . . . . . . . . . . . . . . . 108
12.3 Total and projected flux of dissociating NOCl . . . . . . . . . . . . . . . . . 113

13.1 Main concepts involved in the usage of ab initio data with the MCTDH package127
13.2 Jacobi coordinates for a 4-atomic system . . . . . . . . . . . . . . . . . . . . 131

B.1 The structure of the MCTDH programs. . . . . . . . . . . . . . . . . . . . . 160

D.1 Structure of wave function . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

VII
List of Examples

4.1 An input file for a wavepacket propagation of NOCl . . . . . . . . . . . . . . 40


6.1 An operator file for the NOCl S1 state . . . . . . . . . . . . . . . . . . . . . 51
6.2 An operator file for a propagation using the modified Henon-Heiles Hamil-
tonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.3 A parameter file for the Henon-Heiles Hamiltonian . . . . . . . . . . . . . . 66
6.4 A surface file for the NOCl S1 potential . . . . . . . . . . . . . . . . . . . . 67
10.1 An operator file for the pyrazine 4-mode 2-state model system . . . . . . . . 93
10.2 An input file for the pyrazine 4-mode 2-state model system . . . . . . . . . . 94
11.1 An operator file for N = 3 one-dimensional bosons in a harmonic trap. . . . 99
11.2 An input file for N = 3 one-dimensional bosons in a harmonic trap. . . . . . 100
12.1 The analysis startup menu . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
12.2 An output file from a wavepacket propagation of NOCl . . . . . . . . . . . . 103
12.3 An input file for a potfit calculation . . . . . . . . . . . . . . . . . . . . . . 114
12.4 The input file for the mctdh-genoper-run . . . . . . . . . . . . . . . . . . 115
12.5 An operator file for a projection operator . . . . . . . . . . . . . . . . . . . . 115
12.6 An operator file for a off-diagonal projection operator . . . . . . . . . . . . . 117
12.7 The showsys menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
13.1 A potfit input file for the NOCl S1 surface . . . . . . . . . . . . . . . . . . . 121
13.2 A potfit output file for the NOCl S1 surface . . . . . . . . . . . . . . . . . . 123
13.3 A projection input file for the BMKP surface for (H2 )2 . . . . . . . . . . . . . 129
13.4 An operator file showing the use a Fourier-transformed potential. . . . . . . . 133
14.1 SAMPLING-SECTION in MC-Potfit . . . . . . . . . . . . . . . . . . . . . 137
14.2 SAMPLING-SECTION in MC-Potfit . . . . . . . . . . . . . . . . . . . . . 138
14.3 Symmetry operations within the Zundel cation (D2d ) . . . . . . . . . . . . . 143
14.4 Symmetry operations with periodic boundary conditions . . . . . . . . . . . 145
14.5 Excerpt from an output file for the Zundel cation (D2d ) . . . . . . . . . . . . 150
14.6 An input file for npotminmax . . . . . . . . . . . . . . . . . . . . . . . . . 151
A.1 An input file for a propagation using the Henon-Heiles Hamiltonian . . . . . 159

VIII
Copyright
The software and documentation in the MCTDH package is copyright
© 1996 – 2000 Graham A. Worth, Michael H. Beck, Andreas Jäckle, and Hans-Dieter Meyer.
Permission is granted to use and copy this software and its documentation. Further distri-
bution requires the agreement of the authors. Permission to modify the software is granted.
The authors would welcome if additions and bug fixes are made available to them for inclu-
sion in future releases of the package.
This software is provided “as-is” and without warranty of any kind.

Acknowledgements
The very first MCTDH program, later called version 1, was written by Uwe Manthe as part
of his PhD work in Heidelberg. The Heidelberg MCTDH package was created by G. A.
Worth, M. H. Beck, A. Jäckle, and H.-D. Meyer. Over the years several graduate students,
post-docs and visitors have made contributions to the MCTDH package. We list them in
chronological order: M. Ehara, M.-C. Heitz, A. Raab, S. Wefing, S. Sukiasyan, C. Cattarius,
F. Gatti, F. Otto, M. Nest, A. Markmann, M. R. Brill, O. Vendrell, M. Schröder, D. Pelaez-
Ruiz, Phillip S. Thomas, Ying-Chih Chiang, and David Mendive-Tapia. We are very, very
grateful to all of them!

Citations
When citing the MCTDH program package in the literature, the following citation should be
used:
G. A. Worth, M. H. Beck, A. Jäckle, and H.-D. Meyer.
The MCTDH Package, Version 8.2, (2000). H.-D. Meyer, Version 8.3 (2002), Version 8.4
(2007). O. Vendrell and H.-D. Meyer Version 8.5 (2013). Versions 8.5 and 8.6 contain the
ML-MCTDH algorithm. See http://mctdh.uni-hd.de
Current versions: 8.4.24, 8.5.17 and 8.6.3 (2023).
(Rather than “Current versions” you should give “Used version”)

A comprehensive description of the methods incorporated in the programs is in:


[1] M. H. Beck, A. Jäckle, G. A. Worth, and H.-D. Meyer.
The multiconfiguration time-dependent Hartree (MCTDH) method: A highly efficient algo-
rithm for propagating wavepackets. Phys. Rep. 324:1 (2000), 1.

The original paper is:

IX
X List of Examples

[2] H.-D. Meyer, U. Manthe, and L. S. Cederbaum.


The multi-configurational time-dependent Hartree approach. Chem. Phys. Lett. 165 (1990),
73.

The Multi-Layer (ML) extension is described in:


[3] O. Vendrell and H.-D. Meyer, Multilayer multiconfiguration time-dependent Hartree
method: Implementation and applications to a Henon-Heiles Hamiltonian and to pyrazine.
J. Chem. Phys. 134 (2011), 044135.

These three papers should be cited as well. You may further wish to include the references
[4] U. Manthe, H.-D. Meyer, and L. S. Cederbaum.
Wave-packet dynamics within the multiconfiguration Hartree framework: General aspects
and application to NOCl. J. Chem. Phys. 97 (1992), 3199.
[5] H.-D. Meyer and G. A. Worth.
Quantum molecular dynamics: Propagating wavepackets and density operators using the
multiconfiguration time-dependent Hartree (MCTDH) method. Theor. Chem. Acc. 109
(2003), 251.
[6] H.-D. Meyer, F. Gatti, and G. A. Worth, Eds.,
Multidimensional Quantum Dynamics: MCTDH Theory andApplications. Wiley-VCH,
Weinheim, 2009. ISBN: 978-3-527-32018-9
[7] H.-D. Meyer.
Studying molecular quantum dynamics with the multiconfiguration time-dependent Hartree
method, WIREs: Comput. Mol. Sci., John Wiley & Sons, Inc., 2 (2012), 351-374
volume=2,pages=351-374, DOI=10.1002/wcms.87

A list of publications on the MCTDH method itself and on applications of MCTDH is given at
the end of this Guide. The latest version of this list can be found on the MCTDH homepage:
http://mctdh.uni-hd.de
From this URL a review on the MCTDH scheme, Ref. [1], and the MCTDH feature article,
Ref. [5], [7], as well as other articles can be downloaded. There you will also find a small
bibtex file (mctdh.bib) which contains references to several MCTDH articles. This is for your
convenience.
Chapter 1

Introduction

The MCTDH method is an efficient algorithm for the solution of the time-dependent
Schrödinger equation. For a full description of the theory see the review [1]. You may
also wish to read the MCTDH book [6]. The MCTDH program has been developed to per-
form quantum mechanical wavepacket propagations employing this method. All the options
and variants of the MCTDH method presented in the review are implemented. Furthermore,
the MCTDH program can be used to propagate wavefunctions numerically exactly and to
diagonalise a Hamiltonian by the Lanczos algorithm. A variety of programs included in
the MCTDH package serve to analyse the results of a calculation and compute observable
quantities, which can directly be plotted with the help of G NUPLOT scripts.
The installation of the MCTDH package is described in Appendix E.
This documentation is intended to help the user by explaining, with many examples, how
to set up and run a calculation and analyse the results. For a calculation the Hamiltonian
operator and the input parameters must be defined. This is done in two A SCII files, named
operator and input file, which must have .op and .inp, respectively, as extension. The required
data is put in as keywords. In both files, the keywords are grouped together into sections,
each with a specific set of information. The sections start with a line containing the keyword
XXX-SECTION, and end with END-XXX-SECTION, where XXX is the name of the section.
Everything following a # is treated as comment.
How to set up the operator and input file will be detailed in the following chapters. Note,
however, that this Guide does not claim to be complete. Although the majority of options of
the MCTDH package — and in particular those being most important for your daily work —
is described, there are probably still options useful for you that are not documented here. For
the full list of options, see therefore the HTML manual. The HTML manual also describes
the installation process.
Some parts of the User’s guide are labelled as advanced topics, indicated by a “*” in
the table of contents. These parts contain information on features of the MCTDH package
that make the programs more convenient to use but do not extend their functionality. The
advanced topics also deal with options of the MCTDH package which are needed in special
cases only. You may skip these parts until you got more experienced with the MCTDH
package.
Please keep in mind the following typographical conventions which are designed to help
you reading the User’s Guide:

1
2 1 Introduction

Typewriter The typewriter font is used for literal characters, such as keywords and labels
given in the input files, the names of routines and variables, and extracts of the source
code.

Italics The italics font indicates arguments which are supposed to be substituted by the user.

Bold face Bold face emphasises the names of programs and scripts in the MCTDH Package,
and their options.

Sans serif The sans serif font is employed for files, directories, and paths.

UPPERCASE The different sections that arrange the input and operator files are given in
uppercase.

S MALL C APS Small capital letters are used for the names of persons as well as programs
that are not part of the MCTDH package.
Chapter 2

An MCTDH tutorial

When you have successfully installed the MCTDH package (see Appendix E), you have
various programs in the field of multi-dimensional quantum dynamics at your disposal. Be-
fore we go into the details of how to use these programs, we would like to invite you to a
short tour of the MCTDH package, by performing some exemplary calculations. On this trip
you will get an overview of the opportunities the MCTDH package offers. The tour shall
also demonstrate the ease of employing the program and give you an impression of the effi-
ciency of the code. A more comprehensive tutorial is provided by the lab-session. The
lab-session can be downloaded via SVN or from the MCTDH packages site.
First set up and move to a suitable directory in which to run the tutorial calculations
(e. g. $MCTDH DIR/tutorial or $HOME/tutorial), then follow the instructions below. The
tutorial uses standard problems. Once a calculation has been made, try to understand the input
files, they can be used as templates for other calculations. The expression $MCTDH DIR
occurring in the following examples stands for the path of the MCTDH-directory.

2.1 Determining the absorption spectrum for the photodissocia-


tion of NOCl
The photodissociation of NOCl is a simple photo-chemical reaction. After excitation from
the ground to the first excited state, S0 → S1 , the chlorine atom dissociates on a femto-second
time-scale. This results in a broad band for the absorption spectrum. This system was used
for the first application of MCTDH to a realistic system [4].
The calculation consists of two stages. First, the ground state wavefunction is generated
by energy relaxation of an initial guess wavefunction on the ground state surface, S0 . The
second stage then places this wavepacket on the excited state surface, S1 , leading to pho-
todissociation.

1. Copy the files $MCTDH DIR/inputs/nocl0.inp and $MCTDH DIR/inputs/nocl1.inp to


your tutorial directory, and create there the directories nocl0 and nocl1.
2. To perform the ground state relaxation calculation, type

mctdh86 nocl0

You will have to wait about 2 seconds. (The timings given in this manual are for a
3 GHz PC running under Linux).

3
4 2 An MCTDH tutorial

100
90
80
70
60
50
40
30
20
10
0
-10
0.6 0.8 1 1.2 1.4 1.6 1.8 2
Energy[eV]

Figure 2.1: The absorption spectrum for the NOCl molecule on excitation to the S1 state.

3. To perform the photo-dissociation calculation, type

mctdh86 nocl1

This will again take about 2 seconds.

NB There is now the option -mnd (make name directory) which allows you to skip the
creation of the name directory. E. g.

mctdh86 -mnd nocl1

will make the name directory before starting the calculation.


The calculation can now be analysed. Move to the directory nocl1 which contains all the
data files from the propagation.

1. To watch the system dissociating, type

showd1d86 -a -M -y 5 -sm f1

In order to understand the options and parameters, type showd1d86 -h and see the
HTML documentation. Try the other format options (-S, -T) and inspect the motion of
the other degrees of freedom (f2, f3). The program showd1d also supports interactive
plotting. Start the program with

showd1d86 -inter

and follow the menu options to select and alter the plot.

2. To plot the spectrum, type


2.1 Determining the absorption spectrum for the photodissociation of NOCl 5

autospec86 0.6 2.0 ev 0.0 1


plgen spectrum.pl 1:3

The first line produces a file, spectrum.pl, with data to plot the spectrum. This is done
from 0.6 eV to 2.0 eV. The file spectrum.pl has four columns, the first one is the energy
and the following ones display the intensity evaluated with a box, cosine, and cos2 fil-
ter (window function). The symbol ”1:3” chooses the third column, i.e. a cosine cutoff
function to allow for the finite propagation time. The result is shown in Fig. 2.1. In or-
der to understand the options and parameters, type autospec86 -h and see the HTML
documentation. Note that the spectrum shown is the Fourier-transform of the autocor-
relation function times the energy. Hence it is assumed that the ground state energy
is at zero, such that energy equals excitation energy. If this is not the case, use option
-e to shift the energy scale. The -FT option suppresses the multiplication with the
energy, showing directly the Fourier-transform. (NB The option -FT is now default.
Use option -EP to switch on the energy prefactor, or use -Mb <dipole-moment>, to
plot the properly normalized absorption spectrum in mega barns.)

To make life easier, there exist a number of bash scripts (so called pl-scripts) which auto-
matically call an analyse routine and plot the results. The above commands are equivalent to

plspec 0.6 2.0 ev

One may alternatively call plspec without arguments. The script will then prompt you for the
missing input. To choose a filter one may set the option -gx with x=0,1,..,5. Note that -g1 is
default. Finally, the command plauto plots the autocorrelation function, the command plnat
plots the natural populations, plqdq plots the expectation values of the coordinates, and the
commands plupdate, plupdate -e , and plspeed show information on the performance of
the integration. plall prints a list of all pl-scripts, but for more information see the HTML
documentation. Note that all pl-scripts support the -h option. We do recommend the use
of the pl-scripts!
The program showsys86 is a powerful tool for plotting 1D and in particular 2D views on
wavepackets and potentials. To plot the potential one first has to generate a so called pes file.
To do so, move up to the tutorial directory, where nocl1.inp is located, and type
mctdh86 -pes nocl1

This will generate the files pes, log.pes, and op.log.pes in the nocl1 name-directory. The
pes file is an operator file in which all terms containing derivative operators or CAPs are
deleted. The WARNING message which appears can be ignored. It just tells you, that the
mctdh program will not perform a propagation, although there is a keyword propagation
in the input file. Now move back to the name-directory and type
showsys86

A menu appears (see Example 12.7), which allows various options to be set. Go to menu
point 10 (type 10), and change the plot task to 2 = plot pes (type 2). Next input a 1 three
times and a 2D cut through the surface (with theta fixed to 1.545 radians) will pop up. Now
use menu point 20 = change coordinate section, i.e. chose another cut. If one gives x and
two numbers, a 1D plot will appear. After you have played around enough, go back to menu
point 20 and input
x y 2.1
6 2 An MCTDH tutorial

2.6

2.4

2.2
rv [au]

1.8

3.8 4 4.2 4.4 4.6 4.8 5 5.2 5.4 5.6

Figure 2.2: Overlay plot, wavepacket on potential. The Wavepacket density is shown for the times t = 0, 10, 20,
30 fs. The density is obtained by integrating |Ψ|2 over all angles, whereas the potential contour lines are obtained
by fixing the angle to 2.1 rad.

Then use menu point 5. You will be asked for a file name. Chose any convenient name, e. g.
xyz. The plot data is then written to the file xyz for later use.
Next we want to inspect the wavefunction. Go to menu point 10 and chose 5 = plot
reduced density. The density, i.e |Ψ|2 integrated over all coordinates, except those specified
by x and y (that is integrated over all angles in the present case), will be shown. Input a 1
three times and you will see the initial density. Pressing RETURN will display the density
propagated by one time step, and so on. After you have returned to the menu, chose point 400
= Overlay plots and then 410 = File for overlay and enter the file name (xyz). After inputting
1’s you will now see an overlay plot, i. e. the wavepacket on top of the contour lines of the
potential.
With menu points 240 and 245 one may switch off the legend (or keys) and the title. Menu
point 285 allows to take larger time steps and with point 280 one may switch to different plot
forms, e. g. to plot all time slices at once. Such a plot is shown in Fig. 2.2.
Inspect the A SCII files of the name directories, in particular output, log, and timing. The
file input contains a copy of the input file, the options, and the operator file. Thus, it tells
you exactly what you have been doing. Since an NOCl run is so fast, NOCl is ideally suited
for testing. Just play around with it! You may e. g. change the numbers of single particle
functions or alter the integrator accuracies. You also may try the options, e. g. to start a
continuation run type:

mctdh86 -c -tfinal 50 nocl1

Type mctdh86 -h to obtain the list of options.


2.2 Determining state populations for the photo-excitation of pyrazine 7

1
State 1
State 2

0.8

0.6

0.4

0.2

0
0 20 40 60 80 100 120
time[fs]

Figure 2.3: The diabatic state populations of the pyrazine molecule after excitation to the S2 state, calculated
using a 4-mode model.

2.2 Determining state populations for the photo-excitation of


pyrazine
The pyrazine molecule contains a classic example of vibronic coupling. Two states, which are
close in energy, are coupled by motion along one vibrational mode, resulting in a broad spec-
trum for the upper state. This system can be described using the simple vibronic-coupling
model Hamiltonian.
The vibronic-coupling model Hamiltonian is well suited to the MCTDH method, being
already in the product form required for maximum efficiency. For further details of this
system, see Refs. [8–11], and the references therein.
In this tutorial, we use a simple 4-mode 2-state model. This qualitatively reproduces the
experimental spectrum after the addition of phenomenological broadening. The calculation
takes the ground state wavefunction (here a simple product of gaussians as the ground state
surface is harmonic), and places it on the S2 excited surface. Propagation then takes place,
and rapid population transfer to the S1 state is observed. Finally, the spectrum of the model
system is calculated.

1. Copy the file $MCTDH DIR/inputs/pyr4.inp, and create the directory pyr4.
2. To perform the photo-excitation calculation, type

mctdh86 pyr4

This will take about 20 seconds.

The calculation can now be analysed. Move to the directory pyr4 which contains all the
data files from the propagation.
8 2 An MCTDH tutorial

70

60

50

40

30

20

10

0
-1 -0.5 0 0.5 1
Energy[eV]

Figure 2.4: The absorption spectrum for the pyrazine molecule on excitation to the S2 state, calculated using a
4-mode model with phenomenological broadening.

1. To plot the diabatic state populations, type

rdcheck86 -g 1 0
gnuplot -persist chk.pl

or, more simply, type

plstate

The result is shown in Fig. 2.3. Note that very fast transfer occurs to the S1 state. At
around 80 fs the system returns to the conical intersection connecting the two states,
and a second transference of population occurs.

2. To plot the spectrum, type

autospec86 -e -0.2258 eV -1.0 1.0 eV 30 1


plgen spectrum.pl 1:3

The first line produces a G NUPLOT file with data to plot the spectrum from -1.0 eV to
1.0 eV. An energy shift of 0.2258 eV has been added due to the zero point energy of
the system. A phenomenological broadening with a relaxation time of 30 fs has also
been added. The result is shown in Fig. 2.4. Again, the same figure is generated more
simply by typing

plspec -e -0.2258 eV -1.0 1.0 eV 30 1


2.3 Determining reaction probabilities for the exchange reaction of H+H2 9

2.3 Determining reaction probabilities for the exchange reaction


of H+H2
The H+H2 system is the smallest reactive molecular system, but it is the prototype of all
three atom reactions. As interaction potential we will use the LSTH potential energy surface.
This is a full 3D surface and as such must be first transformed to MCTDH product form.
The Potfit program can accomplish this fast and reliably (at least as long as the full primitive
product grid is not too large). After the wavepacket is propagated the reaction probability
is determined by flux analysis. See the MCTDH review [1] or the original publication [12]
for more details. Here we will perform a scattering calculation for vanishing total angular
momentum (J = 0) only. Thus the result is a initial-state selected reaction probability and
not a cross section.

1. Copy the files $MCTDH DIR/pinputs/lsth.inp and $MCTDH DIR/inputs/hh2.inp to your


tutorial directory, and create the directories lsthfit and hh2.
2. To perform the potential fit calculation, type

potfit86 lsth

This will take about 5 seconds.


3. To perform the scattering calculation, type

mctdh86 hh2

This will take less than 5 minutes.


4. To perform the flux analysis, move to the directory hh2 and type

flux86 -e lsth 0.4 2.0 ev rv

This will take less than 10 seconds. The option -e lsth sets the zero point of the
energy to the minimum of the H2 potential curve. The other arguments set the energy
interval to 0.4 – 2.0 eV and select the rv-CAP for analysis.

The results of the calculation can now be inspected. Type

plflux

and you will see the reactive flux, i. e. the quantum flux going into the rv–CAP, and the
energy distribution of the initial wavepacket. The reaction probability is just the quotient of
these two data sets. It can be seen by typing

plflux -r

The results are shown in Fig. 2.5. One may compare them with those of reference [13].
Inspect the A SCII files of both name directories, lsthfit and hh2. The Potfit program will
be described in more detail later in this guide. The motion of the wavepacket can again be
visualised with the aid of showd1d86. In particular the θ degree of freedom is interesting.
Type
10 2 An MCTDH tutorial

40

0.8

30

flux / energy distribution


reaction probability

0.6

20
0.4

10
0.2

0 0
0.5 1 1.5 2
Energy [eV]

Figure 2.5: This picture shows the reaction probability of the system H+H2 (ν=0,j=0) for total angular momen-
tum J=0 (solid line), which is the quotient of the quantum flux going into the rv-CAP (dashed line) and the
energy distribution of the initial wavepacket (dotted line).

showd1d86 -a -y 10 f3

and repeatedly press RETURN to step through the pictures. Initially the molecule is in the
j = 0 rotational state and the density is evenly distributed over all angles. After about 20 fs
the wavepacket reaches the saddle-point region and the system is in the transition state. The
transition state is collinear and consequently the angular distribution is now strongly peaked
at zero degrees. At later times a more evenly angular distribution is again assumed. You may
also inspect the motion of the other two degrees of freedom.

2.4 Determining the vibrational spectrum of LiCN


The MCTDH program is not only capable of propagating wavepackets but also of diago-
nalising a Hermitian Hamiltonian operator, by employing the Lanczos algorithm. The time-
independent Schrödinger equation is then solved rather than the time-dependent one. This
feature, and similarly the possibility of performing a numerically exact propagation, has been
implemented into the mctdh package because then the very convenient operator generation
is available for these tasks. Lanczos diagonalisation and exact propagation are, of course,
possible only for comparatively small problems.
As a small example of this feature let us determine the vibrational spectrum of a two-
dimensional model of the LiCN electronic ground state, with the CN bond length frozen at
its equilibrium value. The initial wavefunction is chosen arbitrarily; the intensities thus have
no physical meaning. To keep the CPU time short only a small number of Lanczos iterations
will be made. The number of iterations is sufficient to converge the lowest 0.5 eV of the
spectrum.
2.4 Determining the vibrational spectrum of LiCN 11

0.05

0.045

0.04

0.035

0.03
Intensity

0.025

0.02

0.015

0.01

0.005

0
-6.6 -6.5 -6.4 -6.3 -6.2 -6.1
Energy

Figure 2.6: The vibrational spectrum of LiCN.

1. The LiCN surface is not linked by default. It must be first linked to the program by
re-compiling MCTDH.

compile -i licn mctdh

It might be that you need to copy licnsrf.f from the addsurf directory to
source/surfaces. Alternatively you may set a link (run the script mklinks). Type
mctdh86 -ver to inspect, which surfaces are included. See the HTML documen-
tation Installation and Compilation / Compiling the Programs and Hamiltonian Docu-
mentation / Available Surfaces for more details.

2. Copy the file $MCTDH DIR/inputs/licn.inp, and create the directory licn.
3. To diagonalise the Hamiltonian, type

mctdh86 licn

This will take less than 20 seconds.

The calculation can now be analysed. Move to the directory licn which contains all the
data files from the diagonalisation. The eigenvalues, intensities and error estimates for the
energies are stored in the A SCII file eigval.

1. To see the results, type e.g.

less eigval

The first line describes the entries of the eigval file.


12 2 An MCTDH tutorial

2. To plot the spectrum, type

pleigval -a -6.6 -x -6.1

This displays the spectrum in the converged energy range. The result is shown in Fig.
2.6. Note that energies with very small intensities are not visible. To display all lines,
add the option -l in order to use a logarithmic scale for the intensities.

2.5 Determining the vibrational spectrum of CO2 by filter-


diagonalisation
To Fourier transform the autocorrelation function is the straightforward procedure to extract
eigen-energies from a time evolved wavepacket. This, however, requires a very long prop-
agation time T as the resolution improves only like ~/T . This limit, set by the uncertainty
relation, can be overcome when employing the filter-diagonalisation (FD) method introduced
by Neuhauser. Our particular version of the FD method is discussed in Refs. [14, 15].
The following example shall show how filter-diagonalisation and MCTDH-propagation
can be combined. The example is similar to the problem studied in Ref. [15], however, here
we sacrifice some accuracy in order to gain speed.

1. Copy the file $MCTDH DIR/inputs/co2t.inp, and create the directory co2.

2. Copy the file $MCTDH DIR/finputs/co2ft.inp to the directory co2.


3. To perform the MCTDH propagation, type

mctdh86 co2t

This will take less than 2 minutes.

As done in the previous examples, you should study the log, output, timing, etc files and in-
vestigate natural– and grid–populations. In particular it is useful to investigate the spectrum.
Thus type

plspec -e -2534.52981 cm-1 -200 7000 cm-1

The option -e -2534.52981 cm-1 shifts the zero point of the energy scale by
−2534.52981 cm−1 which is the ground state energy. Thus, the ground state is now ex-
pected at zero. Try the options -g 0, -g 1, and -g 2 and you will understand, why -g 1
is the default. The plot depicts the spectral lines having a width of almost 100 cm−1 . This
demonstrates that a precise determination of eigen-energies by Fourier transform of the au-
tocorrelation function is difficult. (See Fig. 2.7)
To continue with the tutorial move to the co2 directory and type

filter86 co2ft

This runs the filter-diagonalisation and creates the files filter.eig, filter.inp, and filter.log. The
file filter.inp repeats the input file, but additionally shows all default and computed param-
eter values. The file filter.log displays what filter86 has been doing. It also contains a list
of all computed eigenvalues and intensities. The file filter.eig again contains the computed
2.5 Determining the vibrational spectrum of CO2 by filter-diagonalisation 13

350

300

250

200

150

100

50

0
0 1000 2000 3000 4000 5000 6000 7000
Energy [cm-1]

Figure 2.7: The vibrational spectrum of CO2 as obtained by Fourier transform of the autocorrelation function
and by FD using the same autocorrelation function. For better visibility, the Fourier spectrum is shifted upwards
by 50 units.

eigenvalues, but omits those which lie outside the energy window or which are detected as
spurious according to an internal error measure.
Unfortunately, the file filter.eig may still contain spurious eigenvalues. These are detected
by performing several filter-diagonalisations with slightly different parameters and keeping
only those eigenvalues which are stable. To perform the additional filter-diagonalisation runs,
type
filter86 "file_outputname=f1,window_energypoints=150" co2ft
filter86 "file_outputname=f2,vp_principle = 1/H,filter_function=box" co2ft
The double quoted arguments of filter86 overwrite the values from the input file. We used a
different number of energy points (150 rather than 125) and a different variational principle
(1/H rather than H) together with a different damping function (box rather than cos) as
compared to the first filter-diagonalisation. (See the HTML documentation for details). The
output files are now f1.* and f2.*, respectively. A list of the stable eigenvalues together
with an error estimate based on the spread of the eigenvalues is produced by the command
fdmatch86 filter.eig f1.eig f2.eig | sort -n | fdcheck86 3 0 > results
You may inspect this data, cat results, and plot a stick spectrum
plfdspec -c -a -200 results

The content of the file results is compiled in Tab. 2.1 (columns 3–6) and compared with
experimental data (column 2).
To obtain all eigenvalues in this energy range, one has to run the propagation with different
initial states, either sequentially or (more efficient) in parallel by performing a multi-packet
propagation. Also, increasing the accuracy (more SPFs, e.g. 16/16/14) and increasing the
propagation time (e.g. 250 fs) will help to detect states of low intensity. See Ref. [15] for
details.
14 2 An MCTDH tutorial

Table 2.1: Vibrational energies (J = 0) of CO2 . The MCTDH/FD energies , EF D , are compared with experi-
mental ones, Eexp . ∆E and ∆I denote internal error estimates of the eigen-energies and intensities, respectively.
Missing entries specify states that have not been detected. In this case the intensity is taken from a larger cal-
culation and is shown in brackets. The missed states are all of very low intensity, except for state 26. Here the
computed state represents the two neighbouring states, 25 and 26. A calculation with a longer propagation time
or with several wavepackets will detect more states. (See Ref. [15]). All energies are given in cm−1 with respect
to the ground state energy.

No. Eexp EF D ∆E Intensity ∆I


0 0.000 -0.002 0.054 4.49d-2 3.32d-5
1 1285.414 1285.393 0.096 1.07E-1 3.05E-5
2 1388.188 1388.276 0.264 3.48E-2 7.77E-5
3 2349.148 2349.090 0.086 3.17E-2 2.26E-4
4 2548.374 2548.349 0.017 1.06E-1 3.65E-5
5 2671.113 2671.152 0.008 9.08E-2 3.00E-5
6 2797.154 2796.339 0.752 4.23E-3 2.10E-4
7 3612.845 3612.860 0.013 5.61E-2 7.65E-5
8 3714.789 3715.040 0.108 1.57E-2 9.32E-5
9 3792.679 3792.531 0.075 6.78E-2 2.16E-4
10 3942.480 3942.562 0.002 8.62E-2 3.35E-4
11 4064.101 4064.190 0.040 1.34E-2 2.31E-4
12 4225.043 (1.05E-4)
13 4673.332 (6.17E-5)
14 4853.622 4853.747 0.046 4.27E-2 1.62E-4
15 4977.828 4977.548 0.572 2.73E-2 3.41E-4
16 5022.273 5022.408 0.492 3.41E-2 1.61E-4
17 5099.668 (9.38E-4)
18 5197.251 5197.442 0.055 4.47E-2 8.24E-6
19 5329.746 5329.986 0.029 1.31E-2 6.07E-5
20 5475.283 5480.947 0.839 2.19E-4 1.84E-5
21 5667.488 (1.80E-7)
22 5915.216 (1.41E-4)
23 6016.687 (4.45E-4)
24 6075.984 6076.471 0.554 2.12E-2 1.50E-3
25 6227.915 6233.344 0.074 3.08E-2 8.89E-5
26 6239.852 (1.31E-2)
27 6347.956 6333.856 2.964 2.15E-3 3.33E-4
28 6435.398 6434.692 0.261 1.59E-2 6.00E-4
29 6503.081 (3.09E-6)
30 6588.730 6588.345 0.745 5.48E-3 2.46E-5

2.6 Determining eigenstates by improved relaxation


Improved relaxation is a MCSCF variant where the SPFs are optimised by relaxation (prop-
agation in negative imaginary time), but the A-vector is determined by diagonalisation of the
Hamiltonian matrix evaluated in the set of the present SPFs. In contrast to filter diagonalisa-
tion, improved relaxation yields not only the eigenenergies but also the eigenstates. Improved
relaxation is more accurate than filter diagonalisation, but also more elaborate, because one
has to perform a separate calculation for each state.

1. Copy the file $MCTDH DIR/inputs/co2 gs.inp to your tutorial directory and similarly
the files co2 sym.inp, co2 asym.inp, and co2 excite.inp.
2.7 Determining eigenstates by block improved relaxation 15

2. To perform the relaxation, execute the command:


mctdh86 -mnd co2_gs

and, after the job has finished, run the inputs co2 sym, co2 asym, and co2 excite. Move to
the directory co2 gs and type rdrlx -e to read the rlx info file. This produces the following
output.

time order q beta*1000 Energy[cm-1] ovl*1000 Delta-E


-2.0 0 0 0.000E+00 2922.190 202 862 0.0000 0.000E+00
0.000 15* 0 804.71296 2534.937 314 025 0.0000 -3.873E+02
0.500 11 0 999.98713 2534.663 002 346 0.0000 -2.743E-01
1.250 10 0 999.99715 2534.558 864 426 0.0000 -1.041E-01
2.000 9 0 999.99971 2534.535 729 282 0.0000 -2.314E-02
4.000 8 0 999.99990 2534.528 474 396 0.0000 -7.255E-03
6.000 6 0 0.293E-08 2534.528 204 472 0.0000 -2.699E-04
8.000 4 0 0.874E-10 2534.528 194 788 0.0000 -9.684E-06

WARNING: Davidson did not converge for 1 diagonalisations.

The star ⋆ at 15 indicates that that this Davidson diagonalisation did not converge. 16 David-
son iterations are needed for convergence, but in the input file the maximum number of
iterations was limited to 15. The non-convergence is of no relevance here, because all later
iterations converged. However, if non-convergence of the Davidson happens frequently, one
cannot trust the results, but has to repeat the calculation with a different integrator setting.
The first data line with the negative time gives the energy expectation value of the initial
wavefunction. The second line, t = 0.0, gives the energy obtained by diagonalising the
Hamiltonian represented in the orbitals of the initial wavefunction. Then the orbitals (SPFs)
are relaxed and the Hamiltonian matrix, built from the new orbitals, is diagonalised again.
This procedure is repeated till convergence is reached.
For the present example the convergence of the improved relaxation scheme is fast. beta
denotes the squared overlap of the current A-vector with the previous one. If beta is very
close to one, the difference from 1 is printed. ovl denotes the squared overlap of the current
wavefunction with the initial wavefunction. This data is evaluated only for relaxation=lock
runs. More information on the performance of the improved relaxation run is obtained when
dropping the option -e from rdrlx. (Try rdrlx -h). A graphical visualisation of the conver-
gence is provided by plrlx. Try plrlx, plrlx -a 3, and plrlx -E -l.
Inspect the outputs of the other relaxation runs in a similar way. Note that considerably
more Davidson iterations are needed for converging higher excited states. Note also that
the energy scale is shifted via the keyword rlxunit=cm-1,2534.528194 to display
directly the excitation energies. Inspect the input files and try to understand every line.
The tiny 3D problem CO2 is, of course, too simple to show the strengths of improved
relaxation. If you wish to solve some 6D problems, run the input files hono.dav.inp and
H2CS.∗.inp

2.7 Determining eigenstates by block improved relaxation


The block variant of improved relaxation is very useful if several low-lying states are to be
computed. It makes use of the single-set multi-packet feature of MCTDH, i. e. the different
16 2 An MCTDH tutorial

packages are formally put on different (single-set) electronic states. True electronic states,
either in multi-set or single-set formalism, can be added as well. Because the packets are
treated in single set, the SPFs are propagated (or relaxed) on a state-averaged mean field.
As there is only one set of SPFs, the SPFs cannot be optimal for one eigenstate, they are
optimized for the full block of eigenstates to be computed. Hence the block form will in
general require more SPFs to achieve the same accuracy as a (single) improved relaxation.
But because the block form generates several eigenstates at once, it is often more conve-
nient and sometimes even numerically more efficient. However, a block-relaxation requires
considerably more memory than a single relaxation.
The following example takes more computation time than the previous ones. It may be
skipped if one is not particularly interested in block improved relaxation.

1. Copy the file $MCTDH DIR/inputs/blkHONO.inp to your tutorial directory.


2. To perform the block-relaxation, execute the command:
mctdh86 -mnd blkHONO &

Edit the input file such that the numbers and keywords, which appear after “#” or “##”,
become valid. Then run the input again. The convergence of the eigenenergies is most con-
veniently visited by running the script rdrlx. The convergence can be inspected graphically
by running plbrlx, which is very similar to plrlx, but requires as argument the number of the
state to be plotted. The converged eigenenergies (in cm−1 ) obtained from these runs read as
follows:

blk.1 sing.1 blk.2 blk.3

0 0.006 0.000 0.000 0.000


1 93.992 93.973 93.974 93.972
2 600.920 600.872 600.873 600.871
3 710.781 710.623 710.625 710.621
4 796.056 795.999 796.000 795.997
5 944.422 . 944.111 944.116 944.108
6 1055.391 1055.384 1055.385 1055.384
7 1188.605 : 1188.073 1188.079 1188.070
8 1267.671 1267.600 1267.609 1267.598
9 1306.671 1306.601 1306.604 1306.595
10 1313.852 + 1312.748 1312.761 1312.736
11 1386.094 : 1385.262 1385.263 1385.247
12 1405.637 1405.519 1405.545 1405.510
13 1549.283 + 1547.471 1547.458 1547.431
14 1575.849 + 1574.831 1574.851 1574.821
15 1640.938 1640.887 1640.887 1640.884
16 1690.148 1690.009 1690.034 1690.006
17 1726.574 : 1726.015 1726.050 1726.009
18 1770.187 # 1761.572 u 1761.638 1761.581
19 1783.998 * 1779.401 1779.466 1779.377
20 1829.101 1829.017 1829.017 1829.013
21 1858.538 . 1858.223 1858.242 1858.210
22 1901.955 + 1902.884 1897.807 . 1897.580
23 1909.695 # 1897.012 u 1902.886 1902.838
24 1970.004 # 1966.496 * 1961.701 1961.558
25 2002.997 : 2002.376 2002.404 2002.323
2.7 Determining eigenstates by block improved relaxation 17

26 2025.521 2025.382 2025.384 2025.381


27 2049.494 : 2048.983 2049.045 2048.967
28 2120.335 . 2120.044 2120.019 2120.002
29 2147.592 # 2136.577 . 2136.567 . 2136.276
30 2173.911 $ 2153.985 2154.080 2153.897
31 2211.437 : 2210.637 2210.633 2210.622
32 2242.353 + 2240.892 2240.933 2240.825
33 2292.107 + 2291.121 2291.196 2291.096
34 2306.560 2306.468 2306.477 2306.460
35 2341.711 $ 2339.301 $ 2322.512 : 2321.754
36 2357.212 $ 2340.799 u 2339.333 2339.225
37 2376.415 $ 2376.423 $ 2339.687 . 2339.416
38 2396.093 $ 2370.751 . 2370.709 . 2370.415
39 2402.523 $ 2400.605 u 2376.419 2376.401

. > 0.2, : > 0.5, + > 1.0, * > 2.0, # > 5.0, $ > 10., u unconverged

The first run, blk.1, used the SPF set 9/4/16/18 and took 46 min CPU time on a 3.2 GHz
Pentium 4, and 165 MB RAM, the second run with the SPF set 10/5/30/20 took 3 h CPU time
and 560 MB RAM, the third run with 12/5/42/28 SPFs took 11 h CPU time and 1340 MB
RAM. The third calculation, blk.3, is fully converged and serves as reference. Deviations
from these results are indicated by . : + ∗ # and $ when they are larger than 0.2, 0.5.
1.0, 2.0 5.0, and 10 cm−1 , respectively.

As one notices, the eigenenergies obtained with the first run are not too accurate. In
particular the last four states are quite bad, showing deviations of more than 10 cm−1 . The
second calculation, blk.2, however, shows rather good results. All deviations are below 1
cm−1 , and in most cases the deviations are even below 0.1 cm−1 .

To compare block- with single-relaxation, separate single-relaxations were performed us-


ing the eigenstates of the block-relaxation as start vectors. The small set, 9/4/16/18, of SPFs
was used and the results are shown in the column sing.1 . The results of the single relax-
ations are much improved as compared to the corresponding block relaxation, except for the
last four states and for the excited states no 18 and 23. These states (as well as state 36)
did not converge, i. e. the energy kept on oscillating. The energies displayed in this case
are some mean value. In the block-relaxation the SPFs are optimized to represent all 40
states under consideration, whereas in the single-relaxation they are optimized for a partic-
ular eigenstate. Obviously more SPFs are needed in a block-relaxation to obtain results of
similar quality. However, the single relaxations took between 30 s and 3 min each, depending
on the state to be relaxed. In total they took 1 h CPU time, which is similar to the 3 h used by
the second block-relaxation. Remembering that for the single-relaxations we took excellent
starting vectors, namely the eigenstates obtained by the first block-relaxation, and that the
second block-relaxation yield eigenenergies of better accuracy than the sing.1 calculations,
one may conclude that single- and block-relaxation take similar amounts of CPU time for
obtaining similar accuracy. But the memory consumption of the block-relaxation is consid-
erably larger (20 MB compared to 560 MB). However, it requires much less human effort to
run a block-relaxation as compared to run 40 single relaxations.
18 2 An MCTDH tutorial

2.8 Propagating a statistical ensemble to simulate systems at


finite temperature and investigate thermal effects
Please read first chapter 15 to become familiar with the theoretical background of our ap-
proach to include thermal effects. Here we will concentrate on the thermal broadening of
vibrational spectra.
It is convenient to create an extra directory for storing the files of this study.
mkdir thermal ; cd thermal
Then copy input files to the current directory.
cp $MCTDH DIR/inputs/prlxth.inp .
cp $MCTDH DIR/inputs/pyr4th.inp .

The two input files are used for relaxation and propagation, respectively. The tempera-
ture, which determines the relaxation time, and the seed, which specifies the randomization
of the initial SPFs, are usually provided trough the MCTDH option -thermal. Please
inspect the input files as well as the operator file pyrmod4th.op, which is on the MCTDH
operators directory. As several relaxations with different seeds and accompanying propaga-
tions are to be performed, it is convenient to use a script. To understand the script we are
using, one may read the file $MCTDH DIR/bin/runthermal. First we run the help function of
the script runthermal
runthermal -h

The output should read:

Purpose: Run relaxations and propagations to simulate a system at finite temperature.


Usage: runthermal [ -T -s -n -r -p -i -j -f -E -h]
-h : print this help text.
-T temp : Temperature of simulation (default temp=1000.0)
-s seed : Initial seed for random number generator. (default seed=1)
-n niter : Number of iterations to be performed. (default niter=5)
-r rlxdir : Path of name-directory of relaxation. (default rlxdir=rlxth)
-p propdir: Path of name-directory of propagation. (default propdir=pyr4th)
-i rlxinp : Input file for relaxation. (default rlxinp=prlxth.inp)
-j rlxinp : Input file for propagation. (default propinp=pyr4th.inp)
-f spec : Path of dir which holds the spectra. (default spec=spectra)
-E arg : Arguments of autospec. (default arg="3.0 6.0 ev")
-S : Show the arguments and exit. (Must be last option).
The script creates a stopfile. The iterations are ended when the stopfile is removed

Make sure that the defaults rlxdir=rlxth, rlxinp=prlxth.inp,


propinp=pyr4th.inp, and arg="3.0 6.0 ev" are set. Otherwise edit the de-
fault section of the script, or use options. Then run the script
runthermal -T 2000 -n 30

the file spectra2000 contains the spectra spec1.pl, spec2.pl, · · · , spec30.pl of the individual
propagations, and the files sumX contain the averaged sums of the spectra up to X. To plot
the first three spectra move to the directory spectra200 and run
plgen spec1.pl spec2.pl spec3.pl

The individual spectra differ quite substantially, but the averaged spectra converge nicely.
plgen sum5 sum20 sum30
2.9 Using potfit and chnpot to fit a surface to ab initio data points 19

140

120

100

80

60

40

20

0
3 3.5 4 4.5 5 5.5 6
Absorption Energy [eV]

Figure 2.8: The 4D pyrazine thermalized absorption spectrum for temperatures T=100K, 1000K, and 2000K.

Next run the script runthermal with different options. e.g. with -T 1000 -n 25,
-T 600 -n 20, -T 100 -n 5. One has to wait till the script finishes before starting it
with a new temperature. If one wants to run different temperatures simultaneously one has
to run the script in separate directories. Figure 2.8 shows the averaged spectra for T=100K,
T=1000K, and T=2000K. The T=100K spectrum (blue line) is almost indistinguishable from
a T=0 spectrum, but for higher temperatures the spectrum broadens and the line structure is
washed out.

2.9 Using potfit and chnpot to fit a surface to ab initio data points
In this example it is shown how to use ab initio data points to generate a natural potential and
how this natural potential can then be interpolated into a more suitable grid for a MCTDH
simulation. To perform such tasks the programs potfit86 and chnpot86 will be used, respec-
tively. A detailed description of how such tasks are accomplished is found in chapter 13.2 of
this guide.
The data used in this example – taken from Ref. [16] – is a 2D cut corresponding to the
PES of the CO− 2 anion in C2v symmetry. The two coordinates are the length of the two CO
bonds and the angle between them, i. e. symmetric stretch and bending.

2.9.1 Transforming the ab initio data to product form


1. Create a new directory, for example co2fit

2. From the directory $MCTDH DIR/pinputs/ copy to the directory co2fit the files:

• co2 potfit.inp
20 2 An MCTDH tutorial

• co2 pes
• co2 r grid
• co2 theta grid

The file co2 pes contains the ab initio energies and the two following files the corre-
sponding grid points.

3. Move to the co2fit directory and execute the command:

potfit86 -mnd co2_potfit

A new subdirectory co2 potfit has been created, change to it and execute

showpot86 -vfit

In the interactive menu type 3 times 1, return to see the plot of the natural potential fit.
By definition it is identical to the original data on the grid points since the same number of
natural potentials as grid points has been used (Inspect the co2 potfit.inp file).

2.9.2 Interpolating the natural potential to a new primitive grid

1. Copy the file $MCTDH DIR/pinputs/co2 chnpot.inp to the co2fit directory.

2. Execute the command:

chnpot86 -mnd co2_chnpot

A new subdirectory co2 chnpot has been created, which contains new dvr and natpot files.
As before, the newly interpolated potential can be inspected using the utility showpot86 and
following the interactive menu.
The process outlined in the present and previous subsections can be repeated us-
ing the alternative set of files co2 r dense grid, co2 dense pes, co2 theta dense grid ,
co2 chnpot dense.inp, co2 potfit dense.inp. The initial grid is double as dense as the original
one. After the potfit stage the data points are interpolated to the same grid as in the previous
case. The rms of the difference of the two interpolations to the same grid is 9.55 × 10−6
au, i. e. 0.26 meV. This is a very good value considering that the potential spans an energy
interval of 8 eV. Indeed, using showpot86 to compare the outcome of both chnpot86 runs
shows that the obtained potential energy surfaces are virtually equal, which constitutes a nice
example of the usefulness of the chnpot86 utility when preparing an MCTDH calculation
from ab initio data points.
We have used this method quite succesfully to create multi-dimensional 3D-fits to ab initio
data. The only restriction is that the data is to be supplied on a product grid. Equidistance of
the grid points, however, is not required.
2.10 Optimizing an external field with Optimal Control Theory (OCT) 21

2.10 Optimizing an external field with Optimal Control Theory


(OCT)
MCTDH can be used to perform coherent control calculations within the OCT scheme. The
OCT algorithm was developed by Tannor and coworkers [17] and by Rabitz and coworkers
[18]. For this purpose mctdh and the routine efield are called from the script optcntrl. OCT
maximizes the expectation value hΨ(T )| O |Ψ(T )i at the final time T , where O denotes some
positive semidefinite hermitian operator.
The control target O can be defined in two different ways. If O is the projector onto a
target quantum state, i.e., O = |Ψtar i hΨtar |, then it is sufficient to specify the target state
|Ψtar i. If O is a general operator, e.g., a projector onto an electronic state O = |Si hS|, it has
to be specified in the operator file. At present only one target operator can be specified in the
operator file, it is, however, possible to use it with multiple initial states.
Multi-target optimizations are possible by using the multi-packet algorithm for target
states. Multi-packet wave functions are treated within a multi-target optimization procedure.
For target states the control functional J can be chosen either as

N ZT
−1
X tar
2 E 2 (t)
J1 (E) = Ntar Ψi (T )|Ψ(tar,i) − α0 dt , (2.1)
S(t)
i 0

or as
N 2 ZT
−2
X tar
E 2 (t)
J2 (E) = Ntar Ψi (T )|Ψ(tar,i) − α0 dt . (2.2)
S(t)
i 0

Here α0 is the so-called penalty factor that penalizes for strong fields and S(t) serves as a
pulse envelope that can be defined in the operator file. The functional (2.1) leads to optimiza-
tions of the target state populations only while within (2.2) the phases are also aligned. [19]
If Ntar = 1, both functionals are identical.
Example inputs are provided under $MCTDH DIR/inputs/optcntrl. The Python script
optcntrl parses the input file and invokes OCT related programs from the MCTDH pack-
age. Note: the script reqires Python 2.4 or 2.5 and relies on the Python executable be-
ing found in /usr/bin/env python. This path can be changed in the first line of the script
$MCTDH DIR/bin/python/optcntrl.py.
From the input file a number of temporary input files for the actual MCTDH calculations
are created. The same applies for the operator file. The operator file must contain at least two
operators, the system Hamiltonian including the dipole operator multiplied with the electric
field and a second operator containing the dipole operator alone. The system Hamiltonian
is used to perform the propagations while the dipole operator is used to evaluate the electric
field.
To execute an example, create a new empty directory, change to it, and copy the example
input files, e.g. “pyrazine.inp” and “pyrazine.op” (see Ref. [20]). Inspect the input file and
run the command:

optcntrl -mnd pyrazine.inp

The command

optcntrl -h
22 2 An MCTDH tutorial

will provide help about options.


Recently, the a number of new features have been implemented into OCT-MCTDH, such
as optional filtering of the field and the use of different optimization schemes. [21–23] Please
refer to the HTML documentation for details.

2.11 Concluding Remarks


This tutorial has shown you some typical applications of MCTDH. In order to ensure that
within this tutorial all calculations can be done quickly – only the optimal control example
takes somewhat longer, 60 minutes (on a 3 GHz PC) – we have chosen rather small example
systems. This, however, should not mislead you, MCTDH is for treating large systems! The
full power of MCTDH is uncovered when turning to problems which require such a large
primitive product grid, that a standard (numerical exact) wavepacket propagation becomes
impossible on a workstation. A good example for such a problem is the calculation of the
absorption spectrum of pyrazine, as discussed in Ref. [9]. There the primitive product grid
amounted to 6.6 × 1020 points whereas the MCTDH calculation required only 3.76 × 106
configurations, 687 MByte RAM and 52h CPU time. (This was done in 1998 on an IBM
RS/6000 power2 workstation, which is much slower than any modern PC.)
Chapter 3

Defining the type of calculation to be


made

In this chapter we present how to define and start the calculation to be made. Possible types
are propagation, relaxation or diagonalisation. Propagation and relaxation calculations can
be performed either using the MCTDH method, or numerically exactly, i. e. using the full
primitive product grid. We also give a brief overview of the output to be produced.

3.1 Specifying the task for MCTDH


The MCTDH program package can perform different tasks specified in the RUN-SECTION.
The following tasks are possible:

Keyword Level Description


gendvr 1 A DVR file will be generated (see Sec. 4).
genoper 2 An operator file will be generated (see Sec. 6).
genpes 2 A special operator file, called pes, will be generated, that
contains the potential energy surface (see below).
gengmat 2 A special operator file, called pes, will be generated, that
contains an element of the G-matrix of the kinetic energy
(see below).
geninwf 3 An initial wavefunction (restart file) will be generated
(see Sec. 7).
test 4 All input files will be checked and all other files, necessary for
a propagation, will be created, but no propagation step will be
performed (see below).
propagation 4 Propagation in real time (see Sec. 3.3).
relaxation 4 A relaxation or an improved relaxation will be performed
(see Sec. 3.4 or Sec. 3.5 respectively).
continuation 4 A continuation of the run will be performed (see Sec. 3.9).
diagonalisation 4 The Hamiltonian will be diagonalised (see Sec. 3.7).
When a high level task is to be performed, the necessary tasks of lower order are auto-
matically included. E.g. by setting the keyword propagation one implicitly also sets
gendvr, genoper and geninwf.

23
24 3 Defining the type of calculation to be made

The pes-files, created with the keywords genpes or gengmat (or the options -pes
or -gmat), are special operator files which include only potential like operators. Note that
all non-diagonal (i.e. kinetic energy) terms are automatically removed from the Hamiltonian
when setting the keyword genpes. The pes-file is usually used in the context of the analyse
routines vminmax or showsys (see Sec. 12.10). The showsys program can plot 2D-cuts
through potential energy surfaces (or other multidimensional functions) provided in the form
of a pes-file. The pes-file, created with the genpes-keyword, contains the potential energy
surface of the system. If the keyword gengmat = I1,I2 (or the option -gmat I1 I2)
is used then the pes-file contains the (I1,I2) matrix element of the G-matrix of the kinetic
energy operator. A kinetic energy operator can always be written in the form:

f f
1X † X
T = pi Gij pj + Fi pi + Vextra (3.1)
2
i,j i=1

where Gij , Fi and Vextra are potential like terms. This equation defines the G-matrix. Note
that the kinetic energy, defined in the Hamiltonian-Section, does not need to be of this par-
ticular form.
A further useful task is performed if the keyword test is used. In this case all input files
are checked and all output files are created (even a psi file for t=0) like in a propagation run,
but no propagation step is done. A test run may hence be used to convert a restart-file into a
psi-file. It is possible to start a continuation run (see Sec. 3.9) after a test run.

3.2 Specifying the desired output


The output produced by the MCTDH program is sent to a directory called the name-directory.
The (absolute or relative) path of this directory is specified by the name keyword in the RUN-
SECTION of the input file. The name-directory should already exist when the MCTDH
program is started. Otherwise one may use the option -mnd (make name directory) to create
a new directory.
During run-time, a number of files are generated in the name-directory. Some of these are
always created while others have to be selected by the user. The most interesting file of the
former category is the log file, which records what happens at the various stages of a run.
Frequently used files of the second category are the output, auto, and psi files. The output
file contains some basic physical quantities of the wavefunction, such as norm, energy, state
populations, and the position and momentum expectation value of each coordinate. The auto
file contains the auto-correlation function as a function of time. Both files are in A SCII for-
mat. In the psi file the wavefunction as a function of time is stored in binary format. The three
files are selected by placing the keywords output, auto, or psi in the RUN-SECTION.
Examples for the RUN-SECTION are given in the following sections. A complete list of the
available files and options can be found in the HTML documentation.
The files gridpop, check, steps, update, timing, and speed only serve to check the effi-
ciency or accuracy of an MCTDH calculation. They are very useful during the test phase of
your calculations. Since some of them might become rather large, however, you may turn
them off for your production calculations. NB the files output, timing, speed, and (for CMF
runs) update are opened by default. To turn them off, use the keywords no-output (or
screen), no-timing, etc.
3.3 Propagating a wavepacket 25

3.3 Propagating a wavepacket

For performing a wavepacket propagation using the MCTDH method you first have to set up
the Hamiltonian in an operator file (see Sec. 6). This operator file must then be specified in
the OPERATOR-SECTION of the input file (see Sec. 6.1). In the input file the primitive and
single-particle basis (Secs. 4 and 5), as well as the initial wavefunction (Sec. 7), must also be
defined. Finally, you may select an integration scheme different from the default (Sec. 9).
A wavepacket propagation is then initiated by placing the keyword propagation in the
RUN-SECTION. A typical example is

RUN-SECTION
propagation
tfinal = 50.0 tout = 1.0
name = results
psi auto gridpop
end-run-section

The parameters tfinal and tout denote the time the propagation will run up to and the
time interval after which the data is output (in femtoseconds). The name-directory is results
in our example. The other parameters have been established in Sec. 3.2. A number of ad-
ditional options may be selected in the RUN-SECTION. We refer the reader to the HTML
documentation for details.

3.4 Relaxing a wavepacket to produce the lowest eigenstate

In a relaxation calculation a wavepacket is propagated in imaginary time to produce the low-


est ro-vibrational eigenstate. Analogous to a (real-time) propagation, an operator and an input
file are required to define the Hamiltonian, the primitive and single-particle basis, the initial
wavefunction, and possibly the integration scheme.
A relaxation calculation is selected in the RUN-SECTION by the keyword relaxation
instead of propagation. The RUN-SECTION may read

RUN-SECTION
relaxation
tout = 10.0
tfinal = 100.0
name = results
end-run-section

The parameters have been introduced in Secs. 3.2 and 3.3.


After a successful run, the desired lowest eigenstate is stored in the restart file. This
eigenstate can then be used as initial wavefunction in following calculations, by using the
file keyword in the INIT WF-SECTION.
To check the convergence of a relaxation calculation with respect to the propagation time
tfinal, you may look at the total energy being displayed in the output file. If this has
not changed significantly during the last outputs, the eigenstate is converged. Otherwise, the
calculation should be continued to longer times. See Sec. 3.9 for continuing calculations.
26 3 Defining the type of calculation to be made

3.5 Advanced topic: Improved relaxation. Generation of excited


eigenstates

This section may be difficult to understand, if one is not familiar with the constant mean
field (CMF) integration scheme. For a brief discussion on CMF see Sec. 9.2 and 9.4.2. A
more comprehensive discussion on CMF can be found in the MCTDH review. The Improved
Relaxation algorithm is discussed in the MCTDH feature article [5] and more recently (and
more comprehensively) in refs. [7, 24, 25].
Consider a relaxation run where the CMF integration scheme is adopted and the SIL inte-
grator is used to propagate the A-vector. In this case it seems to be somewhat cumbersome to
generate a relaxed (i.e. propagated in imaginary time) A-vector by taking a linear combina-
tion of the eigenvectors of the Lanczos matrix. It is more meaningful to replace the relaxed
A-vector by the ground state of the Lanczos matrix, as one is interested in the ground-state
but not in a proper propagation in imaginary time. This modification leads not only to a faster
convergence but, more importantly, offers the possibility to converge to an excited state. One
simply takes the n-th state of the Lanczos matrix as ”relaxed” A-vector. However, the dimen-
sion of the Lanczos matrix is in general small compared to the length of the A-vector. The
pseudo-spectrum of the Lanczos matrix is thus a poor simulation of the spectrum of the ma-
trix representation (in the set of the single particle functions) of the Hamiltonian H. Although
the n-th eigenstate of the Lanczos matrix may be a good approximation to an eigenstate of
the H-matrix, it may not approximate the n-th state of H, but a higher one. Thus the algorithm
of improved relaxation will converge to some eigenstate, but one is not sure, which one it is
(except when the ground-state is sought).
To deal with this situation, the algorithm is set up such, that that eigenvector of the Lanc-
zos matrix is taken, which has the largest overlap with the one of the previous CMF step.
(A warning is written to the log file, if this overlap-squared is smaller than 0.66). There are
two ways to select the initial Lanczos vector. The first way is to write relaxation = n
to the RUN-SECTION. The n-th eigenvector of the Lanczos matrix is then taken as starting
point of the relaxation. The counting starts from zero, i.e. n = 0, 1, 2, . . ., 98. Note that the
Lanczos matrix depends on the starting vector, which in this case is the initial wavefunction
defined in the INIT WF-SECTION.
The second way is to specify relaxation = follow. In this case the starting vector
of the improved relaxation is that eigenvector of the Lanczos matrix, that has the largest
overlap with the initial wavefunction defined in the INIT WF-SECTION.
The Krylov space and thus the dimension of the Lanczos matrix grows with each step of
the Lanczos iteration.This process is stopped when the accuracy criterion is satisfied (the SIL
accuracy parameter is now interpreted as the tolerated error in milli Hartree of the energy of
the desired Lanczos eigenvalue ) or when the specified maximal dimension of the Lanczos
matrix is reached. If the keyword full is given as a second argument of the relaxation
keyword, then during the very first build up of the Krylov space the iteration will be continued
till the maximal dimension is reached. This feature is useful to ensure that the improved
relaxation starts from the correct Lanczos eigenvector. There is also the keyword ortho,
which may appear as an argument to the relaxation keyword. ortho forces the SIL
integrator to perform a full re–orthogonalisation of the Krylov space. This often significantly
improves the convergence, but for long A-vectors it may take some CPU–time. In short, the
improved relaxation command may read relaxation=follow,full,ortho.
3.5 Improved relaxation. Generation of excited eigenstates * 27

As the A-vector now changes discontinuously, the standard variant of the CMF step size
control, CMF/var, does not work. One must either work with fixed CMF steps, CMF/fix, or
let the step size control depend on the single particle functions only, CMF/varphi. The latter
choice is usually to be preferred. For convenience CMF is set equivalent to CMF/varphi
when the run-type is improved relaxation. In all other cases CMF is interpreted as CMF/var.
Note that the integrator parameters, initial CMF step size, CMF accuracy (only for varphi),
maximal Lanczos space and SIL accuracy, may have decisive effects on the convergence. The
SIL accuracy and space should be chosen higher than for propagation. Use an SIL accuracy
between 10−8 and 10−11 and a Lanczos space between 20 and 200 (the maximal size is 500).
The higher the sought eigenstate lies, the larger must be the Lanczos (or Krylov) space. The
convergence to higher lying states also requires more SPFs than needed for propagation (and
as indicated by the natural weights).
The single-particle functions are propagated in imaginary time, i. e. they converge toward
the lowest states of the mean-field operator, irrespectively whether they are needed for repre-
senting the wavefunction or not. If, for example, there is no node-less single-particle function
approximating the ground-state of the mean-field operator, then the propagation in imaginary
time will rapidly change the single-particle functions in order to generate such a function.
Due to this rapid change, the method then fails to converge. One thus may have to select the
initial single-particle functions somewhat more carefully. However, there is no implemented
algorithm to do so and one may therefore be forced to use more single-particle functions for
improved relaxation than finally needed to represent the converged wavefunction.
When the keyword orben is set in the RUN-SECTION, then the so called orbital ener-
gies are computed and output to the file orben. The orbital energies are obtained by diagonal-
ising an appropriate mode-Hamiltonian in the set of the single-particle functions. The mode
Hamiltonian is conveniently defined as the trace over the mean-fields of the particular mode
under discussion. I. e.
P κ (κ)
Hav = nj=1 hHijj .
See the MCTDH-review for a definition of the mean-field operators hHi(κ) .
The eigen-functions of Hav , called energy orbitals, allow to define energy weights as the
diagonal values of the density matrix expressed in the basis of the energy orbitals. The energy
weights are very useful for assigning quantum numbers to a relaxed wavefunction. If for each
mode there is one weight that is close to one (larger than 2/3, say), then the full wavefunction
is characterised by the quantum numbers of the dominant energy orbitals. For further infor-
mation see the HTML documentation under Input-Documentation/Run-Section
and Output-Documentation/Data-files.
More recently (Aug 2003) a Davidson diagonaliser has been implemented to replace the
SIL for improved relaxation. The Davidson algorithm is much superior to Lanczos when
the generation of a single excited eigenstate is asked for. For the Davidson, there is a new
keyword relaxation=lock. This is similar to relaxation=follow but more stable,
because lock searches for the eigenvector with the largest overlap with the initial wavefunc-
tion, whereas follow takes the eigenvector with the largest overlap with previous vector.
The keyword ortho is not allowed when using the Davidson, and full is useful in special
cases only. See the HTML documentation for more details. A typical input for improved
relaxation with Davidson is provided by inputs/hono.dav.inp . Note that in this example one
is computing the about 120th eigenstate in A’ symmetry.
There are several versions of the Davidson diagonaliser implemented. With the keyword
DAV one calls a routine which works for hermitian Hamiltonians. With the aid of the keyword
28 3 Defining the type of calculation to be made

cDAV one may diagonalise non-hermitian (e. g. CAP augmented) Hamiltonians and compute
complex resonance energies. However, in most applications the Hamiltonian will not only
be hermitian, it will also be real. (A Hamiltonian is called real, if HΨ is real for every real
Ψ). As MCTDH is written to propagate wave packets, almost all variables are declared as
complex. Hence one is wasting memory and CPU time by not making use of the reality
of the wave function. To reduce this waste, one may use the keywords rDAV or rrDAV.
rDAV is similar to DAV, but it stores the Davidson vectors as real. This substantially reduces
the memory demand. rrDAV performs in addition the matrix-vector operation HA in real
arithmetic, which speeds up this step. Note that rrDAV can be used only, if each single
operator appearing in the Hamiltonian is real. This, in particular, excludes the use of the
operator p. (One may replace it by the operator dq). Furthermore, rrDAV cannot be used, if
there are so called muld-operators (i. e. multi-dimensional operators which act on more than
one MCTDH particle simultaneously). The use of natural potentials, however, is allowed.
Note that the relaxation of the SPFs is always done in complex arithmetic.
Turning more to the technical side we note that the integrator setting for
improved relaxation is quite different from the one for propagation. For
improved relaxation (with Davidson) the CMF accuracy is usually set to a rather low value,
around 10−3 , whereas high accuracies, 10−7 · · · 10−8 and 10−8 · · · 10−10 , are to be used
when propagating the SFPs and the A-vector, respectively. (See Sec. 9.4.2). For propagating
the SFPs we recommend the RK8 integrator. In contrast to a propagation run one now prefers
to have an output after each update step, i. e. after each diagonalisation. To achieve this, one
sets tout=all. In this case one should also give tpsi, even if the psi file is not written.
The tpsi time is taken as the upper limit for the update interval.
When computing the ground state, the Davidson diagonaliser is usually quite fast, i. e.
requires only few iterations. Turning to excited states, however, the number of Davidson-
iterations may become quite large. In order to speed up the calculation in this case, a better
pre-conditioner was implemented. If one sets precon=N then an N × N block of the
Hamiltonian matrix is diagonalised and used to improve the pre-conditioner. One should be
careful not to use a too large value for N , otherwise the build-up of the pre-conditioner takes
more time as saved by performing a smaller number of Davidson iterations. It is usually not
useful to use precon when the ground state is computed. When computing higher excited
states, on the other hand, the pre-conditioner can be very helpful.
When excited states are to be computed one usually uses relaxation=lock. This,
however, requires that an initial state is provided, which has a decent overlap with the state to
be computed. There are two convenient ways to generate such an initial state. The first one is
to operate with some excitation operator on the ground state, or on some converged excited
state. (Compare with the co2 ∗.inp input files on MCTDH DIR/inputs). The other way is to
diagonalise appropriate 1D-operators with eigenf or mode-operators with meigenf and
build the initial state as Hartree product from those low-dimensional eigenstates. (Compare
with the hono.dav.inp and H2CS.r1r2.inp input files on MCTDH DIR/inputs). Furthermore,
one may use the orthogonalise keyword to purify an initial state from contributions of
already converged eigenstates. (See HTML documentation under INIT WF-SECTION).
When the CI-pace is too small (i. e. when the A-vector length is too short) the improved
relaxation algorithm will not converge due to a “variational breakdown”. Not only the state
requested but all states below this one must be representable by the SPF basis sets. For
highly excited states this may require large CI-spaces. One must be careful when using
mode combinations and avoid too strongly combined modes because over-combination will
make the CI-space too small. Relaxation to the ground state is always unproblematic. If
3.6 Performing a numerically exact calculation 29

a relaxation to an excited state does not converge, one has to use more SPFs, although the
natural populations may already be very low. The natural population indicates how important
an orbital is for representing the desired state. But again, here the orbitals have to represent
in addition all states below the desired one.
Rather than (single) relaxation one may use block-relaxation. See Sec. 2.7 for an example.
The keyword split-rst splits the restart file of the block-relaxation into individual restart
files for each eigenstate. Block-relaxation does not allow the use of the keywords-arguments
follow or lock, only relaxation=0 is allowed. Hence one computes the b lowest
eigenstates, where b denote the block size. However, one may set the keyword rlxemin
(see the HTML docu for a full description). This will force the code to compute the b lowest
states above the argument of rlxemin.
An initial wavefunction for a block improved relaxation run can be read by using the
keywords block-spf, block-A, or, if there is already a wavefunction in correct block
form, simply by using the file keyword. The keyword autoblock is particularly useful.
See the HTML docu for a comprehensive description of these keywords.
Finally we note that the rlx info file is most conveniently read with the aid of the script
rdrlx. Type rdrlx -h for obtaining more information. The script plrlx (or plbrlx for block-
relaxation) plots the energy versus relaxation time.

3.6 Performing a numerically exact calculation

The MCTDH program — although originally developed for wavefunction dynamics within
the MCTDH scheme — also allows one to perform numerically exact wavefunction propa-
gations. Employing the MCTDH program for such calculations has the advantage that one
can benefit from the easy way a Hamiltonian can be set up. A numerically exact calculation
may also be useful for comparison with an MCTDH calculation. Of course, a numerically
exact propagation is only feasible for rather small systems.
For a numerically exact wavepacket propagation an operator file and the same input sec-
tions as in an MCTDH calculation are required. A numerically exact calculation can be made
by including the keyword exact in the RUN-SECTION in addition to the calculation type
keyword (e.g. propagation or relaxation). Rather than using the low-dimensional MCTDH
single-particle functions, this sets up a wavepacket (or for a non-adiabatic system one for
each electronic state) on the full product primitive basis. The operator is also set up on this
full grid.
To propagate this wavepacket any of the integrators listed in Tab. 9.1 can be used. Al-
though the ABM integrator is the default, the best performance is typically obtained by the
SIL integrator, because it exploits the fact that the equations of motion in a numerically exact
calculation are linear. To select the SIL integrator, insert for instance

INTEGRATOR-SECTION
SIL = 20, 1.0d-6
end-integrator-section

into your input file. The parameters are discussed in Sec. 9.3. The ABM, BS or RK5/8
integrator can be chosen as described in the examples in Sec. 9.
30 3 Defining the type of calculation to be made

3.7 Diagonalising the Hamiltonian using the Lanczos algorithm


Although the MCTDH method is a time-dependent one, the MCTDH program is also capable
of diagonalising a Hamiltonian using the Lanczos scheme. In such a diagonalisation run the
wavefunction is automatically represented on a (primitive) product grid, i.e. in the same way
as in a numerically exact calculation.
A diagonalisation run therefore requires the same input sections as a numerically exact
calculation, and of course an operator file. A possible RUN-SECTION reads

RUN-SECTION
diagonalisation = 10000
name = results
end-run-section

The number associated with the diagonalisation keyword indicates the number of
Lanczos iterations to be made. The name keyword has been explained in Sec. 3.2. Other
keywords that may be specified in a diagonalisation run can be found in the HTML docu-
mentation.
The computed eigenenergies and intensities, together with an error estimate of the
eigenenergies, are compiled in the eigval file. If the error of the desired eigenvalues is to
large, the calculation can be continued to increase the number of iterations. See Sec. 3.9 for
continuing calculations.
Note that one-dimensional Hamiltonians can be numerically exactly diagonalised using a
DVR basis. See Sec. 7.6 for more details of this.

3.8 Starting a calculation


The MCTDH program is started by typing

mctdh86 myinput

on your console, where we assumed that your input file is named myinput.inp. If the input file
is not stored in the current directory, add the correct path to the input file’s name. A variety
of options may be used on starting the MCTDH program. Type

mctdh86 -h

to get an overview.
To find out during run-time how far a propagation is proceeded, you may look for instance
at the last line of the log file, by typing

tail -1 results/log

where results has to be substituted by the name-directory.


Any error messages that might be raised during run-time are sent directly to the screen
and additionally written to the log file. See there in case of problems. If the calculation was
successful, the results can be analysed by the Analyse programs and scripts. This is detailed
in Chap. 12.
3.9 Continuing or stopping a calculation * 31

3.9 Advanced topic: Continuing or stopping a calculation


A calculation that has been finished may be continued again, so propagating to longer
times or performing a larger number of Lanczos iterations. This is done by adding the
keyword continuation to the RUN-SECTION. (Alternatively, one may start a contin-
uation run using the -c option on the command line, see the HTML documentation for
details.) In a propagation run the final time must also be increased. For instance, if the
previous calculation finished after 50 fs, then you may set tfinal = 75.0 to propagate
over the next 25 fs. Similarly, if 10 000 iterations were made in a diagonalisation run, set
diagonalisation = 15000 for the next 5 000.
Again, it is often more convenient to use options. E. g. the command

mctdh86 -c -tfinal 75.0 <inputfile>

will start a continuation run where the final time is set to 75 fs. The use of other options like
-I, -tcpu or -tstop may be useful. Type mctdh86 -h to see the list of options. Note that
a continuation run reads only the RUN-SECTION and ignores all the other sections of the
input file as well as the operator file. All the necessary information is read from the read-write
files of the name directory.
Sometimes it is desirable that a calculation is continued with a different integrator setting.
This can be accomplished by giving the keyword continuation=integrator or by
the option -ci. In this case the INTEGRATOR-SECTION will be read.
Finally, the continuation keyword can be used in order to try to complete a crashed
calculation. The program however does not check the output files for consistency. The
continuation thus might fail if some relevant data was lost due to the crash.
Another option of the MCTDH program is to stop a calculation during run-time in a
controlled manner, such that it can be resumed later. To this end include the stop file by
adding the keyword stop to the RUN-SECTION. To halt a calculation after the next output,
edit the stop file and write stop to its first line. Alternatively one may just remove the stop
file. The stop is automatically deleted when the run finishes. It thus may serve as a lock-file.
As long as the stop file exists, the run is not finished.
Rather then simply writing stop to the stop file one may supply more specific commands
which will halt the program after a certain real-time or CPU-time has passed. This allows
e. g. to outwit CPU-time limits. Rather than editing the stop file ”by hand”, one may let the
MCTDH program do that. This can be accomplished by giving the keywords tcpu and/or
tstop in the RUN-SECTION or by using the options -tcpu and/or -tstop. See the
HTML documentation for details.

3.10 Advanced topic: Using parallel shared memory hardware


If shared memory hardware is available MCTDH can take advantage of it. The parallel fea-
tures of MCTDH are used if the keyword usepthreads = I is set in the RUN-SECTION,
where I stands for the number of processors that should be used. Further arguments can be
added, which disable the parallelisation of the different MCTDH routines. The paralleli-
sation of the following routines can be disabled: phihphi (no-phihphi), calcha/funka2
(no-funka), summf (no-summf), mfields (no-mfields), hlochphi (no-hlochphi),
hlochphi1m (no-hlochphi1m), funkphi (no-funkphi), getdavmat (no-getdavmat)
and dsyev (no-dsyev). In the MCTDH code the funkphi routine calls several subroutines:
32 3 Defining the type of calculation to be made

hlochphi1m, mfsumphi1m, dicht1phi1ms, hunphi1ms, addhunphi1ms and project1ms. (The


parallelisation of the first routine is switched off by setting the no-hlochphi1m keyword.
Setting the no-funkphi keyword switches off the parallelisation of the other routines all
together.) The funka2 routine is only used in the case of a relaxation run with the rrDAV
integrator.
There are more keywords. The mem-calcha and the mem-mfields keywords enable
MCTDH to use more memory for a more efficient parallelisation of the calcha and mfields
routines. In default mode the parallelisation is optimized for low memory requirements.
Furthermore there is the summf2 keyword. If this keyword is set, a differently parallelised
summf routine is used. This may increase the efficiency of the parallelisation if a very large
combined mode is present, dominating the calculation of summf. A parallel version of the
LAPACK dsyev-routine is used in MCTDH. The dsyev = I keyword can be used to set
the minimum size of the matrix that is diagonalized in parallel.
The results of a parallel calculation may slightly differ from those of a non-parallel one
due to numerical reasons. Furthermore a parallel calculation needs more memory. This is one
of the reasons why the parallel use of the routines can be disabled. Depending on the type
and the parameters of the calculation some routines may only marginally improve the perfor-
mance of the parallelisation. They can be turned off to save memory. Moreover, depending
on the calculations made, some routines can produce overhead which overcompensates the
gain of their parallelisation. These routines should also be turned off.
Example:
RUN-SECTION
usepthreads = 4, no-funkphi
...
end-run-section

In this example a parallel calculation with 4 processors will be performed but the paralleli-
sation of the funkphi routine is disabled. Sometimes disabling the parallelisation of routines
even increases the computational speed, as it is the case for propagation of C2 H4 . If the cal-
culation is made with all routines running in parallel mode the parallel part of the program,
according to Amdahl’s law, is 61% whereas the parallel part is 75% if the parallelisation of
the funkphi routine is disabled.
In general the parallelisation works better for larger systems, i.e. systems with many
Hamiltonian terms and many single particle functions. This is due to the fact that either
loops over the Hamiltonian terms or loops over the single particle functions are parallelised.
We have observed that the performance of the parallelisation does not only depend on the
system studied but also on the computer platform and compiler. The C2 H4 system has been
propagated on an Itanium cluster using the Intel compiler. This resulted in a speedup of
2.30 (4 processors) for which Amdahl’s law states a parallel parallel part of 75%. The same
system, propagated on a quad-opteron, also with the Intel compiler, showed a speedup of
2.58 (4 processors) and hence a parallel part of 81.7%.
One of our better examples is H2 + H2 inelastic scattering. Here the Hamiltonian consists
of many terms because there is a large potfit. A speedup of 6.19 is observed when running this
system on 8 processors in parallel. This implies that 95.5% of the work is done in parallel.
The memory used increased form 56 MB (one processor) to 60 MB (8 processors).
The performance of the parallelisation can be monitored using the keyword ptiming. If
this keyword is set in the RUN-SECTION an additional timing file, called ptiming, is created
containing information about the time spent in each thread and routine. This keyword also
can be used if usepthreads is not set. In this case no ptiming file is created, but the timing
3.10 Using parallel shared memory hardware * 33

file contains information about the timing of the parallelised routines. This helps to decide
what routine should be used in parallel mode if the parallelisation is turned on.
The ptiming file is structured in the following way (H5 O+
2 propagation):

Subroutine Calls cpu sum thread: 1 thread: 2


phihphi 52 822.72 822.83 411.44 411.39
calcha 168 11297.70 11363.55 5680.55 5683.00
mfields 51 8054.95 8055.37 4026.99 4028.38
summf 51 4991.97 9529.60 4764.80 4764.80
hlochphi1m 5617 11071.72 11204.26 5667.22 5537.04
funkphi 5237 716.71 726.63 329.93 396.70

The first column shows the name of the parallel subroutine, the next column gives the num-
ber of calls to this routine. The column “cpu” shows how much cpu time is spend for the
computation. The columns “thread: p” give the real time spend in each thread (here 2) for
the computations made, these values are summed up in column “sum”. In this example the
parallelisation of the summf routine works badly. This can be seen, because the cpu time for
the summf evaluation is much lower than the sum of the realtime spend for this task. Using
the summf2 keyword this problem can be fixed. The corresponding line in a summf2 run
indicates that the parallelisatioin now works better:
Subroutine Calls cpu sum thread: 1 thread: 2
...
summf 188394 3809.27 3868.90 1917.64 1951.25
...

Ignore the number of calls. It is increased because now not summf is timed but an internal
routine called by summf. More things can be seen with help of the ptiming files. Some-
times the parallelisation creates cpu time overhead. This cannot be discoverd by checking
only one ptiming file. In the case of the C2 H4 propagation the routines controlled with the
no-funkphi keyword produce overhead. But the corresponding ptiming file is:
Subroutine Calls cpu sum thread: 1 thread: 2
...
funkphi 121389 606.69 627.99 308.03 319.96

Here the columns “cpu” and “sum” compare very well. But the ptiming file for one thread,
i.e. usepthreads=1, reads:
Subroutine Calls cpu sum thread: 1
...
funkphi 120780 174.36 175.23 175.23

Comparing the “cpu” column of both files a strong increase of cpu time is discovered, 174.36s
(1 proc) to 606.69s (2 proc). Hence the no-funkphi keyword should be used to avoid this
overhead. Finally we give some overall timings:

1 processor 4 processors
default no-summf summf2
H5 O+
2 9h 52m 20s 3h 50 m 52s 3h 52m 06s 3h 09m 49s
default no-funkphi
C2 H4 22m 21s 12m 20s 8m 49s

If the ptiming keyword is used but the lrt library is not linked the following error mes-
sage appears.
34 3 Defining the type of calculation to be made

###########################################
### --- no clock_gettime command ---
### lrt not linked!
### If lrt is available,
### modify the script compile.cnf
###########################################

If your compiler supports this library the script compile.cnf has to be modified.1 The option
-lrt must be added in the line MCTDH ADD LIBS in the section of the compiler that is
used. Then MCTDH must be compiled again.
A similar error message appears if the pthread library was not linked for compilation of
MCTDH.

###########################################
### --- no xxx_yyyy command ---
### pthread library not linked!
### If your compiler supports pthread,
### modify the script compile.cnf
###########################################

xxx yyyy is replaced by the name of the routine the program tried to execute but could
not be found. If your compiler supports pthreads, the script compile.cnf has to be modified
(see above). The option -lpthread must be added in the line MCTDH ADD LIBS and the
option -pthread must be added in the line MCTDH CFLAGS in the section of the compiler
that is used. Then MCTDH must be compiled again.
For the standard compilers, e.g. GNU or Intel, all the necessary extensions of the compile
scripts are already done.
To improve the efficiency of the shared memory parallel MCTDH on NUMA (non uni-
form memory access) machines the numa.h library can be linked 2 . To do so the -u option
must be given for compilation:

compile -u mctdh

Doing so the POSIX-threads created during an MCTDH-run are distributed and bound
cyclicly to the available processors to prevent thread migration. Of course, this only works if
the numa library is available on your computer.
On NUMA machines (e.g. typical Opteron or Xeon clusters) we observed that execution
times of identical runs may vary by more than 20%. Using the numa.h library, however, these
surprising variations vanish and all runs take almost identical execution times. These times
agree with the shortest times observed without using numa.h.

3.11 Advanced topic: Using parallel distributed memory hard-


ware
Beside parallel shared memory hardware, MCTDH can make use of parallel distributed
memory hardware. For the distributed memory parallelization of MCTDH the Message
1
One should edit compile.cnf be and compile.cnf le as well because compile.cnf is overwritten by one of the
latter files when install mctdh is executed.
2
You may visit http://oss.sgi.com/projects/numa/ to find more information about NUMA API
3.11 Using parallel distributed memory hardware * 35

Passing Interface (MPI) was used. To use the MPI-parallel MCTDH, the keyword usempi
must be set in the RUN-SECTION and the MCTDH program must be started with the
mpirun command. Further the MPI compilation of MCTDH has to be used (see below). To
invoke an MPI-parallel run with 32 MPI-prozesses the command could look like this:

mpirun -np 32 mctdh86.mpi-g77 <inputfile>

Further arguments can be added to the usempi keyword, which disable the par-
allelisation of the MPI-parallel routines. These routines are: calcha (no-calcha),
funka2 (no-funka2), mfields (no-mfields), getdavmat (no-getdavmat),
dsyev (no-dsyev), phihphi (no-phihphi), hlochphi (no-hlochphi) and mpir-
davstep/mpibdavstep (no-dav). These keywords are similar to those used in shared mem-
ory parallelisation with the usepthreads keyword but the last one, no-dav, is different.
This keyword disables the usage of the MPI-parallel routines mpirdavstep/mpibdavstep.
This means that the davidson vectors that are built during an improved relaxation step are
stored on one node and are not distributed. Additionally there is the keyword dav=I, where
I stands for the maximum number of davidson vectors that are stored on one node. If this
keyword is not set the maximum allowed number of vectors (integration order) is equally
distributed over the available nodes (intorder/# of MPI-prozesses). If I is set to a higher
value this can lead to smaller communication costs because the vecors are held on a smaller
number of prozessors.
As in the case of the shared memory parallelisation the results of a parallel calculation
may slightly differ from those of a non-parallel one due to numerical reasons. An example
for a RUN-SECTION in an MPI-parallel run is shown in the following Example:

RUN-SECTION
usempi, no-dsyev
...
end-run-section

Here the parallelisation of the diagonalisation routine DSYEV is turned off. The number
of prozesses is not specified in the RUN-section as is must be done in the shared memory
parallel case. This is done via the mpirun-command (see above).
In the case of the distributed memory parallelization not all parts of MCTDH are paral-
lelized, only the mean-field computation and the A-vector propagation are parallel but not
the SPF-propagation. This is due to the fact that large calculations are A-vector dominated
ones in general. Hence calculations with a considerable contribution from the SPF propaga-
tion to the cpu time are not suited for the MPI-parallel MCTDH. The best tested case was
the H5 O+ 2 -propagation where up to 1024 prozessors were used. This calculation showed a
maximum speedup of 118, this corresponds to a parallel part of over 99%.
If the keyword ptiming is set for an MPI-parallel run the file mpitiming is created.
This file contains timing information for each MPI prozess. An mpitiming-file for a run
with 8 prozesses is shown here:

Process cpu %cpu


-------------------------------------
0 14501.84 12.40
1 15288.35 13.08
2 14399.39 12.32
36 3 Defining the type of calculation to be made

3 13243.32 11.33
4 17475.32 14.95
5 13699.10 11.72
6 13507.77 11.55
7 14790.03 12.65

The first column denotes the MPI process, 0 being the master process, the second column
shows the cpu time spent in each process and the third column gives the percentage of the cpu
time. The Example shows a well paralellized case where the cpu time is equally distributed
over the processes.
If the MPI parallelization is combined with the usage of POSIX threads the fourth column
appears that shows the sum of real time spent in the threads of each prozess. This is similar
to the summation done for the ptiming-files but here the summation was additionally done
over the different routines. The following example is an MCTDH-run with 2 MPI-processes
with 4 POSIX-threads each, denoted by ’(4)’:

Process cpu %cpu sum real time ( 4)


---------------------------------------------------------
0 51811.34 50.31 51574.81
1 51168.49 49.69 51095.79

If the sum of real time is comparable to the cpu time the shared memory parallelization
works well for each prozess (see the comments to ptiming-file in sec. 3.10).
For combined calculations, distributed and shared memory parallelization, a further op-
tion for the ptiming-keyword can be set: ptiming=all. If this is done a ptiming-
file is created for each MPI-prozess, containing the timing information for the parallel rou-
tines. Thereby the quality of the shared memory parallelization within the different MPI-
prozesses can be checked in more detail as by the mpitiming-file. These files are denoted
by ptiming0, ptiming1 and so on. This is mainly for testing.
To combine distributed and shared memory parallelization both, the usepthreads
and the usempi keywords, must be set in the RUN-section and MCTDH must be started
with the mpirun command. For a parallel calculation where each MPI-prozess uses 4
POSIX-threads the RUN-section may look like:

RUN-SECTION
usepthreads=4
usempi
...
end-run-section

Here the parallelization for all routines is working. The MPI-parallel ones are called in
each MPI-prozess where they run in shared memory parallel mode with 4 POSIX-threads.
Additionally in the master-process the other shared memory parallel routines for the SPF-
propagation are used.
Example:

mpirun -np 5 mctdh86.mpi-g77 <inputfile>

The g77-built MCTDH is now run with 5 MPI-processes and 4 POSIX-threads per MPI-
process i.e. 20 cores are used. The specific command to be given may depend on the queueing
system of your computer and hence may differ from the example above.
3.11 Using parallel distributed memory hardware * 37

To be able to start the MPI-parallel MCTDH the program must be compiled with some
additional options. For the standard compilers (g77, gfortran, pgf77, and ifort) additional
sections are included in the script compile.cnf. Depending on the compiler the command is:

compile -m mctdh

or

compile -c mpi-xxx mctdh

where xxx must be replaced by g77, gfortran, pgf77, or intel, respectively. If an-
other compiler should be used an appropriate section in the compile.cnf script must be cre-
ated. The -m option is a shorthand form. It requires that your default compiler is one out of
the four above mentioned compilers. Note that it is essentially that your MPI package was
created with a compiler compatible to the compiler you would like to use 3 .

3
Try to check mpif77 -v and see the manpages for mpif77.
Chapter 4

Selecting a DVR/FBR-representation
for the primitive basis

DVR/FBR-representations are used to set up the single-particle functions of an MCTDH


or the product grid of a numerically exact calculation. The DVR/FBR basis is also called
primitive basis in the following. A comprehensive discussion of the DVR/FBR technique
can be found in Appendix B of the review [1].

4.1 Available DVR/FBR-representations


The DVR/FBR-representations that are implemented in the MCTDH package are compiled in
Tab. 4.1, along with examples for typical applications of them. Also given are the keywords
by which the corresponding primitive basis types are selected in the input file.
The representations of the primitive basis are specified in the PRIMITIVE-BASIS-
SECTION of the input file. The program evaluates this section and stores the information
in the dvr file. The PRIMITIVE-BASIS-SECTION also serves to define the system coordi-
nates, by allocating a label to each degree of freedom in the system. These labels are then
used in other sections, such as the INIT WF-SECTION, the SPF-BASIS-SECTION, and the
HAMILTONIAN-SECTION to map the different sets of information onto the system coor-
dinates.
A complete input file — for the photo-dissociation process of NOCl — is shown in Ex-
ample 4.1. There, three Jacobian coordinates are defined, labelled rd (dissociative degree
of freedom), rv (vibrational degree of freedom), and theta (angular degree of freedom).
Their DVR-representations are sine, Hermite, and Legendre, respectively. The parameters
associated with these representations are explained in the following sections.

4.2 Hermite and radial Hermite DVR


In the Hermite or harmonic oscillator DVR the harmonic oscillator functions
−1/2 √  2
χj (x) = 2j j! (mω/π)1/4 Hj mω (x − x̃) e−mω(x−x̃) /2 (4.1)

are taken as basis functions. The Hermite DVR is thus typically used for vibrational modes.
In the above equation Hj denotes the jth Hermite polynomial and j starts from zero,

38
4.2 Hermite and radial Hermite DVR 39

Table 4.1: The DVR/FBR-representations for the primitive basis which are available in the MCTDH package.
Also displayed are the corresponding keywords that are used in the input file, and a typical application for each
basis type.

DVR/FBR-representation Keyword Typical applications


Hermite (harmonic osci.) DVR HO Vibrational modes
Radial Hermite DVR rHO Vibrational modes
Legendre (rotator) DVR Leg Angular modes (θ)
Restricted Legendre DVR Leg/R Angular modes (θ)
Sine DVR sin Vibrational, angular, and dissociative modes
Laguerre DVR Lagu Boundary condition ϕ(r) ∼ r1/2
Exponential (plane-wave) DVR exp perodic boundaries, φ-angular and diffractive modes
Fast Fourier transform (FFT) FFT Dissociative modes with large grids
Spherical harmonics FBR sphFBR Combined (θ, φ) angular modes
Extended Legendre DVR KLeg Combined (θ, φ) angular modes
Two–Dimensional Legendre DVR PLeg Combined (θ, φ) angular modes
Three–Dimensional rotational DVR wigner Combined (α, β, γ) angular modes

j = 0, 1, . . ., N − 1. Note that the Hermite DVR depends only on the product mω, which
determines the width, and on x̃, which defines the centre of the grid.
A variant of the Hermite DVR is the radial Hermite DVR, which is an appropriate DVR
when the wavefunction is defined on a half-axis [x̃, ∞) only, and satisfies the boundary con-
dition ψ(x̃) = 0. The odd harmonic oscillator functions,

χj (x) = 2 χHO
2j−1 (x) , (4.2)

are chosen as basis, with j = 1, . . ., N and χHO


k given by Eq. (4.1).
A Hermite DVR may be selected in two ways. One is given by the following PRIMITIVE-
BASIS-SECTION:

PRIMITIVE-BASIS-SECTION
X HO 36 0.00 0.10 1822.89
Y HO 36 0.00 2.721,eV 1.0,AMU
end-primitive-basis-section

Here we have assumed that the system under consideration has two degrees of freedom,
labelled X and Y. The keyword HO specifies the harmonic oscillator DVR. The next entry
denotes the number N of basis functions or, equivalently, grid points. The next three numbers
define the equilibrium position x̃, the frequency ω, and the mass m. If the mass entry is
missing, the program sets m to 1.
The above example also demonstrates the use of units. The default unit for times is fem-
toseconds, for all other input variables it is atomic units. (Hence exactly the same DVR is
selected for the two modes X and Y.) A complete list of the available units can be found in
the HTML documentation.
The second way to choose a Hermite DVR is to specify the first and last grid point, by
employing the keyword xi-xf:

PRIMITIVE-BASIS-SECTION
X HO 36 xi-xf -0.528 0.528
Y HO 36 xi-xf -0.528 0.528
end-primitive-basis-section
40 4 Selecting a DVR/FBR-representation for the primitive basis

RUN-SECTION
name = nocl1 propagation
tfinal = 25.0 tout = 1.0
psi=double auto steps gridpop
title = NOCl, propagation, CMF 5 6 6, spf 5 5 5, prim 36 24 60
end-run-section

OPERATOR-SECTION
opname = nocl1
alter-labels
CAP_rd = CAP [ 5.0d0 0.3d0 3 ]
end-alter-labels
end-operator-section

SPF-BASIS-SECTION
rd = 5 rv = 5 theta = 5
end-spf-basis-section

PRIMITIVE-BASIS-SECTION
#Label DVR N Parameter
rd sin 36 3.800 5.600
rv HO 24 2.136 0.272,ev 7.4667,AMU
theta Leg 60 0 all
end-primitive-basis-section

INTEGRATOR-SECTION
CMF/var = 0.5 , 1.0d-5
BS/spf = 10 , 1.0d-6
SIL/A = 12 , 1.0d-6
end-integrator-section

INIT_WF-SECTION
file = nocl0
end-init_wf-section

end-input

Example 4.1: An input file for a wavepacket propagation on the S1 surface of NOCl.

Here the two parameters define the grid points x1 and xN . The program then computes the
corresponding product mω, as well as the equilibrium position x̃ = (x1 + xN )/2. The above
example is thus equivalent to the previous one.
A radial Hermite DVR can be selected in exactly the same way than a Hermite DVR, but
with rHO rather than HO as keyword.

4.3 Legendre DVR


A Legendre or rotator DVR is employed for angular degrees of freedom θ because the asso-
ciated Legendre functions Plm (cos θ) are eigenfunctions of the angular momentum operator
ˆl2 . The basis functions are thus the L2 -normalised associated Legendre functions,
s
2 l + 1 (l − m)! m
χl−m+1 (θ) = P (cos θ) , (4.3)
2 (l + m)! l
4.4 Sine DVR 41

with m ≥ 0 and l restricted to m ≤ l ≤ m + N − 1. The parameter m denotes the magnetic


quantum number and is treated as a fixed parameter. The associated Legendre function Plm
is given by the polynomial

(−1)m 2 m/2 d
 l+m l
Plm (x) = 1 − x x 2
− 1 , (4.4)
2l l! dxl+m
for 0 6 m 6 l.
A Legendre DVR is selected for a coordinate named theta by the line

theta Leg 60 0 all

in the PRIMITIVE-BASIS-SECTION. The first number specifies the number N of basis


functions or grid points, the second one denotes the magnetic quantum number m. The
last keyword controls which symmetry is to be used. For all, all values l = m, m +
1, . . ., m + N − 1 are employed, for odd/even, only odd/even values of l are taken, i.e.
l = m, m + 2, . . ., m + 2N − 2 or l = m + 1, m + 3, . . ., m + 2N − 1.

4.4 Sine DVR


The sine or Colbert-Miller DVR uses the particle-in-a-box eigenfunctions as a basis. The box
boundaries are x0 and xN +1 , and L = xN +1 − x0 denotes the length of the box. The basis
functions are thus
 p
2/L sin (jπ(x − x0 )/L) for x0 ≤ x ≤ xN +1
χj (x) = . (4.5)
0 else

Note that the grid boundaries x0 and xN +1 do not belong to the grid since the wavefunc-
tion vanishes there by construction. The sine DVR has been successfully used in MCTDH
calculations for vibrational, angular, and dissociative degrees of freedom.
A sine DVR is turned on for a coordinate named, say, r by the line

r sin 24 1.0 24.0 short

in the PRIMITIVE-BASIS-SECTION. Again the first number denotes the number N of grid
points. The meaning of the next two numbers depends on the last (optional) keyword, which
can be short (the default) or long. When short is selected, the two numbers are the first
and last grid point, x1 and xN . If the keyword long is present, the two numbers specify the
box boundaries, x0 and xN +1 . The line

r sin 24 0.0 25.0 long

is hence equivalent to the previous one. The grid spacing is ∆x = (xN − x1 )/(N − 1) in the
case of short and ∆x = (xN +1 − x0 )/(N + 1) in the case of long.

4.5 Exponential DVR and fast Fourier transform


The exponential DVR uses plane waves as basis functions. It is therefore often used for
dissociative degrees of freedom. Moreover, exponential DVR and FFT are the only primitive-
basis representations within the MCTDH program that satisfy periodic boundary conditions.
These occur for instance for angular motion or motion parallel to a corrugated surface.
42 4 Selecting a DVR/FBR-representation for the primitive basis

As our implementation of the exponential DVR requires an odd number of basis functions,
we set N = 2n + 1. The basis functions are then written as

χj (x) = L−1/2 exp (2iπj(x − x0 )/L) , (4.6)

with −n 6 j 6 n and L = xN − x0 . The wavefunctions to be represented satisfy periodic


boundary conditions, ψ(x0 ) = ψ(xN ).
The fast Fourier transform (FFT) method may be considered as an exponential DVR
where, however, the derivative matrices are not built but the action of them on the wave-
function is evaluated by two FFTs. The MCTDH program uses a Temperton FFT which
allows one to use grids the length of which can be factorised into powers of 2, 3, and 5, i.e.
N = 2j 3k 5l , where j, k, and l are non-negative integers. For optimal performance, one
should work with a grid length of N = 2j 3k .
Although the exponential DVR and the fast Fourier transform (FFT) are formally equiv-
alent, this does not hold for their efficiency. It is our experience that the exponential DVR
performs faster than FFT for small grids (N . 16), while FFT is faster for large grids
(N & 64). Between these limits both representations are similarly fast.
FFT and exponential DVR have an identical set of input parameters. Supposed there are
two degrees of freedom labelled X and Y, an exponential DVR and an FFT representation are
employed for these coordinates by a PRIMITIVE-BASIS-SECTION reading
PRIMITIVE-BASIS-SECTION
X exp 25 2.2 5.8 linear
Y fft 48 1.5 4.3
end-primitive-basis-section

As usual, the first number defines the number N of grid points. Remember that N must be
odd for an exponential DVR and factorise into powers of 2, 3, and 5 (better 2 and 3 only)
for FFT. If the last keyword is missing or linear, then the remaining two numbers, which
will be called xi and xf in the following, are interpreted as the grid points x0 = xi and
xN −1 = xf . The grid spacing is ∆x = (xf − xi )/(N − 1). Due to the periodic boundary
conditions the first grid point, x0 , and the point xN , which is the one following the last point
on the grid, are to be identified.
Instead of linear, the keywords periodic or s-periodic may be specified, which
changes the interpretation of xi and xf . In both cases, xi and xf are considered identical due
to the periodic boundary conditions. The grid spacing is now ∆x = (xf − xi )/N . For
periodic the parameter xf is taken as N th grid point, xN = xf . For s-periodic the
grid points are additionally shifted by ∆x/2, i.e. x0 = xi + ∆x/2 and xN = xf + ∆x/2.
As an example, the lines
X fft 32 0.00 3.0434 linear

and
X fft 32 0.00 3.1416 periodic

are equivalent.
The keywords periodic and s-periodic are particularly useful to describe angular
degrees of freedom. For angular modes ranging from 0 to some integer fraction of 2π, one
may alternatively use the keywords 2pi or s-2pi. The example above is thus equivalent to
X fft 32 2pi/2

For a more detailed discussion see the HTML documentation.


4.6 Spherical harmonics FBR * 43

4.6 Advanced topic: Spherical harmonics FBR


The spherical harmonics FBR is the appropriate choice when there is rotational motion which
must be described by two angles, θ and φ. The spherical harmonic functions
s
2 j + 1 (j − m)! m
Yjm (θ, φ) = P (cos θ) eimφ (4.7)
4π (j + m)! j

serve as basis functions, where Pjm denotes the Legendre polynomial (4.4). The matrix
elements of the angular momentum operators ̂2 , ̂+ , ̂− , and ̂z are then given by simple
formulas.
Examples for a PRIMITIVE-BASIS-SECTION defining a spherical harmonics FBR for
the set of coordinates alpha and beta are

PRIMITIVE-BASIS-SECTION
alpha sphFBR 9 nosym
beta phiFBR
end-primitive-basis-section

and

PRIMITIVE-BASIS-SECTION
alpha sphFBR 8 sym
beta phiFBR 4 2
end-primitive-basis-section

The keyword sphFBR selects the spherical harmonics FBR and the label phiFBR indi-
cates the second coordinate on which the FBR is based. The number jmax after the keyword
sphFBR or defines the maximum value for j. The j values are j = 0, 1, . . ., jmax for nosym
and j = 0, 2, . . ., jmax or j = 1, 3, . . ., jmax for sym, depending on the parity of jmax . With-
out the optional data mmax , which follows the keyword phiFBR, m takes on the values
m = −j, −j + 1, . . ., −1, 0, 1, . . ., j − 1, j. With mmax (and possibly also ∆m) given,
m takes the values m = − min(mmax , j), − min(mmax , j) + ∆m, . . ., min(mmax , j) −
∆m, min(mmax , j). In the second example we thus have j-values of j = 0, 2, 4, 6, 8.
The corresponding values for m are m = 0 for j = 0, m = −2, 0, 2 for j = 2, and
m = −4, −2, 0, 2, 4 for j = 4, 6, 8, giving an overall number of 19 basis functions.
The order in which the primitive basis sets are declared is, in general, arbitrary. However,
a sphFBR line must be followed directly by a phiFBR line. Moreover, the corresponding
degrees of freedom (alpha and beta in the example above) must be declared as combined
in the SPF-BASIS-SECTION.

4.7 Advanced topic: Restricted Legendre DVR


The restricted Legendre DVR, Leg/R, is very similar to the (ordinary) Legendre DVR, but
can make use of the fact that the angular motion may be restricted to an interval smaller
than (0, π). In such a case one may drop the unused grid-points, assuming that the wave-
function vanishes there. The FBR/DVR transformation matrix is now rectangular rather than
square. The propagation, however, is performed exclusively in the (smaller) set of DVR
grid-points and some speed-up is obtained. For example, one may replace the theta line
in the PRIMITIVE-BASIS-SECTION of the nocl1.inp input file (see Example 4.1 and the
Tutorial) to
44 4 Selecting a DVR/FBR-representation for the primitive basis

theta Leg/r 60 0 all 1.4 2.7

The two last numbers define the range (in radians) to be covered by the grid-points. In the
log file one finds

****** Primitive Basis *********

mode kappa DVR N xi xf dx p-max

rd 1 sin 36 3.800 5.600 0.051429 59.436


rv 2 HO 24 1.620 2.652 0.044849 70.171
theta 3 Leg/R 27/ 60 2.739 1.389 0.051924 m= 0, sym= 0

The last line tells us, that there are 60 FBR functions but only 27 DVR grid-points. For tech-
nical reasons, the locations of the first and last grid-points differs slightly from the inputted
numbers. Comparing the timing files, one finds that the restricted Legendre DVR reduces
the total CPU time by a factor of 1.4 and reduces the time spend for propagating the single-
particle functions of the theta degree of freedom by more than a factor of 4.
The analyse programs plgpop and showd1d86 are useful for determining an appropriate
theta-range. Try plgpop -z 1.e-10 2 3 and showd1d86 -a -y 0.000001 f3.
When using the restricted Legendre DVR it should be the last entry in the
PRIMITIVE-BASIS-SECTION. Due to a bug it otherwise sometimes performs in-
correctly.

4.8 Advanced topic: Extended Legendre DVR (KLeg) and


Two-Dimensional Legendre DVR (PLeg)
Similarly to the spherical harmonics FBR, the extended Legendre DVR employs the spher-
ical harmonics as basis set. It thus defines a two-dimensional representation. As the name
indicates, there is a FBR/DVR transformation from the angular momentum indices ℓ to grid
points θi . There is, however, no such transformation for the {m, φ} pair. The extended Leg-
endre DVR will typically be used to describe angular motion of a molecule with total angular
momentum J > 0. The projection of the angular momentum of the angular motion under
discussion onto the body fixed frame is usually called K or Ω (rather than m). The angle φ,
which is the coordinate canonical conjugate to K, is an Euler angle and does not appear in the
potential. There is thus no point to perform a K ↔ φ transformation. The 2D single-particle
functions, ϕ(θ, K), are hence given in a mixed DVR–FBR representation.
An example for a PRIMITIVE-BASIS-SECTION defining an extended Legendre DVR
for the set of coordinates theta and K is given by

PRIMITIVE-BASIS-SECTION
theta KLeg 31 even
K K -4 4
end-primitive-basis-section

The keyword KLeg selects the extended Legendre DVR and the label K indicates the second
coordinate on which the KLeg representation is based. Similarly to the spherical harmonics
FBR, the KLeg line must be followed directly by a K line, and the corresponding degrees of
freedom (here theta and K) must be declared as combined in the SPF-BASIS-SECTION.
The first number after KLeg specifies the number N of θ-grid points, the following keyword
4.9 Three-Dimensional rotational DVR * 45

controls which symmetry is to be used. For all, all values ℓ = K1 , K1 + 1, . . ., K1 + N − 1


are employed, for odd/even, only odd/even values of ℓ are taken, i.e. ℓ = K1 , K1 +
2, . . ., K1 + 2N − 2 or ℓ = K1 + 1, K1 + 3, . . ., K1 + 2N − 1. Here, K1 denotes the
minimum of |K|, i. e. K1 = 0 if Kmin · Kmax ≤ 0 and K1 = min(|Kmin |, |Kmax |) else. The
numbers following K are the minimal, Kmin , and maximal, Kmax , values for K. The K-grid
thus consists of 9 points for the example above.
The two-dimensional Legendre DVR, PLeg, is similar to KLeg, except that a Fourier-
transformation from K to φ is performed. An example for a PRIMITIVE-BASIS-SECTION
defining a PLeg two-dimensional Legendre DVR for the set of coordinates theta and phi
is given by

PRIMITIVE-BASIS-SECTION
theta PLeg 31 even
phi exp 11 2pi
end-primitive-basis-section

The keyword PLeg selects the two-dimensional Legendre DVR and the label phi indicates
the second coordinate on which the PLeg representation is based. Similarly to KLeg and to
the spherical harmonics FBR, the PLeg line must be followed directly by a exp line, and
the corresponding degrees of freedom (here theta and phi) must be declared as combined
in the SPF-BASIS-SECTION. The number of grid-points of the exponential DVR must be
odd. The 11 points chosen here allow to represent K in the interval −5 ≤ K ≤ 5.

4.9 Advanced topic: Three-Dimensional rotational DVR


(Wigner)
j
Wigner-DVR uses the L2 -normalized Wigner-D functions, Dm,k (α, β, γ), as a basis set.
These are defined as:
r
j 2j + 1 j
Dm,k (α, β, γ) = Dm,k (α, β, γ) (4.8)
8π 2

j
Dm,k (α, β, γ) = e−imα djm,k (β)e−ikγ (4.9)
where α and γ are the Euler angles representing rotation around the space-fixed (SF) and
body-fixed (BF) z-axes, respectively, and β is the Euler angle between the SF and BF z-
axes (where the z-y-z right-handed axis convention is used). The Wigner-(small)-d function,
djm,k (β), is defined as:
D E
ˆ
djm,k (β) = j, m e−iβ JY j, k (4.10)

Wigner-DVR defines a three-dimensional representation which can be used to model rota-


tion of polyatomic molecules. An FBR/DVR transform is used to convert between the angular
momentum index j and the grid points βi . The {m, αi } and {k, γi } momentum-coordinate
conjugate pairs can be used in either momentum or coordinate representation in MCTDH;
in the latter case a discrete Fourier transform switches between grid points and momentum
indices.
A PRIMITIVE-BASIS-SECTION input block defining Wigner-DVR uses three input
lines, one for each Euler angle. For example:
46 4 Selecting a DVR/FBR-representation for the primitive basis

PRIMITIVE-BASIS-SECTION
---------------------------------------------------
# Mode DVR N
---------------------------------------------------
beta wigner 20 all
gamma k -7 7
alpha exp 15 2pi
---------------------------------------------------
END-PRIMITIVE-BASIS-SECTION

The keyword wigner is used to select the L2 -normalized Wigner-(small)-d functions as


the basis functions for the β- angle. The number following the wigner keyword denotes the
number of j-values to be used, and the all keyword denotes that both odd and even j-values
are to be included. For the γ and α angles, the coordinate representation is declared by an
exp line; alternatively, a K line can be used to declare the momentum representation. In the
example above, the alpha DOF is used in coordinate representation, while the gamma DOF
is used in momentum representation. The input line for the β angle must appear first and be
immediately followed by a line for the γ angle, which must then be followed by a line for the
α angle; that is, the order of the degrees of freedom must be given as |J, K, M i. All three
DOF must be declared as combined in the SPF-BASIS-SECTION.
Chapter 5

Defining the single-particle basis

In an MCTDH calculation (propagation or relaxation) the single-particle basis has to be


defined. This is done in the SPF-BASIS-SECTION of the input file. The SPF-BASIS-
SECTION also enables one to treat degrees of freedom as a combined mode, or to select
only a subset of the system degrees of freedom.

5.1 Specifying the number of single-particle functions


In the SPF-BASIS-SECTION the number nκ of single-particle functions to be used for each
degree of freedom κ of the system are listed. Supposed that there are two degrees of freedom,
the SPF-BASIS-SECTION

SPF-BASIS-SECTION
X = 3
Y = 3
end-sbasis-section

assigns three single-particle functions to each mode. Here X and Y are the mode labels which
must coincide with those in the PRIMITIVE-BASIS-SECTION.
If only one single-particle function is used for each degree of freedom, a calculation ac-
tually employs the time-dependent Hartree (TDH) method rather than the MCTDH scheme.
Another special case is obtained for equal numbers of single-particle and primitive basis
functions in each degree of freedom κ, i.e. nκ = Nκ , with Nκ being the number of primitive
basis functions. An MCTDH calculation is then equivalent to a numerically exact one, but
note that numerically exact calculations can be performed much more efficiently by using the
exact keyword (see Sec. 3.6).
Typical numbers of single-particle functions range from nκ = Nκ /20 to nκ = Nκ /3.
Note that the numbers of single-particle functions should obey

f
Y
n2κ 6 n κ′ , (5.1)
κ′ =1

since otherwise there will be redundant configurations in the MCTDH wavefunction. Hence,
one must choose n1 = n2 if there are two degrees of freedom.

47
48 5 Defining the single-particle basis

5.2 Advanced topic: Selecting degrees of freedom from a large


system
For some systems it may be useful to treat only a subset of the specified coordinates.
The program allows one to select coordinates simply by listing only those required in the
SPF-BASIS-SECTION. For instance, if five modes V, W, X, Y, and Z are specified in the
PRIMITIVE-BASIS-SECTION
PRIMITIVE-BASIS-SECTION
V HO 16 0.0d0 1.0d0 1.0d0
W HO 22 0.0d0 1.0d0 1.0d0
X HO 32 0.0d0 1.0d0 1.0d0
Y HO 21 0.0d0 1.0d0 1.0d0
Z HO 12 0.0d0 1.0d0 1.0d0
end-primitive-basis-section

and you wish to include only W, X, and Z in your calculations, this can be accomplished by
the SPF-BASIS-SECTION
SPF-BASIS-SECTION
W = 7
X = 8
Z = 6
end-spf-basis-section

(or by commenting out the corresponding lines for V and Y).


The approximation being made here is that the coupling between the included and ex-
cluded modes is negligible. As a result, the Hamiltonian is built simply ignoring all terms
that include contributions from the excluded degrees of freedom.

5.3 Combining modes to produce multi-dimensional single-par-


ticle functions
For large systems, or when certain degrees of freedom are strongly coupled, it may be advan-
tageous to combine degrees of freedom together and use multi-mode single-particle functions
(see Sec. 4.5 in Ref. [1] for further details).
A combination scheme can be easily specified by grouping together the degrees of free-
dom to be combined in the SPF-BASIS-SECTION. As an example we consider a system
consisting of eight degrees of freedom named r1,. . .,r8. The SPF-BASIS-SECTION
SPF-BASIS-SECTION
r1, r4 = 15
r2, r3, r7 = 10
r5, r6, r8 = 12
end-spf-basis-section

then combines, for instance, the modes r1 and r4 together, and treats them as a single
coordinate in the calculation. The single-particle functions for this coordinate are then two-
dimensional functions in the system coordinates. The number of two-dimensional single-
particle functions is 15 for the combined r1–r4–mode.
In the example given, eight modes have been combined together to produce three modes
for the MCTDH calculation. As the length of the expansion coefficient vector grows ex-
ponentially with the number of modes included in a calculation this drastically reduces the
computational resources required.
5.3 Combining modes to produce multi-dimensional single-particle functions 49

It is important to choose a ”good” combination scheme. One should combine those DOF,
which are most strongly coupled with each other. Then, these correlations are taken care of
at the SPF-level, and the number of SPFs, necessary for convergence, is decreased. Some-
times physical intuition and knowledge of the system helps to identify the strongly coupled
DOFs, but most of the time, this information is missing. Then one takes a more practical
approach. Firstly, one combines those DOFs which have similar frequencies, because modes
with very different frequencies are less likely to couple strongly. Secondly, one should set up
a combination scheme such, that the combined grids have similar size.
One must neither over- nor under-combine. The A-vector length should be larger than
the number of data points needed to represent the SPFs. Otherwise it is likely that one over-
combines. It is always useful to inspect the timing file. The time needed to propagate the
SPFs should take between 2% and 25% of the total effort (CMF scheme assumed).
Chapter 6

Setting up the Hamiltonian

For a quantum dynamical calculation a Hamiltonian operator has to be defined. This is typ-
ically done using the operator file, which is a text file that is read and interpreted by the
MCTDH program. The MCTDH program is capable to parse a variety of mathematical ex-
pressions. This often allows the implementation of a new Hamiltonian without programming
any routines.

6.1 The operator file


The operator file contains all the information the program needs to set up the Hamiltonian.
It must have the extension .op, e.g. hamiltonian.op. Similarly to the input file, the operator
file is divided into sections. In the OP DEFINE-SECTION the Hamiltonian is characterised.
Numerical constants can be specified in the PARAMETER-SECTION. The definition of the
Hamiltonian is contained in the HAMILTONIAN-SECTION. Finally, any labels that are used
to describe the Hamilton operator are compiled in the LABELS-SECTION. The operator file
for the propagation of NOCl on the S1 surface is given as Example 6.1.
In order to select a particular operator file, an OPERATOR-SECTION is required in the
input file. The keywords opname and oppath then point to this file. For instance, with
the OPERATOR-SECTION

OPERATOR-SECTION
oppath = /usr/people/mctdh/operators
opname = nocl1
end-operator-section

the MCTDH or Potfit program would look in the directory /usr/people/mctdh/operators for
the operator file nocl1.op. If the oppath item is not given, the program first looks in the
startup directory (i. e. the directory where the input file is located), then in the directory
specified by the default operator path. (The default operator path is displayed when typing
mctdh86 -max). The operator files that are available in the MCTDH package are tabulated
in the HTML documentation.
If you desire to create a new operator file, the first step is to write the OP DEFINE-
SECTION. In this section the Hamiltonian is given a title, between the keywords title
and end-title. The title will be printed e.g. in the log file. In the NOCl example 6.1 the
operator is labeled “NOCl S1 surface”, by employing the OP DEFINE-SECTION

50
6.2 Defining numerical constants 51

OP_DEFINE-SECTION
title
NOCl S1 surface
end-title
end-op_define-section

PARAMETER-SECTION
mass_rd = 16.1538 , AMU
mass_rv = 7.4667, AMU
end-parameter-section

HAMILTONIAN-SECTION
------------------------------------------
modes | rd | rv | theta
------------------------------------------
-0.5/mass_rd | dqˆ2 | 1 | 1
-0.5/mass_rv | 1 | dqˆ2 | 1
0.5/mass_rd | qˆ-2 | 1 | jˆ2
0.5/mass_rv | 1 | qˆ-2 | jˆ2
1.0 | V
------------------------------------------
end-hamiltonian-section

LABELS-SECTION
V = srffile {nocl1um, default}
end-labels-section

end-operator

Example 6.1: An operator file for the NOCl S1 state.

OP_DEFINE-SECTION
title
NOCl S1 surface
end-title
end-op_define-section

There is no restriction on the format or number of lines used. The next step for creating a
new operator file is described in the following section.

6.2 Defining numerical constants


A Hamiltonian typically contains some numerical constants, such as (reduced) masses, fre-
quencies, or coupling strengths. In the PARAMETER-SECTION of the operator file, labels
can be associated with these constants, which can then be used in the definition of the Hamil-
tonian. This makes the operator file not only easier to read but also very simple to change,
as is depicted in Sec. 6.11.
For example, a PARAMETER-SECTION reading

PARAMETER-SECTION
mh = 1837.15 # hydrogen mass
mc = 21874.7 # carbon mass
end-parameter-section
52 6 Setting up the Hamiltonian

defines the labels mh and mc as the masses of the hydrogen and carbon nuclei (in a.u.). Note
that it is possible to specify the unit of a parameter. The just mentioned example can hence
also be written

PARAMETER-SECTION
mh = 1.0, H-mass
mc = 12.0, AMU
end-parameter-section

The keywords H-mass and AMU stand for hydrogen mass and atomic mass unit. See the
HTML documentation for available units. Furthermore, elementary algebraic operations can
be performed in the PARAMETER-SECTION. Thus, the section

PARAMETER-SECTION
a = 1.0
b = 2.0
c = 3.0
d = 2.0*a+b*c+1.0
e = EXP[ d/9.0-a ]
end-parameter-section

sets d to 9.0 and e to 1.0. The algebraic expression must not contain spaces or brackets!
Only the operators + − ∗ /ˆ are allowed. An exponent acts only on the label to which it is
attached and ∗ / are evaluated before +−. Otherwise the order of operation is strictly from
left to right. Exponents must be numbers (not parameters), they may be signed and real (e. g.:
alphaˆ-0.5 is a valid construct). The exponential form (e. g. 2.3d-5) is allowed for numbers
only. The decimal exponent must be indicated by a d, not by a D, e or E ! See the HTML
documentation (Hamiltonian-Documentation/Parameter-Section) for further details.
The last line of the example above demonstrates the use of functions in parameter arith-
metic. Available functions are:
EXP, LOG, LOG10, SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, ABS,
INT, ATAN2, MIN, MAX.
The definitions of these functions are the usual F ORTRAN definitions. Note that the last three
functions depend on two arguments. The two arguments, which may be numbers, parameters
or numerical expressions, must be separated by a blank or a comma. The keyword for the
function must follow directly the equal sign, not even a minus is allowed in between. No
operations must follow the closing bracket of the function, except possibly a unit.
Some labels have a special, pre-defined meaning. A complete list of these is given in the
HTML documentation. Here we only mention the mass x label (cf. Example 6.1). The value
of this parameter is taken as the mass of the degree of freedom specified by x (as defined in
the PRIMITIVE-BASIS-SECTION of the input file). By default the mass is otherwise set
to 1.0 au. The mass x label can then be used to define the kinetic energy, by employing
the KE operator. The symbol KE belongs to the list of expressions the MCTDH program
can interpret. These will be explained in the following section. Other parameters of special
meaning are PI, jtot, and jbf.

Remarks:

• Parameters cannot be re-defined. A second definition is simply ignored (but protocoled


in the log file). E. g. if a parameter is defined on the command line, then a following
re-definition in the operator-file will be ignored. This, however, makes operations like
6.3 Using symbolic expressions to define the Hamiltonian 53

par=par+1
invalid.

• Since version 8.2.2 it is allowed to put spaces around + and −. However, such spaces
are allowed only in a PARAMETER-SECTION, but not in parameter arithmetic any-
where else (e. g. not within a parameter bracket of an symbolic expression or function).

• One better does not mix parameter arithmetic and units. The statement
par = par1*par2+par3,ev
is valid. The whole expression (not only par3) is divided by 27.211. However, the
statement
par = par1,ev/par2,AMU
is invalid. A unit can only be appended to the end of an expression and it will modify
the value of the full expression.

• A function name must be in upper case letters and the argument(s) of the function must
be in square brackets. No arithmetic is possible with the function. Do the arithmetic
with the parameter which was defined by the function.

• The parameters and their values are protocoled in the op.log file. One may check if the
program has performed the parameter arithmetic in the way expected.

6.3 Using symbolic expressions to define the Hamiltonian


The MCTDH and Potfit programs are able to parse a variety of mathematical symbols, such
as powers, exponential and trigonometric functions, and first and second derivatives. A com-
plete list of these built-in symbols can be found in the HTML documentation. A selection
of these symbols is compiled in Tab. 6.1. For a complete list, please refer to App. C. The
symbolic expressions are used in the HAMILTONIAN-SECTION to define the Hamiltonian.

Within the MCTDH framework the Hamiltonian must in general be given in product form,
s
X
H= cr h(1) (f )
r · . . . · hr , (6.1)
r=1

where f and s denote the numbers of degrees of freedom and Hamiltonian terms, respectively.
This structure is reflected in the HAMILTONIAN-SECTION, which is mainly a table with s
lines and f + 1 columns, containing the coefficients cr and single-particle operators hr .
To make things concrete, let us explain the usage of the symbolic expressions with the
aid of the following two examples. The first one is a fairly simple one, namely a modified
Henon-Heiles Hamiltonian, i.e. two coupled anharmonic oscillators.
The Hamiltonian is
 2     4 
1 ∂ ∂2 x2 + y 2 2 x3 2 x +y
4 x2 y 2
H=− + + + λ xy − +λ + . (6.2)
2m ∂x2 ∂y 2 2 3 16 8

The modification with respect to the original Henon-Heiles Hamiltonian is the last (quartic)
term. It makes the system bound. The corresponding operator file is included as Example 6.2.
As one can see, the Hamiltonian (6.2) is represented by the symbols in the HAMILTONIAN-
SECTION, one product term per line. The mode labels have to match with those in the
54 6 Setting up the Hamiltonian

Table 6.1: A selection of built-in symbolic expressions that can be used to define the Hamiltonian. (For a
complete list please refer to the HTML documentation or to Appendix C.) The variables x and θ represent the
mode labels associated with the corresponding degrees of freedom.

Symbol Operator Description


1 1 Unit operator
q x Multiply by position coordinate x
qˆr xr Multiply by rth power of x
sin sin x Sine of coordinate
cos cos x Cosine of coordinate
tan tan x Tangent of coordinate
exp ex Exponential of coordinate
dq ∂x First derivative
dqˆn ∂xn nth derivativea
KE − 2m1
∂x2 Kinetic energy termb
jˆ2 1
− sin θ ∂θ sin θ ∂θ Angular momentum squaredc
a
Derivatives with n > 2 are only allowed for an FFT primitive-basis.
b
The variable m stands for the mass x label defined in the PARAMETER-SECTION.
c
The given formula is only valid if a Legendre-DVR with magnetic quantum number m = 0 is used.

OP_DEFINE-SECTION
title
Henon-Heiles PES
end-title
end-op_define-section

PARAMETER-SECTION
mass_X = 1.0 mass_Y = 1.0
lambda = 0.2
end-parameter-section

HAMILTONIAN-SECTION
-----------------------------
modes | X | Y
-----------------------------
1.0 | KE | 1
1.0 | 1 | KE
0.5 | qˆ2 | 1
0.5 | 1 | qˆ2
lambda | q | qˆ2
-lambda/3 | qˆ3 | 1
lambdaˆ2/16 | qˆ4 | 1
lambdaˆ2/16 | 1 | qˆ4
lambdaˆ2/8 | qˆ2 | qˆ2
-----------------------------
end-hamiltonian-section

end-operator

Example 6.2: An operator file for a wavepacket propagation using the modified Henon-Heiles Hamiltonian.
6.4 Defining labels 55

PRIMITIVE-BASIS-SECTION of the input file. The coupling parameter λ and the masses
used for the KE keyword are defined in the PARAMETER-SECTION.
The second example is the kinetic energy of a three-atomic molecule with total angular
momentum J = 0 described by Jacobian coordinates r1 , r2 , and θ. The kinetic energy reads
 
1 ∂2 1 ∂2 1 1 1 1 ∂ ∂
T =− 2 − 2 − 2 + sin θ , (6.3)
2µ1 ∂r1 2µ2 ∂r2 2 µ1 r1 µ2 r22 sin θ ∂θ ∂θ

where µ1 and µ2 specify the reduced masses associated with r1 and r2 . The representation
of T in the HAMILTONIAN-SECTION is given by

HAMILTONIAN-SECTION
------------------------------------------
modes | r1 | r2 | theta
------------------------------------------
1.0 | KE | 1 | 1
1.0 | 1 | KE | 1
0.5/mass_r1 | qˆ-2 | 1 | jˆ2
0.5/mass_r2 | 1 | qˆ-2 | jˆ2
------------------------------------------
end-hamiltonian-section

Here we have assumed that the keywords mass r1 and mass r2 have been correspondingly
defined in the PARAMETER-SECTION. (See also Example 6.1). Note that all blank lines
and all lines which start with ----- (5 minus) are ignored.
Another example, the operator file for a 4-mode model of pyrazine, is discussed is Sec.
10. This example also demonstrates how to treat non-adiabatic systems.

6.4 Defining labels


In the tableau of the HAMILTONIAN-SECTION there must appear only simple labels with
or without exponents and products of those. I. e. cos*qˆ 2 is a valid entry but q+qˆ 2 is
not. Simply use two lines to perform the sum. Symbolic expressions with parameters must
not appear in the tableau, one rather must link them to a simple label. This is done in a
LABELS-SECTION. For example

LABELS-SECTION
bcw=expcos[1.1,theta0]
cap1=CAP[ 5.0 0.3 3 ]
dcos=cos1[2.0 5.0*t1]ˆ2
V = natpot {name}
end-labels-section

See the Appendix C for a list of symbolic expressions. In the parameter list, [· · · ], there may
appear numbers, parameters or simple algebraic expressions of those. The different entries
may be separated by a comma or a blank. The use of units is not allowed here. File names,
etc. are given in curly brackets. If a path is relative it is interpreted as relative to the location
of the input file. The entry name simply is a shortcut for the path of the name-directory.
A label may consist of upper or lower case letters (case sensitive!) and numbers. Even
special characters like ”.”, ”:”, ”$”, ”%”, ”&”, or ”?” are allowed. The underscore ” ” how-
56 6 Setting up the Hamiltonian

ever has a special meaning. If one writes a label as


label modelabel
where modelabel denotes a modelabel of one of the dof, then the program puts the corre-
sponding operator in the modelabel column of the HAMILTONIAN-SECTION, assuming
unit operators for all other degrees of freedom. This feature is frequently used for complex
absorbing potentials (CAPs). See Section 6.10 for an example. Remember not to make the
underscore part of a label, except when using this modelabel feature.

6.5 Implementing user-defined 1D-operators


The examples in the previous section have underlined how easily a Hamiltonian operator can
be implemented in many cases into the MCTDH program. Nevertheless, it might happen that
a new 1D-operator is required for a particular problem. When the desired 1D-operator is a
real function, i.e. a potential, then there are three simple ways to implement it. The first way
is to define the function by a set of data points {xi , f (xi )}. This data is written in ASCII
format to a file called, say, data. When one includes in a LABELS-SECTION a statement
like:
V2=external1d{data}

then the data will be read by MCTDH, quadratically interpolated and assigned to the label
V2. As usual, the path given as argument to external1d may be absolute or relative. In the
latter case it is, as usual, relative to the location of the input file. MCTDH reads the data
file (two columns, free format) till it finds an end-of-file. Blank lines and lines beginning
with a hash ’#’ are ignored. The x–values have to be equally spaced. Extrapolation is not
possible, hence the first x-point must be smaller than the first grid-point and the last x-point
must be larger than the last grid-point. For optimal performance, there should be two data
points below the first and above the last grid-point, respectively. The data points should be
dense enough such that the interpolation error is negligible.
The second way is similar to the first one, but here the data must be given precisely at the
grid points. A file of either ASCII or binary format must be generated such that the first line
contains the data for the first grid point, the second line for the second point, etc. Let us call
this file again data. The LABELS-SECTION should now contain the statement
V2=read1d{data ascii}

where ascii is to be replaced by binary if the file data is in binary format. See also
HTML documentation: ”Hamiltonian Documentation”/”Labels-Section”.
The third way is to use the pre-defined label my1d and to edit the subroutine my1d which
is on source/opfuncs/user1d.F. The label my1d is to be used in the same way as e.g. the
label cos, i.e. with or without parameters. One may make use of up to five parameters.
Grid based 1D operators, i. e. matrix representations of 1D operators with respect to the
DVR functions, may also be read in. See the HTML documentation “Hamiltonian Documen-
tation” / “Labels-Section” for details.

6.6 Advanced topic: Defining new symbolic expressions


When a new operator with a new label is to be implemented, this operator must be added to
the operators in the source/opfuncs directory. Operators are divided into four classes, which
6.6 Defining new symbolic expressions * 57

are handled differently by the program. The first of these are grid based operators, such as
the kinetic energy operator in a DVR basis, or a natural potential expansion operator, which
are only defined with respect to a grid. The remaining three classes are all different types of
analytic functions: complex functions (e.g. CAPs), multi-dimensional functions (e.g. non-
separable potential energy surfaces), and real one-dimensional functions. In this and the
following section we will give some examples as to how to implement real one-dimensional
functions. The implementation of multi-dimensional functions is the topic of Sec. 6.8.
Important note: Since version 8.3.10 there are four new files: install/user surfaces,
install/user surfdef, opfuncs/user1d.F and opfuncs/usersrf.F. These were introduced to sep-
arate changes done by a user from changes done by the authors. This new procedure will
simplify an update of the package. When implementing a new one-dimensional potential
function please use now opfuncs/user1d.F. Otherwise the procedure remains unchanged.
There is a default example from MCTDH in the file opfuncs/user1d.F, showing how
users can define their own one-dimensional potentials. There are three subroutines in this
file: ufdef1d, ufunc1d, and my1d. Suppose we use the label “my1d” in the operator file
LABELS-SECTION
my = my1d[p1,p2,p3,p4,p5]ˆp0
end-labels-section

The subroutine my1d will be executed during running MCTDH. Although there is no real
potential coded in this subroutine, one can find instructions on how to implement the user-
defined potentials. To call the subroutine my1d, the program has to identify the label “my1d.”
This is done in the subroutine ufdef1d, where MCTDH reads the label and its parameters,
e.g. p1. The arrays hoprpar and hopipar serve to pass real or integer arguments to the
function definition in subroutine ufuncld. Here we only use the real one. The program by
default stores an exponent r in hoprpar(1) or hopipar(1), depending on its type. If
any parameters [p1,p2,. . .] given in square brackets are present, this is indicated by the
counter np being greater than zero, and the parameters are automatically pushed to the array
elements hoppar(1,np),hoppar(2,np),. . .. Since hoprpar(1) is reserved for the
exponent, there is a shift of arguments between hoprpar and hoppar. If no parameters
have been specified, i.e. np=0, default values are taken for the parameters. Besides the
issue of parameters, each label is given a different function number ifunc and the program
will call different subroutine according to the ifunc number. For example, we have defined
ifunc equals to 1 if the label is my1d in subroutine ufdef1d and in subroutine ufunc1d,
subroutine my1d will be called if ifunc equals 1.
As an example, if you wish to add the cotangent function cot(a ∗ (x − b)) to the pro-
gram, using the label cot. You would then have to edit both the subroutines ufdef1d and
ufunc1d in the file opfuncs/user1d.F, and additionally write a subroutine of the cotangent
function. First, the new function must be coded:
subroutine cot(x,v,a,b)
C cot: cot(a*(x-b))
C this subroutine is called in subroutine ufunc1d
C the parameters are defined in subroutine ufdef1d

real*8 x, v, a, b, r

r=a*(x-b)
v=1.d0/tan(r)

end subroutine
58 6 Setting up the Hamiltonian

Any valid F ORTRAN expression can be employed to define a new function. Then you have
to define the label “cot” in the subroutine ufdef1d and give it a function number ifunc.
Go to the end of the subroutine ufdef1d where the code reads like (near line 60 of file
opfuncs/user1d.F)

ifunc=1

C newfunc ! This is, of course, just an example.


C elseif(label(1:ilbl) .eq. ’newfunc’) then
C ifunc=2

C-----------------------------------------------------------------------
C end of if loop
C-----------------------------------------------------------------------
endif

The next free function number is 2, so you should replace the three out-commented lines with
C cot: cot(a*(x-b))
else if (label(1:ilbl) .eq. ’cot’) then
if (np .gt.0) then
hoprpar(2)=hoppar(1,np)
hoprpar(3)=hoppar(2,np)
else
hoprpar(2)=1.0d0
hoprpar(3)=0.0d0
endif
ifunc=2

Finally, you have to modify the subroutine ufunc1d. Find the following comments
C newfunc EXAMPLE
C Set here the routine you want to call
C
C elseif (ifunc .eq. 2) then
C call newfunc(x,v)

and replace those comments by the following lines


C cot: cot(a*(x-b))
elseif (ifunc .eq. 2) then
call cot(x,v,hoprpar(2),hoprpar(3))

This completes the modifications for implementing the cotangent function. After recompiling
the program (type compile mctdh), the new label cot may be used in the HAMILTONIAN-
SECTION. When the label cot is used with parameters, it must – as usual – be assigned to
a simple label in a LABELS-SECTION (see Sec. 6.4).

6.7 Advanced topic: Implementing separable potentials


In favorable cases the potential energy surface may be expressed by the built-in symbols
known to the program, as has been discussed in Sec. 6.3. If this is not possible, new symbolic
6.7 Implementing separable potentials * 59

expressions have to be introduced as detailed in the previous section. In some cases, however,
it may be more convenient to set up a set of labels specifically for a complicated separable
potential, i.e.
s Y
X f
V (x1 , . . ., xf ) = Vki (xi ) , (6.4)
k=1 i=1
where f and s denote the numbers of degrees of freedom and Hamiltonian terms, respec-
tively. Let us further assume that you provide a F ORTRAN-routine, say mypot, stored in a
file source/opfuncs/mypot.f, to evaluate the one-dimensional potentials v = Vki (x) in depen-
dence of k, i, and x (v and x in a.u.):

subroutine mypot (k,i,x,v)


integer k,i
real*8 x,v
...
end

The first step then is to add this file to the operator library, by inserting the line

$(AR_OPFUNCS)($(PATH_OPFUNCS)/mypot.o) \

at the corresponding position into the install/Makefile.


The second step is to establish labels for the one-dimensional potentials. Although the
choice of these labels is arbitrary, we strongly recommend the use of some systematic nomen-
clature, e.g. mypot1:1, mypot2:1, mypot1:2, etc., where the first number denotes k
and the second i. For instance, with s = 3 and f = 2 the potential would then be defined by
the lines

1.0 | mypot1:1 | mypot1:2


1.0 | mypot2:1 | mypot2:2
1.0 | mypot3:1 | mypot3:2

in the HAMILTONIAN-SECTION.
Next, a link between these labels and the potential routine is needed. This is done by
adding the lines

8 call mypot(ipar(2),ipar(3),x,v)
return

to subroutine callanld in the file source/opfuncs/callanld.f. The file number 8 should be


the next free number in that subroutine. For this to work properly, you have to store the in-
dices k and i in ipar(2) and ipar(3) before. (Remember that ipar(1) is reserved for
an exponent, if present.) This can be accomplished by inserting a new subroutine defmypot
into your mypot.f file:

subroutine defmypot (label,file,k,i)


integer file,k,i,a,b,c
character*(*) label

if (label(1:5) .eq. ’mypot’) then


a = 5
b = index(label,’:’)
c = index(label,’ ’)
read(label(a+1:b-1),*) k
read(label(b+1:c-1),*) i
60 6 Setting up the Hamiltonian

file = 308
endif
return
end

The number 5 must match the number of characters in the name mypot, and file must be
300 plus the file number introduced above. Finally, add the lines

call defmypot(buffer,ifile,hopipar(2),hopipar(3))
if (ifile .ne. 0) go to 99

to the subroutine defanld in the file source/opfuncs/callanld.f, and recompile.


We close in noting that it is possible — analogous to what was said in Sec. 6.6 — to pass
additional parameters to the potential routine mypot, by employing the arrays hopipar,
hoprpar, and hoppar.

6.8 Advanced topic: Implementing non-separable potentials (po-


tential surfaces)
It is also possible to include non-separable potentials into the MCTDH program, i.e. po-
tentials that cannot be written in the product form (6.4). Because the direct evaluation of a
non-separable potential makes an MCTDH calculation extremely inefficient, they are typi-
cally used in numerically exact calculations (propagation, relaxation, or diagonalisation) or
to generate a separable potential fit using the Potfit program. The MCTDH program can
however use them as they are, which may be useful for checking purposes. Note that the use
of a multi-dimensional potential is not of disadvantage, if it operates on the coordinates of
one MCTDH particle (combined mode) exclusively. See Section 6.13.
Another application of non-separable potentials is the MCTDH method in combination
with the CDVR scheme (see Sec. 9.4.3). If the CDVR method is to be used during the prop-
agation, the keyword analytic pes should be included in the OPERATOR-SECTION.
This means that the generated potential operator will not be explicitly calculated on the prim-
itive grid points, but will be stored in the oper file in an “analytic” form which can be evalu-
ated on-the-fly at any point in coordinate space.
For the convenience of the user, there is already a dummy routine source/surfaces/mysrf.f
and one merely places the code of the new potential energy surface there. When editing
mysrf.f one finds a brief description of how to make the necessary modifications on the file
source/opfuncs/usersrf.F. This simplified procedure is convenient for a quick implementa-
tion of a new surface. However, it does not allow to pass surface options to the program. If
options are needed or if more than one potential energy surface is to be implemented, one has
to go the proper, slightly more elaborate way described next.
However, the most easiest way to include a multi-dimensional potential into MCTDH or
POTFIT is via the readsrf keyword. In the LABELS-SECTION of an MCTDH operator
file there would appear the statement

Vmd=readsrf{data ascii}

where data gives the path of the data file and ascii might be replaced by binary, if the
file is in binary format. For POTFIT one would write

pes=readsrf{data ascii}
6.8 Implementing non-separable potentials (potential surfaces)* 61

in the OPERATOR-SECTION of the POTFIT input file.


The file data must contain the potential energy values at the grid points, just the energies
and one energy per line. The order is implicitly defined by the Primitive-Basis-Section, or (in
mctdh) by a |i&j&k (i,j,k=1,2,...) construct of the Hamiltonian-Section. Note: first index
runs fastest. There is no check for the consistency of the data.
Important note: Since version 8.3.10 there are four more files, which were introduced
to separate changes done by a user from changes done by the authors. This new proce-
dure will simplify an update of the package. Rather than editing the Makefile, please edit
now the two files install/user surfdef and install/user surfaces. Similarly, rather than edit-
ing opfuncs/funcsrf.F, please edit now the file opfuncs/usersrf.F. For implementing new 1D
functions, please use the file opfuncs/user1d.F.
The implementation of a non-separable potential follows the same philosophy as that of
separable potentials, now with source/opfuncs/usersrf.F being the relevant file to modify.
Let us again assume that you provide a F ORTRAN-routine, say newsurf, stored in a file
source/surfaces/newsurf.f, to evaluate the non-separable potential v = V (~ x) in dependence
of the coordinate vector x(i) = ~xi (v and ~x in a.u.):

subroutine newsurf (x,v)


real*8 x(*),v
...
end

As a first step one has to provide a default routine, in case the new surface is not linked.
I. e. one creates a file DEF newsurf.f on the directory source/surfaces, and writes to it e. g.
(see source/surfaces/ for examples)

subroutine newsurf (x,v)


real*8 x(*),v
write(6,’(a,/a)’) ’###########################################’,
+ ’newsurf is not linked. Run compile with -i option.’
write(2,’(a,/a)’) ’###########################################’,
+ ’newsurf is not linked. Run compile with -i option.’
stop
end

Note that the file DEF newsurf.f may also need to include dummy routines for other subrou-
tines which are on the source/surfaces/newsurf.f file. In particular, if the routine newsurf
contains an entry point, the dummy routine must have a corresponding entry point as well.
If the program compiles but does not link, after having added a new surface, it is likely that
there is a mistake in the dummy routine.
The next step then is to ensure that these two file will be compiled, by inserting the line

SURFDF1 = $(AR_SURFDEF)($(PATH_SURFACES)/DEF_newsurf.o)

into install/user surfdef. Finally insert

newsurf.o : $(PATH_SURFACES)/newsurf.f
$(FC) $(FFLAGS) -c -o $@ $?

into install/user surfaces. Note that the second line starts with a tab and not with a series of
blanks. The two files install/user surfdef and install/user surfaces will be sourced (i. e. read)
by the Makefile. They hence contain the personal additions to the Makefile. Similarly, the
62 6 Setting up the Hamiltonian

files opfuncs/user1d.F and opfuncs/usersrf.F contain the personal additions to the F ORTRAN
code.
The subroutine newsurf will be called from the MCTDH or Potfit program via the
subroutine uvpoint (i. e. user V point) which is located on the file opfuncs/usersrf.F.
At the end of the subroutine uvpoint a call to the new surface routine must be added.
For this in-comment
elseif(ifunc .eq. 2) then

(near line 107 of file opfuncs/usersrf.F) and replace the line following this if-statement with
call newsurf(gpoint,v)

The array gpoint contains the coordinates in the order specified in the HAMILTONIAN-
SECTION, via the mode-line and the |i&j&k construct. (See Section 6.13).
The surface number hopilab, 2 in our example, then has to be defined. (Note,
hopilab is called ifunc in some routines). This is done in subroutine udefsrf, which
also is stored on source/opfuncs/usersrf.F. Add lines such as
else if (label(1:ll) .eq. ’newsurf’) then
write(ilog,’(a)’) ’newsurf, <remarks> ’
hopilab = 2

to this subroutine. If the surface depends of parameters or options, these options have to be
read here. See subroutine defsrf on opfuncs/funcsrf.F for examples.
Finally, we want the program to write some information to the log file, when the multi-
dimensional potential energy surface is used. To this end one has to edit the subroutine
usersurfinfo on the file opfuncs/usersrf.F. One should briefly describe the surface and
then name the coordinates. The string mlabel(j) contains the modelabel of the j-th coor-
dinate of mysurf, as assigned in the Hamiltonian-Section. For example, the code added to
usersurfinfo may read
elseif( hopilab .eq. 2 ) then
write(ilog,’(a)’) ’newsurf. V(x,y,z) = beta-function’
write(ilog,’(2a)’) ’x : ’,mlabel(1)
write(ilog,’(2a)’) ’y : ’,mlabel(2)
write(ilog,’(2a)’) ’z : ’,mlabel(2)
jj=4 ! This is dimension+1

Finally, recompile. Include the new surface by running compile with the option -i newsurf.
(See HTML documentation Installation and Compilation/Compiling the Programs)
Please be reminded again, that only real, multi-dimensional potential functions should be
implemented on usersrf.F. For one-dimensional real functions please use user1d.F
(or funcanld.F), for complex functions use funcanlz.F, and for grid based operators
use funcgrd.f.
The new potential surface is selected in the HAMILTONIAN-SECTION using the V (or
any other not pre-defined) label and the LABELS-SECTION.
 Assuming that the Hamiltonian
is given by H = −1/2m ∂x2 + ∂y2 + ∂z2 + V (x, y, z), the HAMILTONIAN-SECTION
reads
HAMILTONIAN-SECTION
-------------------------------
modes | x | y | z
-------------------------------
6.9 Incorporating natural potentials 63

1.0 | KE | 1 | 1
1.0 | 1 | KE | 1
1.0 | 1 | 1 | KE
1.0 | V
-------------------------------
end-hamiltonian-section

The label V is defined in the LABELS-SECTION


LABELS-SECTION
V = newsurf
end-labels-section

in the operator file.


If the order of the arguments of V differ from the order defined in the mode-line then the
order has to be explicitly specified. E. g. turning to the above example but cyclic interchang-
ing the modes the HAMILTONIAN-SECTION reads
HAMILTONIAN-SECTION
-------------------------------
modes | z | x | y
-------------------------------
1.0 | KE | 1 | 1
1.0 | 1 | KE | 1
1.0 | 1 | 1 | KE
1.0 |2&3&1 V
-------------------------------
end-hamiltonian-section

because the first argument of V is the second mode etc. See the HTML documentation and
Section 6.13 for further details.

6.9 Incorporating natural potentials


With the aid of the Potfit program potential surfaces can be fitted to the product form 6.4.
These fits are known as natural potential fits. Natural potentials are the method of choice
to employ non-separable potential surfaces in an MCTDH calculation. How such a fit is
generated will be discussed in Sec. 13.1. We only mention that the Potfit program requires
the (non-separable) potential to be implemented in the operator library in exactly the same
way as described in the previous section.
After having constructed a natural potential fit, it may be used in the MCTDH program
by correspondingly defining the label V in the above example:
LABELS-SECTION
V = natpot{directory}
end-labels-section

Here directory denotes the path to the directory containing the natpot file, which is created
by the Potfit program. Replacing the path by the keyword name, i. e. natpot{name},
indicates that the natpot file is in the name-directory, i.e. the directory the output is directed
to.
Note that MCTDH uses the modelables to let the potential operate on the degrees of
freedom (or on combined modes, i. e. MCTDH particles) in the correct order. It is hence
64 6 Setting up the Hamiltonian

recommended to use an unnumbered Hamiltonian line (e. g. | V ) rather than a numbered


one (e. g. |1&2&3 V ) when V refers to a natural potential. One may put the symbol | V
in any column, and it may be convenient to place it in the first column. If a numbered Hamil-
tonian line is used, however, the numbers must be consistent with the modelabels. Otherwise
the program will stop. If one gives the keyword ignore as argument to natpot{· · · } in the
Labels-Section, then the modelabels are ignored and the assignment of the modes or DOFs
is done exclusively by using the numbers. As a final remark we note that the modelabels of a
natpot may be altered by running chnpot86.
There are some restrictions when using natural potentials (natpots). natpots cannot be
multiplied with another operator (except a constant). Hence a construct like | cos*V is
not allowed. However, if the natpot does not operate on all DOFs or particles, it may be
combined with operators acting on the remaining DOFs or particles. E. g. if the natpot V
does not operate on the first DOF, the following Hamiltonian line is allowed
const | dqˆ2 | V

This, however, does not hold if the other operator is also a natpot. I. e.
const | V1 | V2

is not a valid Hamiltonian line if V1 and V2 are both natpots. One cannot multiply natpots
with each other.

6.10 Using complex absorbing potentials (CAPs)


Complex absorbing potentials (CAPs) can be employed to reduce the lengths of the primitive
grids. CAPs are also useful for computing S-matrix elements in scattering processes. Please
refer to Chaps. 4.7 and 8.6 of the review [1] for details.
The CAPs −iW that can be employed in the MCTDH program are one-dimensional and
monomial, i.e. of the form

−iW (x) = −iη |x − xc |b Θ ± (x − xc ) . (6.5)

The parameters xc , η, and b denote the starting point, strength, and order of the CAP, respec-
tively. Θ specifies Heaviside’s step function. When the positive sign is used, the CAP lies to
the right of xc , otherwise it is located to the left of xc .
Let us assume that your system under investigation has three degrees of freedom, labeled
x, y, and z. To turn on CAPs for, say, the first two modes, add the lines
1.0 | cap1 | 1 | 1
1.0 | 1 | cap2 | 1

to the HAMILTONIAN-SECTION. The labels cap1 and cap2 (or any other labels you have
chosen) are then defined in the LABELS-SECTION:
LABELS-SECTION
cap1 = CAP [ 5.0 0.375 3 +1]
cap2 = CAP [ 1.0 0.240 2 -1]
end-labels-section

The parameters in square brackets are from left to right the starting point xc , strength η (both
in a.u.), and order b of the CAP. The last number specifies whether the CAP lies to the right
(+1, which is also the default), or left (−1) of xc . Note, the input [· · · ] may consist of
numbers, parameters or algebraic expressions containing numbers and parameters. Hence
6.10 Using complex absorbing potentials (CAPs) 65

cap1 = CAP [ 3.0+x0 1.0d-3*strength 3 +1 ]

is a valid statement, provided the parameters x0 and strength are defined.


The described way of including CAPs has the disadvantage that the CAPs are hard-wired
in the operator file. The MCTDH program therefore offers the opportunity to switch on CAPs
from the input file, without any change of the HAMILTONIAN- or LABELS-SECTION in
the operator file. To this end include the lines
alter-labels
cap_x = CAP [ 5.0 0.375 3 +1]
cap_y = CAP [ 1.0 0.240 2 -1]
end-alter-labels

in the OPERATOR-SECTION of the input file. The special keyword cap1 x, where x stands
for one of the mode labels, tells the program to add a CAP to the corresponding degree of
freedom. See Section 6.4 for more details on the special meaning of the underscore ( ) within
a label.
The optimal values of the CAP parameters, i. e. the Cap length, CAP strength, and CAP
order, need to be determined. It is our experience, that the optimal CAP order is 2 or 3 (the
larger the energy range, Emax /Emin , the larger the optimal CAP order). The CAP length
should be as small as possible in order not to waist grid points. On the other hand, a short
CAP requires a large CAP strength which in turn, produces unwanted CAP reflexions. The
program reflex86 computes an estimate of the CAP transmission and CAP reflexion. This
estimate, derived in Ref. [26], is very accurate for a free particle. To determine the optimal
CAP parameters, one needs to know the lowest and highest kinetic energy component for the
CAP degree of freedom with which the particle enters CAP. These energies are sometimes
difficult to estimate. If one has used FFT (or exponential DVR) for the CAP degree of free-
dom, the command showd1d86 -a -pop2 -y 0.01 fx (x denotes the number of the degree of
freedom of the CAP) displays the momentum distribution from which the desired energies
can be calculated.
The program reflex86 is most conveniently called through the shell script plcap. The
parameters necessary for the calculation are given as options and arguments. The program
prompts for missing input. To give an example, let us turn to NOCl. Type
plcap -n 3 -m 16 -l 0.6 -e 0.3 0.1 2.0 ev

This computes the reflection– and transmission–probability for a CAP order of 3, a (reduced)
mass of 16 atomic mass units, a CAP length of 0.6 a.u., a CAP strength of 0.3 a.u. and for
the energy interval 0.1 – 2.0 eV. A G NUPLOT window pops up which displays the reflection–
and the absorption–probabilities and their sum. plcap then prompts you for new options.
Type -h to see the list of options, or type -z 1.e-7 to arrive at a more convenient scale. If
one inputs -e ?, the program will compute the optimal CAP strength for the given energy
interval.
The distribution of kinetic energies of dissociating NOCl lies between 0.2 eV and 1.6
eV, thus the reflection– and absorption–probabilities are below 10−4 , which is a fairly good
value. The precise values of the CAP parameters are usually not very critical, except when
very low kinetic energies are present. Very low kinetic energies may appear when an internal
excitation takes almost all of the available energy. The low kinetic energy contributions
are more strongly reflected from the CAP and these reflections lead to artificial oscillatory
structures in e. g. the reaction probability. Fig. 3 of Ref. [12] shows such an small artificial
structure near 1.25 eV, i. e. close to the v = 2 threshold. As discussed in Ref. [12] this small
artificial structure disappears when using a longer and weaker CAP.
66 6 Setting up the Hamiltonian

# Parameter file for the Henon-Heiles system


lambda = 0.4
end-parameter-file

Example 6.3: A parameter file for the Henon-Heiles Hamiltonian.

6.11 Advanced topic: Altering a Hamiltonian from input file


or command line
The concrete form of the Hamiltonian, i.e. the values of parameters defined in the PARAM-
ETER-SECTION and the meaning of labels specified in the LABELS-SECTION of the oper-
ator file, can be overridden in different ways. Let us first consider the change of parameters.
One possibility is to write the parameters to be changed into a file. Example 6.3 shows an
example for such a parameter file, again for the Henon-Heiles system. To read this file and
use its settings insert the keyword
parfile = mypara/hh.par

into the OPERATOR-SECTION of your input file. Here it was assumed that the parameter
file is named hh.par and resides in the directory mypara (relative to the path of the input file).
A second way is to include the alter-parameter and end-alter-parameter
keywords in the OPERATOR-SECTION of the input file. All parameter definitions in-
between replace the corresponding parameters in the PARAMETER-SECTION of the op-
erator file. For instance, the lines
alter-parameter
lambda = 0.4
end-alter-parameter

in the OPERATOR-SECTION of the input file set the coupling parameter λ of the Henon-
Heiles potential, Example 6.2, to 0.4 a.u. The format of the parameters is the same as in the
PARAMETER-SECTION of the operator file.
The third method makes use of command line parameters. Starting a calculation employ-
ing the -p option, e.g.
mctdh86 -D new -p lambda 0.4 hh

would run a new calculation with the input file hh.inp, but with the coupling parameter λ
twice as strong as defined in the operator file. The -D option means that the results are written
this time to the name-directory new. There may be more than one parameter definition and
the parameters may carry a unit. Thus
mctdh86 -p lambda 10.9,eV -p mass_Y 1.5 hh

is also a valid command.


The order of precedence of parameters defined from different sources is command line,
input file, parameter file, operator file. Thus parameters in the operator file are the default
values, which can be altered in a run in a variety of ways.
The labels in the LABELS-SECTION of the operator file may also be modified without
altering the operator file. This is done using the alter-labels keyword. One example
for this was presented before in Sec. 6.10, where complex absorbing potentials were added
to the Hamiltonian. Another typical example is to switch between different implementations
of a potential. Supposed the potential to be used is represented by the label V in the line
6.11 Altering a Hamiltonian from input file or command line * 67

# Uwe Manthe fit NOCl S1 surface

PARAMETER-SECTION
theta0 = 127.4, deg

c000 = 0.0384816 c001 = 0.0247875 c002 = 0.0270933 c003 = 0.00126791


c004 = 0.00541285 c005 = 0.0313629 c006 = 0.0172449
...
end-parameter-section

HAMILTONIAN-SECTION
modes | rd | rv | theta

1.0 | 1 | v:NO | 1
c000 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ0
c001 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ1
c002 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ2
c003 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ3
c004 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ4
c005 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ5
c006 | bcrdˆ0*1qd | bcrvˆ0 | bcwˆ6
c010 | bcrdˆ1*1qd | bcrvˆ0 | bcwˆ0
c011 | bcrdˆ1*1qd | bcrvˆ0 | bcwˆ1
.....
end-hamiltonian-section

LABELS-SECTION
bcrd = exp1[-1.5,4.315]
1qd = exp[-1.5,4.315]
bcrv = q[2.136]
bcw=expcos[-1.1,theta0]
end-labels-section

end-operator

Example 6.4: A surface file containing the M ANTHE analytic fit to the NOCl S1 potential energy surface.

1.0 | V

of the HAMILTONIAN-SECTION and defined as


LABELS-SECTION
V = mysurf
end-labels-section

in the LABELS-SECTION of the operator file. Then you may add


alter-label
V = natpot{name}
end-label-parameter

to the OPERATOR-SECTION of your input file. The program then uses the natural potential
fit stored in the name-directory rather than the potential surface labeled mysurf.
It is also possible to move some part of the Hamiltonian section, e.g. the potential, to
a separate file, called surface file. Use of this is made in Example 6.1, where only the
kinetic energy part is defined in the HAMILTONIAN-SECTION. The (separable) poten-
tial is stored in the surface file nocl1.srf, part of which is displayed in Example 6.4. (See
68 6 Setting up the Hamiltonian

$MCTDH DIR/operators/nocl1um.srf for a complete listing and compare it with Eqs. (32,33)
of Ref. [4]).
The surface is defined in the Hamiltonian by

LABELS-SECTION
V = srffile {nocl1, directory}
end-labels-section

Here directory denotes the path to the directory containing the nocl1.srf file. Replacing the
directory by the keyword oppath indicates that the surface file is in the same directory as
the .op file. The keyword default will make the program look for the .srf file in the default
operator directory. Using again the alter-label keyword in the OPERATOR-SECTION
of the input file, one may select a different potential with a minimum of effort.
Finally we note that is is possible to impose an energy cut-off on a non-separable potential
energy surface by using the v keyword in the operator section of the input file. This is detailed
in the HTML documentation.

6.12 Setting up Auxiliary Operators


In addition to the system Hamiltonian, other operators may be required, e.g. to generate
eigenfunctions of a zero-order Hamiltonian for the initial wavepacket (see Sec. 7.6), or to
calculate the time-evolution of an expectation value (either using the expect keyword in
the RUN-SECTION, or the ANALYSE program EXPECT). Operators needed during a run
must be included in the .op file. They are defined exactly as the system Hamiltonian, but are
delimited by

HAMILTONIAN-SECTION_XXX
.
.
.
end-hamiltonian-section

where XXX is a label to distinguish the operator. Operators to be used in any post-
propagation analysis can also be set up in a separate .op file, i.e. one not containing the
system Hamiltonian. The RUN-SECTION keyword genoper = S can then be used to set
up the operators in the file S.op to the read-write file oper S.
To check that these operators are used correctly it is necessary to understand the working
of the program internal flag diag assigned to each operator of which the total operator is
composed. If this flag is set to .true. then the operator is a unit operator and it will not be
explicitly evaluated. This has an obvious advantage for the efficiency of the program. The
program also uses these flags to determine which operator terms are separable, i.e. product
terms in which all operators except for one are unit operators.
In some cases, however, unit operators must be explicitly evaluated. An example is when
the matrix elements hϕ̃a | h | ϕb i are required, where {ϕ̃} and {ϕ} are different basis
sets, which happens when e.g. the operate keyword is used. For this reason there is a flag
nodiag assigned to each operator, which when set to .true. turns off the use of the diag
flag. This flag is set by default to .true. by the program, but can also be set by hand using
nodiag or usediag as the very first keyword in the HAMILTONIAN-SECTION XXX.
How this flag is set is listed in the log and op.log files. Note that the system Hamiltonian and
the operators used for eigenf, meigenf, expect, and pexpect must be of usediag
6.13 DOF, mode, and muld potentials 69

type. For operate, fmat, crosscorr, and flux the nodiag variant is required. If the
keyword expect is given in the RUN-SECTION, the flag is automatically set to usediag.
It could become necessary to implement the same operator twice, once with usediag, once
with nodiag.

6.13 DOF, mode, and muld potentials


The potential functions from which the Hamiltonian is build are mostly one-dimensional.
They are accessed through symbols like q, sin, or vh2. However, MCTDH can also use
multi-dimensional potential functions. These are defined in funcsrf.F of usersrf.F. If the
multi-dimensional potential operates on one particle (i. e. on one combined mode) it is a
particle (or mode) operator. Otherwise it is a so called muld–potential. The use of muld
potentials makes the propagation slow and in general one will use potfit to generate a nat-
ural potential, which is a sum of products of DOF (or mode) potentials. However, there is
no disadvantage in using (multi-dimensional) mode potentials. The MCTDH program will
recognise a multi-dimensional potential as mode potential, if it operates on all DOFs of one
mode, but on no other DOF. Assume that there is a symbol fxy which refers to a potential
function f1 (x, y). A Hamiltonian-Section may then read

HAMILTONIAN-SECTION
-----------------------------------------
modes | R | x | y | z | theta
-----------------------------------------
.
.
const |2&3 fxy |5 cos
.
.
-----------------------------------------
end-hamiltonian-section

or equivalently

HAMILTONIAN-SECTION
-----------------------------------------
modes | R | x | y | z | theta
-----------------------------------------
.
.
const | 1 |& fxy | 1 | cos
.
.
---------------------------------------
end-hamiltonian-section

If x and y are uncombined, then fxy will be treated as a muld potential, but when x and y
are combined to form a MCTDH particle, then fxy will be treated as mode operator. Inspect
the op.log file. After the operator terms are summed (if possible), they are listed under the
heading

Hamiltonian Operator Terms [h,htmdof,htmmode,htmmuld,htmtype,htmsym,string]


No. f m md Typ Sym Term
70 6 Setting up the Hamiltonian

A non-zero entry in the column f or m denotes that the operator term acts on the DOF f or
the particle m, respectively.
If however x,y, and z would form one MCTDH particle, then fxy would not be recog-
nised as a mode operator, because it does not act on all DOFs of the mode. One has to include
z as a dummy DOF

HAMILTONIAN-SECTION
-----------------------------------------
modes | R | x | y | z | theta
-----------------------------------------
.
.
const |2&3&4 fxy |5 cos
.
.
-----------------------------------------
end-hamiltonian-section

or equivalently

HAMILTONIAN-SECTION
-----------------------------------------
modes | R | x | y | z | theta
-----------------------------------------
.
.
const | 1 |&& fxy | cos
.
.
---------------------------------------
end-hamiltonian-section

Assume that there is another symbol fzx, which refers to the function f2 (z, x). An
inclusion of this function may look like

HAMILTONIAN-SECTION
-----------------------------------------
modes | R | x | y | z | theta
-----------------------------------------
.
.
const |4&2&3 fzx |5 cos
.
.
-----------------------------------------
end-hamiltonian-section

Note that the dummy variable(s) must be the last one(s). The symbol fzx is simply inter-
preted here as f2 (z, x, y) with no dependence on y. Note that one can freely re-order the
arguments of a multi-dimensional function when using a numbered Hamiltonian line.
The use of muld potentials is restricted as there must be no “holes” in the order of modes
and of DOFs within a mode. I. e. a muld potential may operate on mode 2, 3, and 4 but
must not operate on mode 2 and 4 only. In the latter case there is a hole (mode 3). Holes
are only allowed at the beginning and the end of a muld potential. One may fill the holes by
6.14 Golden rules for writing operator files 71

incorporating dummy variable as done above. However, this will make the application of a
muld potential even more expensive. One rather should try to re-order the modes and DOFs
to avoid the holes. In any case, it is advisable to transform a muld potential to a separable
natpot by using potfit (see Section 13.1). How a natpot is incorporated is discussed in Section
6.9.
Finally an important note. It is not possible to re-order the arguments or to add dummy
variables if the special multi-dimensional “function” readsrf is used. In this case the re-
ordering and/or addition of dummy variables must be done on the readsrf data file.

6.14 Golden rules for writing operator files


General remarks
File-names, modelabels, labels and parameters are case sensitive! Hence most parts of the
operator file are case sensitive (in contrast to the input file). All input is assumed to be in
atomic units. In contrast to the input-file this holds also for times. One hence has to explicitly
give the unit fs when a parameter value is given in femto-seconds.
Parameter-Section (See also Section 6.2)
Parameters are real numbers. When real a number appears in the Parameter-Section it should
include a dot. E. g. one should use 2.0 rather than 2 . Numbers in exponential format,
e. g. 1.0d-2 should be avoided, if the exponent is not large. Use 0.01 in this case.
The letter indicating the exponent must be a lower case d; a D, e, or E will not work. One
may perform simple arithmetic with the parameters (see Section 6.2). In particular one may
exponentiate a parameter. The exponent, however, must be a number and cannot be another
parameter. (Use the function EXP for exponentiation). If the exponent is integer, write it as
integer, e. g. write parˆ3 rather than parˆ3.0 . Note that the exponent can be real and
also negative, e. g. parˆ-0.5 is possible. The use of brackets is not allowed. Rather
than writing
cent = j*(j+1)/(2*mass) one has to write
cent = 0.5*jˆ2/mass + 0.5*j/mass .
The string which is used to specify a parameter may consist of upper or lower case letters,
numbers, and the special characters

. _ ˜ @ $ % & ?

Note in particular that the colon (:) is not allowed to be part of a parameter name. It is
recommended to choose names which start with a letter. Note that there is a pre-defined
parameter PI with obvious meaning.
There is a special parameter, called mass modelabel where modelabel is a label which
was assigned to one of the degrees of freedom in the Primitive-Basis-Section. This special
parameter should be set to the (reduced) mass of the indicated degree of freedom. This
parameter is used in connection with the KE keyword and strange results may occur if KE is
used but mass modelabel is not set. Do not use this construct when the second part is not a
valid modelabel. E. g. for the total mass do not use mass tot but rather use mass@tot or
mass.tot or MassTot instead.
Labels-Section (See also Section 6.4)
One may use the same set of letters, numbers and special characters for labels, as are al-
lowed for parameters. Again, the colon (:) is not allowed to be part of the name, although
72 6 Setting up the Hamiltonian

pre-defined labels (i.e. those listed in Appendix C) may contain a colon. Moreover, the un-
derscore has a special meaning for labels. If a label has the structure label modelabel then
the mctdh program will put the corresponding operator in that column of the Hamiltonian-
Section which refers to modelabel. One must not put it explicitly there. Unit operators are
assumed for all other degrees of freedom. This feature, which is often used to include CAPS,
excludes the general use of the underscore in a label. E. g. defining a label as exp 1 may
produce an error, because 1 may not be a modelabel.
Note that there must not be a parameter and a label which have the same name. E. g. q
cannot be used as parameter because it is pre-defined as a label. The program checks that
parameter and label names are disjoint.
Hamiltonian-Section (See also Section 6.3)
Only simple labels may appear in a Hamiltonian-Section. Operators with arguments must be
assigned to a simple label in the Labels-Section.
With the aid of the caret ˆ one may apply a power to operators. The power may be integer
or real and may carry a sign. This, however, works only for potential like operators. Inspect
Appendix C to learn, which operators can be exponentiated. Note, that symbols like dqˆ2
or jˆ2 are operator labels of their own right, they do not denote that the second power of the
operators dx or j is taken literally.
Time-dependent operators can easily be implemented. The time is simply treated as an
additional DOF of the Hamiltonian-Section. The modelabel of this additional DOF must be
Time. See the HTML-documentation (”Hamiltonian/Liouvillian Documentation” and then
”Time-dependent Operators”) for further details. See also the operator file nocl1T.op on
$MCTDH DIR/operators.
Chapter 7

Generating the initial wavepacket

For a quantum dynamical calculation an initial wavepacket Ψ(0) is required. This is done
in the INIT WF-SECTION of the input file. The initial wavepacket must have a particular
form, depending on the method to be used. If the MCTDH scheme is employed, Ψ(0) has
to be represented as a multi-configurational Hartree product (i.e. a linear combination of
products of single-particle functions), while in a numerically exact calculation it must be
mapped onto a product of DVR grids. Usually, Ψ(0) is a simple Hartree product, i.e. a
product of one-dimensional functions (unless spherical harmonics are employed, which are
two-dimensional). The MCTDH program offers a number of function types to be used for
each factor in the product, i.e. each degree of freedom.

7.1 Building Gaussian functions as initial functions


A possible choice for the one-dimensional initial functions are Gaussian functions. These
can be defined in two manners which differ only by the way the width is specified, namely
either as
2
ϕ(x) = N e−1/4 ((x−x0 )/∆x) eip0 (x−x0 ) (7.1)
or as
2
ϕ(x) = N e−1/2 mω (x−x0 ) eip0 (x−x0 ) , (7.2)
with corresponding keywords gauss and HO. Here N is a normalisation constant, x0 and
p0 are the centre and initial momentum, ∆x is the width, and m and ω denote mass and
frequency.
Suppose there are two degrees of freedom X and Y, then the initial wavepacket may be
defined by an INIT WF-SECTION reading
INIT_WF-SECTION
build
X gauss 4.315 0.0 0.0794
Y HO 2.151 0.0 0.218,eV 13615.5
end-build
end-init_wf-section

The keywords build and end-build enclose the lines that specify how to build the initial
wavefunction. The first and second number in each line denote x0 and p0 , respectively. The
next numbers are ∆x in the first case, and ω and m in the second. As the example shows,
one may add a unit to the parameters. Note that ∆x and ω may be complex.

73
74 7 Generating the initial wavepacket

Plane waves may be generated by setting the frequency within the HO line to zero. E. g.

build
X HO 0.0 0.0 0.0
Y HO 0.0 2.5 0.0
end-build

will generate a flat function for the X degree of freedom and a plane wave with momentum
2.5 au for the Y degree of freedom.
In a numerically exact calculation, the initial wavepacket is simply the product of the
functions (7.1) or (7.2) for the degrees of freedom involved. In an MCTDH calculation,
however, the program interprets each line in the INIT WF-SECTION as first single-particle
function for that degree of freedom. Higher single-particle functions are then constructed by
multiplying the preceding function by x (so producing a series of powers of x), followed by
Schmidt-orthogonalisation onto the lower functions. The set of all products of the functions
of the included modes then defines the initial configurational space.
The initial wavefunction in an MCTDH calculation is then chosen as one of these config-
urations. The default is to use the product of the first single-particle functions of each mode,
thus arriving at the same initial wavefunction as in a numerically exact calculation: the prod-
uct of the functions (7.1) or (7.2). One may however also populate a different configuration,
with the aid of the pop keyword, e.g.

INIT_WF-SECTION
build
X gauss 4.315 0.0 0.0794 pop = 2
Y HO 2.151 0.0 0.218,eV 13615.5 pop = 3
end-build
end-init_wf-section

The initial wavepacket is in this example the product of the second single-particle function
in X and the third in Y.

7.2 Setting up Legendre functions as initial functions


An initial function frequently employed for angular modes is an associated Legendre function
s
2 l + 1 (l − m)! m
φl−m+1 (θ) = P (cos θ) , (7.3)
2 (l + m)! l
with 0 6 m 6 l. The parameter m denotes the magnetic quantum number and is treated as a
fixed parameter. Plm is the (unnormalised) associated Legendre function (4.4).
The following example defines the initial wavepacket of a system with two degrees of
freedom rd and theta as product of a Gaussian function in rd and a Legendre polynomial
in theta:

INIT_WF-SECTION
build
rd gauss 4.50d0 -8.76d0 0.18d0
theta Leg 0 0 sym
end-build
end-init_wf-section
7.3 Setting up extended Legendre functions as initial functions 75

The numbers after the keyword Leg denote m and l, respectively. If the corresponding type
of the primitive basis is not Leg, then m must be zero; if it is Leg, then m must coincide
with the value in the PRIMITIVE-BASIS-SECTION.
In an MCTDH calculation the program uses the Legendre polynomial specified in the
INIT WF-SECTION to define not only the initial wavepacket but also the first single-particle
function. Which higher single-particle functions are used depends on the last parameter,
which can be sym or nosym. In the latter case all values of l (both even and odd) are
employed, in the former case only those Legendre functions having the same symmetry as l
(either even or odd) are taken.

7.3 Setting up extended Legendre functions as initial functions


When the extended Legendre DVR is used an initial associated Legendre function and the
corresponding K-function (which is a Kronecker δ) should be generated via the KLeg and K
keywords.

INIT_WF-SECTION
build
...........
theta KLeg 2 sym
K K 1
...........
end-build
end-init_wf-section

The number after the keyword KLeg denotes the initial ℓ, and the keyword sym accomplishes
that for the generation of higher single-particle functions only every second one will be taken.
I. e. there will be only even or only odd ℓ’s depending on whether the initial ℓ is even or odd.
The keyword sym may be replaced by nosym with obvious meaning. The number following
K denotes the initial value of K. Note that the KLeg and K keywords of the INIT WF-
SECTION may also be used when the PLeg DVR is employed.

7.4 Generating spherical harmonics as initial functions


If spherical harmonics have been employed as primitive basis functions for a combined mode
alpha and beta, a normalised spherical harmonic
s
2 j + 1 (j − m)! m
Yjm (α, β) = P (cos α) eimβ (7.4)
4π (j + m)! j

is the appropriate initial function for that mode. Here Pjm denotes the associated Legendre
function (4.4).
Spherical harmonics can be selected similarly to the primitive basis by the INIT WF-
SECTION

INIT_WF-SECTION
build
...........
alpha sphfbr 0
beta phifbr 0
76 7 Generating the initial wavepacket

...........
end-build
end-init_wf-section

The two numbers specify j and m. Of course, the initial spherical harmonic must be part of
the primitive basis set.
In an MCTDH calculation, this again defines not only the initial wavepacket but also the
first single-particle function. Higher single-particle functions are other spherical harmonics
whose quantum numbers are as close as possible to the quantum numbers of the first one.

7.5 Generating Wigner functions as initial functions


For rotational motion of polyatomic molecules in three dimensions, Wigner-D functions can
be used for the initial wave function. These are defined as:
r
j 2j + 1 j
Dm,k (α, β, γ) = Dm,k (α, β, γ) (7.5)
8π 2

j
Dm,k (α, β, γ) = e−imα djm,k (β)e−ikγ (7.6)

D E
ˆ
djm,k (β) = j, m e−iβ JY j, k (7.7)
j
where Dm,k (α, β, γ) is the normalized Wigner-D function and djm,k (β) is the Wigner (small)-
d function, and −j 6 m, k 6 j.
A Wigner-D function can be generated as an inital wave function by specifying the
wigner keyword, followed by two K lines, as in the example below:

INIT_WF-SECTION
build
-----------------------------------------------------------
# mode type q.n.
-----------------------------------------------------------
...
beta wigner 5 nosym excite=mkj print # j of initial wigner
gamma k -3 -7 7 1 # initial-k, k-range, k-step size
alpha k 1 -2 2 1 # initial-m, m-range, m-step size
...
-----------------------------------------------------------
end-build
END-INIT_WF-SECTION

The Wigner-(big)-D function is generated in the above example as the product of a Wigner
(small)-d function for the β Euler angle and a Kronecker-δ for the associated momentum
quantum number of each of the α and γ angles. The first number following wigner denotes
the j-value of the initial wavefunction; initial values of the k and m quantum numbers along
with their ranges and step sizes are given in the first and second K lines, respectively. The
corresponding DVR for wigner initial wavefunctions must be wigner for the first degree
of freedom in the combined mode; either exp or K are allowed DVR/FBR types for the
second and third degrees of freedom. The degrees of freedom are assumed to be given in
7.6 Generating eigenfunctions of a one-dimensional Hamiltonian 77

the order |J, K, M i. The excite keyword can be used to choose between two different
schemes for generating unoccupied single-particle functions: excite=mkj preferentially
excites m-states, then k, then j, while excite=kmj preferentially excites k, then m, then
j-states.

7.6 Generating eigenfunctions of a one-dimensional Hamiltonian


It may be useful to start a calculation with the wavepacket in a particular eigenstate of a zero-
th order Hamiltonian. This occurs, for example, in an atom-diatom scattering calculation
when the diatom starts in a particular vibrational eigenstate. To do this, one must first define
the zero-th order operator. This is done by including a HAMILTONIAN-SECTION OPER
section in the operator file (see Sec. 6.12) to define an operator labelled OPER (any other
string except SYSTEM can be chosen for this name).
As an example, a one dimensional H2 Hamiltonian operator can be defined by adding the
section
HAMILTONIAN-SECTION_H2
usediag
-------------------------------------------
modes | rd | rv | theta
-------------------------------------------
1.0 | 1 | KE | 1
1.0 | 1 | vh2 | 1
-------------------------------------------
end-hamiltonian-section

to the operator file. In fact, the simpler input


HAMILTONIAN-SECTION_H2
------------------
modes | rv
------------------
1.0 | KE
1.0 | vh2
------------------
end-hamiltonian-section

works as well, because usediag is default for eigenf, and for DOF’s which are not listed
a unit operator is assumed by default.
The desired functions are then generated by using the eigenf keyword in build block
of the INIT WF-SECTION, e.g.
INIT_WF-SECTION
build
rd gauss 4.50d0 -8.76d0 0.18d0
rv eigenf H2 pop=2
theta leg jbf sl0 sym
end-build
end-init_wf-section

generates a three dimensional wavepacket with a Gaussian along mode rd and the second
eigenfunction (i. e. the first excited state) of the operator H2 for rv. (NB. pop=1 is default
and may be dropped). For the theta degree of freedom an associated Legendre function is
78 7 Generating the initial wavepacket

taken. The associated Legendre function is specified by the value of the parameters jbf and
sl0.
If the veigen keyword has been included in the RUN-SECTION, then the eigenfunctions
and eigenvalues are written to the file veigen. In this way this procedure can be used to
numerically exactly diagonalise a one-dimensional operator. If the veigen keyword is not
given, the eigenvalues are still written to the log file.
NB. This is only possible if the primitive basis for the degree of freedom is a DVR basis
(i.e. not an FFT) as the program generates the eigenfunctions by diagonalising the operator
represented as a real matrix.

7.7 Reading the initial wavepacket from file

Instead of building a new initial wavepacket, one may also read a wavefunction that has been
created in a previous calculation from the restart file. This is done by the file keyword in
the INIT WF-SECTION:

INIT_WF-SECTION
file = oldrun, orthopsi
end-init_wf-section

Here oldrun is the path of the directory where the restart file is stored. If no path is spec-
ified, the restart file is searched for in the name-directory. The second (optional) parameter,
which can be orthopsi (the default) or noorthopsi, specifies whether or not the single-
particle functions are Schmidt-orthogonalised after being read.
The primitive basis must be defined in the PRIMITIVE-BASIS-SECTION identically to
the one of the previous calculation from which the initial wavepacket is being read. This
can be ensured by reading the definition of the primitive basis of the previous run from file
using the readdvr keyword in the RUN-SECTION, rather than defining the primitive basis
in a PRIMITIVE-BASIS-SECTION. The number of single-particle functions, however, may
differ.
Since version 8.3.10 there is also a Read-Inwf ... end-read-inwf block. In
contrast to the simple file keyword, this allows to distribute the SPFs and the blocks of the
A-vector freely among the electronic states. In particular, the current system and the wave-
function read in do no longer need to have the same number of electronic states. Example:

INIT_WF-SECTION
Read-Inwf
file = gs
SPF 1 -> 1,2,3
A 1 -> 2
end-read-inwf
end-init_wf-section

Here, the file which is read in, gs/restart, has only one electronic state. Its SPFs are copied
to all the three states of the current system and its A-vector is copied to state 2. The A-vector
blocks for state 1 or 3 are hence zero. See the HTML documentation for more information.
7.8 Diagonalising a multi-dimensional operator to create multi-dimensional SPFs* 79

7.8 Advanced topic: Diagonalising a multi-dimensional operator


to create multi-dimensional SPFs

With the meigenf feature it is possible to diagonalise one– or multi–dimensional hermitian


Hamiltonians to create one– or multi–dimensional SPFs. As meigenf uses the Lanczos
algorithm (with full re-orthogonalisation) for diagonalisation, it needs some initial guess for
the SPF. Hence the keyword meigenf must not be given in a build-block, it may come after
a build block. However, meigenf can also alter the SPFs of a wavefunction which is read
from file.
Example: meigenf = 3,oper,0
Here, meigenf will diagonalise the operator oper, which must be defined in a
Hamiltonian-Section (similar to eigenf). The eigenfunctions of oper will then replace
the SPFs of the third mode (first argument). The third argument, 0, finally indicates that
the ground state is taken as the first SPF. (In contrast to eigenf, meigenf counts the
eigenfunctions from zero). The Lanczos iteration is stopped, when the selected state (here
the ground state) is converged. Adding the argument full forces meigenf to perform as
many iterations as there are grid points, leading to a numerically exact full diagonalisation
of the operator. (This is not recommended if the particular mode under discussion is repre-
sented by many grid points, more than 300 say). With an additional integer argument one
may limit the number of iterations. Finally, if the integer argument for the selected eigenstate
is replaced by the argument follow, then that eigenfunction, which has the largest overlap
with the initial function, will be taken as first SPF.
Example: meigenf = 3,oper,follow,full,select,write,125
In this example the maximum number of arguments is given. See the HTML documenta-
tion for explanation and more information.

7.9 Advanced topic: Generating an initial wavepacket using


an operator

It is also possible to first generate an initial wavepacket, and then to apply an operator to
this wavepacket before starting the propagation. This is required, e.g., when the initial wave-
packet to be generated is the dipole operator acting on a ground state wavefunction.
To do this, a wavepacket must be build or read in as described in this section above. The
operator must also be defined in the operator file using a HAMILTONIAN-SECTION OPER
section and setting nodiag (see Sec. 6.12). This sets up an operator labelled OPER (any
other string except SYSTEM can be chosen for this name). Once this has been done, adding
the keyword operate=OPER to the INIT WF-SECTION generates a wavepacket by ap-
pling this operator to the initial packet.
For a numerically exact wavefunction this procedure is simple. For an MCTDH wavefunc-
tion however the optimal single-particle functions for the final wavepacket may be different
from those of the initial wavepacket. To optimise the basis functions for the new wavefunc-
tion, an iterative procedure is used. Details of the iterations are protocolled in the log file.
Compare also with Section 12.6.2.
80 7 Generating the initial wavepacket

7.10 Advanced topic: Creating a set of initial wavepackets


Instead of propagating only a single wavepacket, one may also define a set of P initial
wavepackets Ψ1 , . . ., ΨP , which are then propagated simultaneously. This is called a multi-
packet calculation.
For example, to propagate P = 2 wavefunctions with coordinates X and Y, one first has
to add the line

packets = 2

to the SPF-BASIS-SECTION in order to specify the number P of packets. The definition for
the initial wavefunction has to be given for each wavepacket, e.g.

INIT_WF-SECTION
build
X gauss 4.315 0.0 0.0794 pack = 1
Y gauss 3.2 0.0 0.053 pack = 1
X HO 2.151 0.0 0.218,eV 13615.5 pack = 2
Y gauss 3.840 0.0 0.1378 pack = 2
end-build
end-init_wf-section

The pack keyword defines the packet to which an input line belongs. It is possible to specify
more initial packets in this section than given by the packets argument. All data with
pack > packets will then be ignored.
Note that the auto file now contains the cross-correlation matrix

cαβ (2t) = hΨ∗α (t) | Ψβ (t)i , α, β = 1, . . ., P , (7.8)

rather than the auto-correlation function. See the HTML documentation for the exact format
of the auto file.

7.11 Advanced topic: Setting up (a)diabatically corrected initial


wavepackets
The flux-analysis and similarly twprob require the knowledge of the energy distribution
of the (initial) wavepacket. This energy distribution is written to the enerd file, if the
keyword correction is given in the INIT WF-SECTION. (NB: The file enerd is
called adwkb in older versions.) The keyword correction requires an argument. If
correction = edstr is given, it is assumed that the wavepacket is located far out-
side such that the interaction potential can savely be neglected. The energy distribution
is then given by Eq.(140) of the MCTDH review [1], i. e. essentially by a fourier trans-
form of the single-particle function of the translational degree of freedom. It is assumed
that the translational degree of freedom is the dof number 1, i. e. is the first item in the
PRIMITIVE-BASIS-SECTION. Otherweise the keyword trans = I1 (,I2) must
be given, where I1 denotes the number of the translational dof and (optional) I2 its elec-
tronic state.
The influence of the interaction potential is (partly) corrected for when giving
correction = dia. The energy distribution is now evaluated as the overlap of the
translational single-particle function with a distorted wave (rather than a plane wave). The
7.11 Setting up (a)diabatically corrected initial wavepackets * 81

distorted wave is the solution of a 1D Schrödinger equation employing the translational mean
field as interaction. (See the MCTDH review [1] Chapter 7.2 for details). The distorted wave
is no longer calculated through the WKB approximation, but evaluated numerically using
the Numerov method.
The quality of the energy distribution may be further improved by replacing the argument
dia by ad. An adiabatic correction is now performed which modifies the single-particle
functions of the internal degrees of freedom. This improves the mean-field and in turn the
distorted wave. Adiabatic correction, however, is presently only implemented for the H+H2
system and its isotopic variants.

Remarks:

• The translational degree of freedom must not be combined with other dof’s.

• There are special routines for the H+H2 system (and its isotopic variants). These are
used when the argument hh2 is additionally given with the keyword correction,
e. g. correction = hh2, ad.

• Presently, the adiabatic correction works only in combination with the hh2 argument.
Chapter 8

Optimal choice on-the-fly of


unoccupied single-particle functions

In this chapter we present how to choose optimal initial orbitals (e.g. SPFs) and how to
enlarge this basis on-the-fly during the propagation itself. In addition, this allows to regularize
the Equations Of Motion (EOM) on-the-fly by computing appropriate columns for the A-
vector expansion coefficients, thus removing any singularities in the density matrix.

8.1 Initial optimal orbitals (InitOrb)


The method used to generate initial orbitals at time t = 0 can be controlled with the keyword
InitOrb in the RUN-SECTION. There are two possible choices:

1. Standard (InitOrb = std). This generation of unoccupied orbitals is based on


successively multiplying the highest defined SPF with its coordinate and orthonormal-
izing against the previous SPFs. For instance, in the case of a Harmonic Oscillator
(HO) basis (see chapter 7), if one starts with a Gaussian, this procedure generates suc-
cessive higher excited harmonic oscillator functions.
It should be noticed that this is a very simple and efficient method for one-dimensional
modes. However, if mode combination is used the SPFs are multi-dimensional, raising
the ambiguity of by which coordinate the SPF should be multiplied. In other words,
it is not clear at the outset which SPFs will be the most relevant and how many of
them should be added. When using this method with combined modes, the successive
unoccupied initial orbitals are build according to the order given in the definition of the
modes in the SPF-BASIS-SECTION, which might be or not adequate.

2. Optimal (InitOrb = opt). The ambiguity of choosing an appropriate number of


SPFs and their shape can be solved generating initial orbitals that are optimal for the
case at hands by variationally minimizing the error made by the finite size of the basis.
See Ref. [27] for a detailed description.

In the following we describe two calculations, whose template is provided within the
MCTDH code in the folder named inputs with the file hono initorb.inp. Here we can see two
main sections regarding the selection of initial orbitals:

1. The keyword InitOrb = opt in the RUN-SECTION

82
8.1 Initial optimal orbitals (InitOrb) 83

2. The definition of 12, as the maximum number of initial SPFs that can be generated for
every combined mode, in the SPF-BASIS-SECTION

SPF-BASIS-SECTION
r_2, p_1 = 12
t_2, r_3 = 12
t_1, r_1 = 12
end-spf-basis-section

If we run this calculation and look at the output file, we can see that a total of 4, 5 and 5
SPFs were generated for the respective combined modes:

Natural weights *1000 :


r_2 C2: 999.9957 0.0035 0.0008 0.0000
t_2 C2: 999.9910 0.0078 0.0012 0.0000 0.0000
t_1 C2: 999.9941 0.0052 0.0007 0.0001 0.0000

Furthermore, the corresponding natural populations are already non-zero at time t = 0


since the respective A-vector coefficients have been regularized (e.g. rather than zero a neg-
ligible small weight coefficient was added. See Ref. [27] for more details).
It is illustrative to compare this propagation with a comparable computation using the
standard generation of orbitals instead. In other words using the keyword InitOrb = std
and the same initial number of initial orbitals in the SPF-BASIS-SECTION that were ob-
tained for the computation above. Thus we have something that reads:

SPF-BASIS-SECTION
r_2, p_1 = 4
t_2, r_3 = 5
t_1, r_1 = 5
end-spf-basis-section

for which, after propagation, the corresponding natural weights for each mode are:

Natural weights *1000 :


r_2 C2:1000.0000 0.0000 0.0000 0.0000
t_2 C2:1000.0000 0.0000 0.0000 0.0000 0.0000
t_1 C2:1000.0000 0.0000 0.0000 0.0000 0.0000

As one would expect since the A-vector is not regularized, the first coefficient weight for
the initial hartree product is 1.0 and the rest of coefficients are zero.

Efficiency

If we compare the number of steps made by the integrator routine (log file) in both examples,
we can see that these correspond to 25 and 51 in the case of opt and std, respectively.
InitOrb = opt:
Total number of RK8 steps: 25
Number of accepted RK8 steps: 25
Number of rejected RK8 steps: 0

InitOrb = std:
84 8 Optimal choice on-the-fly of unoccupied single-particle functions

Total number of RK8 steps: 51


Number of accepted RK8 steps: 45
Number of rejected RK8 steps: 6

As it was mentioned before, standard unoccupied SPFs with mode combination are gen-
erated by successive multiplying by the coordinate in the order that the DOFs appear in the
input definition, which not necessarily leads to the optimal unoccupied function(s). Similarly
the A-vector coefficients associated with the initially unoccupied SPFs need to be rotated into
their “correct direction” in the Hilbert space, i.e., into the direction in which they contribute
optimally to the expansion of the wavefunction. In contrast, when using optimal orbitals the
A-vector coefficients can be chosen so that they are already correctly aligned (e.g. regular-
ized), both requiring less integration steps.

8.2 Dynamical SPFs (spawn)


After generation of the initial orbitals or SPFs at time t = 0, the basis can be further enlarged
on-the-fly for times t > 0 through the keyword spawn in the RUN-SECTION. The complete
syntax is:
spawn = αmax
where αmax is the threshold used to monitor the values of the lowest natural populations
of every DOF during the dynamics. Then, once any natural population number surpasses
αmax , the dynamics is stopped and all the modes whose lowest natural populations exceeds
this threshold are enlarged.
The use of the keyword spawn automatically generates optimal orbitals at time t = 0.
Thus the keyword InitOrb can be omitted unless one wishes to modify the respective
default options. As before a maximum number of SPFs must be given in the SPF-BASIS-
SECTION (e.g. 12). Furthermore, a second array of maximum values for the number of
SPFs for the overall propagation (e.g. 50) has to be given after the symbol “<”:

SPF-BASIS-SECTION
r_2, p_1 = 12 < 50
t_2, r_3 = 12 < 50
t_1, r_1 = 12 < 50
end-spf-basis-section

An example input is provided within the MCTDH code in the folder inputs with the file
hono initorb dynspf.inp. Looking at the output file after running the calculation, we can see
that the SPF basis is enlarged at times t = 1.5, 2.0, 2.5 fs. The number of SPFs for each DOF
over time is written in the file named nspf.
Chapter 9

Choosing an integration scheme

In a propagation or relaxation calculation an ordinary differential equation has to be solved.


This can be accomplished by different integration methods. The first two sections, 9.1 and
9.2, are dealing with integration techniques developed especially for the MCTDH method.
Section 9.3 describes general integrators, which can be used in both MCTDH and numerically
exact calculations.

9.1 Using the VMF integration scheme in an MCTDH calculation


In an MCTDH calculation one possible integration method is the variable mean-field, or VMF
scheme, which is described in Sec. 5.1 of Ref. [1] and in Ref. [28]. As the name implies, in
the VMF scheme the mean-fields are determined in each integration step. The VMF scheme
is the default in an MCTDH calculation.
As can be seen from Tab. 9.1, the equations of motion in the VMF scheme can be solved
with an ABM (the default), BS or RKx integrator. ABM stands for Adams-Bashforth-
Moulton predictor-corrector method, BS for Bulirsch-Stoer extrapolation scheme and RKx
for a Runge-Kutta integrator or fixed order x, where x = 5 and x = 8 are available. We
recommend the use of the ABM method because it is generally more efficient.
To choose a VMF calculation employing the ABM integrator, the INTEGRATOR-
SECTION in the input file should read, e.g.,

INTEGRATOR-SECTION
VMF
ABM = 6, 1.0d-7, 0.01d0
end-integrator-section

The parameters after the ABM keyword are explained in Sec. 9.3. When the BS integrator is
desired, a possible INTEGRATOR-SECTION is

INTEGRATOR-SECTION
BS = 8, 1.0d-6
end-integrator-section

Here we have omitted the VMF keyword since it is the default.


Note that one may also not define at all the INTEGRATOR-SECTION. This is equivalent
to specifying the VMF and ABM keywords, together with some default parameters for the
ABM integrator that can be found in the HTML documentation.

85
86 9 Choosing an integration scheme

Table 9.1: Available integrators in dependence of the calculation type. The table displays which of the integrators
ABM, BS, RKx and SIL can be chosen depending on whether a VMF, CMF, or numerically exact calculation is
being made. An underlined checkmark “X” indicates the default.

Integrator
Calculation type ABM BS SIL RKx
VMF X X — X
CMF, A-vector X X X X
CMF, ϕ-vector X X — X
Numerically exact X X X X

9.2 Using the CMF integration scheme in an MCTDH calculation


In many cases an MCTDH calculation is more efficient if the VMF scheme is replaced by
the constant mean-field, or CMF scheme. In the CMF scheme the numerical effort is reduced
by holding the mean-fields, density matrices, and Hamiltonian matrix elements constant for
some time, rather than evaluating them in each integration step. Note that the CMF scheme
does (presently) not work in combination with the CDVR approximation. The CMF scheme
is detailed in Sec. 5.2 of Ref. [1] and in Ref. [28].
Table 9.1 displays the integrators being compatible with the CMF method. Since the
MCTDH coefficients (i.e. the A-vector) and the single-particle functions (i.e. the ϕ-vector)
are propagated separately in the CMF scheme, different integrators can be chosen for each
of them. This is indicated by appending /A or /spf to the ABM, BS, RK5, RK8 or SIL
keyword. The default is SIL/A and BS/spf, which is in general the most efficient combi-
nation.
An example for the INTEGRATOR-SECTION in the input file is

INTEGRATOR-SECTION
CMF = 0.5d0, 1.0d-6
SIL/A = 15, 1.0d-7
BS/spf = 9, 1.0d-7
end-integrator-section

This starts a CMF calculation with an initial stepsize of 0.5 fs and an error tolerance of 10−6 .
The parameters for the SIL and BS integrator are described in Sec. 9.3. If the same integrator
(e.g. ABM) is to be used for the MCTDH coefficients and the single-particle functions, the
shortcut /all can be appended to the integrator keyword:

INTEGRATOR-SECTION
CMF = 1.0d0, 1.0d-5
ABM/all = 5, 1.0d-4, 0.05d0
end-integrator-section

Note, however, that the ABM integrator typically will not give you the optimal performance
of the CMF scheme. As a final example, the CMF scheme may also be selected by

INTEGRATOR-SECTION
CMF
end-integrator-section

The program then uses default integrators and parameters, which are compiled in the HTML
documentation.
9.3 Description of the available integrators 87

In the above examples, two (optional) parameters are used to concretise the CMF calcula-
tion. The first one is the initial stepsize (in fs). A good guess for the initial stepsize is to use
the output interval tout specified in the RUN-SECTION. Whether the initial stepsize was
chosen reasonably can be checked by looking at the update file, which will be generated in a
calculation if the update keyword in the RUN-SECTION is set. The update file indicates
whether repetition steps were necessary in the beginning of the propagation. If so, one should
use a smaller initial stepsize in the following calculations.
The second parameter defines the CMF error tolerance, which controls the stepsizes dur-
ing the propagation. Typical values lie between 10−4 (very low accuracy) and 10−8 (very
high accuracy). For many applications an error tolerance of 10−5 or 10−6 will be sufficient.
The convergence of a calculation with respect to the CMF error can be checked by comparing
the results of two calculations performed with different error tolerances.
We finally note that it is possible to perform a CMF calculation with fixed or variable step-
sizes. To choose among the possible options use the keywords CMF/var, CMF/varphi,
CMF/vara or CMF/fix, respectively. With the extension var the stepsize becomes vari-
able and is controlled by both the single particle functions and the A-vector. As var is
default, CMF/var is identical to CMF. Using the extension varphi or vara, the stepsizes
are controlled only by the single particle functions or only the A-vector, respectively. Finally,
the extension fix enforces the use of a fixed stepsize. To discriminate these CMF stepsizes
from the integrator step sizes, the former are often called update times.

9.3 Description of the available integrators


The integrators that are available are an Adams-Bashforth-Moulton (ABM) predictor-
corrector method with fixed order and variable stepsize, a Bulirsch-Stoer (BS) extrapola-
tion scheme with polynomial extrapolation and variable order and stepsize, two Runge-Kutta
(RK5/8) integrators with adaptive stepsize and fixed order (5 or 8, respectively), and a short
iterative Lanczos (SIL) algorithm with variable order and stepsize. Note that the (hermi-
tian) SIL integrator is automatically replaced by a complex SIL integrator, also known as
Lanczos-Arnoldi integrator, if the Hamiltonian is complex. More precisely, the Lanczos-
Arnoldi routine is automatically chosen, if there is a complex potential (e.g. a CAP) in one
of the separable parts of the Hamiltonian. However, the Hamiltonian may be non-hermitian
for various other reasons. In these case one has to replace the SIL keyword by CSIL, which
enforces the use of the Lanczos-Arnoldi integrator. Note that the integration will be incorrect,
if the (hermitian) SIL integrator is used for a non-hermitian Hamiltonian! Which integrator
has been used is protocoled in the log-file.
Each integrator is associated with up to three parameters. In case of the ABM, BS and
SIL integrators the first one is the integration order and the second one the error tolerance,
while the last one depends on the integrator. Typical error tolerances range from 10−3 or
10−4 (low accuracy) over 10−5 or 10−6 (normal accuracy) to 10−7 or 10−8 (high accuracy).
For the RK5 and RK8 integrators (where the order is fixed), the first parameter specifies the
error tolerance and the second one the initial stepsize. For all integrators it is in general not
useful to work with an error tolerance less accurate than 10−5 .
When performing a calculation, one should first select the desired error tolerance. The
second step is to define the integration order. The meaning of this parameter is slightly dif-
ferent for the three integrators which provide it. For the ABM integrator, which runs with a
fixed order, the order-parameter in the INTEGRATOR-SECTION is the true integration or-
88 9 Choosing an integration scheme

Table 9.2: Optimal orders for the ABM and BS integrators in dependence of the error tolerance. The optimal
ABM order was found empirically and might differ slightly in other cases. The values for the BS integrator,
on the other hand, can be proved to be the optimal orders. (What is called “optimal BS order” in this guide is
actually the maximum number of extrapolations.)

Error tolerance Optimal ABM order Optimal BS order


10−3 3 4
10−4 4 5
10−5 5 7
10−6 5 8
10−7 6 9
10−8 6 10

der. For the BS and SIL integrators, which continously adapt their integration order during a
run, the order-parameter denotes the maximum number of extrapolations and the maximum
integration order, respectively. What the order-parameter hence defines is actually the mem-
ory being allocated, as all three integrators have in common that with each increase of the
order-parameter by one, one additional wavefunction vector must be stored.
The order-parameter of the ABM and BS integrators should be chosen according to Tab.
9.2. Larger values do not increase the efficiency but only enlarge the memory requirements.
(In the case of the ABM integrator a larger value in fact decreases the efficiency.) Smaller
values for the order-parameter lead to longer CPU times. They might however be used if
memory must be saved.
The optimal order-parameter of the SIL integrator unfortunately cannot be predicted but
has to be found out empirically for each system. Typical values range from 6 to 16. After a
calculation the largest order the SIL integrator has used is given in the log file. If this value
is smaller than the order-parameter, you should decrease the order-parameter accordingly,
to avoid the waste of memory in future calculations. If the largest order equals the order-
parameter, this indicates that the efficiency might become higher if a larger order-parameter
is chosen, so increase the order-parameter for optimal performance. When memory-intensive
systems are investigated, it again might become necessary to use a smaller than optimal order-
parameter, at the price of a longer computation time.
If the ABM, BS or RKx integrator is employed, the last parameter to be specified is the
initial stepsize (in fs).. In the case of the BS integrator, the output interval tout defined in
the RUN-SECTION is normally a good choice. For the ABM integrator, the initial stepsize
should in general be by a few orders of magnitude smaller than the output interval. This is
because the ABM integrator — although being a multi-step method — has to be started as
a one-step method, i.e. with an order of two, since initially the wavefunction is given for
a single point of time only. In case of the RKx integrators, the initial stepsize can also be
omitted or set to zero. The integrator then tries to guess a suitable value for the initial stepsize
by employing a single explicit Euler step and estimating the second derivative of the solution.
(However, in our experience this guess is often too conservative.) Whether the initial ABM,
BS or RKx stepsize was chosen reasonably can be decided with the aid of the steps file,
which is generated when the steps keyword in the RUN-SECTION is set. From this A SCII
file it can be seen how large the first (successful) step actually was. This value may then be
used as initial stepsize in future calculations.
For the complex SIL method, two different error estimates, called standard and improved
estimate, are implemented, which can be specified by the third parameter. The standard error
9.4 Fine-tuning the integration 89

criterion is based on the product of the sub-diagonal elements of the Lanczos matrix. The
improved one uses the norm of the difference between the wave functions propagated with
two consecutive orders. The improved estimate requires slightly more computation time but
is more reliable when the stepsize is large. For details we refer the reader to Refs. [1,28]. The
estimates can be activated by the keywords standard or novel, respectively. The former
is the default.

9.4 Fine-tuning the Equations of Motion and the Integration


Scheme.
There are a number of keywords that can be added to the INTEGRATOR-SECTION that
change the form of the equations of motion, or change the way the integration is performed.
Examples of these are given in this section.

9.4.1 Advanced topic: Propagating in natural or interaction picture orbitals


Instead of the standard single-particle functions one may employ natural or interaction picture
orbitals. Natural orbitals are those single-particle functions that diagonalise the MCTDH
density matrices. Interaction picture orbitals are obtained by moving from the Schrödinger
to the interaction picture. For details see Secs. 3.3 and 3.4 of the review [1]. In normal
use natural orbitals have no advantages over normal single-particle functions: they span the
same space, and may even force the integrator to take smaller steps. The interaction picture
may allow the equations of motion to be integrated more efficiently than the standard VMF
scheme. This is especially true if an operator has a large separable part. It is however usually
less efficient than the CMF scheme.
The type of orbitals to be used is selected in the INTEGRATOR-SECTION of the input
file, since the orbital type affects the form of the equations of motion to be integrated. Place
the keyword natorb or interpic into the INTEGRATOR-SECTION, i.e.
INTEGRATOR-SECTION
.
.
.
natorb
end-integrator-section

or
INTEGRATOR-SECTION
.
.
.
interpic
end-integrator-section

in order to move from standard to natural or interaction picture orbitals, respectively.

9.4.2 Suitable integrator settings for improved relaxation


The integrator settings for improved relaxation are somewhat different from those for prop-
agation. Improved relaxation requires a CMF/fix or CMF/varphi integration scheme. The
90 9 Choosing an integration scheme

best is simply to use CMF, this defaults to CMF/var for propagation runs and to CMF/varphi
for improved relaxation. Improved relaxation furthermore requires a Davidson ”integrator”
(actually a diagonalizer), i.e. the keyword DAV, rDAV, rrDAV, or cDAV. A typical setting
might read:

INTEGRATOR-SECTION
CMF = 1.0, 3.0d-3
RK8/spf = 1.0d-9
rrDAV/A = 200, 1.0d-8
natorb
eps_inv=1.0d-10
end-integrator-section

Note that the CMF-accuracy is rather low, whereas the accuracy of the integrators is rather
high. Note also that the parameter for regularizing the density matrices, eps inv, is also set
to a low value (its default value is 10−8 ). This is because the lowest natural SPF populations
are in the range 10−6 · · · 10−10 for improved relaxation runs, whereas they are typically in
the range 10−3 · · · 10−6 for propagation runs.
The RK8 integrator was found to perform best for SPF relaxation. If a hight ac-
curacy of the results is not required, one may set the RK8 accuracy to 1.0d-8 and
eps inv=1.0d-9, or even remove the eps inv line.
As orbital-type natorb was chosen in this example. The default for improved relaxation
is energyorb (may be abbreviated to enorb). Energy orbitals make the Hamiltonian
matrix more diagonal dominant than other orbital choices, which accelerates the convergence
of the Davidson digonalizer. However, the computation of the energy orbitals is a bit costly
and we noticed that, in particular when a preconditioner is used, it is often more efficient to
use natural orbitals. Standard orbitals, stdorb, which are default for propagation, can also
be used. Note that the use of energy orbitals requires that the keyword orben is set in the
Run-Section.

9.4.3 Advanced topic: Evaluating potentials using the TDDVR or CDVR


method
The time-dependent DVR (TDDVR) and Correlation DVR (CDVR) methods offer the possi-
bility of employing non-separable potentials within the MCTDH scheme, without the strong
increase of computational labour that arises when such potentials are evaluated directly. The
disadvantage of these procedures is their introduction of an additional, unpredictable error in
the calculation. For a discussion of the TDDVR and CDVR methods see Ref. [1].
The TDDVR or CDVR method can be used by simply inserting either the keyword

TDDVR

or the keyword

CDVR

into the INTEGRATOR-SECTION of the input file. Presently, both TDDVR and CDVR
work only in combination with the VMF integration scheme.
Chapter 10

Treating non-adiabatic systems

To treat a non-adiabatic system, i.e. a system which involves a manifold of coupled potential
energy surfaces, the Hamiltonian operator has to be set up appropriately. Furthermore, the
primitive and the single-particle basis, as well as the initial wavepacket, have to be defined in
a special way when the system is non-adiabatic.

10.1 Setting up the Hamiltonian for a non-adiabatic system

The Hamiltonian of a non-adiabatic system with σ electronic states can be written as (σ ×σ)-
matrix
 
H11 . . . H1σ
H =  ... ..  .

.  (10.1)
Hσ1 . . . Hσσ

For the sake of simplicity we assume in the following that only two electronic states have to be
accounted for, i.e. σ = 2. The generalisation to larger numbers of states is straightforward.
To implement the Hamiltonian matrix, which is now two-dimensional, into the MCTDH
program, it must have the product form required by the MCTDH method:

s
!
(k) (k)
X (1) (f ) γ11 γ12
H= ck hk . . . hk (k) (k) , (10.2)
k=1
γ21 γ22

(κ)
where f denotes the number of molecular degrees of freedom and hk is a one-dimensional
operator acting exclusively on the κth degree of freedom. It is no restriction to assume that
(k)
the elements of the γ-matrices are only zero and one, i.e. γij ∈ {0, 1}.
The program knows a number of built-in symbolic expressions that can be used to define
the γ-matrices in the Hamiltonian section of the operator file. These symbols are compiled in
Tab. 10.1. For instance, the symbol S1&1 specifies the symmetric matrix that couples states
1 and 1, while Z1&2 stands for the unsymmetric matrix that couples initial state 2 with final
state 1. Note that the symbol S1&2 implies that initial state 2 couples with final state 1 and
vice versa, because the corresponding matrix is symmetric.

91
92 10 Treating non-adiabatic systems

Table 10.1: The built-in symbolic expressions that can be used to define the couplings of a non-adiabatic Hamil-
tonian. (Two electronic states are assumed.)

Matrix
  Symbol Matrix
  Symbol
1 0 0 1
1 S1&2 (or S2&1)
0 1 1 0
   
1 0 0 1
S1&1 Z1&2
0 0 0 0
   
0 0 0 0
S2&2 Z2&1
0 1 1 0

As an example, the operator file for the 4-mode 2-state model of the pyrazine molecule is
shown in Example 10.1. The Hamiltonian for this system reads
X ωi     X  (1)   
2
 1 0 −∆ 0 κi 0 0 λ
H= −∂Q + Q2i + + Qi + Q10a ,
2 i 0 1 0 ∆ 0 κ(2)
i λ 0
i i6=10a
(10.3)
with i = 10a, 6a, 1, 9a. The numerical parameters are defined in the PARAMETER-SEC-
TION, e.g. w10a corresponds to ω10a and k6a1 to κ(1) 6a . This Hamiltonian is represented in
the operator file by the HAMILTONIAN-SECTION (see Example 10.1). The modelabel el
labels the electronic states. For more details of the pyrazine calculations see Ref. [9].

10.2 Defining the primitive basis for a non-adiabatic system


For the treatment of a non-adiabatic system not only the operator but also the input file has
to be set up appropriately. One modification concerns the PRIMITIVE-BASIS-SECTION,
where an electronic basis has to be specified for the mode labelled el in the operator file:

PRIMITIVE-BASIS-SECTION
v10a HO 22 0.0 1.0 1.0
v6a HO 32 0.0 1.0 1.0
v1 HO 21 0.0 1.0 1.0
v9a HO 12 0.0 1.0 1.0
el el 2
end-primitive-basis-section

The primitive-basis type for the electronic basis is el and the number denotes the number σ
of states in the system, in this case two. This sets up a discrete (vector) representation for the
σ states.
The complete input file for the 4-mode 2-state pyrazine model, from which the above lines
were taken, is displayed in Example 10.2.

10.3 Defining the single-particle basis for a non-adiabatic system


In an MCTDH propagation or relaxation a single-particle basis is needed for the representa-
tion of the wavefunction. For non-adiabatic systems there are two possible representations,
termed single- or multi-set (see Sec. 3.5 of Ref. [1] for details).
10.3 Defining the single-particle basis for a non-adiabatic system 93

OP_DEFINE-SECTION
title
Pyrazine 4-mode model
end-title
end-op_define-section

PARAMETER-SECTION
w10a = 0.09357, ev
w6a = 0.0740 , ev
w1 = 0.1273 , ev
w9a = 0.1568 , ev
delta = 0.46165, ev
k6a1 =-0.0964 , ev
k6a2 = 0.1194 , ev
k11 = 0.0470 , ev
k12 = 0.2012 , ev
k9a1 = 0.1594 , ev
k9a2 = 0.0484 , ev
lambda = 0.1825 , ev
end-parameter-section

HAMILTONIAN-SECTION
---------------------------------------------
modes | v10a | v6a | v1 | v9a | el
---------------------------------------------
1.0*w10a | KE | 1 | 1 | 1 | 1
0.5*w10a | qˆ2 | 1 | 1 | 1 | 1
1.0*w6a | 1 | KE | 1 | 1 | 1
0.5*w6a | 1 | qˆ2 | 1 | 1 | 1
1.0*w1 | 1 | 1 | KE | 1 | 1
0.5*w1 | 1 | 1 | qˆ2 | 1 | 1
1.0*w9a | 1 | 1 | 1 | KE | 1
0.5*w9a | 1 | 1 | 1 | qˆ2 | 1
-delta | 1 | 1 | 1 | 1 | S1&1
delta | 1 | 1 | 1 | 1 | S2&2
k6a1 | 1 | q | 1 | 1 | S1&1
k6a2 | 1 | q | 1 | 1 | S2&2
k11 | 1 | 1 | q | 1 | S1&1
k12 | 1 | 1 | q | 1 | S2&2
k9a1 | 1 | 1 | 1 | q | S1&1
k9a2 | 1 | 1 | 1 | q | S2&2
lambda | q | 1 | 1 | 1 | S1&2
----------------------------------------------
end-hamiltonian-section
end-operator
Example 10.1: An operator file for the pyrazine 4-mode 2-state model system.

In the single-set formalism, which is the default, the wavepackets on each surface are
represented by the same single-particle function basis. As there is thus only one single-
particle basis, the SPF-BASIS-SECTION has the same form as for adiabatic systems, e.g.

SPF-BASIS-SECTION
v10a = 5
v6a = 6
v1 = 4
v9a = 4
end-spf-basis-section
94 10 Treating non-adiabatic systems

###################################################################
### pyrazine 4-mode multi-set ###
###################################################################

RUN-SECTION
name = pyr4mode
propagate
tfinal=120.0 tout=0.50 tpsi=1.00
psi auto=twice steps gridpop
end-run-section

OPERATOR-SECTION
opname = pyrmod
end-operator-section

SPF-BASIS-SECTION
multi-set
v10a = 4, 3
v6a = 5, 4
v1 = 3, 3
v9a = 3, 3
end-spf-basis-section

PRIMITIVE-BASIS-SECTION
v10a HO 22 0.0 1.0 1.0
v6a HO 32 0.0 1.0 1.0
v1 HO 21 0.0 1.0 1.0
v9a HO 12 0.0 1.0 1.0
el el 2
end-primitive-basis-section

INTEGRATOR-SECTION
CMF/var = 0.5 , 1.0d-5
BS/spf = 7 , 1.0d-5 , 2.5d-4
SIL/A = 5 , 1.0d-5
end-integrator-section

INIT_WF-SECTION
build
init_state = 2
v10a HO 0.0 0.0 1.0
v6a HO 0.0 0.0 1.0
v1 HO 0.0 0.0 1.0
v9a HO 0.0 0.0 1.0
end-build
end-init_wf-section

end-input

Example 10.2: An input file for the pyrazine 4-mode 2-state model system.

Note that no single-particle basis needs to be specified for the electronic “degree of freedom”,
as this is a complete basis set.
In the multi-set formalism, which is often more efficient than the single-set formalism,
the wavepackets on each surface are represented in a different single-particle function basis.
The number of functions desired for each state must therefore be given. The SPF-BASIS-
SECTION may read
10.4 Building the initial wavepacket for a non-adiabatic system 95

SPF-BASIS-SECTION
multi-set
v10a = 4, 3
v6a = 5, 4
v1 = 3, 3
v9a = 3, 3
end-spf-basis-section

The keyword multi-set selects the multi-set formalism. For instance, the line

v10a = 4, 3

requests four functions to be used for the wavepacket in the lower state 1, and three functions
for the wavepacket in the upper state 2. The multi-set formalism usually requires fewer
single-particle functions (per state) than the single-set formalism. This makes the former
more efficient in most cases.

10.4 Building the initial wavepacket for a non-adiabatic system


For a non-adiabatic system with σ electronic states also σ initial wavefunctions have to be
built (unless they are read from file). When generating the initial wavepacket the MCTDH
program however assumes that only one electronic state is initially populated and hence sets
all wavefunctions on other states to zero.
The initial wavefunction can therefore be defined in the same way as for adiabatic systems.
The program has solely be supplied with the information which state is to be populated at the
beginning. This is achieved using the init state keyword in the INIT WF-SECTION, as
shown in Example 10.2. If this keyword is missing, state 1 is initially populated.
When a multi-set wavefunction is to be read from file it is convenient to use a
Read-Inwf block, because then the wavefunction read and the system wavefunction do
not need to have the same number of electronic states. See Section 7.7.
Chapter 11

Treating bosonic systems

While MCTDH is designed for distinguishable particles, it also allows for the treatment of
indistinguishable particles. The ‘only’ conceptual complication that needs to be taken care
of is the permutation symmetry encoded in the general rules of quantum mechanics: More
precisely, Ψ is a valid wave function only if for any permutation Pij of two particles we have
Pij Ψ = ±Ψ. The + sign holds for bosonic particles, which are the subject of this chapter; for
fermions (−) there already exist specially modified versions of MCTDH. 1 The consequence
is that bosons live only in the symmetry-restricted Hilbert space

H+ = {Ψ | Pij Ψ = Ψ ∀i, j} ⊂ H.

Obviously, the most elegant way to extend the MCTDH ansatz


X
Ψ(Q, t) = AJ (t)ΦJ (Q, t) (11.1)
J

would be to include only basis function ΦJ ∈ H+ , a demand clearly not met by the Hartree
products employed in MCTDH. However, it is possible to circumvent this by simply pro-
jecting any wave function onto H+ . This amounts to keeping the expansion coefficients AJ
symmetric rather than the basis vectors themselves. In fact, any wave function will usually
stay permutation symmetric under (real or imaginary) time evolution if both the initial state
and the Hamiltonian are chosen as outlined below and if numerical errors are kept at bay.

11.1 Setting up the Hamiltonian


The Hamiltonian for identical bosonic atoms should of course be symmetric in all particles.
For bosonic atoms with no more than binary interactions, it usually has the form
X X
H= h(pi , xi ) + V (xi − xj ),
i i<j

so the one-particle operator h (including kinetic energy) has to be listed in the operator file for
any boson i, while the interaction potential V requires a manual entry for any combination
1
For simplicity, we assume a system of spin-polarized one-dimensional bosons. The extension to higher
dimensions is slightly more complicated insofar as one has to distinguish between particles (i = 1, . . . , N ) and
degrees of freedom (κ = 1, . . . , f ). To match these two, different modes κ belonging to one and the same
physical particle #i have to be combined, cf. Sec. 5.3.

96
11.2 Modifying the input 97

i < j. (Altogether, these are N (N − 1)/2 terms, which naturally limits the application to
few particles.)
As an example, the operator file for N = 3 one-dimensional bosons in a harmonic trap
is shown in Example 11.1 (for more details, the reader is referred to [29]). In that case,
h(p, x) = 12 p2 + 21 x2 ; the two-body potential V (x) = gδσ (x), shaped as a normalized Gaus-
sian of width σ, has to be fitted to the direct-product form imposed by MCTDH. This is
carried out as usual via potfit (set there e. g. pes = gauss1d{width=0.05}), the re-
sulting natpot is included in the LABELS-SECTION. The numerical parameters are defined
in the PARAMETER-SECTION, even though some of the values are conveniently reset in
the input file (see below).

11.2 Modifying the input


The symmetrization mentioned above brings about some minor modifications of the way the
wave function Ψ is handled. The MCTDH ansatz (11.1) is now simplified insofar as the
single-particle functions are now identical, i.e., we have ΦJ ≡ ϕj1 ⊗ · · · ⊗ ϕjN with a single
set of functions {ϕj | j ≤ n}.
This reflects in the input file as illustrated in Example 11.2: The SPF-BASIS-SECTION
only gives the first orbital ϕ1 , while all others are mapped via the entry x2 = id,1, etc.
It goes without saying that, by extension, the primitive basis also has to be identical for ev-
ery boson. Again this is reflected in the input file, where the PRIMITIVE-BASIS-SECTION
contains repetitions of the very same line
x1 HO 125 xi-xf -4.0 4.0

for any xi .
A little less trivial is the choice of the initial wave function Ψ0 . As stated above, it must
be permutation symmetric, a demand which can be met by the following standard choices.
• A Hartree state Ψ0 = ϕ⊗N is implemented trivially by including the following lines in
the INIT WF-SECTION:
build
x1 eigenf spo
x2 map x1
x3 map x1
end-build

Here eigenf spo specially selects the (lowest) eigenfunction ϕ of the single-
particle operator spo previously defined in the operator file. This particular feature
is not essential—in this case, one may as well use harmonic-oscillator functions (HO)
instead—but we have included it simply to give a realistic example.
• More generally, a number (or Fock) state |n1 , n2 , . . . i can be selected, whichPdenotes
how many particles na ∈ N occupy a given single-particle mode ϕa (where a na =
N ). Cast in standard MCTDH form, this a sum over all permutations of the single
configuration
J = (j1 , . . . , j1 , . . . , jn , . . . , jn ).
| {z } | {z }
n1 × nn ×
This is a little more cumbersome, since we have to keep track of all permutations of J.
A typical statement from the INIT WF-SECTION now reads:
98 11 Treating bosonic systems

build
x1 eigenf spo
x2 map x1
x3 map x1
end-build

A-coeff
2 2 3 (1.0,0.0)
end-A-coeff

symcoeff

Note that the last block is the same as for the Hartree product above, telling MCTDH
to select eigenstates ϕa of the single-particle Hamiltonian spo. On top of that, the
block A-coeff defines just which orbitals a should be selected. In our example, this
produces a single configuration J = (2, 2, 3) (forget about normalization.) To make
this permutation symmetric —i.e., a number state |n1 = 0, n2 = 2, n3 = 1i— the
statement symcoeff has been added.
• If one performs a series of relaxations, e.g. with increasing interaction parameter g,
then the most convenient choice for the initial state is one already obtained in some
previous MCTDH calculation. This is done by simply casting the INIT WF-SECTION
as follows:

file= p3d1_19
symcoeff

This ensures that the restart file from the directory p2d1 19 is read as initial wave
function. The symcoeff statement is added just to be one the safe side and make
sure that the initial state is absolutely symmetric.

The input for potfit is very simple. One usually uses as many natpot terms as grid points.
The fit is therefore exact.
RUN-SECTION
name = ngaussHOfit_N125
end-run-section

OPERATOR-SECTION
pes = gauss1d{width=0.05}
end-operator-section

PRIMITIVE-BASIS-SECTION
x1 HO 125 xi-xf -4.0 4.0
x2 HO 125 xi-xf -4.0 4.0
end-primitive-basis-section

NATPOT-BASIS-SECTION
x1 = contr
x2 = 125
end-natpot-basis-section

end-input
11.2 Modifying the input 99

#######################################################################
### 3 bosonic particles, 1D, in a harmonic trap ###
#######################################################################

OP_DEFINE-SECTION
title
p3d1, 3 one-dimensional bosons in a harmonic trap
end-title
end-op_define-section

PARAMETER-SECTION
mass_x1 = 1.0
mass_x2 = 1.0
mass_x3 = 1.0
g = 1.0 # int. strength | only dummy value, reset in INP file!
end-parameter-section

HAMILTONIAN-SECTION
---------------------------------
modes | x1 | x2 | x3
---------------------------------
# Kinetic energy
1.0 | KE | 1 | 1
1.0 | 1 | KE | 1
1.0 | 1 | 1 | KE

# Harmonic trap
0.5 | qˆ2 | 1 | 1
0.5 | 1 | qˆ2 | 1
0.5 | 1 | 1 | qˆ2

# Two-particle interaction // N(N-1)/2 entries


g |1&2 vv
g |1&3 vv
g |2&3 vv
---------------------------------
end-hamiltonian-section

HAMILTONIAN-SECTION_spo
-----------------------
modes | x1
-----------------------
# Kinetic energy
1.0 | KE
# Harmonic trap
0.5 | qˆ2
-----------------------
end-hamiltonian-section

LABELS-SECTION
vv = natpot{ngaussHOfit_N125 ignore} # pot-fitted interaction potential
end-labels-section # ’ignore’ is set to ignore the modelabels of the fit

end-operator

Example 11.1: An operator file for N = 3 one-dimensional bosons in a harmonic trap.


100 11 Treating bosonic systems

#######################################################################
### 3 bosonic particles, 1D, in a harmonic trap ###
#######################################################################

RUN-SECTION
name = p3d1_20
energy-not-ev time-not-fs # A dimensionless model is treated
relaxation = 0 rlxunit=au
tfinal = 20.0 tout = all tpsi = 1.0
gridpop steps cross orben
title = 3 particles, 1D in harmonic trap (p3d1_DW)
end-run-section

OPERATOR-SECTION
opname = p3d1
alter-parameters
g = 10.
end-alter-parameters
end-operator-section

SPF-BASIS-SECTION
x1 = 15
x2 = id,1
x3 = id,1
end-spf-basis-section

PRIMITIVE-BASIS-SECTION
x1 HO 125 xi-xf -4.0 4.0
x2 HO 125 xi-xf -4.0 4.0
x3 HO 125 xi-xf -4.0 4.0
end-primitive-basis-section

INTEGRATOR-SECTION
CMF/varphi = 0.2, 1.0d-2
RK8/spf = 1.0d-8 , 0.1
RRDAV/A = 200 , 1.0d-9
end-integrator-section

INIT_WF-SECTION
file=p3d1_19
symcoeff
end-init_wf-section

end-input

Example 11.2: An input file for N = 3 one-dimensional bosons in a harmonic trap.


Chapter 12

Analysing the results employing the


Analyse programs

The set of Analyse programs can be used to analyse the information from a calculation,
which is stored in the various data files. For a complete list of programs, see the HTML
documentation. If a program is started using the -h option, i.e.

analyse86 -h

where analyse is the name of the program, e.g. rdgpop, a brief description of how to use the
program, and a list of options will appear.
The programs are designed to be used together with the G NUPLOT program. In many
cases, the option -g will produce a file complete with G NUPLOT commands, ready for
immediate plotting. Some programs also support interactive plotting in conjunction with
G NUPLOT. In these cases, starting the program with

analyse86 -inter

brings up a menu with options to choose what is to be plot, to change plotting boundaries,
etc.
Here, a brief overview of only the most important programs will be given. As an example,
we take the results from the wavepacket propagation of the NOCl system. First the system is
relaxed on the S0 surface using the input file inputs/nocl0.inp. Propagation is then made using
the file inputs/nocl1.inp. The data files containing all the information about the calculation
and the system evolution are then contained in the directory nocl1. This is the system used in
the first tutorial.

12.1 The Analysis Interface


The analysis program provides a menu driven interface for running many of the ANALYSE
programs. On typing

analysis86

a menu appears, as shown in Example 12.1.


An option is selected by entering the appropriate number. This may lead to further menus
which allow the examination or plotting of various quantities of interest.

101
102 12 Analysing the results employing the Analyse programs

************************************************************************

THE HEIDELBERG MCTDH PROGRAM ANALYSIS PACKAGE

Program Version : 8
Release : 2

************************************************************************

Present directory is: /workb/graham/mctdh82.0

0 = stop
1 = list / change directory
2 = analyse convergence
3 = analyse integrator
4 = analyse results
5 = analyse system evolution
6 = analyse potential surface
7 = compare calculations

Example 12.1: The start-up menu in the analysis program which provides an interface for running the various
ANALYSE programs.

A browse function is included to move between directories containing data (option 1).
Keep typing the name of the new directory, either absolute or relative names are allowed,
until the directory of choice is found. Then type “no” to return to the main menu. This option
may also be used to list the contents of the present directory.
If one knows the MCTDH package well, it is more convenient (and faster) to use directly
the routines, which are called by the analysis interface. But for the beginner, analysis can
be a big help, as one is guided through the large selection of analyse–tools. Note, how-
ever, that there are more tools available than accessible through analysis86. (See the HTML
documentation).

12.2 Interpreting the MCTDH output


During the propagation of a wavepacket, information about the system evolution is output to
allow an easy visual check of how the calculation is progressing. If the keyword output
was included in the RUN-SECTION of the input file, this information is written to the file
output in the directory specified by the name keyword. If this keyword was omitted, this
information is written to the screen during the calculation.
A section of the output from our example NOCl propagation is shown in Example 12.2.
After information about the program version used, and where and when the calculation was
run, starts the information about the system. This is output every t fs, where tout = t is the
time specified in the RUN-SECTION of the input file.
At each output step the following information is give:
pP ∗
• Norm: The norm of the wavefunction expansion coefficients J AJ AJ . This
should remain close to 1.0, unless a CAP is used in which case the norm will disappear
with the wavepacket.
12.2 Interpreting the MCTDH output 103

*******************************************************************************
MCTDH version 8
Release 1
Revision 6
*******************************************************************************

------ Host: "bose" ----------Tue Feb 8 10:58:01 2000

/usr/people/graham/runs1/nocl1
NOCl S1 Propagation, (sin,HO,Leg/36,24,60). CAP
------------------------------------------------------------------------------

Time = .00 fs, CPU = .76 s, Norm = 1.00000000


E-tot = 1.188024 eV, E-corr = 1.029664eV, Delta-E = .0000 meV

Natural weights *1000 :


rd : 999.2709 .7283 .0008 0.0000 0.0000
rv : 999.3842 .6153 .0005 0.0000 0.0000
theta : 998.9065 1.0845 .0088 .0002 0.0000

Mode expectation values and variances :


rd : <q>= 4.3143 <dq>= .0794 <n>= 2.1160 <dn>= 2.2115
rv : <q>= 2.1549 <dq>= .0670 <n>= .0349 <dn>= .2249
theta : <q>= 2.2283 <dq>= .0767 <j>= 4.6297 <dj>= 3.9988
------------------------------------------------------------------------------

Time = 1.00 fs, CPU = 1.32 s, Norm = 1.00000000


E-tot = 1.188024 eV, E-corr = 1.023057eV, Delta-E = 0.0000 meV

Natural weights *1000 :


rd : 997.8587 2.1345 .0068 .0001 0.0000
rv : 997.8951 2.0843 .0201 .0005 0.0000
theta : 998.5412 1.4346 .0233 .0009 0.0000

Mode expectation values and variances :


rd : <q>= 4.3155 <dq>= .0798 <n>= 2.2337 <dn>= 2.3028
rv : <q>= 2.1578 <dq>= .0668 <n>= .0588 <dn>= .2809
theta : <q>= 2.2276 <dq>= .0767 <j>= 4.8200 <dj>= 4.1250

:
:
:
:

Propagation was successful.

Total time [h:m:s] : 0 : 0 : 12.1

---------------------------------------------------------------------------
------ Host: "bose" ----------Tue Feb 8 10:58:13 2000

/usr/people/graham/runs1/nocl1
NOCl S1 Propagation, (sin,HO,Leg/36,24,60). CAP

Example 12.2: A section of an output file from the wavepacket propagation on the S1 surface of NOCl.

• E-tot: The total energy, i.e. expectation value of the Hamiltonian. This should remain
constant, unless a CAP is used when the energy will dissappear with the wavepacket.

• E-corr: The correlated energy, i.e. the expectation value of the terms in the Hamiltonian
which correlate the degrees of freedom. (The correlated and uncorrelated Hamiltonian
terms are listed in the op.log file).
104 12 Analysing the results employing the Analyse programs

• Delta-E: The loss in energy during the calculation, i.e. difference between the energy
at time t and at time 0.
• Natural weights: The natural weights, i.e. eigenvalues of the one-dimensional density
matrices, are given for each mode in the calculation. A weight of 1.0000 given here
indicates that the least important natural orbital is present in 0.1% of the wavefunction.
• Mode expectation values: hqi andphdqi are the expectation values and variances for the
position operator, where hdqi = hq 2 i − hqi2 . This gives an idea of the spread of the
wavepacket and a check on the grid used. If a DVR is used, hni and hdni are the ex-
pectation values and variances of the number representation in the corresponding FBR
basis, a measure of which functions are populated. If a Legendre DVR is used (i. e.
Leg, Leg/R or KLeg) the symbol is changed to hji and hdji to indicate, that the number
representation is in this case just the expectation and variance of the angular momen-
tum. If an FFT basis or the exponential-DVR is used, hpi and hdpi, the expectation
value and variance of the momentum operator are given.
At the end of the file should be written:
Propagation was successful.

and the CPU-time used for the calculation.

12.3 Checking the accuracy of a calculation


The accuracy of an MCTDH calculation depends on both the size of the primitive and the
single-particle function bases. Analyse programs are available for both these tasks. Note that
one has to be in the name directory when applying the analyse routines and scripts as shown
below.

12.3.1 Checking the primitive basis size


The program rdgpop reads and evaluates the populations of the primitive basis functions, e.g.
the grid points. This is used to check that enough primitive basis functions have been used
for the calculation. The program requires the gridpop file, which is obtained by specifying
the gridpop keyword in the RUN-SECTION of the input file.
The program can be used either to calculate the maximum population, or to evaluate the
change of population with time of the points at the ends of the grid.
In the directory containing the data files, typing
rdgpop86

results in some information about the calculation and the primitive basis used for each degree
of freedom in the calculation. The question
Number of grid-points to be summed over: nz =?

then appears. If 1 is input, then the populations output are those on the end grid points. If 2
is input, the output population for the beginning of the grid is the sum of the populations of
the first and second points, while the output population for the end of the grid is the sum of
the populations of the last and last-but-one points. And so on.
The next question asked is
12.3 Checking the accuracy of a calculation 105

Runing-number of degree of freedom: dof =?


dof = 0 -> Print only maximum over time
Selecting 0 here results in the maximum population at the end grid points being displayed.
------------------------------------------------------------------------------

Maximal values (all times); final time: 30.00 fs


# dof grid(begin) grid(end) basis(begin) basis(end)
1 rd .000245781 .000000064 .260884702 .000002414
2 rv 0.000000000 .003499307 .972981513 .000017179
3 theta 0.000000000 0.000000000 .150721535 .000005773
------------------------------------------------------------------------------

We see that the beginning of the rv grid is unpopulated, and this grid point could be re-
moved without affecting the propagation quality. Likewise, the ends of the theta grid are
unpopulated.
To avoid answering the questions, this result could be obtained by calling the program as

rdgpop86 1 0

If the number of grid points to be summed over is changed to 2, i.e.

rdgpop86 2 0
then the output is
------------------------------------------------------------------------------

Maximal values (all times); final time: 30.00 fs


# dof grid(begin) grid(end) basis(begin) basis(end)
1 rd .001164114 .000002005 .593797892 .000013545
2 rv 0.000000000 .010178351 .993075095 .000088905
3 theta 0.000000000 0.000000000 .316521645 .000008258
------------------------------------------------------------------------------

The start of the rv grid is still unpopulated, and so 2 grid points could be removed at the
start of this degree of freedom. By increasing the number of points over which the sum is
made, it is possible to evaluate how many grid points can be removed. Whether it is possible
to remove the grid points depends on the primitive basis being used. Thus the Leg-DVR used
for the theta degree of freedom by definition runs from π to 0 (if symmetry is used theta
runs from π/2 to 0), and these points cannot be removed. (However, the use of the restricted
Legendre DVR, Leg/R, allows to remove unused angular grid-points).
To chart the population of the end grid points, select a degree of freedom. Thus

rdgpop86 1 1

produces the file gpop.pl, which contains the populations of the end of grid points as a func-
tion of time. The option -g writes information for G NUPLOT to this file, and so

rdgpop86 -g 1 1
gnuplot -persist gpop.pl

produces a plot of the time-dependence of the end of grid points. A more convenient way
to plot the time evolution of the population of the end grid points is provided by the plgpop
script.

plgpop 1 1
106 12 Analysing the results employing the Analyse programs

12.3.2 Checking the single-particle function basis size


The quality of the single-particle function basis is reflected in the populations of the nat-
ural orbitals (see Sec. 3.3 in Ref. [1]). If the calculation contains natural orbitals with a
low population, these are not significant for the representation of the wavefunction, and the
calculation is of a reasonable quality. Unfortunately, different properties have different con-
vergence criteria, and it is not possible to give absolute figures for when the natural orbitals
are insignificant. As a general rule of thumb, when the population of the highest (least pop-
ulated) natural orbital is below 1 % (i.e. a population below 0.01), the calculations will be
reasonable, although convergence may be a way off.
Experience has shown that it is important that the single-particle function bases for all
the modes are balanced, i.e. the lowest natural orbital populations are similar for all. There
is little point spending effort on converging the single-particle function basis for one mode
when the dynamics can be seriously affected by the poor representation of another mode.
The program rdcheck is used to check the natural orbital populations, and so show where
more functions are required. Two basic pieces of information are required by the program:
a state and a mode for analysis. If no arguments are given, the program prompts for what it
requires. The basic information is provided by typing

rdcheck86 0 0

when in the directory containing the data files from a calculation. The arguments 0 0 select
no particular state or mode. The program then prints some information about the system,
and most importantly the maximum population of the highest natural orbital (lowest natural
weight) is displayed.
------------------------------------------------------------------------------

Maximum over time of lowest nat.-weight; final time : 30.00 fs


mode s = 1
1 1.810E-03
2 2.472E-04
3 9.870E-05
------------------------------------------------------------------------------

This information says that the calculation should be of reasonable quality, as all mode contain
natural orbitals that remain fairly insignificant.
If a mode is selected, the populations as a function of time can also be graphically dis-
played. The modes are numbered in the order in which they are listed in the SPF-BASIS-
SECTION of the input file. For NOCl the order corresponds to the degrees of freedom
rd, rv, theta, and so 2 selects the vibrational mode rv. The NOCl system has only one
state, and so

rdcheck86 1 2

produces a file, nat.pl which contains the natural populations as a function of time. The
G NUPLOT program can be conveniently used by including G NUPLOT data in this file, i.e.

rdcheck86 -g 1 2
gnuplot -persist nat.pl

would produce the plot shown in Fig. 12.1. Again, a more convenient way to produce this
plot is provided by a pl-script. Just type:

plnat 1 2
12.4 Checking the efficiency of a calculation 107

0.1

0.01

0.001

0.0001

1e-05

1e-06
0 5 10 15 20 25 30
time[fs]

Figure 12.1: The natural orbital populations for the single-particle function basis for the vibrational degree of
freedom as a function of time for the photo-dissociation of NOCl.

12.4 Checking the efficiency of a calculation

The timing file, which is obtained by adding the keyword timing to the RUN-SECTION,
contains information about how much time is spent in the various sections and subroutines
of the program. This information can be used to improve the efficiency of a calculation. For
instance, if in a CMF run the BS-integrator (used to propagate the single-particle functions)
takes less than one or two percent of the total effort, one should combine more single-particle
functions. If, on the other hand, the BS-integrator takes more than 80% of the total effort,
one should remove some of the combinations. If the propagation of one certain mode takes
much longer than the propagation of the other modes although the (combined) grid sizes are
comparable, then check whether the (DVR) representation is appropriate. The information
listed in the timing file can be extremely helpful. It is a good practice to always include the
timing file.

12.5 Watching the system’s evolution

The program showd1d86 is designed to plot the evolution of the system density along a
degree of freedom. It reads the gridpop file, which can be created by adding the keyword
gridpop in the RUN-SECTION of the input file. This file contains the one-dimensional
108 12 Analysing the results employing the Analyse programs

0.3

0.25

0.2

0.15

0.1

0.05

25

20

15
3.6
3.8
4 10 T
4.2
4.4
4.6
4.8 5
5
X 5.2
5.4
5.6 0

Figure 12.2: The density along the dissociative degree of freedom as a function of time for the photo-dissociation
of NOCl.

densities output at intervals specified by the tout keyword. This density can be plotted
using the showd1d86 program in conjunction with G NUPLOT.
For example, the NOCl photo-dissociation calculation has been run using the example
input file 4.1. The command

showd1d86 -a -T f1

requests that the density for the first degree of freedom (as listed in the PRIMITIVE-BASIS-
SECTION of the input file, i.e. the dissociative mode, rd) is written to a file den1d f1. The
options make this file into a G NUPLOT grid file, complete with commands. The option -a
(automatic) lets showd1d86 call G NUPLOT. The 3D plot of density is shown in Fig. 12.2.
Try also the other format options. A complete list of options is obtained trough the command
showd1d86 -h.
The similar program is showspf86 which displays the single-particle functions (uncom-
bined modes only, of course). Note that showd1d86 reads the gridpop file while showspf86
reads the psi file. Finally, there is showrst86 which plots the single-particle functions of the
restart file.
12.6 Determining photo-dissociation and photo-absorption spectra 109

12.6 Determining photo-dissociation and photo-absorption spec-


tra
12.6.1 Electronic excitations
When computing involving an electronic excitation (or ionisation) the Condon approxiamtion
is usually used. The initial state of a propagation is created by shifting the vibrational ground
state of the the electronic ground state surface vertically onto an excited (or ionized) elec-
tronic state. The absorption spectrum is then given by the Fourier-transform of the autocor-
relation function.
The spectrum of a system can be generated using autospec86. This reads the autocor-
relation function from the file auto, which is created if the keyword auto is included in
the RUN-SECTION of the input file. The spectrum is then created over a chosen interval
in energy space by Fourier transform. The shell script plspec calls autospec86 and then
G NUPLOT. It is often more convenient to use this script.
For example, the NOCl spectrum can be displayed by typing
plspec 0.6 2.0 ev
This spectrum was produced in the tutorial, and is shown in Fig. 2.1.
Before the autocorrelation function is Fourier transformed, it gets modified. To reduce
artifacts of the Gibbs phenomenon, the autocorrelation function is multiplied with a filter
function cosn (πt/2T ), where n = 0, 1, 2 and where T denotes the final time (plus one time
step) of the autocorrelation function. Due to the t/2–trick, see Eq. (167) of the MCTDH
review, the propagation time is only T /2. The columns 2–4 of the spectrum.pl file list the
results for the different n’s. When the option -lin is set for autospec86, then a second set
of filters is used. In plspec the choice of the filter is made trough the option -g0 · · · -g5,
the filter -g1 is default. See the HTML docu. For a comprehensive discussion of the filters
see the lecture notes INTRODUCTION TO MCTDH, chapter 1.3. (The lecture notes can be
downloaded from the literature downloads site, which is part of the MCTDH web-site). Here
we only list the full-widths at half maximum (FWHM) of the energy filters, which are the
Fourier transforms of the time filters. The entries in Table 12.1 are to be divided by the length
of the autocorrelation function to yield the FWHM. Note that the filters g̃0′ and g̃1′ (which are

g̃0 g̃1 g̃2 g̃3 g̃0′ g̃1′ unit


2.49 3.38 4.14 4.78 3.66 4.91 eV fs
20.1 27.3 33.2 38.6 29.5 39.6 cm−1 ps
Table 12.1: FWHM values of the window functions g̃k times the length of the autocorrelation function.
Remember that the length of the autocorrelation function is twice the propagation time, if the t/2-trick is
used.

called g4 and g5 in plspec) are non-negative. The energy-filters may be inspected by running
plspec -gn -r -t 100 -0.1 0.1 ev with n = 0, 1, . . . , 5.
To introduce an additional damping, i. e. a Lorentzian or Gaussian broadening of the
spectrum, the autocorrelation function may be further multiplied with exp(−(|t|/τ )i ) where
τ and i = 1, 2 are the two last arguments of autospec86. The exponential is ignored if τ = 0.
(For plspec this is the default).
Finally, if the option -EP is set, the Fourier transform is multiplied with the photon energy
ω to arrive at an absorption spectrum. This multiplication in general requires to shift the
110 12 Analysing the results employing the Analyse programs

spectrum (option -e) by the ground state (or initial state) energy. The multiplication with ω
is omitted if the option -FT is given (this is the default). Note that only in this case one may
use an energy interval containing negative energies (compare with Fig. 2.4).

12.6.2 IR-spectra
When infra-red spectra are to be computed, the initial wavefunction for the propagation is
given by the vibrational ground state multiplied with a (non-constant) dipole operator D. See
Ref. [30] for a discussion. The operation with a dipole operator is performed by the mctdh86
program, when the keyword operate is given in the Init WF-Section. In most cases it
is beneficial to additionally orthogonalize the operated wavefunction against the ground state.
This can be achieved by setting the keyword orthogonalise in Init WF-Section.
(For more details on the use of these keywords consult the HTML documentation. See
also Section 7.9). Both procedures, operate and orthogonalise finally normalize
the wavefunction, as an MCTDH wavefunction should be normalized initially. This creates
a problem, when absolute intensities are to be computed or when spectra of different com-
ponents of the dipole operator have to be added. To compensate for the normalization after
operate, one should give the norm ||DΨ0 || as argument the the -Mb option of autospec86.
This norm is printed to the log-file of the mctdh86 run. However, when additionally the
ground-state is projected out as well, then the norm is again changed and things become a bit
complicated. In such a case it may be convenient to compute the norm anew.
The initial wavefunction generated by the MCTDH program when using operate and
orthogonalise is
P DΨ0
Ψin = (12.1)
||P DΨ0 ||
where P denotes the projector, which projects out the ground-state, and D is the dipole
operator. Computing the matrix element

hΨ0 |D† P D|Ψ0 i


hΨin |D|Ψ0 i = = ||P DΨ0 || (12.2)
||P DΨ0 ||

yields the desired information. Here we have used P 2 = P = P † . Hence the value
hΨin |D|Ψ0 i, which may be computed with crosscorr86, has to be given as argument of
the option -Mb of autospec86.
Recently the operate algorithm has been extended to perform the orthogonalization in
concert with the operate process. For this one has to set the keyword operate ortho and
to augment the operate Hamlitonian-Section by a unit operator line. See the HTML-docu
for details. We strongly recommend to use the operate ortho keyword, one can then
directly use the the ”operate norm” value from the log file as argument of the -Mb option of
autospec. The use of Eq.(12.2) is no longer necessary.

12.7 Computing excitation and reaction probabilities


The analysis of scattering processes, i. e. the computation of excitation and reaction prob-
abilities, is performed by evaluating the quantum flux going into a particular channel. The
quantum flux is determined by the interaction of the time-dependent wavepacket with a CAP.
The program flux86 performs the necessary analysis. The psi file is read and the energy re-
solved flux is computed and written to the flux file. Additionally this flux is divided by the
12.7 Computing excitation and reaction probabilities 111

energy distribution of the initial wavepacket to obtain the transition or reaction probabilities.
The latter step requires in general that the mctdh86 program has computed the energy distri-
bution of the initial wavepacket and has written it to the enerd file (see Section 7.11). (NB:
The file enerd is called adwkb in older versions). Besides the flux file, flux86 creates the
files flux.log, gtau and wtt. When the file gtau is present the flux program skips the time con-
suming evaluation of the integrals hΨ(t)|W |Ψ(t + τ )i but reads the function g(τ ) from the
gtau file. (See the MCTDH review, section 8.6.3, Eq.(199), for more details). This allows to
re–do the Fourier integrals for another energy interval very quickly. The option -w enforces
the re–calculation of g(τ ).
The file wtt contains the expectation values Wtt = hΨ(t)|W |Ψ(t)i. This information is
useful for checking that the absorption process has finished. The shell script plwtt visualises
the function Wtt , while plflux and plflux -r visualise the flux and the transition probability,
respectively.
The program flux86 cannot only determine the total energy resolved flux going into a
particular arrangement channel (i. e. going into a particular CAP) but can also determine the
flux which is projected onto final quantum states or which is weighted by an operator. This is
probably best demonstrated by an example. Copy the file $MCTDH DIR/operators/nocl1.op
to your tutorial directory and add the following lines to this operator file.

HAMILTONIAN-SECTION_vib
usediag
-------------------------------------
modes | rd | rv | theta
-------------------------------------
1.0 | 1 | KE | 1
1.0 | 1 | v:NO | 1
-------------------------------------
end-hamiltonian-section

Then edit the input file nocl1.inp and set the propagation time to tfinal=60 and re-run.
Since flux86 analyses the wavepacket as it is absorbed by the CAP, a longer propagation time
is required as for converging the spectrum. Then execute the commands

flux86 -w -s 19 -lo 12 0.61 2.0 ev rd


mv flux flux.0
flux86 -w -s 19 -lo 12 -O vib -u 200. 0.61 2.0 ev rd
mv flux flux.op
flux86 -ed flux.0 -s 19 -lo 12 -O vib -u ev 0.61 2.0 ev rd
mv flux flux.op_r
flux86 -w -s 19 -lo 12 -P 2 eigenf vib 1 % 0.61 2.0 ev rd
mv flux flux.1
flux86 -w -s 19 -lo 12 -P 2 eigenf vib 2 % 0.61 2.0 ev rd
mv flux flux.2
flux86 -w -s 19 -lo 12 -P 2 eigenf vib 3 % 0.61 2.0 ev rd
mv flux flux.3
autospec86 -FT 0.61 2.0 ev 0 1

The first flux-run evaluated the total flux. To display it, type

plflux -f flux.0

As you will notice, the plot looks very similar to the absorption spectrum shown in figure
2.1. It is not identical, though, as the definition of an absorption spectrum contains a factor
112 12 Analysing the results employing the Analyse programs

ω, the energy of the absorbed photon. This multiplication is omitted when autospec86 (or
plspec) is run with the -FT option, as we have done above. Now the spectra are identical as
one observes when typing
plflux -G -f flux.0 -d spectrum.pl

This shows the flux and the Fourier transform of the autocorrelation function on top of each
other.
Next we modify the flux by letting the operator of the vibrational energy act on it. Type
plflux -G -f flux.0 -d flux.op

and you will see the total flux in comparison with the vibrational energy weighted flux. It
is now clear that the structures in the spectrum are due to vibrational excitation of the NO
fragment. By the way, via the option -u 200 the modified flux was multiplied by the
factor 200. This was done to make it comparable with the total flux. Usually the option -u
is followed by an energy keyword, e.g. -u ev, to transform the weighted flux from a.u.
to a desired energy unit.
One may divide the weighted flux by the total flux to observe the vibrational energy con-
tent. The option -ed flux.0 was used to input the file flux.0 as energy distribution (the
default is the file enerd, the generation of which, however, is only useful for a scattering –
not half-scattering – problems). To visualise the quotient weighted-flux/total-flux, type
plflux -G -r -f flux.op_r

The structures below 0.8 eV are numerical noise because one divides a very small number
by another very small number. Obviously, the higher the energy of the absorbed photon, the
larger is the vibrational energy of the NO fragment. Compare this plot with the eigenenergies
displayed in the flux.log file.
Finally we demonstrate the use of projectors. Type
plflux -G -f flux.0 -d flux.1 -e flux.2
plflux -G -a 1.0 -y 25. -f flux.0 -d flux.2 -e flux.3

The first plot shows the flux projected onto the vibrational ground state and the first excited
state, respectively, in comparison with the total flux. The second plot is similar, but shows
the flux projected onto the first and second excited state, respectively. The Fig. 12.3 displays
the total and projected projected flux, similarly to the plots generated above.

12.8 Monitoring state populations of non-adiabatic systems


12.8.1 Diabatic populations
The (electronic) state populations of a multi-set run are written to the check file and are
read by rdcheck86 which writes them to the file chk.pl. One then may use G NUPLOT to plot
the state populations, but it is easier to use plstate :
plstate

Note that plstate may also be used for runs evolving on one single potential energy surface.
In this case the norm-squared of the wavefunction is plotted. In the presence of CAP’s this
quantity is non constant.
In case of a multi-state calculation which uses the single-set formulation, the state
populations can be plotted with showd1d86. Use the command:
12.8 Monitoring state populations of non-adiabatic systems 113

100
v=0
v=1
v=2

80

60

40

20

0
0.6 0.8 1 1.2 1.4 1.6 1.8 2
Energy[eV]

Figure 12.3: The total (full line) and projected flux of dissociating NOCl. The projection is on the vibrational
states of the NO fragment, v=0, v=1, and v=2, respectively.

showd1d86 -a -E f<el.DOF>

where <el.DOF> must be replaced with the DOF-number of the electronic state. The numer-
ical values of the populations can be found on the file den1d f<el.DOF>, which is created by
showd1d86.
Alternatively, the popolations may be read from the output file. Use the command:

fgrep population output | sed ’s/population : //’ > dpopfile

to write the state populations to the file dpopfile.

12.8.2 Adiabatic populations computed with adpop


Because mctdh usually works in the diabatic representation the diabatic populations can be
easily calculated (see above). But if one is interested in the adiabatic state populations, these
are more difficult to obtain. There are two possible ways.
The first possibility is to use the analyse program adpop. This program reads the psi
file of an mctdh- run and the so-called pes file, which is a special operator file in which all
derivative operators are ignored. The pes file is conveniently generated by setting the option
-pes, i. e. running “mctdh86 -pes inpfile”. Moving to the name directory, one may then
calculate the diabatic and adiabatic state populations by running adpop86. If needed, one-
and two-dimensional adiabatic densities can be calculated by adding the modelabels to the
program call:

adpop86 v9a v10a,v6a

In this case the one dimensional adiabatic density for the v9a degree of freedom and the
two dimensional density for the v10a-v6a degrees of freedom will be created as well as
114 12 Analysing the results employing the Analyse programs

the diabatic and adiabatic state populations. The created files are: adp (for the populations),
adp v9a (for the one dimensional density), adp v10a v6a (for the two dimensional density)
and the log file adp.log. To create two-dimensional densities, the two modelabes must be
separated by a comma. The modelabels for one-dimensional densities stand alone. To visu-
alise the density files created by adpop use the shell script pladpop that can plot one-and
two-dimensional densities. For plotting the state populations simply use plgen.
As the calculation runs over the full primitive grid, the calculation is slow. Analyzing
one wavefunction takes about [grid-dimension]*[A-vector length]*1.5 ∗ 10−8 s on a 3 GHz
P4. The adpop calculations can be accelerated by setting the options -q or -mc. The first
option enables the quick modus where all points are ignored for which the product of the
one-particle grip-populations (i. e. the 1D-densities) are smaller than some threshold. The
loss in accuracy is usually negligible (and can be controlled by setting the parameter qtol).
The Monte-Carlo integration is, of course, less accurate, but allows to attack problems which
are not feasible for adpop using direct integration.

12.8.3 Adiabatic populations computed with adproj


If one is interested in the adiabatic state populations alone one should use the second variant,
which is more efficient, especially for larger systems (≥5 degrees of freedom). However,
this way is more cumbersome than the adpop calculation. The procedure is explained in the
following.
First a pes file must be created, often this has already been done by the previous mctdh-
run. After this, running adproj generates several vpot files which contain the adiabatic sur-
faces and the projection operator matrix elements for each electronic state. As an example
the file apr p1 12 contains the matrix element (1,2) of the projector (p = projector) for the
first adiabatic electronic state. In contrast, the file apr v2 contains the second adiabatic poten-

RUN-SECTION
name = projector111
readvpot = apr_p1_11 # path of the vpot file
end-run-section

OPERATOR-SECTION
pes = none # no PES from library needed
end-operator-section # as the PES is read from vpot

PRIMITIVE-BASIS-SECTION
v10a HO 20 0.0 1.0 1.0
v6a HO 30 0.0 1.0 1.0
v1 HO 20 0.0 1.0 1.0
end-primitive-basis-section

NATPOT-BASIS-SECTION
v10a = 10
v6a = contr
v1 = 10
end-natpot-basis-section

end-input

Example 12.3: The input file, projfit.inp, for the potfit calculation.
12.8 Monitoring state populations of non-adiabatic systems 115

RUN-SECTION
name = proj1
genoper
title = pyrazine 3D projector, genoper-run.
end-run-section

OPERATOR-SECTION
opname = projector1
end-operator-section

SPF-BASIS-SECTION
multi-set
v10a = 7, 7
v6a = 10, 10
v1 = 6, 5
end-spf-basis-section

PRIMITIVE-BASIS-SECTION
v10a HO 20 0.0 1.0 1.0
v6a HO 30 0.0 1.0 1.0
v1 HO 20 0.0 1.0 1.0
el el 2
end-primitive-basis-section

end-input

Example 12.4: The input file, proj1.inp, for the mctdh-genoper-run.

OP_DEFINE-SECTION
title
projection-operator for 3D pyrazine
end-title
end-op_define-section

LABELS-SECTION
P11 = natpot{projector111}
P12 = natpot{projector112}
P22 = natpot{projector122}
end-labels-section

HAMILTONIAN-SECTION_projector1
usediag
------------------------------------------
modes | el | v10a | v6a | v1
------------------------------------------
1.0 | S1&1 | P11
1.0 | S2&2 | P22
1.0 | S1&2 | P12
------------------------------------------
end-hamiltonian-section

end-operator

Example 12.5: The operator file, projection1.op, for the mctdh-genoper-run.


116 12 Analysing the results employing the Analyse programs

tial energy surface (v = potential). Then the vpot files must be fitted by potfit to bring them
into the MCTDH product representation. To calculate the expectation value of the projector
one needs the projector in form of an MCTDH oper file. This oper file can be created by an
mctdh-run with the keyword genoper in the RUN-SECTION. After the oper file has been
created, the expectation value of the projector can easily be calculated with the expect anal-
yse routine. This requires that the wavefunction has been stored (psi file). Alternatively one
may compute the adiabatic populations on the fly by setting the keyword expectation in
the RUN-SECTION of the mctdh propagation.
Here’s a list of all steps needed to compute the adiabatic populations:

1. Create an pes file by an mctdh-genpes-run.

2. Create vpot files with adproj as explained above. (Just run adproj in the name direc-
tory of step 1. adproj will read the pes file.)

3. Fit the vpot files of the projector with potfit to create natpot files. As potfit requires
an input file, an example is shown in Example (12.3). Here potfit will read the vpot
file apr p1 11 and will create the natpot file in the name directory projector111.
In the OPERATOR-SECTION the keyword pes = none must be given. Note that
there must not appear an electronic degree of freedom in the PRIMITIVE-BASIS-
SECTION. A similar input file must be generated for each matrix element of the pro-
jector.

4. Create a projection operator file by performing an mctdh-genoper-run using the


just created natpot files. For this mctdh-run an input and an operator file must be
written. As an example, these files for the creation of a projection operator are shown
in Example (12.4) and (12.5). In the operator file, projector1.op, one uses the natpot
files which are in the directories projector111, projector112 and projector122. Note
that the SPF- and PRIMITIVE-BASIS-SECTIONs must be identical to the ones used
in the mctdh-propagation-run where the psi-file was created that will be used for
the calcualtion of the adiabatic populations.

5. Calculate the expectation value of the projection operator with the analyse routine
expect. Move to the name directory of a propagation run and submitt the command
”expect86 -f ../proj1/oper projector1”. This requires the wave function that is con-
tained in the psi file. Alternatively the adiabatic populations can be computed on the
fly by setting the expectation keyword in the RUN-SECTION. In this case it is not
necessary to store the wavefunction.

Notice that the adproj run provides also the vpot files of the adiabatic surfaces. This
makes it possible to perform propagation in the adiabatic approximation.
Finally, setting the option -od, adproj will compute the projection matrices onto an
off-diagonal element of the diabatic electronic density operator (and then does nothing
else). E.g. running adproj -od 1 2 will produce the vpot-files apr od12 11, apr od12 12,
apr od12 21, and apr od12 22. Note that the projection matrix is no longer symmetric and
one has to run s2 rather than s(s + 1)/2 potfit calculations, where s is the number of elec-
tronic states. Moreover, one has to use Z1&2 and Z2&1 rather than S1&2 in the operator-file
of the genoper step. See Example (12.6).
Typical calculation times for the adpop-run are about 20s (for 3D) up to 9h (for 6D). Each
calculation was performed on a 2.6GHz processor and the psi files contained 121 timesteps
12.9 Plotting 2D cuts through the system density 117

OP_DEFINE-SECTION
title
projection-operator for the (1,2) off-diagonal element of the electronic density
end-title
end-op_define-section

LABELS-SECTION
OD11 = natpot{pf-od12_11}
OD12 = natpot{pf-od12_12}
OD21 = natpot{pf-od12_21}
OD22 = natpot{pf-od12_22}
end-labels-section

HAMILTONIAN-SECTION_projector12
usediag
------------------------------------------
modes | el | v10a | v6a | v1
------------------------------------------
1.0 | S1&1 | OD11
1.0 | S2&2 | OD22
1.0 | Z1&2 | OD12
1.0 | Z2&1 | OD21
------------------------------------------
end-hamiltonian-section

end-operator

Example 12.6: The operator file, projection2.op, for the mctdh-genoper-run.

(3D and 6D pyrazine models). In the case of using adproj it takes about 10s (3D) up to
5min (6D) for the same Hamiltonians and wavefunctions. Note that in the potfit step of the
second variant there are, as usual, less natpot terms than grid points (See Example 12.3).
The numbers in the NATPOT-BASIS-SECTION were chosen such that there was virtually
no difference to the numerically exact adpop-run.

12.9 Plotting 2D cuts through the system density


The program showsys can be used to display one- and two-dimensional cuts through the
system density using the psi file. This must have been generated during a propagation run by
including the psi keyword in the RUN-SECTION of the input file. If this file has not been
generated, one-dimensional densities may be still be plotted from the gridpop file using the
showd1d program (see Sec. 12.5).
The options are accessed by typing in the number given and responding to the questions.
The words in brackets indicate what the present option is. Some options lead to a change in
options being displayed.
Option 10 can be used to change between various plot tasks. What is possible depends
on the system: for a non-adiabatic system the choices include not only plotting the reduced
density, but plotting a cut through the adiabatic or diabatic wavefunction. These plots should
be used with caution as the values are often extremely low in a cut. If a pes file is present (see
Sec. 12.10), cuts through the PES may also be plotted. If there is more than one electronic
state, one may chose between a adiabatic or diabatic representation of the potential.
118 12 Analysing the results employing the Analyse programs

0 = stop
1 = plot to screen
2 = print plot
3 = save plot to a postscript file
4 = save plot to a gnuplot file (use after 1 or 2)
5 = save data to an xyz file
9 = toggle re-plot (get new set of contours)

10 = change plot task (plot reduced density)


20 = change coordinate section ( rd=x rv=y theta=1.545 Time=0.000)
30 = change coordinate bounds
40 = show coordinate info
50 = change a single coordinate
80 = change coordinate units
90 = change Z-axis units (au)

110 = toggle contour mode (linear)


120 = change number of contours (21)
150 = toggle grid (off)
160 = toggle surface (off)
170 = toggle contour lines (on)
240 = toggle key (on)
245 = toggle title (on)
250 = toggle show points (off)
260 = toggle stick spectrum (off)
270 = toggle smooth curve (off)
280 = change time-slice format, e.g. movie(step-through)
285 = change time-step ( 1)
290 = toggle no-weigths (off)

400 = Overlay plots (off)

900 = toggle gnuplot output format (on)


910 = change printer (lpr)
920 = change GNUplot command

Example 12.7: The start-up menu in the showsys program to enable interactive plotting of the system density
and potential energy surfaces.

Option 20 allows a different cut to be chosen. Enter either x, y, or a number for each
DOF. Information about the mode boundaries is given by option 40. The program then
chooses the grid point nearest to the selected coordinate for the plotted cut. Note that when
densities are plotted, the values of the numbers given are irrelevant. They merely serve as
space-holders. The density is the integral of |Ψ|2 over all those DOFs, which are labelled
with a number.
Option 400 allows to generate overlay plots, i. e. plotting a density on top of the contour
lines of the potential. Before using this menu point, the potential plot data has to be stored to
some file by using menu point 5. (See the tutorial Sec. (2.1) and Fig. 2.2 for an example).

12.10 Plotting cuts through the potential energy surfaces


The program showsys can be used to display one- and two-dimensional cuts through the
potential energy surfaces of the system. Before this can be done, the MCTDH program must
be used to generate a pes file from the Hamiltonian information in the operator file (see
12.10 Plotting cuts through the potential energy surfaces 119

Chapter 6). The pes file is an operator file from which all terms are removed which contain
derivative operators or CAPs.
To generate a pes file, set up an input file specifying the system and operator with a
PRIMITIVE-BASIS-SECTION, A SPF-BASIS-SECTION, and an OPERATOR-SECTION.
While no information is required about the single-particle function basis, the SPF-BASIS-
SECTION is required as it also defines which degrees of freedom defined in the PRIMITIVE-
BASIS-SECTION are included. In the RUN-SECTION, the keyword genpes is then re-
quired, along with the name of a directory in which to store the new file. Now the MCTDH
program is run, and the file name/pes generated. The op.log.pes file contains information on
the function that has been set up, and the log is now called log.pes. This makes it possible to
use the same name-directory as the propagation run.
Rather than editing the input file it is often more convenient to use options. E. g.

mctdh86 -pes nocl1

will generate a pes file of the NOCl S1-surface and stores it in the name directory.
Now change to the directory where the pes file has been stored and start the showsys
program. The program is also able to generate two-dimensional plots of the system density
from the psi file. If only pes plotting is required then start the program using the -pes option:

showsys86 -pes

If both pes cuts and density plots are wanted, this option should not be used. A menu appears
which allows the interactive generation of plots. This is shown in Example 12.7.
When the potential used is given by a natpot file, generated by the potfit86 program (see
next Section), then it is more convenient to use the showpot86 program to visualise the
potential energy surface. showpot86 is menu driven, similar to showsys86, and it allows to
plot 1D and 2D cuts of the original surface, of the natural potential fit, and of differences
between them. When the parameter natpot-cut (menu point 500) is larger than zero, then
all natural potential terms, the supremums norm of which is smaller than natpot-cut, are
removed. A proper use of natpot-cut may reduce the number of potential terms (by a factor
1/2, or so) with only marginally reducing the accuracy of the fit. The parameter natpot-cut is
also available in mctdh86. The number of omitted terms is protocolled in the showpot.log
file.
Chapter 13

Using the Potfit program

13.1 Transforming a potential to product form


For optimal performance, the MCTDH algorithm requires the Hamiltonian to be given as
a sum of products of single-particle operators (MCTDH product form). The kinetic energy
operator usually is in MCTDH product form, but the potential is often given as a multidi-
mensional function. The program potfit is able to transform a given potential energy surface
to MCTDH product form. For small systems (e. g. 3D) it does this job fast and reliable.
However, in contrast to the MCTDH program, which avoids using the primitive product grid,
potfit has to employ the full primitive product grid. The computational resources used by
potfit thus increase much more strongly with the size of the system than the ones required by
MCTDH.
The numerical effort of potfit can be reduced, if the potential surface is partly given in
product form. For example, if a 6 D surface reads

V (u, v, w, x, y, z) = V1 (u, v, w)V2 (x, y, z) + V3 (u, v, w)V4 (x, y, z) (13.1)

one should, of course, apply potfit to V1 , ..., V4 individually, rather than applying it directly
to V.
Similar to mctdh86, potfit86 is started with giving the path of an input file as argument.
potfit86 <inputfile>

The input file is structured similar to the MCTDH input file. To understand it, one must be
familiar with the basics of the potfit algorithm. The potfit algorithm is described in Ref. [1]
and in the original papers [31, 32]. In short, the fit to product form is performed in two steps.
First, the potential density matrices are diagonalised to obtain the natural potentials. The thus
generated product representation of the potential minimises (to a very good approximation)
the overall L2 error. As there are regions of greater and lesser physical importance, a better
representation can be achieved by introducing weights which emphasise the regions of phys-
ical importance. Separable weights, i. e. weights that act on one degree of freedom only,
can be incorporated into the first step. More powerful, however, are correlated weights, i. e.
weights which cannot be written in product form. In a second step one thus may iteratively
improve the representation by employing correlated weights. The correlated weights are im-
plemented as relevant regions. A relevant region may be defined, e. g., as those areas where
the potential energy is below some threshold, V (R) < Vmax . The program then iteratively
improves the fit in the relevant region (while making it worse in the non-relevant region).

120
13.1 Transforming a potential to product form 121

RUN-SECTION
niteration = 10
name = noclfit
iteration prodwei
end-run-section

OPERATOR-SECTION
pes = nocl1sch # Schinkes surface
vcut < 5.0d0,ev # Potential is cutted above 5 eV
vcut > -1.0d0,ev # and below -1 ev
end-operator-section

NATPOT-BASIS-SECTION
rd = 5 # rd = 15 These are the values for nat.pot. I
rv = 4 # rv = 15 review Section 9.1
theta = contr
end-natpot-basis-section

PRIMITIVE-BASIS-SECTION
rd sin 36 3.80 5.60
rv HO 24 2.136 0.272,ev 7.4667,AMU
theta Leg 60 0 all
end-primitive-basis-section

SEPARABLE-WEIGHT-SECTION
rd 5 3.904 5.83d-03
rv 2 v:NO 1.d-3 1.d0
theta 3 2.22 6.d0
end-separable-weight-section

CORRELATED-WEIGHT-SECTION
v < 2.0,eV
rd < 5.d0
end-correlated-weight-section

end-input

Example 13.1: A potfit input file for the NOCl S1 surface.

The output files of potfit are structured similarly to the MCTDH ones. There are the
files output, input, log and timing. The prodwei file lists the separable weights and the file
iteration compiles various error measures for each iteration step. The script plpweight reads
prodwei and plots the separable weights, and the script plpit reads iteration and plots the error
measures versus the number of iterations. The file natpot finally contains the natural potential
fit which may be read by the MCTDH program.
A potfit input file, noclpot.inp, is shown in Example 13.1. The RUN-SECTION defines
the number of iterations to be performed, the name directory, and the files to be opened. The
potential is first evaluated on the full product grid and written to the file vpot. Note, vpot is
needed by showpot when plotting the exact potential.
The OPERATOR-SECTION specifies the potential energy surface to be used and defines
cuts which remove large (positive and/or negative) potential values which, if kept, would
slow down the integrator.
122 13 Using the Potfit program

The NATPOT-BASIS-SECTION defines how many natural potentials are used for the fit.
The more natural potentials one includes, the more accurate is the fit but the slower is the
MCTDH calculation. One of the degrees of freedom should have the argument contr. This
is the mode, over which a contraction is performed (see Refs. [1, 31, 32]). Contract over that
degrees of freedom which converges most slowly. Inspect the output to see which one it is.
One should avoid to contract over a mode if it is defined on a much larger grid than the other
modes. To decide how may natural single particle potentials should be included in the potfit,
one should inspect the output file which displays the natural populations as well as the sums
of neglected natural populations. This will be discussed below.
MODE COMBINATION is also possible. In the NATPOT-BASIS-SECTION, the degrees
of freedom can be combined into a single mode in the same way, as it is done in the spf-basis-
section for an mctdh run. If the resulting natpot file is used in a mctdh run, the degrees of
freedom combined in potfit must also be combined in the spf-basis-section (note that the
order of the degrees of freedom in the mode must be identical in the natpot-basis-section
and in the spf-basis-section). If the degrees of freedom are not combined in the natpot-basis-
section, they still can be combined in a mctdh run. There are, however, restrictions. For
each combined mctdh-mode, potfit must use precisely the same combination, or may treat
all degrees of freedom of this mode uncombined. Combining degrees of freedom can reduce
the number of natural potentials needed for convergence. This will be important for large
systems.
The PRIMITIVE-BASIS-SECTION must be identical to the PRIMITIVE-BASIS-
SECTION of the following MCTDH calculation, except for the ordering of the degrees
of freedom. This ordering, however, must be consistent with the ordering of the argu-
ments of the pes to be fitted. If one is insecure about the latter ordering, inspect the file
source/opfuncs/funcsrf.F and search for the name of the particular pes under discussion.
See also the HTML documentation. NB: One may use the order keyword (OPERATOR-
SECTION of the potfit input file) to define a new order in which the arguments are passed to
the surface routine. However, this does not work for the readsrf surface. See the HTML
documentation for details.
Note that mctdh uses the modelabels to associate the natpot terms with the DOFs. If this
is not wanted one may give the keyword ignore as a parameter to the natpot keyword in
the LABELS-SECTION. In this case one must use a numbered input (e. g. |1&2&3 V ) in
the HAMILTONIAN tableau to indicate on which DOFs and in which order the natpot shall
operate. See the HTML documentation for details.
The SEPARABLE-WEIGHT-SECTION and the CORRELATED-WEIGHT-SECTION
finally define the separable and correlated weights, respectively. See the HTML documenta-
tion for details.
The OUTPUT FILE contains important information on the natural populations
and on error measures. Shown in Example 13.2 is an excerpt of an potfit output-
file, which is generated by running the input Example 13.1. The block named
Trace - Sum of all preceding Natural Weights [eV**2] displays
the sum of ”neglected” reduced natural weights, e. g. the second entry, 0.5371E − 03,
is the sum of eigenvalues 3 to 36. This sum is directly related to the fit er-
ror. As in this example we took √ 5 and 4 single particle potentials into account,
the estimated error is given by 0.2817E −04 + 0.2474E −05 = 0.5535E − 02
in eV, i. e. 5.5 meV. This estimate is printed in the output below the line
Global (weighted) Lˆ2 error estimated from neglected ..., and it
13.1 Transforming a potential to product form 123

************* Mode: 1 rd ************************

Trace of reduced density matrix : 0.8297 au, red. trace 0.8399 eV**2
Number of eigenvalues considered: 5 / 36
Reduced Eigenvalues (Natural Weights) [eV**2] :
1 0.8363E+00 0.3063E-02 0.3058E-03 0.1667E-03 0.3651E-04 0.1198E-04
7 0.5736E-05 0.4436E-05 0.2863E-05 0.1240E-05 0.1052E-05 0.4074E-06
13 0.1324E-06 0.1037E-06 0.8599E-07 0.4732E-07 0.3625E-07 0.1433E-07
19 0.7491E-08 0.7248E-08 0.5348E-08 0.3652E-08 0.1783E-08 0.7816E-09
25 0.4284E-09 0.3753E-09 0.2785E-09 0.2162E-09 0.1371E-09 0.6923E-10

Trace - Sum of all preceding Natural Weights [eV**2] :


1 0.3600E-02 0.5371E-03 0.2313E-03 0.6467E-04 0.2817E-04 0.1618E-04
7 0.1045E-04 0.6010E-05 0.3147E-05 0.1907E-05 0.8552E-06 0.4478E-06
13 0.3154E-06 0.2118E-06 0.1258E-06 0.7847E-07 0.4222E-07 0.2789E-07
19 0.2040E-07 0.1315E-07 0.7802E-08 0.4150E-08 0.2367E-08 0.1585E-08
25 0.1157E-08 0.7814E-09 0.5028E-09 0.2866E-09 0.1495E-09 0.8030E-10

Abs(Trace - Sum of relevant Natural Weights) [eV**2] : 2.81665E-05


Sqrt(Abs(Trace - Sum of rel. Nat. Weights)) [meV] : 5.3072

************* Mode: 2 rv ***********************

Trace of reduced density matrix : 0.8297 au, red. trace 0.8399 eV**2
Number of eigenvalues considered: 4 / 24
Reduced Eigenvalues (Natural Weights) [eV**2] :
1 0.8370E+00 0.2502E-02 0.3699E-03 0.2115E-04 0.1505E-05 0.5984E-06
7 0.1717E-06 0.9290E-07 0.4180E-07 0.3013E-07 0.1483E-07 0.7315E-08
13 0.4230E-08 0.3149E-08 0.1693E-08 0.1479E-08 0.9545E-09 0.3832E-09
19 0.1571E-09 0.2029E-10 0.6050E-12 0.1463E-18 0.2231E-36 -0.2449E-18

Trace - Sum of all preceding Natural Weights [eV**2] :


1 0.2896E-02 0.3935E-03 0.2362E-04 0.2474E-05 0.9691E-06 0.3708E-06
7 0.1990E-06 0.1061E-06 0.6434E-07 0.3421E-07 0.1938E-07 0.1207E-07
13 0.7838E-08 0.4688E-08 0.2995E-08 0.1516E-08 0.5612E-09 0.1780E-09

Abs(Trace - Sum of relevant Natural Weights) [eV**2] : 2.47378E-06


Sqrt(Abs(Trace - Sum of rel. Nat. Weights)) [meV] : 1.5728

************* Mode: 3 theta ************************

Contracted mode. Dimension = 60 / 60

Global (weighted) Lˆ2 error estimated from neglected natural weights:


5.5354 meV 44.646cmˆ-1 2.0342E-04 a.u.

Weighted rms-error on rel. grid points [meV]: 3.9734 1.4602E-04 au


Weighted rms-error on all grid points [meV]: 5.4941 2.0190E-04 au
Unweighted rms-error on rel. grid points [meV]: 31.2338 1.1478E-03 au
Unweighted rms-error on all grid points [meV]: 133.0489 4.8895E-03 au
Max. absolute error on rel. grid points [meV]: 313.2904 1.1513E-02 au
Max. absolute error on all grid points [ eV]: 2.2438 8.2457E-02 au

Example 13.2: An excerpt of a potfit output file for the NOCl S1 surface.
124 13 Using the Potfit program

compares well with the numerically evaluated error (Weighted rms-error on all..)
which is 5.4941 meV. By the way, the choice 5/4 for the number of natural potentials is a bit
unbalanced, as the sums of neglected weights of the two DOFs are quite different. A more
balanced choice would be 5/3 or 9/4, which would lead to (estimated) errors of 7.2 meV or
2.4 meV, respectively.
The following 10 iterations reduce the fit error to 2.202 meV on the relevant region,
whereas the global error on all grid points increases to 9.067 meV. Note that weighted al-
ways refers to separable weights and relevant refers to correlated weights. For large systems
the numerical evaluation of the rms-error may become costly. In such a situation it may be
useful to switch this evaluation off or perform it only every n-th iteration step. See the HTML
documentation for details.

13.2 Using ab initio data


An interesting feature of the MCTDH package is the possibility to define the potential energy
operator (or a part of it, or in general any local operator in configurational space) directly from
ab initio data, in a way that can later be used by a MCTDH calculation. The multidimensional
grid, on which the ab initio data is collected, however, must be a product grid. In general,
there are no further restrictions, e.g., an equidistant distribution of the grid points is not
required. The potfit program can be used in order to transform the supplied data into a
product form, practically a natpot file, that can later be used in the MCTDH simulations. This
is similar to the transformation of general multidimensional functions into product form that
has been covered in chapter 13.1. Also, the primitive grid where the ab initio data is collected
happens to be usually rather sparse, due to the cost of evaluating the desired property on each
point. The MCTDH package provides the chnpot utility, which allows to interpolate between
natural potentials defined in different primitive grids. Therefore, the user may collect the ab
initio data in a rather sparse primitive grid that can be later be interpolated into a more suitable
one for the dynamical simulation phase. These operations will be discussed in detail in this
chapter.
The practical implementation of the MCTDH algorithm uses DVR’s for the primitive
basis, whose points define the primitive grid (see Chapter 4). It is assumed in our discussion
that the value of some property, e.g., the potential energy, has been collected on the points
defined by the primitive grid using some external program. One has to differentiate between
the actual points of the primitive grid in each coordinate and the associated value of a certain
property. As will be immediately seen, both pieces of information are given separately to the
programs that have to use them.
There are mainly three ways to use ab initio data in a MCTDH calculation:

13.2.1 Using ab initio data directly with the mctdh program


This is the least flexible of the possibilities being discussed, but the concepts that will be
introduced apply equally to the other procedures. It corresponds to the direct path to the
usage of MCTDH as depicted in Fig. 13.1. First, let’s assume that we have the ab initio data
values at the points defined by some primitive grid. The primitive grid being used should
correspond, for each coordinate, with some of the DVR’s defined in the MCTDH program
(What to do when this is not the case, will be covered in the following sections). As usual, the
primitive grid is defined in the PBASIS-SECTION of the input file. For example one could
have something like:
13.2 Using ab initio data 125

PRIMITIVE-BASIS-SECTION
x sin 17 -2.4 2.4
y sin 21 -2.5 3.5
end-primitive-basis-section

for coordinates x and y. The information concerning where the actual data values are found is
given in the LABELS-SECTION of the operator file. One has to define a new label making
use of the readsrf keyword:

LABELS-SECTION
vdat = readsrf{pathtofile S}
end-labels-section

S can be either ascii or binary depending on the file to be read. pathtofile is the
absolute or relative path to the file containing the data. The newly defined vdat label can
then be used in the HAMILTONIAN-SECTION of the operator, for example:

HAMILTONIAN-SECTION
---------------------
modes | x | y
---------------------
1.0 |1&2 vdat
other operator lines
end-hamiltonian-section

The file containing the data values consists of a single column of numeric entries, written
so that the first index runs fastest. The order of the indexes is defined by the |i&j&k&...
construct in the HAMILTONIAN-SECTION as shown above. In our example the file has to
be created so that it could be read by the following pseudo-code, where the i index runs on
the y coordinate:

iterate i in range 1 to 21:


iterate j in range 1 to 17:
read v(j,i)
end iterate
end iterate

One should note the following: the described procedure implies that both the x and y
coordinates belong to the same combined mode and there are no other coordinates are present
in this mctdh-particle. Otherwise the program would treat the new potential as a muld-
potential, i. e. a multi-dimensional potential. This slows down the performance of MCTDH.
Therefore, the procedure outlined above is most useful when the potential operates on one
combined mode (MCTDH particle) exclusively.

13.2.2 Using the potfit program


A second alternative is to use the potfit program to convert the ab initio data to product
form, and then use mctdh, as it is shown in Fig. 13.1. This possibility circumvents the
inconveniences described at the end of the previous section, since the different degrees of
freedom can then be used in different combined modes, or be simply uncombined. The usage
of potfit has been covered in chapter 13.1 of this guide, so here it will only be covered how
to make it read an ab initio surface defined on a primitive grid. The readsrf keyword (see
previous section for details) comes now into play in the OPERATOR-SECTION of the input
file of potfit:
126 13 Using the Potfit program

OPERATOR-SECTION
pes = readsrf{path-to-file S}
.......
end-operator-section

As in the previous case, the file containing the data values has to be written with the index
of the first specified degree of freedom running fastest (the most internal loop), the second
degree of freedom in the second most internal loop and so on. The order of the degrees of
freedom is given by the PRIMITIVE-BASIS-SECTION in the potfit input file. The program
potfit will generate a natpot file to be used directly by mctdh. Remember that mctdh uses
the modelabels to associate the natpot terms with the DOFs.

13.3 Extra flexibility, combining potfit and chnpot


The maximum flexibility in the usage of ab initio data is accomplished by combining potfit
with the chnpot utility. There are two main reasons why the initial primitive grid in which
the ab initio data points are given should be transformed into a more suitable one. First, the
given points may be too sparse, and a more dense grid is desired for the dynamical simulation
phase. Second, the primitive grid where the points are supplied does not correspond to a DVR
defined in the MCTDH code.

13.3.1 Dealing with an arbitrary primitive grid


In case that the ab initio data values are given in a grid that does not correspond to a
DVR known to MCTDH, the external keyword can be used in the PRIMITIVE-BASIS-
SECTION of the potfit input file:
PRIMITIVE-BASIS-SECTION
x external 16 path_to_x_grid <unit>
y external 16 path_to_y_grid <unit>
end-primitive-basis-section

path to x grid is the absolute or relative path to a file containing, in one column, the
values xi of the x coordinate, in this case, a total of 16 entries. One needs to create a file
with this information for every external entry. Optionally, a unit may be given to convert
e. g. Angstroem to au or degree to radian. As before, the information concerning where the
ab initio data points are found is given in the OPERATOR-SECTION of the same input file.
After execution, the program yields a natpot file and a dvr file. One should note that these
natpot and dvr files cannot be used directly in a simulation, since only the grid points of the
DVR are found on the dvr file (and not the matrices representing the derivative operators).
However, any natpot whose primitive grid is known (through the corresponding dvr file) can
be interpolated to a desired DVR by the chnpot utility, yielding new natpot and dvr files to
be used in the simulation phase. This is covered in the next subsection. (As a remark, the
external keyword is more powerful and the non-local part of an arbitrary DVR can also be
supplied, see the HTML documentation for this advanced feature).

13.3.2 Transforming between two natural potentials with chnpot


The chnpot utility interpolates a given natpot file into a new primitive grid corresponding to
the desired DVR. It needs to know where to find the initial natpot and dvr files. An example
input file for chnpot reads:
13.3 Extra flexibility, combining potfit and chnpot 127

Grid Values
(ab initio data)

Potfit MCTDH

Chnpot

Figure 13.1: Main concepts involved in the usage of ab initio data with the MCTDH package

RUN-SECTION
name = <S1>
dvrdir = <S2>
natpotdir = <S3>
end-run-section

PRIMITIVE-BASIS-SECTION
x sin 45 -2.4 2.4
y sin 45 -2.5 3.5
end-primitive-basis-section

Fit-Section
x spline
y spline
end-fit-section

end-input

The RUN-SECTION contains keywords that control the program execution, e.g., where the
(old) initial files are found, where to store the (new) results, etc. See the HTML documenta-
tion for a detailed description of every keyword. The PRIMITIVE-BASIS-SECTION spec-
ifies the new DVR, and hence the new primitive grid. The Fit-Section describes how each
degree of freedom has to be interpolated. A detailed description of the chnpot command
line and input file options, is maintained in the HTML documentation. Here some hints are
given in how to use this utility: after chnpot has been executed, the user should check that
the natpot obtained has been correctly interpolated. This can be done conveniently with the
showpot utility. Original potentials with discontinuities or regions where the function slope
changes abruptly can lead to oscillatory behavior of the interpolated function. Depending on
the starting data points, the user may have to find the most convenient interpolation scheme
for each degree of freedom. The program can perform spline and essentially non oscillatory
interpolation (ENO) for degrees of freedom without special boundary conditions and fourier,
sine and cosine interpolation for angular or other degrees of freedom. The program can han-
dle combined modes (combined in potfit) when the combination is up to 2D type, as it is
capable of 1D and 2D interpolations. If the original natpot has been obtained from a sparse
primitive grid, it may be a good idea to potfit it using as many natural potentials as grid points
in each degree of freedom, in case it is computationally feasible. In this way, the resulting
128 13 Using the Potfit program

natpot is exact on the original grid points. What follows is the already described interpolation
to a suitable grid using chnpot.

13.4 Advanced topic: Manipulating potentials with the projection


program
While it is fairly straightforward to include program code for new potential energy surfaces
into the MCTDH program package, it is sometimes desirable to use an existing PES routine
to generate a related PES. Examples for this would be:

• Models with reduced dimensionality, where you need an effective potential which is
derived from the full dimensional potential by averaging over some degree(s) of free-
dom.

• Series expansion of a PES, e.g. multipole expansions or Fourier transforms of angular


degrees of freedom.

These tasks can be accomplished with the projection program. Basically, this program takes
the potential V (q1 , . . . , qf ) from an existing PES routine and “projects out” some degrees of
freedom (say, q1 , . . . , qp ) by integrating over them with projection functions χκ (qκ ) to yield
an (f − p)-dimensional projected potential:
Z
Vproj (qp+1 , . . . , qf ) = dq1 · · · dqp χ1 (q1 ) · · · χp (qp ) V (q1 , . . . , qf ) (13.2)

Numerically this is done by evaluating the PES and the projection functions on the DVR grid
(κ) (κ)
points xακ and employing the DVR weights wακ :
X X
Vproj (x(p+1)
αp+1 , . . . , x (f )
αf ) = · · · wα(1)
1
χ1 (x(1) (p) (p) (1) (f )
α1 ) · · · wαp χp (xαp ) V (xα1 , . . . , xαf )
α1 αp
(13.3)
projection will store the resulting Vproj as a vpot file which must then be processed in a
subsequent potfit run.
During the projection run, the first p degrees of freedom are removed, and so one is
absolutely free in choosing the DVR basis (i.e. basis type as well as basis parameters and
basis size) for these DOFs. For the f − p remaining DOFs however, the DVR basis must
match the one for the subsequent potfit run.
As one is free to choose the DVR basis for the DOFs on which one projects, one can en-
hance the accuracy of the integration scheme (13.3) by choosing it according to the projection
functions. E.g. if the projection function is a Legendre polynomial, one should use a Legen-
dre DVR, as this will turn the integration into a Gauss quadrature. For some of the available
projection functions, the HTML documentation gives hints on which DVR to choose.

13.4.1 Input and output files


As both projection and potfit take a PES on the full grid as primary input, their input files
are quite similar. An example for a projection input file is given in example 13.3. (You can
find a full version with more extensive comments in $MCTDH DIR/pinputs/bmkpe proj.inp .)
13.4 Manipulating potentials with the projection program * 129

RUN-SECTION
name = bmkpproj # directory where output is written
timing # write timing information to file "timing"
output # write output to file "output"
end-run-section

OPERATOR-SECTION
pes = h4bmkp{jacobian} # surface to use: BMKP H4 surface
vcut < 0.0,ev # cut off at 0.0eV (PES zero point is at ˜-9.5eV)
end-operator-section

PRIMITIVE-BASIS-SECTION
R FFT 128 1.80 17.0
RAB HO 8 1.4483 0.019216 0.5,h-mass
RCD HO 8 1.4483 0.019216 0.5,h-mass
AL leg 10 0 even
BE leg 10 0 even
PHI exp 27 2pi
end-primitive-basis-section

PROJECTION-SECTION
PROJECTOR 000
AL leg 0 0
BE leg 0 0
PHI cos 0
end-projector
PROJECTOR 200
AL leg 2 0
BE leg 0 0
PHI cos 0
end-projector
# ... (further projectors omitted)
PROJECTOR 222
AL leg 2 2
BE leg 2 2
PHI cos 2
end-projector
error
end-projection-section

end-input

Example 13.3: A projection input file for the BMKP surface for (H2 )2 (excerpt).

The RUN-SECTION only specifies the name directory and which output files to be
opened. The OPERATOR-SECTION is the same as in potfit; it specifies the PES to be
used and defines cuts to remove large potential values.
The PRIMITIVE-BASIS-SECTION has the same structure as in mctdh and potfit. It
defines the grid points of the product grid on which (13.3) is evaluated. As mentioned above,
for the DOFs on which one projects one is free to use any basis definition. For the remaining
DOFs, one must use the same basis definitions as for the subsequent potfit run (which in turn
must be the same as for the following mctdh run, unless one uses chnpot in between).
The PROJECTION-SECTION contains the definitions of the projector functions χκ (qκ ).
During a single projection run, it is possible to use several different sets of projection
functions. One such set of functions is defined in one PROJECTOR section. After the
130 13 Using the Potfit program

PROJECTOR keyword one must give an arbitrary string which is used as a label for the
projected potential (in example 13.3 this would be the labels “000”, “200”, and “222”). The
definition of the individual projector functions is done by first stating the modelabel of the
DOF on which to project (here e.g. “AL”), and then giving the type and parameters of the
projection function (here e.g. “leg 2 0”, which stands for the Legendre polynomial P20 ).
Please see the HTML documentation for which projector function types are available and
what parameters they take.
For each defined projector, projection produces a vpot file which contains the projected
potential on the product grid of the remaining DOFs. The name of this file depends on
the given projector label, e.g. in case of the “200” projector the corresponding file will
be called vpot 200. To use this file in the subsequent potfit run, one must read it with
the readvpot keyword (in the RUN-SECTION) and also specify pes=none (in the
OPERATOR-SECTION). Example input files for potfit runs which use projection output
can be found in $MCTDH DIR/pinputs/bmkpe fit *.inp .
(i)
In the case where the projected potentials Vproj (where i numbers the different sets of
projector functions) constitute a series expansion of V , it is worthwhile to re-assemble the
projected potentials into another full-dimensional potential Ṽ which can then be compared to
the original potential V . Thus one can check whether enough terms of the series expansion
(i)
have been taken into account to faithfully represent the original potential. To this end, let χκ
(i)
be the projector function for the κ-th DOF in the i-th set, and let χ̃κ be the corresponding
complementary projector function such that
Z
dqκ χ(i) (i)
κ (qκ ) χ̃κ (qκ ) = 1 (13.4)

If we assume that the projector sets i and j are orthonormal, i.e.

p Z
Y
dqκ χ(i) (j)
κ (qκ ) χ̃κ (qκ ) = δij (13.5)
κ=1

then we can define the re-assembled potential


X (i) (i)
Ṽ (q1 , . . . , qf ) = χ̃1 (q1 ) · · · χ̃(i)
p (qp ) Vproj (qp+1 , . . . , qf ) (13.6)
i

An error measure that depends on the remaining coordinates and which has the unit of energy
is:
R !1/2
dq1 · · · dqp |V (q1 , . . . , qf ) − Ṽ (q1 , . . . , qf )|2
∆V (qp+1 , . . . , qf ) = R (13.7)
dq1 · · · dqp

If you give the error keyword in the PROJECTION-SECTION, this error measure will be
calculated and stored in another vpot file, named projerr.vpot . This can then be inspected
with the showpot program.
Finally, the log file lists some brief information about the projected potentials, and (in case
that error was requested) the mean, minimum and maximum values of ∆V .
13.4 Manipulating potentials with the projection program * 131

13.4.2 Generating a Fourier-transformed potential


In the case of a four-atomic system which is described in Jacobi coordinates (see Fig. 13.2),
it is of technical advantage for the MCTDH package to replace the relative torsional angle ϕ
by two torsional angles ϕ1 and ϕ2 such that ϕ = ϕ1 − ϕ2 and then describe the system in
terms of their conjugate momenta k1 and k2 . (For more details see [33] or [34].) In this case
the transition from ϕ1,2 to k1,2 is simply done by a Fourier transform (in the following we
will abbreviate the set of coordinates R, r1 , r2 , θ1 , θ2 simply by Q):

Z2π Z2π
1 −ik1 ϕ1
Ψ̃(Q, k1 , k2 ) = dϕ1 e dϕ2 e−ik2 ϕ2 Ψ(Q, ϕ1 − ϕ2 ) (13.8)
(2π)2
0 0

Likewise, we Fourier-transform the potential V (Q, ϕ):


Z2π
1
ṼΩ (Q) = dϕ e−iΩϕ V (Q, ϕ) (13.9)

0

or vice versa:
+∞
X
V (Q, ϕ) = eiΩϕ ṼΩ (Q) (13.10)
Ω=−∞

Then it is straightforward to see that the action of the potential operator V̂ on the wavefunc-
tion in terms of k1,2 is given by
+∞
X
(V̂ Ψ)(Q, k1 , k2 ) = ṼΩ (Q) Ψ̃(Q, k1 − Ω, k2 + Ω) (13.11)
Ω=−∞

Since the potential V is real and often symmetric, V (Q, ϕ) = V (Q, −ϕ), the Fourier-
transformed potential is also symmetric, ṼΩ (Q) = Ṽ−Ω (Q), and (13.9) simplifies to
Z2π
1
ṼΩ (Q) = dϕ cos(Ωϕ) V (Q, ϕ) (13.12)

0

The latter form can easily be evaluated with the projection program. A PROJECTION-
SECTION of the corresponding input file would look like this:

1111
0000
C
A
000
111
0000
1111
0000
1111
0000
1111
000
111
000
111 0000
1111
000
111
00000
11111
000
111 0000
1111
000
111
0000
1111
00000
11111
000
111 000
111
00000
11111
000
111
00000
11111 000
111 r
00000
11111 000
111
2
000
111
00000
11111
1r
00000
11111
00000
11111 θ
000
111
000
111
000
111 2 θ
000000000000000000000000
111111111111111111111111
00000
11111
00000
11111
1 000
111
000000000000000000000000
111111111111111111111111
000
111
R ϕ
000000000000000000000000
111111111111111111111111
00000
11111 000
111
00000
11111
00000 000
111
11111
00000
111110000
1111 000
111
0000
1111
00000
111110000
1111
0000
1111 000
111
0000
1111
00000
111110000
1111 000
111
0000
1111
000
111
0000
1111 0000
1111
0000
1111
0000
1111 0000
1111
0000
1111 0000
1111
B D

Figure 13.2: Jacobi coordinates for a 4-atomic system


132 13 Using the Potfit program

PROJECTION-SECTION
PROJECTOR K0
PHI cos 0
end-projector
PROJECTOR K1
PHI cos 1
end-projector
PROJECTOR K2
PHI cos 2
end-projector
# ...
error
end-projection-section

where PHI is the modelabel of the torsional coordinate in question. Take note that the defini-
tion of the cos projector function already includes the factor 1/2π! The usage of the error
keyword is recommended here, as it will calculate the error measure described in the last sec-
tion, so one can check whether one has calculated enough Fourier components to faithfully
represent the original potential (look at the log file).
Once this projection run is finished, you will find the files vpot K0, vpot K1, etc., which
contain the individual Fourier components ṼΩ . As these are defined on the full grid of the
remaining coordinates Q, one must use potfit to bring them into the product form required
by MCTDH. It will be necessary to write separate input files to fit the separate Fourier com-
ponents, but these input files will look very much alike. When writing the input files, note
the following:

• in the RUN-SECTION, use readvpot to read the vpot Kx files created by projection
• in the OPERATOR-SECTION, use pes=none
• in the PRIMITIVE-BASIS-SECTION, use exactly the basis definitions from the
projection input file, but only for the remaining coordinates Q; omit all the coordi-
nates that were projected out.

After the potfit runs are complete, you can optionally change the primitive basis by using
chnpot.

13.4.3 Using a Fourier-transformed potential in MCTDH


The last section described how to generate the Fourier components ṼΩ in a form usable by
MCTDH; however this is only one ingredient of (13.11). The other is the shifting of the k
coordinates, Ψ̃(Q, k1 , k2 ) → Ψ̃(Q, k1 − Ω, k2 + Ω). In MCTDH this can be accomplished
with the simple shift operator, which we will denote here formally as Ŝq∆ (where q is the
DOF on which it operates and ∆ is the amount by which the DOF is shifted):
(Ŝq∆ Ψ̃)(. . . , q, . . .) = Ψ̃(. . . , q − ∆, . . .) (13.13)

In this notation, (13.11) becomes (recall that ṼΩ = Ṽ−Ω ):


(V̂ Ψ)(Q, k1 , k2 ) = Ṽ0 (Q) Ψ̃(Q, k1 , k2 ) (13.14)
X∞ h i
+ ṼΩ (Q) (ŜkΩ1 Ŝk−Ω
2
Ψ̃)(Q, k 1 , k 2 ) + ( Ŝ −Ω Ω
k1 Ŝk 2
Ψ̃)(Q, k 1 , k 2 )
Ω=1
13.4 Manipulating potentials with the projection program * 133

HAMILTONIAN-SECTION
------------------------------------------------------
modes | R | r1 | r2 | th1 | k1 | th2 | k2
------------------------------------------------------
# ... (kinetic energy omitted)
1.0 |1&2&3&4&6 V0 |5 1 |7 1
1.0 |1&2&3&4&6 V1 |5 kp1 |7 km1
1.0 |1&2&3&4&6 V1 |5 km1 |7 kp1
1.0 |1&2&3&4&6 V2 |5 kp2 |7 km2
1.0 |1&2&3&4&6 V2 |5 km2 |7 kp2
------------------------------------------------------
end-hamiltonian-section

LABELS-SECTION
V0 = natpot{fitK0}
V1 = natpot{fitK1}
V2 = natpot{fitK2}
kp1 = shift[1]
km1 = shift[-1]
kp2 = shift[2]
km2 = shift[-2]
end-labels-section

Example 13.4: An operator file showing the use a Fourier-transformed potential (excerpt). Only Fourier compo-
nents up to Ω=2 are included.

or even more formally on the operator level:



X
V̂ = Ṽ0 + ( ṼΩ ŜkΩ1 Ŝk−Ω
2
+ ṼΩ Ŝk−Ω
1
ŜkΩ2 ) (13.15)
Ω=1

This form can be easily translated into an MCTDH operator file. (Of course one will truncate
the series at a certain Ωmax .) Parts of the corresponding HAMILTONIAN- and LABELS-
SECTIONs are shown in example 13.4. A few explanations are in order:

• During the following MCTDH propagation, we will be using the two-dimensional


KLeg DVR for the combined coordinates (θ1 , k1 ) and (θ2 , k2 ). (The use of this DVR is
part of the technical reason why we did the Fourier transform in the first place.) This
makes it necessary to order the coordinates differently than in the above theoretical
considerations. Namely, k2 can not directly follow k1 but the ki must be paired with
the θi .
• This different coordinate ordering makes it necessary to use the slightly cumbersome
|1&2&3&4&6 syntax for the potfitted Fourier components V0, V1, V2. This tells the
program to apply them to the set of DOFs (1, 2, 3, 4, 6), which corresponds to (R, r1 ,
r2 , θ1 , θ2 ). (Also see section 6.13.)
• Here we assume that the natpot files of the potfitted Fourier components are located in
the directories fitK0 etc. That is, fitK0 should contain the potfit of vpot K0, fitK1 that of
vpot K1, etc.

• The shift operators must be put into the LABELS-SECTION and then referenced
by their labels (kp1, km1, etc.) because of a syntactical restriction of MCTDH: it is
not allowed to use operators which take an argument directly in the HAMILTONIAN-
SECTION.
134 13 Using the Potfit program

This completes the setup of the operator file for a Fourier-transformed potential.

13.5 Downsizing previous potfits: the cutnpot and rdnpot func-


tions
Under certain circumstances, it may be necessary to make use of previous potfitted potentials,
i.e. natpot files. Possibly, it may be convenient to reduce the number of single particle
potentials and the corresponding contracted coefficients. For instance, this may be useful to
investigate the quality of the potential expansion (e.g. the fitting error) upon reduction of
the expansion coefficients or, simply, in order to decrease the cost of the energy evaluation.
For such a purpose, the cutnpot and rdnpot functions have been developed. It should be
highlighted that they play a major role in the mgpf program (under development).
The process can be summarized in two steps: (i) elimination of unwanted single particle
potentials and the corresponding contracted coefficients from a previously existing natpot
file; and (ii) reading of the newly generated (reduced) natpot file for the evaluation of error
measurement. The first step is accomplished by means of the cutnpot function. This is
invoked by including the cutnpot keyword in the RUN-SECTION of the potfit input file.
The NATPOT-BASIS-SECTION should contain the desired (smaller) values of the expansion
coefficients while preserving the definitions of the contracted mode and the particles. The
natpot file to be reduced (cut)1 should either be placed in the working directory as natpot1 or
under a different name (or location) in which case the name (with absolute path) should be
provided as: cutnpot=path. Then potfit will produce a new (shrinked) natpot file within
the same directory. Finally, the subsequent measurement of the fitting error (for sufficiently
small primitive grids) is obtained by using the rdnpot function which is invoked by adding
the RUN-SECTION keyword rdnpot and running again potfit.
As previously indicated, for the sake of consistency, the DVR definitions, the contracted
mode, and the mode combination scheme, if any, must remain unaltered during the whole
process. Hence, if a new particle scheme is needed, then a new potfit or a new mgpf calcu-
lation has to be performed.
The cutnpot and rdnpot keywords appear in the RUN-SECTION, otherwise the input
is the standard one.

1
Note that cutnpot yields the same results as a normal potfit with the reduced number of single particle
potentials, provided no correlated weights are used.
Chapter 14

Using the Monte-Carlo Potfit


program

14.1 Monte-Carlo Potfit


The potfit program introduced in the previous chapter is a powerful tool to convert a given
potential into sum-of-product form. For low dimensional problems, i.e., up to 6D (with not
too many grid points), it is a very stable and well behaved algorithm. For larger dimensions,
however, potfit runs into a serious bottleneck: potfit requires multiple integrations over the
complete primitive grid. This not only means multiple runs over a large number of grid
points, but also that the potential must be computed and stored on all these grid points.
Monte-Carlo Potfit (or mcpotfit) seeks to circumvent the complete integrals by just using
a (random) subset of the complete set of primitive points and to extract all necessary infor-
mation needed to produce a natpot file from this limited set. In this respect mcpotfit has
the advantage that much larger grids can be treated as the number of grid points that enter
the calculation can be drastically reduced, often by multiple orders of magnitude. Also cor-
related weights can be easily incorporated by means of the distribution of sampling points
such that relevant regions of the potential can be treated with increased accuracy. For a de-
tailed discussion of the theory behind mcpotfit and a discussion of importance sampling see
Ref. [35].
mcpotfit relies on the existence of a potential energy routine that can be compiled into
the operator library. If this is for some reason not possible or wanted one can also implement
the routine in the the file $MCTDH DIR/source/mcpotfit/userpot.F90. It already contains a
skeleton implementation that defines the routine interface.
The mcpotfit program is organized in tasks that lead to generation of the natpot file.
They are consecutively executed. The tasks are specified by means of an input file which is
organized in sections, analogue to the traditional potfit. The tasks are

1. Create or read the sampling points.

2. Create or read the reduced densities and calculate the SPP

3. Calculate the coefficients.

4. Estimate the fit error.

135
136 14 Using the Monte-Carlo Potfit program

The organization in tasks allows re-using earlier calculated parts in later calculations, for
instance re-using reduced densities or SPP with a different set of sampling points for calcu-
lating the coefficients, or to use a different number of SPP. Which tasks are skipped is mainly
controlled in the SAMPLING-SECTION. See below.

14.2 Compiling
During installation a basic version of mcpotfit is readily compiled. It lacks, however, any
parallelization. Other than mctdh and other programs of the package, mcpotfit is written in
Fortran 90 and uses OpenMP instead of Posix threads as its shared memory parallelization
method. To compile with shared memory parallelization the -P option has to be used:

compile -P mcpotfit

This produces the executable mcpotfit86P. As for mctdh MPI support is added with the -m
option, which can, of course, be combined with the -P option.
In mcpotfit a number of solvers are implemented to solve for the expansion coefficients,
some of which use standard linear algebra tools, i.e., LAPACK or ScaLAPACK routines. For
large numbers of SPP using ScaLAPACK instead of LAPACK is almost always unavoidable.
If ScaLAPACK is to be used, mcpotfit needs to be compiled with ScaLAPACK support.
Since the MCTDH package is not shipped with any ScaLAPACK libraries, the ScaLAPACK
libraries must already be available on the system - either self compiled or installed from the
package manager. If ScaLAPACK is installed through the systems package manager it is
usually sufficient to use the -S compile option. This may however depend on the compiler
that is used for compilation.
In case of a self compiled ScaLAPACK or if the library is in some non-standard location
one usually also has to specify the linker search path. This can either be done by modifying
system environment variables or, more easily, by specifying the search path directly in the
compile.cnf file: Open the file $MCTDH DIR/install/compile.cnf with your favorite editor
and search for the compiler label you intent to use for compilation. Note, that this must be a
compiler with MPI support. Add or edit the variables controlling ScaLAPACK support, for
instance

MCTDH_SCALAPACK_FLAGS="-DSCALAPACK"
MCTDH_SCALAPACK_LIBS="-L/path/to/library -lscalapack"

The -DSCALAPACK flag here includes the ScaLAPACK function calls in the source code. If
it is not present, regular LAPACK is called instead. Now compile with the -S option.
Note, that sometimes ScaLAPACK comes in two separate libraries libscalapack.a and
libblacs.a, separating numerics and communication. In this case one needs to include the
BLACS library as well, of course, for instance with

MCTDH_SCALAPACK_FLAGS="-DSCALAPACK"
MCTDH_SCALAPACK_LIBS="-L/path/to/libraries -lscalapack -lblacs"

14.3 Selecting the sampling method


At present mcpotfit supports generation of uniformly distributed sampling points as well as
Boltzmann distributed sampling points. Furthermore samplings can be read in from file.
14.3 Selecting the sampling method 137

SAMPLING-SECTION
sampling-spp = metropolis, 50000, 1000, 10, 3000.0, cm-1
sampling-coeff = metropolis, 50000, 1000, 10, 3000.0, cm-1
sampling-coeff = uniform, 5000
sampling-test = readidx{/path/to/indexfile}
end-sampling-section

Example 14.1: A SAMPLING-SECTION in MC-Potfit by which different sources of sampling


points are assigned to a task: 1) 50000 points from a Metropolis trajectory for calculating
the SPP, 2) another Metropolis sampling with 50000 points plus additional 5000 points of
uniform distribution for calculating the coefficients, and 3) samplings read from file for test-
ing the fit. The numbers after metropolis, 50000 mean: equilibrate for 1000 steps
before recording sampling points, use only every 10th Metropolis step as a sampling point,
and assume the temperature kB T to be 3000.0 cm−1

14.3.1 Sampling methods


The samplings are specified in a SAMPLING-SECTION. At present there is only a distinc-
tion between the sets of sampling points used for generating the reduced densities and hence
SPP, for the coefficients, and for the error estimation. This means in particular, that the SPP
of the single modes are all calculated with the same set of sampling points, i.e., also the same
number of sampling points. This can probably be changed in the future as for different modes
a different number of sampling points might be sufficient.
Multiple sources of sampling points can be chosen per task, for instance multiple
Metropolis sets with different temperature or additional special points stored in a file. To use
multiple sets for one task one simply specifies multiple sets in the SAMPLING-SECTION.
The sets are internally merged into one large set that is used to perform the calculations.
The format of the trajectory files which can be read in is rather simple: each sampling
point is represented as an integer array in ASCII format, one sampling point per line. The
(n)
κth integer entry in the nth line, iκ , corresponds to the ith DVR point of the κth DOF in
the primitive basis and belongs to the nth sampling point. One can therefore simply create
multiple sampling files and pipe them into a single file for later use or specify multiple files
to read in in the SAMPLING-SECTION . When the keyword sampling-only is set
in the RUN-SECTION, mcpotfit will only create and write the samplings specified in the
SAMPLING-SECTION and exit thereafter.
Example 14.1 illustrates the structure of the SAMPLING-SECTION: The sampling
methods are assigned to a task with the label sampling-<task>, where <task> is one
of spp coeff, or test. The task can be omitted in which case the same sampling method
is assigned to all tasks. In this case only the method is the same, but still different sets of
sampling points are created (unless they are read from file, of course).
Sometimes one may want to use really the same set of points, not only the same methods,
for the coefficients and the SPP. In this case one can specify the sources for one of the tasks
(for instance the SPP) and then assign this sampling to the other task. Example 14.2 illustrates
this.
As shown in Example 14.1, three different sources of sampling points are currently imple-
mented: a simple random number generator that produces uniform sampling, and a metropo-
lis algorithm that produces a Boltzmann distributed set of sampling points, i.e., distributed
according to the weight exp (−V (q)/kB T ). Additionally sampling points can be read from
138 14 Using the Monte-Carlo Potfit program

SAMPLING-SECTION
sampling-spp = metropolis, 50000, 1000, 10, 1000.0, cm-1
sampling-spp = metropolis, 50000, 1000, 10, 3000.0, cm-1
sampling-coeff = sampling-spp
sampling-test = readidx{/path/to/indexfile}
end-sampling-section

Example 14.2: A SAMPLING-SECTION in MC-Potfit by which different sources of sampling


points are assigned to a task: 1) Metropolis sampling with 50000 points plus additional 50000
points from a Metropolis trajectory with a different temperature for calculating the SPP, 2)
The same points as used for the SPP are also used for the coefficients, and 3) samplings read
from file for testing the fit. The numbers after metropolis, 50000 mean: equilibrate
for 1000 steps before recording sampling points, use only every 10th Metropolis step as
a sampling point, and assume the temperature kB T to be 1000.0 cm−1 and 1000.0 cm−1 ,
respectively.

file. Also the complete grid can be used but in this case one might better switch to the
traditional potfit as it is implemented here with very limited features and more for testing
purposes. When using complete sampling, only the generation of the vpot file, i.e., the ini-
tial sampling of the potential, is MPI-parallel. All other operations are only shared memory
parallel. Table 14.1 illustrates the parameters that are available for the various sampling
methods.

14.3.2 Remark on the Metropolis algorithm


While reading points from index files and creating a uniform distribution is computationally
relatively cheap, this is not the case for the Metropolis algorithm. The algorithm is modified
to only select neighboring DVR points as candidates for new positions. This can sometimes
lead to a trapping of the random walker (mcpotfit will detect this and exit with the suggestion
to increase the temperature) but it may also need a number of tries to calculate the next step.
This involves multiple, depending on the parameters sometimes even many, evaluations of
the PES routine before a sampling point is calculated. If started in MPI mode, mcpotfit will
therefore start one random walker in each MPI rank (shared memory parallelization is not
yet supported within the Metropolis algorithm). A single walker will therefore only create
a fraction of the total trajectory. However, all walkers will do a burn-in, i.e., propagate a
number of steps to equilibrate (cf. I2 parameter of the metropolis algorithm in Table 14.1)
before sampling points are recorded. The burn-in is necessary because the initial position
of the random walkers is chosen at random on the complete grid (and of course differently
in each MPI rank). The Parameter I3 of the metropolis algorithm can be used to reduce the
correlation length of the trajectory of a single walker.

14.3.3 Choosing a sampling method


The method that should be chosen for generating the sampling depends on the fitting goal.
For a globally optimal fit one should, of course, use uniform sampling as it resembles the
traditional potfit without any weighting. Very often a globally optimal fit is not intended but
increased accuracy in the low energy regions of the potential is required, i.e., in the regions
where the wavefunction resides. This can be achieved with Metropolis sampling.
14.3 Selecting the sampling method 139

Keyword Parameters Meaning


uniform I Uniform sampling with I sampling points
metropolis I1 , I2 , I3 , R [, S] Metropolis algorithm that produces
I1 sampling points in total.
I2 Metropolis steps are done to equilibrate
before sampling points are recorded.
Thereafter every I3 th Metropolis step is used as a sampling point,
i.e, if for instance I3 = 1, every step is used.
R is the temperature kB T .
By default R is in au., but it may bear an optional unit given by S,
for instance cm-1 for cm−1 .
readidx {S} [, I1 ][, I2 ] Read sampling points from file S
where S is a relative or absolute path to the file.
Optionally read only I1 points from that file.
if I2 is present skip the first I2 points first.
complete – Use the complete grid and do not select
random grid points.
Table 14.1: Sampling methods and parameters

Using the Metropolis algorithm above, however, requires choosing appropriate param-
eters. One critical decision is the temperature which defines the width of the Boltzmann
distribution. It should be chosen such that its width is larger then the region where the wave-
function will reside. But it should also not be too high to keep the area of increased accuracy
as small as possible. A temperature with an energy equivalent Emax + f1 E0 seems to be a
reasonable choice to start with for many systems. Here Emax is the energy of the largest in-
volved excitation energy of the system Hamiltonian, E0 is the zero point energy, and f is the
number of DOF. The remaining parameters concern the Number of sampling points, burn-in
and step selection. Checks for the number of Sampling points is discussed in more detail in
Subsection 14.8 while I3 (given a reasonably large number of points and/or walkers) is of
less importance.
If Metropolis sampling has been used for calculating the reduced densities it proved ad-
vantageous to use a metropolis trajectory with the same temperature for the coefficients as
well. In this case, the SPP are optimal for the same region of the potential for which also the
coefficients are calculated.
Often, when Metropolis sampling is used with a low temperature, some high-energy re-
gions of the potential remain un-sampled. This can lead to a situation where some parts of
the potential are fitted with high accuracy while others (in regions without sampling points)
deviate substantially from the original potential. This behavior can be cured by adding a
small fraction of uniform sampling to the trajectories. Also a small fraction of Metropolis
sampling with a high temperature may serve this purpose.
Similarly, some points might be of increased importance for an accurate fit but may not be
part of the set of random sampling points. This can be, for instance, points in the vicinity of
a transition state where the potential varies rapidly. These points need to be added manually
to a trajectory file at present.
140 14 Using the Monte-Carlo Potfit program

14.3.4 Re-using and pre-sampling trajectories

Especially Metropolis trajectories are numerically expensive to create. One might therefore
wish to re-use formerly created trajectories or create a number of trajectories before one starts
to perform any calculations to create a PES fit.
In a regular run, any newly created trajectories are stored in the name direc-
tory with file-names starting with dvrindex-. Anydvrindex- can be read-in with the
readidx{/path/to/dvrindex-file} command in the SAMPLING-SECTION.
With this one easily re-use these trajectories.
One can also start a number of runs of the program just to create dvrindex- files. To this
end one set the keyword sampling-only in the RUN-SECTION. If sampling-only
is set, then mcpotfit will only create the dvrindex- files and exit thereafter.

14.3.5 Re-using densities or SPP

Once the reduced densities and SPP are generated they can be re-used in subsequent calcula-
tions without the need to re-calculate them. This is done by removing or commenting-out the
sampling method for generating the SPP. The program will then assume that the respective
SPP files are present in the name directory and that they can be read in. The program will first
look for the files evecs mode i where i is the mode number. If these files are not present (one
needs to set save-evecs in the RUN-SECTION to store the SPP, by default only densities
are stored) the program will attempt to read the files density mode i. If neither are present
mcpotfit will produce an error message. Reading SPP instead of densities also works if the
numbers of SPP are changed between two runs as also unused SPP are stored in the files.
Note also, that the format for storing the densities and SPP files is ASCII by default. It can
be set to binary in the RUN-SECTION with the keyword density=binary. The ASCII
format allows inspecting the densities with various plotting tools while binary is of advantage
if one plans to re-use the densities in later calculations.

14.4 Solving for the coefficients


Within mcpotfit a number of solvers for the coefficients are available. In particular these
are LAPACK and ScaLAPACK based solvers and a conjugate gradients algorithm. Since
solving for the coefficients is usually the most demanding part, an efficient parallelization
is essential. While the conjugate gradients algorithm is implemented as a module within the
mcpotfit source and can use natively MPI and OpenMP parallelization, this is not the case for
ScaLAPACK based solver. To use ScaLAPACK support one additionally needs to compile
with ScaLAPACK support, otherwise the program will use standard LAPACK routines as a
fall-back (cf. Section 14.2).
The method that is used for solving for the coefficients is specified with the
invert-method keyword in the RUN-SECTION. The available solvers are outlined
in Table 14.2.
While invert-method = direct and invert-method = eigen require ex-
plicit building the SPP-overlap matrix ΩT Ω, which is numerically very costly, this is not the
case for invert-method = pseudo. The latter, however, operates directly on Ω, which
might be very large in which case the method will become very slow. Within the former
14.4 Solving for the coefficients 141

Keyword Parameters Algorithm


direct – (Sca)LAPACK solver (P)DPOSV
using Cholesky decomposition
eigen regularization (Sca)LAPACK solver (P)DSYEV
using eigenvalue decomposition. Optional regularization.
pseudo – (Sca)LAPACK solver (P)DGELS
calculates pseudo-inverse of Ω
using QR-decomposition.
conjgrad – (Block-) conjugate gradients.
Table 14.2: Solvers for the coefficients.

two Ω can be calculated on the fly as needed to reduce memory usage. See Section 14.5 for
benefits and downsides of these variants.
Note that while invert-method = direct and invert-method = conjgrad
both rely on a truly positive definite SPP-overlap matrix ΩT Ω, this condition is relaxed for
the remaining two solvers which can handle singular overlap matrices. (Note that the
pseudo solver, however is usually slow as the Ω matrix is usually very large.)
In practice, the direct solver showed the best performance in the vast majority of cases.
For uniform sampling, sometimes the conjgrad solver can out-perform the direct solver
if many sampling points are used. A very nice feature of the eigen solver is that it one
obtains the eigenvalues of the SPP overlap matrix which are stored in the file eigenvalues in
the name directory. In most cases the pseudo solver showed the poorest performance and
should be considered experimental.

14.4.1 Using conjugate gradients to solve for the coefficients


Some special rules apply for the conjgrad solver. The conjugate gradients method is
implemented in two variants, one for the case where no contracted mode is present, the other
for the opposite case. If mode contraction is omitted, the set of equations to solve has a single
right hand side and hence a single solution vector. If a contacted mode is present, the situation
changes somewhat: in this case there exist multiple right hand sides and a block variant of
conjugate gradients is used. The benefit of multiple right hand sites is that the SPP-overlap
matrix ΩT Ω is much smaller and hence less costly to invert.
Conjugate gradients usually converges rapidly when uniform sampling is used as then the
SPP-overlap matrix is similar to a unit matrix. The situation changes substantially when other
sampling distributions are used. In this case, conjugate gradients converges slowly. Within
mcpotfit a number of preconditioners are available that can speed up the convergence. They
can be added with the keyword cg-precon in the RUN-SECTION. The preconditioners
are outlined in Table 14.3.
In general, the Jacobi preconditioner, diag, is the fastest to build. It only uses the di-
agonal of the SPP-overlap, however, it does usually not yield much speed-up of the conver-
gence. The band preconditioner can yield quite some speed-up, however this is somewhat
unpredictable as it is not necessarily positive definite. It can therefore also lead to slower
convergence than without any preconditioner. Usually the sparse and block precondi-
tioners yields the most speed-up but are also the most expensive to build and to apply. The
sparse preconditioner builds a small SPP-overlap matrix from a reduced set of SPP and
142 14 Using the Monte-Carlo Potfit program

Keyword Parameters Description


diag – Jacobi preconditioner
uses the diagonal of the SPP-overlap matrix
band N Uses a band matrix with N
sub-diagonals as preconditioner.
block N Uses blocks of size N×N
as preconditioner
sparse m1:n1,m2:n2,... Uses a sparse matrix as preconditioner
The sparse matrix has n1 elements in mode m1,
n2 elements in mode m2, etc.
Table 14.3: Preconditioners for conjugate Gradients.

uses it as preconditioner (The name “sparse” stems from different distributions of SPP in the
complete subspace that where tried in the development phase) while the block precondi-
tioner uses a block-diagonal subset of the original SPP-overlap matrix. Unfortunately, none
of the preconditioners mentioned above could speed up the convergence to a degree where
the (Sca)LAPACK based methods are out-performed except for very limited examples.
Conjugate gradients will stop either if the norm of the residual vector(s) drops below a
given threshold (default: 10−8 ) or if the number of iterations is larger than a pre-defined
number (default: 1000). One can modify these numbers within the RUN-SECTION using
the keywords cg-tolerance for the norm of the residual vectors and cg-maxiter for
the iteration, respectively.

14.5 Reducing memory consumption

By default mcpotfit will build the so-called Ω-matrix (cf. Ref. [35]) for calculating the
coefficients. The Ω-matrix contains all configurations evaluated at all sampling points. It
can therefore become very large. For MPI calculations it is distributed among the various
MPI-ranks in equal proportions. Building the Ω-matrix once is very cheap in terms of CPU
time and if it exists it can be used to efficiently calculate the SPP overlap matrix or to operate
on the residual vector within the conjugate gradients algorithm.
However, the Ω-matrix may be so large that it exceeds the memory capacity of the com-
pute nodes. To this end one can set the flag no-omega in the RUN-SECTION. If set, the
matrix elements are (repeatedly) calculated on the fly when needed. This will of course have
quite some speed impact but will also considerably reduce the memory costs.
Within conjugate gradients, the Ω-matrix is even allocated twice by default: once in the
original order and once transposed to reduce cache misses. Of course, this speeds up cal-
culation at the cost of a lot of memory. In this case one can set no-omega-t in the
RUN-SECTION such that the Ω-matrix is only allocated once. This will have a moderate
speed impact but still reduce memory quite a bit. If additionally no-omega is set, also
within conjugate gradients, the matrix elements are (repeatedly) calculated on the fly. This
will have a considerable speed impact.
14.6 Restoring molecular symmetries 143

SYMMETRY-SECTION
E C2 SigmaA SigmaB S4 S4ˆ3 C2A C2B
--------------------------------------------------------------------
z z z z -z -z -z -z
R R R R R R R R
x usersym usersym usersym usersym usersym usersym usersym
y usersym usersym usersym usersym usersym usersym usersym
a usersym usersym usersym usersym usersym usersym usersym
la {-la+2pi} {-la+2pi} {la} {-lb+pi} {lb+pi} {lb+pi} {-lb+pi}
lb {-lb} {lb} {-lb} {la-pi} {-la+pi} {la-pi} {-la+pi}
ua -ua ua -ua -ub ub -ub ub
ub -ub -ub ub ua -ua -ua ua
r1a r1a r1a r1a r1b r1b r1b r1b
r2a r2a r2a r2a r2b r2b r2b r2b
va -va va -va vb -vb vb -vb
r1b r1b r1b r1b r1a r1a r1a r1a
r2b r2b r2b r2b r2a r2a r2a r2a
vb -vb -vb vb -va va va -va
end-symmetry-section

Example 14.3:An excerpt of a potfit input file mcpf zundel.inp: symmetry operations within
the Zundel cation (D2d ).

14.6 Restoring molecular symmetries


In the traditional potfit, molecular symmetries are usually preserved automatically. This is
because one usually defines the primitive grids symmetrically and integrals over (sub-)spaces
do not lead to any symmetry breaking. In mcpotfit this is no longer the case due to the
random choice of the selection of sampling points. mcpotfit will therefore in general not
produce symmetric potential fits.
One can, however, artificially re-symmetrize the the potential fits. This is done in two
steps within the program: first, symmetry adapted SPP are obtained. Second, coefficients
are calculated and subsequently symmetrized. The crucial point to be able to do these two
steps is the knowledge about the molecular symmetries. They can be provided to the program
within an optional SYMMETRY-SECTION.
The SYMMETRY-SECTION contains a table of symmetry operations on the primitive
grid. Cf. Example 14.3 to see the structure of the symmetry table. It consists of a number
of columns, each of which with a label in the first row, followed by signed DOF labels,
expressions in curly brackets or the usersym keyword (see below).
The first column of the symmetry table is special: it contains the E symmetry operation,
i.e., the identity. In this column all coordinate labels from the PBASIS-SECTION must be
given. They can be in a different order then within the PBASIS-SECTION which allows re-
arranging the DOF labels, for instance according to mode combinations for clarity. The first
column serves as a reference for all further symmetries in the remaining columns in which
the actual symmetry operations are implemented.

14.6.1 Simple symmetries


Simple symmetries are grid based operations, i.e., here one operates directly on the DVR-
Grid points of the single DOF. Any coordinate values of the grid-points are ignored. Allowed
operations are DOF-permutations (with respect to E) and reversing the primitive grid.
144 14 Using the Monte-Carlo Potfit program

DOF permutations are interpreted as an interchange of the primitive grids. For instance,
consider a two dimensional system with potential V (x, y) which is expressed on the product
grid as Vi1 ,i2 = V (xi1 , yi2 ). Then the input
SYMMETRY-SECTION
E SXY1
--------------
x y
y x
end-symmetry-section

will lead to a fit which obeys the symmetry ViPF 1 ,i2


= ViPF
2 ,i1
. Note, that this is really a grid-
based symmetrization as only grid point indices are considered and the values of the coordi-
nates x and y are ignored. Additionally the DOF labels may bear a sign which means that
the reverse primitive grid index is used instead. Therefore, the input
SYMMETRY-SECTION
E SXY2
--------------
x y
y -x
end-symmetry-section

will lead to a fit which obeys the symmetry ViPF


1 ,i2
= ViPF
2 ,N1 −i1 +1
..
Defining grid-based symmetries within mcpotfit is subject to a number of restrictions:

1. Interchanging DOFs must have the same number of grid points and the same DVRs

2. DOF permutations must either stay within one combined mode or complete modes
must be swapped (with arbitrary mode-internal permutations)

3. Permuting (combined) modes must have the same number of grid points and the same
DVRs

Note, that at present, mcpotfit does not check if the DVRs of interchanging modes are
compatible. It just checks if the numbers of grid points of the two grids are identical.

14.6.2 Coordinate-based expressions


Sometimes it is more convenient to use arithmetic expressions (instead of counting grid
points) to implement the symmetry operations. This can be done using curly brackets. Curly
brackets must contain an expression of the form {±S ± R}, where S is a DOF label and R is
an optional real number or an arithmetic expression (using +,-,*,/) of real numbers. The arith-
metic expression of real numbers may also contain the symbols pi and 2pi with obvious
meanings. (Note: at present no blanks in curly brackets are supported.)
When using coordinate-based expressions, any the DVR index points are converted to
coordinate values which are transformed according to the expression in curly brackets and
then converted back to grid indices. In the background, coordinate-based expressions are
hence still grid based operations but with a more intuitive notation. One must therefore take
care that coordinate expressions again lead to primitive grid points (unless one uses extended
grids, see below).
In Example 14.3 the coordinate based expressions for the DOF labels la and lb could
also have been done with grid based operations that ignore the coordinate values. The real
14.6 Restoring molecular symmetries 145

SYMMETRY-SECTION
--------------------------------------------
E C2 C4 C4ˆ3
--------------------------------------------
x -x y -y
y -y -x x
phi {phi+pi} {phi-pi/2} {phi+pi/2}
--------------------------------------------
periodic = phi
end-symmetry-section

Example 14.4: Symmetry operations with one DOF (phi) with periodic boundary conditions.

usefulness of coordinate-based expressions actually becomes apparent when periodic bound-


ary conditions are utilized and when extended grids are used. See below.

14.6.3 Periodic boundary conditions


When a coordinate has periodic boundary conditions there is usually not a natural point
around which an inversion should take place such that grid-based inversions are unhelpful.
Also, when using coordinate expressions any results outside the original periodic interval
must be mapped back into it. One can therefore assign a ’periodic’ flag to a list of DOFs with
the periodic keyword. This is shown in Example 14.4.

14.6.4 The usersym keyword


Sometimes, more complicated symmetry operations are needed. For instance, when the trans-
formation of one coordinate depends on another. In Example 14.3, the two coordinates x and
y describe the position of the central proton of the Zundel cation. The orientation of the
x − y-plane, however, is bound to the orientation of one of the water molecules. If a sym-
metry operation now interchanges the two waters, the x − y-plane is rotated according to the
relative angle between the two water molecules α. The equivalent x and y values therefore
depend on α and need to be calculated in an external routine. In such a case the more com-
plicated symmetry operations are labeled with the usersym keyword within the symmetry
table. If usersym is present, the routine GetUserSym is called in which the symmetry
operation must be implemented. It is sufficient here to only implement the transformation for
the coordinates that are involved in the more complicated transformation, that is for which
a special implementation is needed and for which the usersym keyword is set. All other
transformations can be given using coordinate labels. If usersym is used, it must, however,
then be given and implemented for all symmetry operations (except E) and for all coordi-
nates of an involved mode. This is to make sure that possibly extended grids (see below) can
be mapped for all symmetry operations.
A template of the GetUserSym routine with additional comments is located in the source
code file $MCTDH DIR/source/mcpotfit/usersym.F90. Also the routine used for the example
14.3 in Ref. [35] is given in the in file $MCTDH DIR/source/mcpotfit/usersym.F90.zundel.
There is an important difference for these user implemented symmetry operations com-
pared to the simple symmetries described in Subsection 14.6.1: user implemented symmetry
operations are coordinate based, not grid based: the GetUserSym routine receives a vector
146 14 Using the Monte-Carlo Potfit program

of coordinate values and is expected to return the correct equivalent coordinate values. How-
ever, the restrictions that apply to simple transformation also apply for user implemented
symmetry operations.

14.6.5 Using intermediate extended grids


In Example 14.3, the usersym keyword is used to calculate the equivalent points of the
x, y, and α grids upon the various symmetry operations using the GetUserSym routine.
While the operations E, C2, SigmaA, and SigmaB, stay on the original primitive grid and
could have been implemented using coordinate labels as shown above this is not true for the
operations S4, S4ˆ3, C2A, and C2B. The latter four interchange the two water molecules to
which the orientation of the x − y-plane is bound. In addition to coordinate permutations, the
x − y-plane must therefore be rotated which leads to coordinate values outside the original
primitive grid. mcpotfit can therefore calculate extended grids for these cases.
Extended grids are detected by scanning the original primitive grid mode-wise and detect-
ing any points that lie outside the original grid. Symmetry operations that can lead to points
outside the original grid are usersym operations as mentioned before, but also coordinate-
based expressions. For instance in Example 14.4, it the DVR of phi is of type EXP it will
have an odd number of grid points such that none of the symmetry operations (except E, of
course) will lead again to a grid point.
If new points are detected, they are added as additional grid points to the respective mode.
To reduce the possibility of programming errors the flag auto-extgrid has to be set
in the RUN-SECTION to enable auto-generation of grid-points. Otherwise an error will
be produced as soon as points outside the original grid are detected (after all, this may be
unintended). This technique of auto-generating extended grids has also been used in Ref.
[35].
When generating extended grids one must ensure that all symmetry operations stay on
the extended grid once it has been created. This means, none of the symmetry operations
operated on an extended grid again must lead to additional grid points. If this is the case (and
if the symmetries are correctly implemented) then there exists another symmetry operation
which is a combination of two of the already implemented ones. This symmetry must also be
implemented in the SYMMETRY-SECTION. In short, one always has to define all symmetry
operations of a symmetry group.

14.6.6 Symmetry checking


When a SYMMETRY-SECTION is present in the input file, two additional ASCII files are
generated in the name directory: sigma and sym.log. The first file, sigma, contains the
coefficient-transformation matrices (cf. Ref. [35]) that are used to symmetrize the expansion
coefficients. These matrices should be diagonal, with entries +1 or -1 only (except when
degeneracies are present). The file sym.log contains information about the internal represen-
tation of the symmetry operations. It can be used to debug the symmetry table. Furthermore,
all symmetry operations are checked against the PES routine if they really lead to the same
energies and, after the final natpot file has been symmetrized, it is tested on a number of ran-
dom points if they transform correctly. If extended grids have been used, not all operations
may stay on the primitive grid any more as the additional points have been removed again at
this stage already. If a symmetry operation does not stay on the primitive grid, the nearest
grid point is used instead and the ”on-grid” flag is set to false in the log file.
14.7 Implementing a surface outside the MCTDH operator library 147

14.7 Implementing a surface outside the MCTDH operator li-


brary
As mentioned before, mcpotfit relies on a potential energy surface which should usu-
ally be implemented in the MCTDH operator library. If for some reason implementation
of a surface routine within the MCTDH operator library is not wanted or not possible it
can be implemented as an (almost) stand-alone routine within the mcpotfit source code.
There is a template routine in the source tree: $MCTDH DIR/source/mcpotfit/userpot.F90
which can be used to this end. The function called by mcpotfit and mccpd is UserPot
which receives a coordinate vector with values in the same order as they are defined in the
PBASIS-SECTION and the number of coordinates and should return the potential energy at
the given point.
If shared memory parallelization is used, the function must be implemented thread-safe as
it is called in parallel. If this is not possible one has to set the keyword no-OMPpotential
in the RUN-SECTION in which case the calls to the potential routine are executed sequen-
tially. Since the function UserPot is essentially stand-alone it must initialize itself upon the
first call if necessary, for instance read-in parameters, allocate memory etc. This must also
be thread-safe.
To switch to the user-implemented potential routine one needs to set the
pes = usersurf in the OPERATOR-SECTION. Note that the usersurf keyword
does not support any arguments.

14.7.1 Using TANA for coordinate transformations


While MCTDH and hence mcpotfit and mccpd, use internal coordinates most potential sur-
faces require as input the Cartesian coordinates of the involved atoms. In some cases the
transformation is easy to implement manually but with growing size of the systems one often
uses the TANA program by D. Lauvergnat [36, 37] to perform the coordinate transforma-
tion and the generate the kinetic energy operator. The TANA program comes with a Fortran
library that contains two subroutines: Qact TO cart to perform the curvilinear to Carte-
sian coordinate transformation and the subroutine cart TO Qact to perform the reverse
transformation.
Just as the PES routine, also TANA must initialize upon the first call
of the UserPot routine. An example can be found in the template file
$MCTDH DIR/source/mcpotfit/userpot.F90.TANA. The initialization of TANA is done
with an input file and is triggered simply by calling the coordinate transformation once with
an input file opened. Before calling the coordinate transformation, one therefore needs to
assign an input channel (or unit in Fortran language) that does not conflict with any of the
MCTDH input/output channels and open the input file. The channel should be channel no.
50, called idump in MCTDH. This channel in MCTDH is used for quick I/O and closed
immediately after any operation. The input channel for TANA is called in unitp and is
defined in the Fortran module mod NumParameters which needs to be imported in the
init routine and then assigned the value of idump.
There are a few subtleties that should be addressed.

1. If the potential routine is called using shared memory parallelization, i.e., with
OpenMP support, one must place the TANA routines into $OMP critical sections
because of race conditions within these routines.
148 14 Using the Monte-Carlo Potfit program

2. The order of the internal coordinates must be passed to TANA in the same order that as
produced in the TANA output. Ideally, one already defines the coordinates this order in
the PRIMITIVE-BASIS-SECTION so that no re-ordering is necessary. (One should
also check if the Cartesian coordinates that are returned by TANA are in the order the
PES routine expects)

14.7.2 Linking to TANA (and other libraries)

In the following it will be assumed that the TNUM/TANA package is installed in


$HOME/ElVibRot-TnumTana. This may need some adjustment. It will be assumed that
the TNUM/TANA package compiled with no errors and that the Fortran Library is located
in the $HOME/ElVibRot-TnumTana/obj/obj hcompileri and named libTnum.a. Note that the
hcompileri part in the path must be replaced by the name of the compiler used. Older versions
of the TNUM/TANA package do not have the compiler subdirectories.
As described in the previous subsection, modules from TANA are imported into the PES
routine. This makes it very important that the same compiler (and same version) for mccpd
or mcpotfit and for TANA is used. Otherwise the pre-compiled module files may conflict.
To make libTnum.a known to programs from the MCTDH package one needs to edit the
file $MCTDH DIR/install/compile.cnf. Open the file with your favorite text editor and find
the line case $MCTDH COMPILER in. This line opens a case selection between different
compilers which may be run with different options. The first couple of cases use the the
GNU compiler, gfortran with different options (default config, with MPI support, 32 bit
legacy versions etc.). Thereafter follow cases of other compilers (Intel, Portland etc.) also
with different option sets.
Go to the section of the compiler and configuration you want to use and before the end of
the section, that is, before the line containing “;;” add lines like:

LIB_TNUMTANA=${HOME}/ElVibRot-TnumTana/obj/obj_gfortran/
MCTDH_ADD_LIBS="${MCTDH_ADD_LIBS} -L{$LIB_TNUMTANA} -lTnum "
MCTDH_FFLAGS_OPT="$MCTDH_FFLAGS_OPT -I${$LIB_TNUMTANA} "
MCTDH_FFLAGS_DEB="$MCTDH_FFLAGS_DEB -I${$LIB_TNUMTANA} "

Note that these lines are used for gfortran and may be different for other compilers. The
first line defines the path to the library and the pre-compiled module files while the following
lines add this path to the library and include search paths. A similar procedure can also be
used for other libraries, for instance if the potential routine itself is a library function. Note
that this needs to be repeated for all cases in the case $MCTDH COMPILER in statement
that will be used, most likely these will be two cases, the default configuration and the con-
figuration with MPI support.
Now the program needs to be re-compiled, for instance with one of

compile mcpotfit
compile mccpd
compile -m mcpotfit # MPI support
compile -P mccpd # OpenMP support

etc.
14.8 Checking convergence and fit quality 149

14.8 Checking convergence and fit quality


In addition to the usual potfit error which results from the basis truncation, mcpotfit intro-
duces an additional source of error which results from the Monte-Carlo integrations used
throughout the program. Both aspects are interdependent, cf. Ref. [35], and need to be ob-
served. In the following the main focus lies on convergence with respect to the Monte-Carlo
integration as basis truncation errors are already discussed in the previous chapter on potfit.
MC-Potfit critically depends on converged SPP as well as coefficients, where the con-
vergence depends on the number of sampling points. Unfortunately there is no obvious and
simple way to estimate the needed number of sampling points beforehand. As a role of thumb
one can start with about 10 times as many sampling points as primitive grid points on largest
mode for the SPP and 10-100 times as many sampling points as there are configurations for
the coefficients. After the first run one then needs to carefully check the convergence.

14.8.1 Convergence of the SPP


The SPP are the basis functions in which the original potential is to be expressed as good as
possible. Of course, one therefore needs as good as possible basis functions, which in turn
means that the SPP should be converged with respect to the number of sampling points used
for their generation. Luckily, the most important SPP converge fastest, but it is essential to
converge all SPP.
Checking the convergence of the SPP is done by calculating two reduced densities per
mode, each one calculated from half of the total number of sampling points. Subsequently,
SPP are calculated from each density separately. The SPP are then compared in two ways:
1. By overlap of the nth SPP of the first set with the nth SPP of the second set. The
direct comparison allows to evaluate the difference between the individual SPP created
from two different sets of sampling points. This however may be misleading when
degenerate or close to degenerate SPP are present. In this case the individual SPP may
be at different positions within the two sets and a one-to-one correspondence does not
exist.
2. By comparison
n oof the spans of P
the SPP.E D The spans are compared by calculating
1 (1) (2) (i) (i) (i)
nκ tr Pκ Pκ , where Pκ = jκ jκ is a projector on the space spanned
j
by the SPP of mode κ of set i. The trace over the two projectors therefore would give
unity if the spaces are identical and a result less then unity indicates that the spans are
different.
Details of the above are recorded in the log file.

14.8.2 Convergence of the Coefficients


The convergence of the coefficients is hard to estimate directly. mcpotfit resorts to evaluate
the natpot after the fit has been created. It is tested with use of the sampling-test
trajectory in the SAMPLING-SECTION as well as the sampling-coeff trajectory.
When the coefficients are calculated, they are optimized for the sampling points in the
sampling-coeff trajectory and are optimal just for these points in a least squares sense
while the SPP interpolate between these points. If the test trajectory is an independent trajec-
tory it tests the quality of the interpolation between the points used to optimize the coefficients
150 14 Using the Monte-Carlo Potfit program

[...skipped natural population statistics as in potfit...]

Global (weighted) Lˆ2 error estimated from neglected natural weights:


73.5279 meV 593.043 cmˆ-1 2.7021E-03 a.u.

ERRORS OBTAINED WITH COEFF-SAMPLING BEFORE COEFF-SYMMETRIZATION:

Statistics of the difference (V(exact) - V(natpot)) using 10000000 sampling points.


Mean = -4.3031E-06 au, -1.1709E-04 eV, -9.4443E-01 cm-1
RMS = 8.4528E-04 au, 2.3001E-02 eV, 1.8552E+02 cm-1
Minval = -7.0715E-02 au, -1.9243E+00 eV, -1.5520E+04 cm-1
Maxval = 3.3613E-02 au, 9.1465E-01 eV, 7.3771E+03 cm-1

ERRORS OBTAINED WITH TEST-SAMPLING BEFORE COEFF-SYMMETRIZATION:

Statistics of the difference (V(exact) - V(natpot)) using 10000000 sampling points.


Mean = -1.3461E-05 au, -3.6628E-04 eV, -2.9543E+00 cm-1
RMS = 1.9485E-03 au, 5.3021E-02 eV, 4.2764E+02 cm-1
Minval = -9.7127E-01 au, -2.6430E+01 eV, -2.1317E+05 cm-1
Maxval = 7.3143E-01 au, 1.9903E+01 eV, 1.6053E+05 cm-1

ERRORS OBTAINED WITH COEFF-SAMPLING:

Statistics of the difference (V(exact) - V(natpot)) using 10000000 sampling points.


Mean = -1.2842E-05 au, -3.4946E-04 eV, -2.8186E+00 cm-1
RMS = 1.5235E-03 au, 4.1457E-02 eV, 3.3438E+02 cm-1
Minval = -3.7359E-01 au, -1.0166E+01 eV, -8.1994E+04 cm-1
Maxval = 3.4751E-01 au, 9.4562E+00 eV, 7.6269E+04 cm-1

ERRORS OBTAINED WITH TEST-SAMPLING:

Statistics of the difference (V(exact) - V(natpot)) using 10000000 sampling points.


Mean = -1.5470E-05 au, -4.2097E-04 eV, -3.3954E+00 cm-1
RMS = 1.6876E-03 au, 4.5922E-02 eV, 3.7039E+02 cm-1
Minval = -4.1859E-01 au, -1.1390E+01 eV, -9.1870E+04 cm-1
Maxval = 1.1291E-01 au, 3.0726E+00 eV, 2.4782E+04 cm-1

Example 14.5: An excerpt of an output file for the Zundel cation (D2d ): After calculating the
natpot file the fit errors are estimated with two sets of sampling points: the one that has been
used for calulating the coeffitients and an independent test set. If a SYMMETRY-SECTION
is present this is done twice: before and after the symmetrization of the coefficients.
The 15D Zundel cation is a very large system for mcpotfit. Hence, here one is happy with
these rather large fit-errors. For smaller systems one usually aims for fit-errors which are
smaller by one or two orders of magnitude.

and hence tests how good coefficients are represent the complete potential. This assumes that
the SPP are converged and represent the optimal interpolating functions.
Detailed statistics about the two trajectories are written to the output file. Example 14.5
shows an excerpt from an output file for the Zundel cation as used in Ref. [35]. The first
part of the output file is similar as for the traditional potfit (cf. Example 13.2) and has been
skipped in Example 14.5. Only the different error statistics are shown. The statistics that are
evaluated are the mean error, i.e., the mean difference between the original potential and the
fit, the RMSq error (the root-mean-square difference between the original potential and the
P
fit, RMS = N1 I (VI − VIPF )2 , where I runs over the sampling points of the respective
trajectory.). Furthermore, the minimum and maximum of the difference along the trajectory
are given.
14.8 Checking convergence and fit quality 151

RUN-SECTION
name = npmm
trajectory = h5o2p_metr_2500/dvrindex-test
compare = h5o2p_metr_2500/energies-test
readdvr = h5o2p_fit_small_1250
END-RUN-SECTION

NATPOT-SECTION
h5o2p_fit_small_1250
end-natpot-section

end-input

Example 14.6: An input file for npotminmax: the natpot file in directory h5o2p fit small 1250
is tested on the DVR points in file h5o2p metr 2500/dvrindex-test. The exact corresponding
energies of the potential are in the file h5o2p metr 2500/energies-test

If a SYMMETRY-SECTION is present in the input file the statistics are done twice before
and after the symmetrization of the coefficients (the SPP are always symmetry adapted in
case a SYMMETRY-SECTION is present). If the symmetries are implemented correctly one
should observe an increase of the errors along the coeff trajectory while the errors should
decrease along the independent test trajectory after symmetrization. If the sampling meth-
ods for the coefficient- and the test-trajectories are the same (in particular the same temper-
ature in case of Metropolis sampling) the difference between the results obtained with the
coeff and test samplings is therefore a good measure for the convergence of the coeffi-
cients in terms of sampling points.

14.8.3 Testing the fit with other trajectories


Often, a single test trajectory does not yield all information needed about the fit. For instance
one may require information about the fit quality on certain regions of the potential or may
want to test the fit with Metropolis trajectories obtained with different temperatures. To this
end one can use the program npotminmax. With npotminmax one can test the potential fit
along arbitrary trajectories.
npotminmax requires a small input file as displayed in Example 14.6. The input consists
of a RUN-SECTION and a NATPOT-SECTION. The RUN-SECTION defines a name di-
rectory to which the program writes output files while the NATPOT-SECTION defines the
directory in which the natpot file that is to be tested is located. The name directory should be
different than the name directory of a potfit or mcpotfit run since several statistics files are
written. npotminmax can in general test the sum of several natpot files (see HTML docu-
mentation of npotminmax), but this feature is of less importance for the present case where
a single natpot is to be examined.
Within the RUN-SECTION the trajectory along which the natpot file is to be inspected
is specified with the trajectory keyword. The argument is the relative or absolute path
to a file containing DVR index points. This can be for instance be a dvrindex file from a
previous mcpotfit run (must be ASCII). To compare to the exact potential energy values
one furthermore needs to provide a file containing the (exact) potential energy values that
correspond to the index points within the trajectory file. This can be done with the compare
keyword. The argument of compare is the relative or absolute path to a file which contains
the energies corresponding to the DVR points in the trajectory file. The file expected is
152 14 Using the Monte-Carlo Potfit program

an ASCII file with one energy per line, where the nth line of the file contains the energy
that corresponds to the nth DVR point in the trajectory file. These files are also created by
mcpotfit during generation of the sampling points, named energies-<task>, where <task>
is one of “spp”, “coeff”, or “test”. Furthermore in the RUN-SECTION one needs to specify
the DVR that was created by mcpotfit.

14.9 Output files


Table 14.4 outlines a brief overview of the various output files of mcpotfit. In cases where
files can be both, ASCII or binary, there is an option to specify the desired format in the
RUN-SECTION.

File Type Content


natpot binary The potential fit to be read in by mctdh.
dvr binary The DVR points as in mctdh.
output ASCII Natural population statistics for each mode
and final error estimates and CPU time.
input ASCII A copy of the input file and command line options.
log ASCII General information and programs progress,
such as files opened, Type of calculation,
surface used, memory usage,
converge of the SPP, error and warn messages, if any.
conjgrad.log ASCII Iterations and residual vector norm
if conjugate gradients is used to solve
for the coefficients
sym.log ASCII DOF and mode operations for symmetries
and symmetry tests.
Only present if symmetries are specified.
natpot-statistics If more than 1 test-trajectories are specified
in the SAMPLING-SECTION this file contains
statistical details of the fit error for each of the
trajectories.
sigma ASCII Matrices that are used to transform the coefficients
for symmetrizing the fit. Only present if symmetries
are specified.
extgrid mode i ASCII The extended intermediate grid of mode i.
each line contains the coordinates of all DOF of that mode
at one DVR or extended point. Extended points are at the
end of the file.
Only present if symmetries are specified,
and an extended grid is detected.
timing ASCII CPU time and number of calls to various subroutines.
dvrindex-spp binary or ASCII Integer DVR indices of the sampling points to generate
the SPP. Binary or ASCII can be specified in the
RUN-SECTION (default: ASCII). The index is
continued . . .
14.9 Output files 153

. . . continued
File Type Content
given in the same order as the DOF in the
PRIMITIVE-BASIS-SECTION. Each line (or record
if binary) contains one sampling point.
dvrindex-coeff binary or ASCII Same as for dvrindex-spp but contains the sampling
used for calculating the coefficients.
dvrindex-test binary or ASCII Same as for dvrindex-spp but contains the sampling
used for the final test.
energies-spp binary or ASCII Energies that correspond to the DVR index points in
file dvrindex-spp. If dvrindex-spp is binary
then also energies-spp is binary. Each line
(or record if binary) contains one single energy.
energies-coeff binary or ASCII Same as for energies-spp but contains the energies
for the coefficient sampling.
energies-test binary or ASCII Same as for energies-spp but contains the energies
for the test sampling.
energies binary or ASCII Same as for energies-spp, energies-coeff and
energies-test, but in case the keyword
same-sets is set and all samplings are the same.
eigenvalues ASCII If invert-method=eigen is set in the
RUN-SECTION, then the eigenvalues
of the SPP overlap matrix are stored in column 1,
if regularization is used, also regularized eigenvalues in
column 2. of this file.
density mode i binary or ASCII The reduced density matrices for mode i. A header
of 5-6 lines (or records if binary) followed by the
density matrix. Each line (or record if binary)
contains one column of the density. If extended
grids are used the matrices are stored on the
extended grid (after symmetrization).
ASCII or binary is controlled within the
RUN-SECTION (default: ASCII).
evecs mode i binary or ASCII All SPP for mode i. A header
of 5-6 lines (or records if binary) followed by the
SPP. Each line (or record if binary)
contains one SPP. If extended
grids are used the SPP are stored on the
extended grid (after symmetrization).
The last line contains the natural populations.
ASCII or binary is controlled within the
RUN-SECTION (default: ASCII).
Only written if save-evecs is set in
RUN-SECTION. If present, SPP are loaded from here,
otherwise the density is loaded (if no SPP sampling is
specified).
evec mi j ASCII The jth SPP of mode i one entry per line.
continued . . .
154 14 Using the Monte-Carlo Potfit program

. . . continued
File Type Content
first numbers in each line are primitive grid coordinates
followed by the value of the SPP on the point as last
entry of the line. First index runs fastest.
These files are useful for visualizations using
plotting tools.
idxmap mode i ASCII Integer matrix with N columns, one column for
each symmetry. The integer in the nth row and mth
column contains the grid point with which the nth
(extended) mode grid point is interchanged upon symmetry
operation m. (This point might be on a different mode
if modes are interchanged - this is not mapped here).
vpot binary If complete sampling is used, the potential evaluated on
the complete primitive grid as in potfit.
Table 14.4: Output files of mcpotfit and a brief description of their content.
Chapter 15

Thermal averaging

A wavefunction is a pure state and this describes a system at zero temperature, T = 0. To


include thermal effects one may turn to density operator propagation, which, however, is very
costly. An alternative is the statistical sampling of wavefunctions. A randomly chosen initial
state of high energy is relaxed (propagated in negative imaginary time) for a finite time.
The relaxation time is related to the temperature of the system, t = ~/(2kB T ). Then the
relaxed state is propagated and the desired observables are computed. This is repeated several
times and the observables are to be averaged over the ensemble. Depending on the system,
converging the ensemble averaging typically requires between 10 and 1000 realizations. Our
implementation follows the paper of U. Manthe and F. Huarte-Larrañaga [38]. The initial
states used in the relaxation process are Hartree products, the SPFs of which are sums of the
primitive functions with statistically chosen phases.
When the desired observables are populations of electronic states, one simply averages the
computed state populations. However, other observables my require a more careful analysis.
As example we discuss the evaluation of thermalized spectra.
An power spectrum is given by the dipole-dipole correlation function.
Z
1
σ(ω) = dt eiωt hµ(t)µ(0)i (15.1)

The absorption spectrum is given by the power spectrum times ω times a constant.
If N initial states, |Ψn i, are generated by relaxation with the thermal keyword, then the
thermal density (in the limit N → ∞) is given by

N
1 X
ρ= |Ψn ihΨn | (15.2)
N
n=1

With this we evaluate the dipole-dipole correlation function



hµ(t)µ(0)i = trace µ(t)µ(0)ρ
N
1 X
= hΨn |eiHt µe−iHt µ| Ψn i
N
n=1
N
1 X
= hΨn (t)|µ|Ψµn (t)i (15.3)
N
n=1

155
156 15 Thermal averaging

where Ψµn (t) = e−iHt µΨn . Setting N = 1 and assuming that Ψ is an eigenstate of H with
eigenenergy E0 , then one obtains the classical result
Z
1
σ(ω) = dt ei(ω+E0 )t hΨµ (0)|Ψµ (t)i (15.4)

The matrix element hΨn (t)|µ|Ψµn (t)i (see Eq.(15.3) is to be evaluated on the fly with
the aid of the expect keyword. The Fourier-transform of this matrix element is per-
formed by running autospec84. The latter can read an expectation file when the option
-f expectation is set. Note that one has to propagate the relaxed state Ψn and the
dipole operated state Ψµn simultaneously. This can be achieved by putting Ψn on an addi-
tional (possibly artificial) electronic state. An example is provided in the tutorial, chapter
2.8.
The MCTDH program always normalizes the wavefunction. The change in norm due to
relaxation is protocoled in the variable normthermal, which is written to log and restart
file. Here it is called wn .
wn = ||Ψn || = ||e−βH Ψ0n || (15.5)
where |Ψ0n i denotes the n-th randomly selected normalized initial wavefunction. Eq.(15.2)
is then to be replaced with
N
1 1 X 2
ρ= wn |Ψn ihΨn | (15.6)
Z W
n=1
PN 2
with Z = trace(ρ) and W = n=1 wn . Likewise Eq.(15.3) is to be replaced with
N
1 X 2
hµ(t)µ(0)i = wn hΨn (t)|µ|Ψµn (t)i (15.7)
W
n=1
Appendix A

The concept of the input file

With the exception of a continuation run, where a previous wavepacket propagation is carried
on to longer times, all calculations require an input file, name.inp. This file is a text file,
with the required options input as keywords. As all lines beginning with a # are treated as
comments, title and other text can be usefully added to make the file easier to understand.
Example input A.1 shows the input file required for a simple wavepacket propagation
calculation, using a modified Henon-Heiles Hamiltonian (see Ref. [2] for more details of this
calculation). As the example shows, it is possible to include the information of the operator
file in the input file. This is particularly useful for systems having a simple Hamiltonian.
The keywords in the input file are grouped together into sections, each with a specific set
of information. The sections start with a line containing the keyword XXX-SECTION, and
end with END-XXX-SECTION, where XXX is the name of the section. The possible sections
are compiled in Tab. A.1.

Table A.1: The possible sections in the input file. Also displayed is whether a section is required for a certain
calculation type.

Section Calculation Type


gendvr genoper geninwf propagation diagonalisation
genpes relaxation
RUN yes yes yes yes yes
PRIMITIVE-BASIS yes yes yes yes yes
PARAMETERa yesb yesc yesc yesc yesc
SPF-BASIS no yes yes yes yes
OPERATORd no yes yes yes yes
OP DEFINEa no yes yes yes yes
HAMILTONIANa no yes yes yes yes
LABELSa no yese yese yese yese
INITWF no no yes yes yes
INTEGRATOR no no no yes no
a
May be in the operator file
b
Only if parameters are used in the DVR specifications
c
Only if parameters are used in the Hamiltonian specification
d
Only if the Hamiltonian is in an operator file
e
Only if label definitions are required in the Hamiltonian specification

157
158 A The concept of the input file

Table A.2: Description of the calculation types. The table shows the RUN-SECTION keyword required for a
certain calculation type and the level associated with this type. Also given are the files that are created and needed
by the different calculation types.

Level Keyword Description Created files Required files


1 gendvr Sets up primitive bases dvr
2 genpes Sets up a pes file for analysis pes dvr
2 genoper Sets up an operator for use oper dvr
3 geninwf Sets up an initial wavefunction restart dvr, oper
4 propagation Propagates a wavepacket User defined dvr, oper, restart
4 relaxation Relaxes a wavepacket User defined dvr, oper, restart
4 diagonalisation Diagonalises a Hamiltonian User defined dvr, oper, restart

Which sections are required depends on the type of calculation to be made. Table A.1
lists the various sections, and indicates which are required for the various types. A possible
calculation type is, for instance, a propagation, a relaxation, or a diagonalisation, symbolised
in the RUN-SECTION by the corresponding keyword propagation, relaxation, or
diagonalisation. Additionally hereto, one may use the MCTDH program to solely set
up a primitive basis, a Hamiltonian operator, or an initial wavepacket. This is done with the
keywords gendvr, genoper, or geninwf in the RUN-SECTION. (The RUN-SECTION
is hence required for all calculation types.) The generated information can then be read from
file in following calculations be using the keywords readdvr, readoper, or readinwf
in the RUN-SECTION.
Each calculation type has a level associated with it, which reflects the stages for a cal-
culation. These levels are listed in Tab. A.2. Each level keyword automatically contains
the lower levels, thus the keyword propagation implies gendvr, genoper, geninwf,
propagation, and a wavepacket propagation will be performed after first setting up a
DVR, operator, and initial wavepacket. The listed files are files which contain the informa-
tion from the lower level calculations.
In the input file there may appear keywords which have a UNIX filename as argument
(e. g. oppath = · · · ). These filenames are interpreted relative to the location of the input
file.
A The concept of the input file 159

#################################################################
## Propagating a wavepacket using the Henon-Heiles Hamiltonian ##
#################################################################

RUN-SECTION
propagation tout=0.01 tfinal=0.50
name = hh psi gridpop
end-run-section

PBASIS-SECTION
#Label DVR N Parameter
X HO 32 0.0 1.0 1.0
Y HO 32 0.0 1.0 1.0
end-pbasis-section

SBASIS-SECTION
X = 3 Y = 3
end-sbasis-section

OP_DEFINE-SECTION
title Henon-Heiles PES end-title
end-op_define-section

PARAMETER-SECTION
mass_X = 1.0
mass_Y = 1.0
lambda = 0.2, au
end-parameter-section

HAMILTONIAN-SECTION
-----------------------------
modes | X | Y
-----------------------------
1.0 | KE | 1
0.5 | qˆ2 | 1
-lambda/3 | qˆ3 | 1
lambdaˆ2/16 | qˆ4 | 1
1.0 | 1 | KE
0.5 | 1 | qˆ2
lambdaˆ2/16 | 1 | qˆ4
lambda | q | qˆ2
lambdaˆ2/8 | qˆ2 | qˆ2
-----------------------------
end-hamiltonian-section

INIT_WF-SECTION
build
X gauss 1.80 0.00 0.75
Y gauss 0.00 1.20 0.50
end-build
end-init_wf-section

INTEGRATOR-SECTION
VMF ABM = (6 , 1.0d-7 , 1.0d-5)
end-integrator-section

end-input

Example A.1: An input file for a wavepacket propagation using the Henon-Heiles Hamiltonian.
Appendix B

The Structure of the Programs

Figure B.1 displays a flowchart of the MCTDH program package. The MCTDH program first
reads the input file via the eingabe routines and computes the memory requirements. De-
pending on the input settings, it then starts some or all of the calculation types. The routines
callx allocate the memory, the routines runx perform the calculations. Communication
between these parts of the MCTDH program, as well as between the MCTDH and the Potfit
and Analysis programs, is done employing the files indicated by ovals in the diagram.

MCTDH
include files

❄ ❄ ❄ ❄
CALLDVR CALLOPER CALLINWF CALLPROP

EINGABE ✬ ✩
auto
❄ ❄ ❄ ❄ psi
✻ check
✓ ✏
gridpop ✲ ANALYSE
RUNDVR RUNOPER RUNINWF RUNPROP
dvr
✒ ✑
.inp oper

✓ ✏
steps
✻✻ ✻✻ ✻✻ ✻ ✻✻
✫ ✪
etc.

✒ ✑
dvr
✓ ✏
✓ ✏ ❄ oper
POTFIT
✒ ✑
✓ ✏
✒ ✑
natpot

✒ ✑
restart

Figure B.1: The structure of the MCTDH programs. See text for details.

160
Appendix C

The built-in symbolic expressions

The following tables describe the symbols and related operators that can be used to set up a
Hamiltonian operator.

General Remarks
With the aid of the caret ˆ one may apply a power to operators. The power may be integer
or real and may carry a sign. This, however, works only for potential like operators. Inspect
the Tables below to learn, which operators can be exponentiated. Note, that symbols like
dqˆ2 or jˆ2 are operator labels of their own right, they do not denote that the second power
of the operators dx or j is taken literally. (Compare with Appendix B (Discrete Variable
Representation) of the MCTDH review (Phys.Rep. 324 (2000) 1-105), to learn how dq and
dqˆ2 are defined).
One may multiply operators, e.g. a construct like dq*cos*dq is allowed. However,
multiplication is allowed only among potential like operators and operators with a simple
matrix representation. This excludes all KLeg and PLeg operators from multiplication. (See
Table C.2 and notes to this table). Moreover, natpots cannot be multiplied with other
operators. (See Section 6.9)

161
162 C The built-in symbolic expressions

Table C.1: Simple one-dimensional operators. The expression x is the coordinate, r can be replaced by any real
number, positive or negative. If r = 1 it is not required, e.g. q and qˆ1 are synonemous. The expression n can be
replaced by any non-negative integer.

Symbol Operator Notes


1 1 Unit operator
I i*1 Imaginary unit times unit operator
qˆr xr Multiply by rth power of √ x
qsˆr (1 − x2 )r/2 Multiply by rth power of 1 − x2
sinˆr sinr (x) rth power of sine of coordinate
cosˆr cosr (x) rth power of cosine of coordinate
tanˆr tanr (x) rth power of tangent of coordinate
coshˆr coshr (x) rth power of hyperbolic-cosine of x
sinhˆr sinhr (x) rth power of hyperbolic-sine of x
acosˆr arccosr (x) rth power of acosine of coordinate
asinˆr arcsinr (x) rth power of asine of coordinate
atanˆr arctanr (x) rth power of atangent of coordinate
expˆr exp(x)r exponential of coordinate
texpˆr exp(arccos(x))r exponential arc-cosine of coordinate
gaussˆr exp(−x2 )r gaussian of coordinate
tgaussˆr exp(− arccos(x) 2 )r gaussian of arc-cosine of coordinate

ngaussˆr exp(−x2 /2)r / 2π normalized gaussian
legth:n Pn (cos(x)) nth order Legendre polynomial of cosine
of x
asleg:l m Plm (x) associated Legendre polynomial
of x (see function plgndr in
sorce/lib/utilities/legendre.f)
aslegth:l m Plm (cos(x)) associated Legendre polynomial of co-
p sine of x
+
cp J(J + 1) − K(K + 1) CJK symbol appearing with the j+ oper-
p ator (see Table C.2). J is fixed.

cm J(J + 1) − K(K − 1) CJK symbol appearing with the j− oper-
ator (see Table C.2). J is fixed.
my1d user supplied routine. See Note 8 of Table
C.3.
C The built-in symbolic expressions 163

Table C.2: Operator symbols which require no arguments. The expression n can be replaced by any positive
integer. Finally, m is the mass of the relevant degree of freedom. In the MCTDH input, this mass is given by the
reserved parameter mass modelabel. If mass modelabel is not explicitely set, it is 1 by default.

Symbol Operator Notes


dq ∂x first derivative. Cannot be used for rHO, Leg,
KLeg, PLeg, Wigner or sphFBR.

dqˆ2 ∂x2 second derivative. Cannot be used for Leg, KLeg,


PLeg, Wigner or sphFBR.

p −i∂x momentum (deprecated, use dq) When using an


FFT, the construct pˆn is possible for integer n.
1 2
KE − 2m ∂x Kinetic energy term. Cannot be used for modes
with a Legendre DVR or sphFBR.

jˆ2 −sin−1 (θ) ∂θ sin(θ) ∂θ Angular momentum squared. In this form


− sin−2 (θ) ∂φ2 used for sphFBR and PLeg. For Leg and KLeg ∂φ2
is replaced by −m2 (or −K 2 ).

jp eiφ (∂θ + i cot(θ) ∂φ ) Angular momentum raising operator j+ . Only for


KLeg and PLeg. For Wigner see below.

jm e−iφ (−∂θ + i cot(θ) ∂φ ) Angular momentum lowering operator j− . Only


for KLeg and PLeg. For Wigner see below.
+ − ±
jpm CJK j+ + CJK j− Combined angular momentum operator. CJK are
defined in Table C.1. Only for KLeg and PLeg.
+
cjpm CJK (j1,+ + j2,+ ) + Combined operator for two angular

CJK (j1,− + j2,− ) momenta. Here K = k1 + k2 , so this is differ-
ent from jpm for the two individual angular mo-
menta. Only for two successive KLegs, which fur-
thermore have to be combined in one mode.

jz jz = −i∂φ Angular momentum operator. Only for


sphFBR and KLeg. For PLeg use dq or p on the φ
DOF.

jzˆ2 jz2 = (−i∂φ )2 second power of angular momentum operator jz .


Only for sphFBR and KLeg. For PLeg use dqˆ2
on the φ DOF.

jpˆ2 (j+ )2 Square of angular momentum raising operator.


Only for KLeg and PLeg.

jmˆ2 (j− )2 Square of angular momentum lowering operator.


Only for KLeg and PLeg.

jpjm (j+ ) ∗ (j− ) Product of angular momentum raising and lower-


ing operators. Only for KLeg and PLeg.

(continued)
164 C The built-in symbolic expressions

Table 2, continued.

Symbol Operator Notes


jmjp (j− ) ∗ (j+ ) Product of angular momentum lowering
and raising operators. Only for KLeg and
PLeg.

sJp sin(θ) ∗ J+ J is total angular momentum.


Only for KLeg and PLeg.

sJm sin(θ) ∗ J− J is total angular momentum.


Only for KLeg and PLeg.

sJpk (sin(θ) ∗ J+ ∗ k + k ∗ sin(θ) ∗ J+ )/2 Only for KLeg and PLeg.

sJmk (sin(θ) ∗ J− ∗ k + k ∗ sin(θ) ∗ J− )/2 Only for KLeg and PLeg.



Jp J+ multiplication with CJK and
shift k → k − 1
+
Jm J− multiplication with CJK and
shift k → k + 1

Jx Jx Jx = (J+ + J− )/2

Jy iJy iJy = (J+ − J− )/2

dth1 ∂θ sin θ ”first derivative”, only for Leg-


KLeg- and PLeg-DVR (no symmetry).
1
dth2 2 (cos θ ∂θ sin θ ”first derivative”, only for Leg-
+ ∂θ sin θ cos θ) KLeg- and PLeg-DVR (symmetry).
1
qdq 2 (x ∂x + ∂x x) for rHO-DVR this replaces the ”first
derivative”.
1
sdq 2 (sin(x) ∂x + ∂x sin(x)) for cos-DVR this replaces the ”first
derivative”.
1 2 2
sdq2 2 (sin (x) ∂x + ∂x sin (x))
1
cdq 2 (cos(x) ∂x + ∂x cos(x))
1 2 2
cdq2 2 (cos (x) ∂x + ∂x cos (x))
1
csdq 2 (sin(x) cos(x) ∂x + ∂x sin(x) cos(x))
1
√ √
2 1 − x2 )
udq 2 ( 1 − x ∂x + ∂x
1
√ √
2 1 − x2 x)
uqdq 2 ( 1 − x x ∂x + ∂x
1 2 2
udq2 2 ((1 − x ) ∂x + ∂x (1 − x ))
p%<integer> p%k is a projector which projects onto the
momentum state which is given by the k-
th grid point of a FFT grid. Run rdgrid86
-pgrd to see the connection between mo-
mentum and FFT grid points.

(continued)
C The built-in symbolic expressions 165

Table 2, continued.

Symbol Operator Notes


jˆ2 −∂β2 − cot(β) ∂β − sin−2 (β) [∂α2 + Wigner-DVR angular momentum
∂γ2 − 2 cos(β) ∂α ∂γ ] squared operator, with matrix elements:
j 2 |J, K, M i = J(J + 1) |J, K, M i.

jp (j+ )BF
 =  Wigner-DVR body-fixed angular mo-
e −iγ i
∂ + ∂ − i cot(β) ∂ mentum lowering operator, which
sin(β) α β γ
operates
p as: (j + ) BF |J, K, M i =
J(J +1) − K(K −1) |J, K −1, M i.

jm (j− )BF =  Wigner-DVR body-fixed angular mo-


e iγ i
∂ α − ∂ β − i cot(β) ∂ γ
mentum raising operator, which
sin(β)
operates
p as: (j− )BF |J, K, M i =
J(J +1)−K(K +1) |J, K +1, M i.

j ps (j+ )SF =  Wigner-DVR space-fixed angular


e iα i cot(β)∂α + ∂β − i momentum raising operator, which
sin(β) ∂γ
operates as:
p (j+ )SF |J, K, M i =
J(J +1) − M (M +1) |J, K, M +1i.

j ms (j− )SF
 =  Wigner-DVR space-fixed angular mo-
e −iα i cot(β)∂α − ∂β − i mentum lowering operator, which
sin(β) ∂γ
operates
p as: (j − ) SF |J, K, M i =
J(J +1) − M (M −1) |J, K, M −1i.
+ −
jpm CJK (j− )BF + CJK (j+ )BF Wigner-DVR body-fixed combined angu-
±
lar momentum operator. CJK are defined
in Table C.1.
+ −
jpms CJM (j+ )SF + CJM (j− )SF Wigner-DVR space-fixed combined angu-
±
lar momentum operator. CJM are defined
in Table C.1, but here M replaces K.

jpˆ2 (j+ )2BF Wigner-DVR squared body-fixed angular


momentum raising operator.

jpˆ2s (j+ )2SF Wigner-DVR squared space-fixed angular


momentum raising operator.

jmˆ2 (j− )2BF Wigner-DVR squared body-fixed angular


momentum lowering operator.

jmˆ2s (j− )2SF Wigner-DVR squared space-fixed angular


momentum lowering operator.

(continued)
166 C The built-in symbolic expressions

Table 2, continued.

Symbol Operator Notes


jpjm (j+ )BF ∗ (j− )BF Wigner-DVR product of body-fixed an-
gular momentum raising and lowering
operators.

jpjms (j+ )SF ∗ (j− )SF Wigner-DVR product of space-fixed an-


gular momentum raising and lowering
operators.

jmjp (j− )BF ∗ (j+ )BF Wigner-DVR product of body-fixed an-


gular momentum lowering and raising
operators.

jmjps (j− )SF ∗ (j+ )SF Wigner-DVR product of space-fixed an-


gular momentum lowering and raising
operators.

jpjz (j+ )BF ∗ (jz )BF Wigner-DVR product of body-fixed


angular momentum operators, which
operates
p as: (j+ )BF (jz )BF |J, K, M i =
K J(J +1) − K(K −1) |J, K −1, M i.

jpjzs (j+ )SF ∗ (jz )SF Wigner-DVR product of space-fixed


angular momentum operators, which
operates
p as: (j+ )SF (jz )SF |J, K, M i =
M J(J +1) − M (M +1) |J, K, M +1i

jzjp (jz )BF ∗ (j+ )BF Wigner-DVR product of body-fixed an-


gular momentum operators, which oper-
pas: (jz )BF (j+ )BF |J, K, M i = (K −
ates
1) J(J +1) − K(K −1) |J, K −1, M i.

jzjps (jz )SF ∗ (j+ )SF Wigner-DVR product of space-fixed an-


gular momentum operators, which oper-
pas: (jz )SF (j+ )SF |J, K, M i = (M +
ates
1) J(J +1) − M (M +1) |J, K, M +1i

jmjz (j− )BF ∗ (jz )BF Wigner-DVR product of body-fixed


angular momentum operators, which
operates
p as: (j− )BF (jz )BF |J, K, M i =
K J(J +1) − K(K +1) |J, K +1, M i.

jmjzs (j− )SF ∗ (jz )SF Wigner-DVR product of space-fixed


angular momentum operators, which
operates
p as: (j− )SF (jz )SF |J, K, M i =
M J(J +1) − M (M −1) |J, K, M −1i

(continued)
C The built-in symbolic expressions 167

Table 2, continued.

Symbol Operator Notes


jzjm (jz )BF ∗ (j− )BF Wigner-DVR product of body-fixed an-
gular momentum operators, which oper-
pas: (jz )BF (j− )BF |J, K, M i = (K +
ates
1) J(J +1) − K(K +1) |J, K +1, M i.

jzjms (jz )SF ∗ (j− )SF Wigner-DVR product of space-fixed an-


gular momentum operators, which oper-
pas: (jz )SF (j− )SF |J, K, M i = (M −
ates
1) J(J +1) − M (M −1) |J, K, M −1i

AA a Annihilation operator in second quan-


tization.
√ √ Upper side-diagonal is

( 1, 2, · · · , gdim − 1), all other
matrix elements are zero.

AD a† Creation operator in second quan-


tization.
√ √ Lover side-diagonal is

( 1, 2, · · · , gdim − 1), all other
matrix elements are zero.

AP a + a† Operator in second quantization.

AM a − a† Operator in second quantization.

NN a† a Number operator in second quantization.

Notes to Table C.2

The volume-element assumed for Leg/KLeg/PLeg/Wigner is sinθ dθ, whereas all other DVRs
in MCTDH assume the simple volume-element dq. Because of the non-trivial volume-
element, ∂θ is not an anti-hermitian operator, only ∂θ sinθ (i.e. dth1) is. Note that
sinθ ∂θ = ∂θ sinθ − cosθ = dth1 − cosθ.
The operators j p, j m, jpm, jpˆ2 and jmˆ2 are (KLeg or PLeg) 2D mode-operators, i.e.
they operate on the combined mode (θ,k) or (θ,φ) for KLeg or PLeg, respectively. Note that
jˆ2 becomes a 2D mode-operator, when operating on a KLeg or PLeg mode. Similarly, the
operators sJp, sJm, sJpk, and sJmk are also 2D KLeg/PLeg operators, where J denotes the
total angular momentum. The 2D mode operator j p performs a multiplicative and shift op-
eration on k, but additionally performs a derivative and k-dependent multiplicative operation
on the θ-dof of the KLeg mode. Similar operations are done by the j m, sJp, sJm, sJpk, and
sJmk operators.
The operators jz, jzˆ2, Jp, Jm, Jx, Jz are 1D operators and operate on the k-dof of the
KLeg mode only. Hence they must appear in the k-column whereas the 2D KLeg-operators
must appear under the θ column. (A more vivid way of writing the operator file is to let the
2D operator appear under both columns by using the |& construct, see Section 6.13. How-
168 C The built-in symbolic expressions

ever, in contrast to potential functions one must not reorder the DOFs of KLeg/PLeg/Wigner
operators. For example |2&3 is fine, but |3&2 is not.)
When applied to Wigner functions, the operators jˆ2, j p, j m, jpm, jpˆ2, jmˆ2, jpjm,
jmjp, jpjz, jzjp, jmjz, and jzjm are 3D mode operators and are represented as 4D tensors in
MCTDH, so care must be taken when multiplying these operators with other operators. The
Wigner operators j p, j m, jpm, jpˆ2, jmˆ2, jpjm, jmjp, jpjz, jzjp, jmjz, and jzjm operate in the
BODY-fixed axis system; that is, these operators perform multiplicative operations and shifts
depending on the k (second) degree of freedom in the combined 3D mode. The corresponding
SPACE-fixed operators, which perform multiplications and shifts depending on the m (third)
DOF, are denoted j ps, j ms, jpms, jpˆ2s, jmˆ2s, jpjms, jmjps, jpjzs, jzjps, jmjzs, and jzjms.
Note that j+ and j− are defined as j+ = jx + ijy and j− = jx − ijy for both the SF- and
BF-system. Due to the anomalous commutation relation for the BF operators, j p = (j+ )BF
decreases k by one, whereas j ps = (j+ )SF increases m by one.
The operator cjpm is a 4D mode-operator (two successive KLegs). It only works if the two
KLegs are combined into one mode, and for this case it replaces the use of natural potentials
of the cpp/cmm surfaces (see Table C.5).
Note that the operators j p, j m, jpm, cjpm, jpˆ2, jmˆ2, sJp, sJm, sJpk and sJmk — as well
as jˆ2 if the latter operates on a KLeg/PLeg combined mode — are 3D tensors in MCTDH
and not matrices. Hence care must be taken when multiplying these operators with other
operators. To give an example

HAMILTONIAN-SECTION
-----------------------------------
modes | ... | theta | k
-----------------------------------
... | ... | cos*j_p | c_p
... | ... | j_p*cos | c_p
-----------------------------------
end-hamiltonian-section

is a valid construct. Note that the 2D operator j p may be multiplied from right or left with
and operator operating on θ only. However, it may be multiplied only from right with a local
k-dependent function (here c p).
The operators dth1, dth2, qdq, and sdq replace the first derivative operator for the Leg
(and KLeg/PLeg), rHO, cos (and sin when the keyword sdq is given) DVR, repectively. In
these cases the operator dq cannot be used.
The operators AA, AD, AP, AM, and NN are fro treating vibrations or bosonic systems in
second quantization. For the respective DOFs it is convenient to use a sin-DVR which starts
at zero and has a mesh width of 1. E.g.: q1 sin 12 0.0 11.0
C The built-in symbolic expressions 169

Table C.3: One-dimensional operators which require arguments. The expression x stands for the coordinate, p
can be replaced by any parameter from the PARAMETER-SECTION, or any real number. The exponent r can
be any real number. If r = 1 it is not required, e.g. q[p] and q[p]ˆ1 are synonemous.

Symbol Operator
(x r
q[p]ˆr p− p) r
qs[p]ˆr ( p − x2 )
sin[p1,p2]ˆr sinr (p1(x − p2))
cos[p1,p2]ˆr cosr (p1(x − p2))
tan[p1,p2]ˆr tanr (p1(x − p2))
exp[p1,p2]ˆr expr (p1(x − p2))
Exp[p1,p2]ˆr expr (i ∗ p1(x − p2))
texp[p1,p2]ˆr expr (p1(arccos(x) − p2))
sinh[p1,p2]ˆr sinhr (p1(x − p2))
cosh[p1,p2]ˆr coshr (p1(x − p2))
tanh[p1,p2]ˆr tanhr (p1(x − p2))
cos1[p1,p2]ˆr (cos(p1 ∗ x) − cos(p1 ∗ p2))r
exp1[p1,p2]ˆr (1 − exp(p1(x − p2)))r
expcos[p1,p2]ˆr (exp(p1 cos(x)) − exp(p1 cos(p2)))r
expcos1[p1,p2]ˆr exp(p1(cos(x) − p2))r
qtanh[p1,p2,p3]ˆr tanhr (p2(arccos(x) − p1)p3 )
motanh[p1,p2,p3,p4]ˆr tanhr (p3[1 − exp(−p1(x − p2))]p4 )
asin[p1,p2,p3]ˆr (arcsin(p1 ∗ x − p2) − p3)r
acos[p1,p2,p3]ˆr (arccos(p1 ∗ x − p2) − p3)r
atan[p1,p2,p3]ˆr (arctan(p1 ∗ x − p2) − p3)r
coschirp[p1,p2,p3]ˆr cosr (x[p2 + (p1 − p2) exp(−(x/p3)2 )])
tgauss[p1,p2]ˆr exp(−p1(arccos(x) − p2)2 )r
gauss[p1,p2]ˆr exp(−p1(x − p2)2 )r
ngauss[σ, x0 ]ˆr (2πσ 2 )−1/2 exp(−(x − x0 )2 /(2σ 2 ))r
morse[p1,p2,p3,p4,p5] Morse function. See Note 1.
morse1[p1,p2,p3,p4] Morse function. See Note 1.
CAP[p1,p2,p3,p4] −iW . See Note 2.
ACAP[p1,p2,p3,p4,p5] −iW . See Note 3.
switch1[p1,p2] 0.5 ∗ [1 − tanh(p1(x − p2))]
switch2[p1,p2] 0.5 ∗ [1 + tanh(p1(x − p2))]
step[p] Θ(x − p) Step function. See Note 4.
rstep[p] Θ(p − x) Reverse step function. See Note 4.
charfun[p1,p2] characteristic function: if x ∈ [p1,p
p2] then charfun=1 else it is zero.
regcoul[p1,p2] regularized coulomb function: 1/ (x − p1)2 + p2.
low[m, ω, s] lowering operator. See Note 5.
rai[m, ω, s] raising operator. See Note 5.
num[m, ω, s] number operator. See Note 5.
(continued)
170 C The built-in symbolic expressions

Table 3, continued.
Symbol Operator
ramorse[m, ω, Λ, α, z0 ] raising operator for Morse potential. See Note 6.
lwmorse[m, ω, Λ, α, z0 ] lowering operator for Morse potential. See Note 6.
cspot[J, K, csmax, m] centrifugal potential. See Note 7.
external1d{file} external 1D function read from file file. See Note 8.
read1d{file F} external 1D function read from file file of format F. See Note 9.
my1d[p1,p2,p3,p4,p5] user supplied routine. See Note 10.
flux[xc , power] Flux operator for Cartesian kinetic energy. xc = location
of dividing surface, power = exponent of smoothing function.
See Note 11.
pgauss[σ, x0 ] Projector |G >< G| , where G denotes a L2 normalized Gauss
G = (2πσ 2 )−1/4 exp[−(x − x0 )2 /(4σ 2 )]
shift[Ω] simple shift on the grid by Ω, ψ̃(xi ) = ψ(xi−Ω )
ψ̃(xi ) = 0 if i − Ω < 1 or i − Ω > N
For a periodic shift on a periodic grid (exp-DVR of FFT)
use shift[Ω] and shift[Ω − N ] (with Ω > 0).
ωx
vecpot[A0 , ω, Nc ] A(x) = A0 cos(ωx − Nc π) sin2 ( 2N c
). Vector potential for
linearly polarized pulse. A0 , ω and Nc are the amplitude,
frequency and number of cycles of the pulse, respectively.
ωx
Peierls[l, ω, Nc ] Peierls’ phase: exp(il cos(ωx − Nc π) sin2 ( 2N c
)).

Table C.4: One-dimensional potential energy curves.

Symbol Potential Curve


v:NO NO potential curve
v:H2 H2 potential (link lsth)
vbmkp:H2 H2 potential (link h4bmkp)
v:HO OH potential, morse function from h2o.f
v:OH OH potential (link hoosrf)
v:CH CH potential (link c2h)
v:C2 C2 potential (link c2hasec)
v:OF OF potential curve
vrho:H3 H+H2 potential in hypersphaerical coordinates, theta=π (link lsth)
vthe:H3 H+H2 potential in hypersphaerical coordinates, rho=2.484773 (link lsth)
vdj:000 expansion coeffiecent V000 for DJ H4 surface (link h4dj)
vdj:022 expansion coeffiecent V022 for DJ H4 surface (link h4dj)
vdj:224 expansion coeffiecent V224 for DJ H4 surface (link h4dj)
C The built-in symbolic expressions 171

Table C.5: Two-dimensional operators (used for molecule-surface scattering).

Symbol Operator
coshcosth[p] cosh(p ∗ cos(θ))
sinhcosth[p] sinh(p ∗ cos(θ))
cossinthcosphi[p] cos(p ∗ sin(θ) ∗ cos(φ))
cossinthsinphi[p] cos(p ∗ sin(θ) ∗ sin(φ))
sinsinthcosphi[p] sin(p ∗ sin(θ) ∗ cos(φ))
sinsinthsinphi[p] sin(p ∗ sin(θ) ∗ sin(φ))
reY[l,m] Re(Ylm (θ, φ))
imY[l,m] Im(Ylm (θ, φ))

Table C.6: Multi-dimensional C+ , C− symbols defined on truncated k1 ,k2 ,. . .,kd grid.


See also ”Hamiltonian Documentation”/”Available Surfaces”

Symbol Operator
q P P
cpp{jtot=J,dim=d} J(J + 1) − ( dj=1 kj )( dj=1 kj + 1)
q P P
cmm{jtot=J,dim=d} J(J + 1) − ( dj=1 kj )( dj=1 kj − 1)

Table C.7: Some general multi-dimensional operators. Here parameters are to be given in curly brackets.
E.g: coulomb1d{a=1.3 b=2.0 c=0.0 d=1.5}. See also ”Hamiltonian Documentation”/”Available Surfaces”

Symbol Operator
readsrf{file F} Potential values on grid points are read from file file of format F.
(F=ascii or binary. See HTML Docu. For 1D-potential use read1d).

gauss1d{width=w S} exp(−0.5((x1 − x2 )/w)2 )/( 2π w)
If the optional string S is set to periodic,
then a 2 π periodic grid is assumed.
In this case the DVR lines should read e. g.:
x1 FFT 128 2pi
x2 FFT 128 2pi
gauss2d{width=w} exp(−0.5([(x1 − x2 )/w]2 + [(y1 − y2 )/w]2 ))/(2π w2 )
p
coulomb1d{· · · } 1/ (a x1 − b x2 + c)2 + d
172 C The built-in symbolic expressions

Table C.8: One-dimensional operators for treating symmetric double-well potentials by mapping each side on an
artificial (single-set) electronic state. Note, the grid must be a sin-DVR, which, when doubled, lies symmetrically
to zero but does not contain zero. The differential operators which are truncated are firstly defined on this doubled
grid, but then projected to the working grid.

Symbol Operator Notes


Rf Rf ϕ(xi ) = ϕ(xN +1−i ) Reflection operator. (Must not be multiplied with
other operators).
Rfm Rfm ϕ(xi ) = −ϕ(xN +1−i ) Reflection operator. (Must not be multiplied with
other operators).
hKEh step*KE*step Truncated kinetic energy
hFRh step*KE*Rf*step Truncated kinetic energy times reflection
hdqh step*dq*step Truncated first derivative
hdqRh step*dq*Rf*step Truncated first derivative times reflection
dqR dq*R First derivative times reflection
dq2R dqˆ2*R Second derivative times reflection

Notes to Table C.3


All input variables [· · · ] are numbers, parameters or arithmetic expressions containing num-
bers and parameters. (See Hamiltonian-Documentation/Parameter-Section for details). The
use of units is not allowed here. Note that these symbolic expressions with parameters must
not appear in a HAMILTONIAN-SECTION. They rather have to be linked to simple symbols
(without parameters) in a LABELS-SECTION. (Compare with Example 6.4).

1. A morse curve can be given by D (exp(−α(x − x0 )) − 1)2 + E0 , where D is the


dissociation energy (depth parameter), α defines the curvature, x0 the equilibrium
position, and E0 is an energy shift parameter. If one uses the symbol morse1 these
are precisely the input parameters, i.e. [D, α, x0 , E0 ]. For the symbol morse the in-
put parameters are [D, ω, x0 , ex0 , m], where m is the mass, ω is the frequency of
the related harmonic oscillator, and ex0 is the position at which the potential is zero.
Note that ω and α are related by α2 = mω 2 /2D, while ex0 and E0 are related by
E0 = −D(exp(−α(ex0 − x0 )) − 1)2 .

2. A CAP (Complex Absorbing Potential) is an imaginary, negative potential, used to


absorb a wavepacket as it approaches the end of the grid. It is defined as −iW , where
W = η Θ(k(x − x0 )) (k(x − x0 ))n and where Θ denotes the Heaviside’s step function.
The input parameters are [x0 , η, n, k], where k is used to choose to which end of the
grid the CAP is placed: k = −1 puts the CAP at the left, and k = 1 at the right of the
grid. k = 1 is default and may be left out.

3. ACAP symbolises an automatic CAP. The ACAP is useful, when one wants to place the
initial wavepacket at a position, where it overlaps with the CAP. The ACAP remains
disabled as long as the wavepacket overlaps with the CAP. The ACAP is enabled only
when the wavepacket starts to re-enter the region where the CAP is defined. There is a
fifth parameter: timecap. If this optional parameter is set, the ACAP will remain dis-
abled at least as long as time < timecap, where time is the propagation time in fs. The
parameter timecap is useful, because the automatic enabling of the CAP may some-
times happen too early. The time, at which the ACAP is switched on, is protocoled in
C The built-in symbolic expressions 173

the log file. Use this information to set the option -lo in flux84 appropriately. When
flux84 is run, it must not evaluate matrix elements of the CAP for times, at which the
CAP is switched off.

4. The symbols step and rstep symbolise a Heaviside’s step function and the reverse of it.
I. e. step[p] = Θ(x − p) and rstep[p] = 1 − Θ(x − p) = Θ(p − x).

5. The lowering operator corresponding to a harmonic oscillator is given by


r
i mω
b= √ p+ (q − q0 ) ,
2mω 2
where p denotes the momentum operator, q denotes the position operator, m is the
mass, ω is the frequency, and q0 is the equilibrium position. The input parameters are
[m, ω, s], which means the mass m, the frequency ω, and the shift
r

s=− q0 .
2

(Note the minus sign). The corresponding raising operator is given by b† , and the
number operator by n̂ = b† b. The parameters have the same meaning as for lowering
operators. NB. The lowering, raising and number operator require the use of a simple
DVR with an ordinary first derivative, e.g. sin, HO, or exp but not FFT, rHO, Leg,
KLeg, PLeg or sphFBR.

6. The (approximate) raising/lowering operators (R/L) for a Morse Hamiltonian


 
H = p2 /(2m) + D e−2α(x−x0 ) − 2e−α(x−x0 )

are defined as
r   
~ 1 i
L= Λ− α − Λαe−α(x−x0 ) + p
2mω 2 ~
and
R = L†
p √
with ω = α 2D/m and Λ = 2Dm/~α

7. The centrifugal potential given by:


 
J(J + 1) − 2K 2
Vcent (x) = min , csmax .
2mx2

8. An arbitrary (real) 1D–function may be defined through a set of points. The points are
read from file file and are then interpolated to define a general 1D–function. The data
is in free format with one (x,y) data pair per line. Blank lines and lines which start with
a # are ignored. Currently, the x-data (called time in the code) must increase linearly,
i.e must be equally spaced.
An arbitrary number of these, with different data files, may be used in one operator.
However, when using multiple instances of the same external1d function, do this by
defining a label and referring to it in the operator rather than declaring external1d{file}
with the same file file repeatedly, as this wastes buffer memory due to duplication.
174 C The built-in symbolic expressions

9. An arbitrary (real) 1D–function may be defined through a set of points. The points
must coincide with the grid points. The potential values on the grip points are read
from file file, one value per line. The file may be in ascii or binary format. (binary is de-
fault). Give ascii or binary as second argument after file. (For multi-dimensional
surfaces use readsrf ).

10. A (real) 1D–function may be defined through a user written subroutine. Edit the sub-
routine my1d on $MCTDH DIR/source/opfuncs/func1d.F .

11. The flux operator [Θ, T ] is set up in a sine or exponential basis and then trans-
formed to DVR representation. This operator might be used with eigenf to pro-
duce flux-eigenstates as initial wavefunctions. To regularize the flux operator and
to make its eigenfunctions more localized, it is multiplied from right and left with
[cos(πp/2pmax ) cosh(πp/2pmax )]power . The exponent power may be zero or any pos-
itive real number. power = 1 is recommended.

Special operators
There is a number of operators especially defined for the methyl-iodine (CH3I) system. Their
labels all start with MI: . See opfuncs/ch3i.f and opfuncs/ch3igrd.f for further information.

Non-adiabatic operators
If the system contains more than one electronic state, the Hamiltonian can be written in
matrix form, i.e.  
H11 H12 . . .
Ĥ =  H21 H22 . . . 
 
(C.1)
.. .. ..
. . .
To input such a form, the symbols in Table C.9 can be used. Thus the operator
     
1 0 0 1 0 1
h1 + h2 + h3 (C.2)
0 1 1 0 0 0

can be represented symbolically as

modes | X | el
1.0 | h_1 | 1
1.0 | h_2 | S1&2
1.0 | h_3 | Z1&2

See also Sec. 10 for more examples.

Table C.9: Matrix operator symbols, used for an electronic degree of freedom.

Symbol Operator
Sf&i Symmetric matrix element
Zf&i Unsymmetric matrix element
1 Unit matrix
Appendix D

Structure of the WF array

psi(dgldim)
z }| {
| Ψ |

psi(adim) psi(totphidim)
z }| {z }| {
| A | ϕ |
zpsi(1) zetf(1,1)

psi(block(s)) psi(phidim(m))
z }| { z }| {
| ··· | A(s) | ··· | ··· | ϕ(m) | ··· |
zpsi(s) zetf(m,1)

psi(subdim(m),dim(m,s))
z }| {
| ··· | ··· | | ϕ(m,s) | | ··· |
zetf(m,s)

Figure D.1: The structure of the wave function

175
Appendix E

Installing the MCTDH package

The installation of the MCTDH package is is very easy if you install it on a PC with a not too
old Linux system. On more fancier machines one may need to edit the compile scripts (to set
compiler options appropriately) and/or install some open-source software like gnuplot or a
GNU make. It is essential to have a bash shell (version 3.x or 4.x is recommended, but lower
versions may also work) and it is highly recommended that you work under bash, although it
is possible to work under C-shell or kshell as well. A bash, however, must exist as there are
several bash scripts. Moreover, there are also several python scripts for which python 3 has
to be installed. However, the optimal control scripts on $MCTDH DIR/bin/python/OCT still
require python 2.4 or higher (but NOT python 3).
One should begin with creating a directory MCTDH which eventually will contain all the
MCTDH stuff, but not – at least I prefer to do so – the output of production runs. (Ap-
ple OSX users should call this directory MCTDHdir, because OSX does not distinguish
between upper and lower case.) Move the MCTDH tar-ball, which is downloaded from
http://mctdh.uni-hd.de/packages/ to the MCTDH directory and unzip and un-
tar it. I. e.
mkdir /home/muser/MCTDH
cd /home/muser/MCTDH
mv <path>/mctdh86.x.tgz .
tar xzvf mctdh86.x.tgz

Here it is assumed that your login name is muser and that you have a GNU tar. If you
do not have a GNU tar you first have to gunzip the tar-ball and then untar it (without the
option z). The symbol x stands for the revision number of the particular package which was
downloaded. When the tar command is finished, there should exist a directory mctdh86.x
under /home/muser/MCTDH .
If you are familiar with Subversion (svn), it will be more convenient to download the
code form the svn-repository of the Heidelberg MCTDH package. In fact, we strongly rec-
ommend to download via SVN, as it makes updating of the code much simpler. For details
see Appendix F.
After the code is downloaded, move to the directory mctdh86.x/install and run
check system :
cd mctdh86.x/install
./check_system

This will create an output like

176
E Installing the MCTDH package 177

**********************************************************************
**************** ------- CHECK SYSTEM ------- ****************
**********************************************************************

Mon Dec 9 14:42:09 CET 2013

The path of the MCTDH-directory is: /home/dieter/MCTDH/mctdh86.2

System : Linux
Platform : i686
Operating-System : GNU/Linux
Machine : cauchy
Processor : unknown
Kernel : Linux

This is a 32-bit system.

These are the variables determined by platform.cnf


MCTDH_PLATFORM = i686
MCTDH_COMPILER = gfortran
MCTDH_GFORTRAN_VERSION = 4.7.2

These are the default compilers


Fortran compiler: gfortran
C compiler : gcc
make command : make

If you want to use other compilers please edit platform.cnf* and


possibly also compile.cnf* (or use the -c option when compiling).

The Fortran compiler gfortran is /apps/gcc-4.7/bin/gfortran


The C compiler gcc is /apps/gcc-4.7/bin/gcc
The make command make is /usr/bin/make
Congratulation, you have a GNU make.

GNUPLOT exist on your system: gnuplot 4.4 patchlevel 0

Python exist on your system: Python 2.6.6

Your bash is: GNU bash, version 4.1.5(1)-release

Distributed memory parallelization with MPI seems to be possible!


For this use Fortran compiler consistent with:
gcc version 4.7.2 (GCC)

Shared memory parallelization with POSIX-Threads seems to be possible!

The use of the NUMA library for the shared memory parallelization
with POSIX-Threads seems to be possible!
Compile with "-u" option to enable the use of NUMA. (See "compile -h").

The standard installation should work without problems.


If not already done, you should now run "./install_mctdh".
178 E Installing the MCTDH package

**********************************************************************
*************** ----- Finished System Check ----- ***************
**********************************************************************

This is just for fun, but if you read the message ”The standard installation should work
without problems”, then there should be no problems. By the way, please note that the GNU
compilers GCC 3.4.0 – 3.4.3 and GCC 4.0.0 – 4.1.0 are buggy, DO NOT USE THEM. We
recommend to use GNU-GCC 4.8.0 or higher. For the 8.5-branch, where we start to use
some fancy features of FORTRAN95/2003 we recommend to use even higher versions, e.g.
5.2 or higher. Next to GNU, the intel, pgi, and some other compilers are also fine. See
install/compile.cnf for possible compilers. (You may edit the compile scripts and add new
compilers to it).
Please read the README file of the install directory and start with the installation, i. e.
type

./install_mctdh

while being in the install directory. The script will ask you several questions and in general
you should answer yes, i. e. type y. Please, try to understand all the questions before giving
an answer. If you think you have made a wrong choice, you can always stop the installation
process with the ctrl c command and then start anew. The install mctdh script LaTeX
compiles the guide, compiles the code, sets some environment variables, and writes the path
of the MCTDH directory to your ./bashrc file (or some other configuration file if you are
not running under bash). Note that you have to source your ./bashrc (or other configuration)
file to activate the changes. The path to the MCTDH directory is stored in the environment
variable MCTDH DIR, to inspect it type echo $MCTDH DIR. But it is more convenient to
run the script menv, which writes a list of all MCTDH environment variables to screen.
If you are running under bash the install script will also create the ∼/.mctdhrc file. This en-
ables the powerful cdm command (try cdm -h) and sets a link ∼/mctdh which points to the
currently active MCTDH directory, in the present case to /home/muser/MCTDH/mctdh86.x .
(One may install several MCTDH packages, but only one will be active. Use the script
minstall to switch between the different versions.)
If you want to make use of the potential energy surfaces library, move the file addsurf.tgz
to your MCTDH directory, i. e. in our example to /home/muser/MCTDH, and untar
it. Then you should edit the ∼/.mctdhrc. In this case simply remove the # in front of
export MCTDH ADDSURF and source .mctdhrc to activate this change. Similarly, one can
set environment variables in .mctdhrc which point to the MCTDH backup and elk directories
(for users who want to change the code). Use the script mklinks to set a link to the PES
requested. However, one should do so only when a PES is needed. After a PES is linked to
the $MCTDH DIR/source/surfaces directory, one has to compile mctdh or potfit with the -i
option, e. g. execute the commands

mklinks h4bmkp
compile -i h4bmkp potfit

before running potfit86 to bring the BMKP surface of the H4 system to product form.
Load the URL file:///home/muser/mctdh/doc/index.html into your
browser to inspect the HTML on-line documentation. Bookmark this page! A simple but
quick help is provided through the script mhelp. It briefly explains the keywords of the input
file. Try mhelp -h. (All MCTDH scripts and programs know the help option -h). If you
want to inspect the code, try the scripts mcb, mcg, mcl, and phelp.
E Installing the MCTDH package 179

You may go to the AdvancedUser directory (e. g. type cdm Ad) and execute make there
(read the README file first). This will give you access to additional scripts and routines
(mcalc is quite useful).
There are four compile-configuration files on the install directory: compile.cnf le,
compile.cnf be, compile.cnf lenp, and compile.cnf benp. The letters le and be
stand for little endians and big endians, respectively, np denotes
no parallelization. The install mctdh script links one of these four configura-
tion files to compile.cnf by setting a soft link, the default choice is compile.cnf le. The file
compile.cnf is then read by the compile script which is used to compile individual programs
(e. g. compile mctdh) or the full package (compile all). If your compiler does not
support pthreads, you have to choose compile.cnf lenp or compile.cnf benp. We have tried
to find reasonable options for the compilers (see in particular MCTDH FFLAGS OPT), but
we cannot account for any hardware and software installation on which MCTDH may run.
Hence, depending on your particular hardware/software installation, the choice of compiler
options may not be optimal. (To inspect the compiler option run compile config). Feel
free to adjust the compiler options to your particular installation. If you add a new compiler,
please send us the updated compile.cnf file.
If you are working on a system where computers of different kind (32 bit / 64 bit, Linux
/ other Unix (including Mac OS X)) are interconnected by a common file system, you may
store and install the MCTDH package only once, but run compile on each kind. MCTDH
is smart and will load automatically the correct executables. Run menv on interconnected
computers of different kind and you will see that the paths are set differently.
In general, each MCTDH user works with his own package. This allows him to change
the code according to his demand. However, sometimes it may be wanted that several users
have access to the same package. In this case there is a master-user who installs the package
and clients who only need to add the line
source $MCTDH_DIR/install/MCTDH_client

to their .bashrc. The file MCTDH client is generated during installation. Of course,
$MCTDH DIR must be replaced by the full path of the MCTDH directory, which for the
present example reads /home/muser/MCTDH/mctdh86.x. Alternatively, the clients may sim-
ply copy the file MCTDH client to their .bashrc.
If the automatic detection of platform and compiler does not work, one has to edit the
platform.cnf.def script. Around line 65, platform.cnf.def reads:

#-----------------------------------------------------------------------
# SET MACHINE-DEPENDENT OPTIONS
#-----------------------------------------------------------------------

system=‘uname -s‘
## system=MYSYSTEM # Incomment, if automatic dection doesnt work.
case $system in
MYSYSTEM) # Here you may set the variables by hand.
MCTDH_PLATFORM= # Please set! (try ‘uname -n‘ or ‘uname -m‘)
MCTDH_COMPILER= # Please set! (if not listed in compile.cnf, you
;; # have to edit compile.cnf as well.)

Change this to e. g.:


#-----------------------------------------------------------------------
# SET MACHINE-DEPENDENT OPTIONS
180 E Installing the MCTDH package

#-----------------------------------------------------------------------

system=‘uname -s‘
system=MYSYSTEM # Incomment, if automatic dection doesnt work.
case $system in
MYSYSTEM) # Here you may set the variables by hand.
MCTDH_PLATFORM=cruncher
MCTDH_COMPILER=pgf77
;;

This is, of course, just an example. One can give any name to MCTDH PLATFORM, a con-
venient choice is the output of uname -n or uname -m. The symbol which is given to
MCTDH COMPILER must be listed in the compile.cnf file. If one wants to use a compiler,
which is not listed there, one has to edit compile.cnf to add the new compiler. (Note that
during installation one of the files compile.cnf ⋆ is copied to compile.cnf, where ⋆ stand for
le, be, lenp, or benp. Hence one may whish to edit those files as well.)
Finally, let us summarize the commands you now should be familiar with: menv, compile,
mhelp, cdm, and, if you use a PES from addsurf, mklinks. Try the help option -h and in-
spect the HTML on-line documentation “The Analyse Programs / Utility Scripts” to learn
more about the utility scripts. If you want to inspect the code, make yourself familiar with
mcb, mcg, mcl, and phelp. There is also a backup facility and an automatic program test
(Elk Test), see the HTML on-line documentation for details. For additional information on
the install process see the page “Installation and Compilation” of the HTML on-line docu-
mentation.
When the installation is completed, it is advisable to work through the tutorial (Sec. 2).
A more extended tutorial can be downloaded from the packages site (lab.session.tgz) or
via SVN (svnm checkout $SVNM/lab-session/ ./lab-session). For the
definitions of svnm and SVNM see Appendix F

A final remark on Apple computers running under Mac OS x (Darwin) should be


made. The MCTDH versions 8.4.16 and 8.5.9 or later install painlessly on a Mac
(MacOS 10.6, Snow Leopard or later) after some additional software is installed.
One needs Apple’s Xcode (to obtain make), the GNU-compilers gcc and gfortran
with version GCC-5.2.x or higher, and gnuplot. Moreover, after installing the open-
MPI software, one can use MCTDH with MPI parallelization. For more details see:
Installation and Compilation / Installation Problems (Linux, Mac OS X)
on the HTML-documentation.
Appendix F

The svn-repository of the Heidelberg


MCTDH package

We use Subversion, or short svn, for version control of the MCTDH package. As
svn is likely to be available on your computer installation, we open the possibil-
ity to download the MCTDH package directly from our svn-repository, rather than
from the MCTDH web-site http://mctdh.uni-hd.de/packages/ . If you are new to svn
you may wish to consult the svn-book, which can be downloaded from the URL
http://svnbook.red-bean.com/en/1.7/svn-book.pdf .
To access the MCTDH svn-repository, a username and password are needed. These are
given in the Letter to the new MCTDH user and are the same as the ones requested to access
the MCTDH web-site http://mctdh.uni-hd.de/packages/ .

F.1 Useful svn commands


In order to abbreviate the commands, we suggest to add the following lines to your .bashrc
or .alias file.
alias svnm="svn --username <user> --password <psswd> --non-interactive"
export SVNM="svn://www.pci.uni-heidelberg.de:/mctdh"
where <user> and <psswd> are to be replaced with the username and password given in
the Letter to the new MCTDH user.
To get an overview on what is available via SVN submit the command:
svnm list $SVNM
This will show the output
addsurf/
bibtex/
lab-session/
mctdh83/
mctdh84/
mctdh85/
mctdh86/

181
182 F The svn-repository of the Heidelberg MCTDH package

And to get an overview on the available releases of the mctdh 8.4 branch, submit the
command:
svnm list $SVNM/mctdh86/releases/
This will provide an output similar to
8.6.1/
8.6.1.1/
8.6.2/
8.6.3/
8.6.4/
where, of course, one may exchange mctdh86 with mctdh83, mctdh84, or mctdh85 to list the
contents of those directories.

If you want to download version 8.6.4 (this is an example, please download the most re-
cent version), type
svnm export $SVNM/mctdh86/releases/8.6.4/ mctdh86.4
where the directory mctdh86.4 will be created by svn, it should not previously exist. Of
course, one may give any name to the final directory and may give its full path, if it
is to be created in a directory different from the current one. The svn export com-
mand will provide you with exactly the same data as found on the mctdh86.4.tgz file of
http://mctdh.uni-hd.de/packages/ .

A better alternative is to use


svnm checkout $SVNM/mctdh86/releases/8.6.4/ mctdh86.4
The difference is that with this command additionally a couple of .svn files will be copied to
the final directory, which almost doubles the size of the latter. However, the .svn files give
you access to most of the svn-commands. E.g. moving (cd) the the mctdh-directory (here
mctdh86.4) and submitting the command
svnm status
will tell you which files are modified or added with respect to the repository. Or
svnm diff --old=$SVNM/mctdh86/releases/8.6.4/ --new=.
will display the differences between your code and the one on the repository. (You may pipe
this output to less). If you would like to have a line by line comparison of the two versions,
you may add the option --diff-cmd kdiff3 to the command above.

If you have already checked-out a previous version and want to merge with a newer one,
type e.g.
svnm merge $SVNM/mctdh86/releases/8.6.3/ $SVNM/mctdh83/releases/8.4.4/
This command merges the differences between release 8.6.3 and 8.6.4 to your mctdh-
directory, which must be the current directory. Here we are assuming that you are working
with release 8.4.3 and are updating to 8.6.4 .
F.1 Useful svn commands 183

Moreover, rater than downloading a release, one may download the current developers
code
svnm checkout $SVNM/mctdh86/trunk/ mctdh86
This makes life easier, as one can simply run
svnm update
to merge with the most recent changes. However, this way is recommended more for experi-
enced users, as the current developers code may not be bug-free. To be on the safe side, one
may run the command
svnm cat $SVNM/mctdh86/trunk/changelog | less
and then update to an appropriate revision by setting the option -r<number>.
Finally, if one is interested in the branches 8.3, 8.4 or 8.5 rather than 8.6 one simply
replaces the version numbers accordingly.
To download the lab-session and/or the addsurf directory type
svnm checkout $SVNM/lab-session/ ./lab-session
and
svnm checkout $SVNM/addsurf/ ./addsurf
These commands download to the current directory. One can, of course, add a path to down-
load to another directory, e.g.
svnm checkout $SVNM/addsurf/ /home/muser/MCTDH/addsurf/
The final download directory should not exist, SVN will create it.
List of MCTDH references

[1] M. H. Beck, A. Jäckle, G. A. Worth, and H.-D. Meyer. The multi-configuration time-dependent Hartree
(MCTDH) method: A highly efficient algorithm for propagating wave packets. Phys. Rep 324 (2000),
1–105.
[2] H.-D. Meyer, U. Manthe, and L. S. Cederbaum. The multi-configurational time-dependent Hartree ap-
proach. Chem. Phys. Lett. 165 (1990), 73–78.
[3] O. Vendrell and H.-D. Meyer. Multilayer multiconfiguration time-dependent Hartree method: Imple-
mentation and applications to a Henon-Heiles Hamiltonian and to pyrazine. J. Chem. Phys. 134 (2011),
044135.
[4] U. Manthe, H.-D. Meyer, and L. S. Cederbaum. Wave-packet dynamics within the multiconfiguration
Hartree framework: General aspects and application to NOCl. J. Chem. Phys. 97 (1992), 3199–3213.
[5] H.-D. Meyer and G. A. Worth. Quantum molecular dynamics: Propagating wavepackets and density
operators using the multiconfiguration time-dependent Hartree (MCTDH) method. Theor. Chem. Acc.
109 (2003), 251–267.
[6] H.-D. Meyer, F. Gatti, and G. A. Worth, Eds. Multidimensional Quantum Dynamics: MCTDH Theory
and Applications. Wiley-VCH, Weinheim, 2009.
[7] H.-D. Meyer. Studying molecular quantum dynamics with the multiconfiguration time-dependent Hartree
method. WIREs: Comput. Mol. Sci. 2 (2012), 351–374.
[8] G. A. Worth, H.-D. Meyer, and L. S. Cederbaum. The effect of a model environment on the S2 absorption
spectrum of pyrazine: A wavepacket study treating all 24 vibrational modes. J. Chem. Phys. 105 (1996),
4412.
[9] G. A. Worth, H.-D. Meyer, and L. S. Cederbaum. Relaxation of a system with a conical intersection
coupled to a bath: A benchmark 24-dimensional wavepacket study treating the environment explicitly.
J. Chem. Phys. 109 (1998), 3518–3529.
[10] A. Raab, G. Worth, H.-D. Meyer, and L. S. Cederbaum. Molecular dynamics of pyrazine after excitation
to the S2 electronic state using a realistic 24-mode model Hamiltonian. J. Chem. Phys. 110 (1999), 936–
946.
[11] G. A. Worth, H.-D. Meyer, and L. S. Cederbaum. State filtering by a bath: Up to 24 mode numerically
exact wavepacket propagations. Chem. Phys. Lett. 299 (1999), 451.
[12] A. Jäckle and H.-D. Meyer. Time-dependent calculation of reactive flux employing complex absorbing
potentials: General aspects and application within MCTDH. J. Chem. Phys. 105 (1996), 6778.
[13] A. Jäckle and H.-D. Meyer. Calculation of H+H2 and H+D2 reaction probabilities within the multicon-
figuration time-dependent Hartree approach employing an adiabatic correction scheme. J. Chem. Phys.
109 (1998), 2614.
[14] M. H. Beck and H.-D. Meyer. Extracting accurate bound-state spectra from approximate wave packet
propagation using the filter-diagonalization method. J. Chem. Phys. 109 (1998), 3730–3741.
[15] M. H. Beck and H.-D. Meyer. Efficiently computing bound-state spectra: A hybrid approach of the multi-
configuration time-dependent Hartree and filter-diagonalization methods. J. Chem. Phys. 114 (2001),
2036–2046.
[16] T. Sommerfeld, H.-D. Meyer, and L. S. Cederbaum. Potential energy surface of the CO−
2 anion. Phys.
Chem. Chem. Phys. 6 (2004), 42–45.
[17] D. J. Tannor, V. Kazakov, and V. Orlov. Control of photochemical branching: Novel procedures for
finding optimal pulses and global upper bounds. In Time Dependent Quantum Molecular Dynamics,
J. Broeckhove and L. Lathouwers, Eds. Plenum, New York, 1992, pp. 347–360.

184
List of MCTDH references 185

[18] W. Zhu and H. Rabitz. A rapid monotonically convergent iteration algorithm for quantum optimal control
over the expectation value of a positive definite operator. J. Chem. Phys. 109 (1998), 385.
[19] J. P. Palao and R. Kosloff. Optimal control theory for unitary transformations. Phys. Rev. A 68 (2003),
062308.
[20] L. Wang, H.-D. Meyer, and V. May. Femtosecond laser pulse control of multidimensional vibrational
dynamics: Computational studies on the pyrazine molecule. J. Chem. Phys. 125 (2006), 014102.
[21] M. Schröder, J.-L. Carreon-Macedo, and A. Brown. Implementation of an iterative algorithm for optimal
control of molecular dynamics into MCTDH. Phys. Chem. Chem. Phys. 10 (2008), 850.
[22] M. Schröder and A. Brown. Realization of the cnot quantum gate operation in 6d ammonia using the
oct-mctdh approach. J. Chem. Phys. 131 (2009), 034101.
[23] M. Schröder and A. Brown. Generalized filtering of laser fields in optimal control theory: application to
symmetry filtering of quantum gate operations. New J. Phys. 11 (2009), 105031.
[24] H.-D. Meyer, F. Le Quéré, C. Léonard, and F. Gatti. Calculation and selective population of vibra-
tional levels with the Multiconfiguration Time-Dependent Hartree (MCTDH) algorithm. Chem. Phys. 329
(2006), 179–192.
[25] L. J. Doriol, F. Gatti, C. Iung, and H.-D. Meyer. Computation of vibrational energy levels and eigenstates
of fluoroform using the multiconfiguration time-dependent Hartree method. J. Chem. Phys. 129 (2008),
224109.
[26] U. V. Riss and H.-D. Meyer. Investigation on the reflection and transmission properties of complex
absorbing potentials. J. Chem. Phys. 105 (1996), 1409.
[27] D. Mendive-Tapia and H.-D. Meyer. Regularizing the MCTDH equations of motion through an optimal
choice on-the-fly (i.e. spawning) of unoccupied single-particle functions. J. Chem. Phys. 153 (2020),
234114.
[28] M. H. Beck and H.-D. Meyer. An efficient and robust integration scheme for the equations of motion of
the multiconfiguration time-dependent Hartree (MCTDH) method. Z. Phys. D 42 (1997), 113–129.
[29] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Ultracold few-boson systems in a double-well trap. Phys.
Rev. A 74 (2006), 053612.
[30] O. Vendrell, F. Gatti, and H.-D. Meyer. Full dimensional (15D) quantum-dynamical simulation of the pro-
tonated water dimer II: Infrared spectrum and vibrational dynamics. J. Chem. Phys. 127 (2007), 184303.
[31] A. Jäckle and H.-D. Meyer. Product representation of potential energy surfaces. J. Chem. Phys. 104
(1996), 7974.
[32] A. Jäckle and H.-D. Meyer. Product representation of potential energy surfaces II. J. Chem. Phys. 109
(1998), 3772.
[33] S. Sukiasyan. Investigation of three– and four–atomic reactive scattering problems with the help of the
multiconfiguration time-dependent Hartree method. PhD thesis, Universität Heidelberg, 2005.
[34] F. Gatti, F. Otto, S. Sukiasyan, and H.-D. Meyer. Rotational excitation cross sections of para-H2 + para-
H2 collisions. A full-dimensional wave packet propagation study using an exact form of the kinetic energy.
J. Chem. Phys. 123 (2005), 174311.
[35] M. Schröder and H.-D. Meyer. Transforming high-dimensional potential energy surfaces into sum-of-
products form using Monte Carlo methods. J. Chem. Phys. 147 (2017), 064105.
[36] M. Ndong, L. Joubert Doriol, H.-D. Meyer, A. Nauts, F. Gatti, and D. Lauvergnat. Automatic com-
puter procedure for generating exact and analytical kinetic energy operators based on the polyspherical
approach. J. Chem. Phys. 136 (2012), 034107.
[37] M. Ndong, A. Nauts, L. Joubert-Doriol, H.-D. Meyer, F. Gatti, and D. Lauvergnat. Automatic com-
puter procedure for generating exact and analytical kinetic energy operators based on the polyspherical
approach: general formulation and removal of singularities. J. Chem. Phys. 139 (2013), 204107.
[38] U. Manthe and F. Huarte-Larrañaga. Partition functions for reaction rate calculations: statistical sampling
and MCTDH propagation. Chem. Phys. Lett. 349 (2001), 321–328.
[39] U. Manthe. Mehrdimensionale Wellenpaketdynamik nach elektronischen Anregungen. PhD thesis, Uni-
versität Heidelberg, 1991.
[40] U. Manthe, H.-D. Meyer, and L. S. Cederbaum. Multiconfigurational time-dependent Hartree study of
complex dynamics: Photodissociation of NO2 . J. Chem. Phys. 97 (1992), 9062–9071.
186 List of MCTDH references

[41] U. Manthe and A. D. Hammerich. Wavepacket dynamics in five dimensions. Photodissociation of methyl
iodide. Chem. Phys. Lett. 211 (1993), 7.
[42] H.-D. Meyer, U. Manthe, and L. S. Cederbaum. The multi-configuration Hartree approach. In Numerical
Grid Methods and their Application to Schrödinger’s Equation (Dordrecht, 1993), C. Cerjan, Ed., Kluwer
Academic Publishers, pp. 141–152.
[43] A. P. J. Jansen. A multiconfiguration time-dependent Hartree approximation based on natural single-
particle states. J. Chem. Phys. 99 (1993), 4055–4063.
[44] U. Manthe. Comment on “A multiconfiguration time-dependent Hartree approximation based on natural
single-particle states”. J. Chem. Phys. 101 (1994), 2652.
[45] A. P. J. Jansen. Response to “Comment on ‘A multiconfiguration time-dependent Hartree approximation
based on natural single-particle states”’. J. Chem. Phys. 101 (1994), 2654.
[46] A. D. Hammerich, U. Manthe, R. Kosloff, H.-D. Meyer, and L. S. Cederbaum. Time-dependent photodis-
sociation of methyl iodide with five active modes. J. Chem. Phys. 101 (1994), 5623.
[47] J.-Y. Fang and H. Guo. Multiconfiguration time-dependent hartree studies of the CH3 I/MgO photodisso-
ciation dynamics. J. Chem. Phys. 101 (1994), 5831–5840.
[48] J.-Y. Fang and H. Guo. Four-dimensional quantum dynamics of the CH3 I/MgO photodissociation. Chem.
Phys. Lett. 235 (1995), 341–346.
[49] J.-Y. Fang and H. Guo. Multiconfiguration time-dependent Hartree studies of the Cl2 Ne vibrational
predissociation dynamics. J. Chem. Phys. 102 (1995), 1944.
[50] L. Liu, J.-Y. Fang, and H. Guo. How many configurations are needed in a time-dependent Hartree
treatment of the photodissociation of ICN? J. Chem. Phys. 102 (1995), 2404.
[51] J.-Y. Fang and H. Guo. Quantum dynamics within the multiconfiguration time-dependent Hartree ap-
proximation. J. Mol. Struct. (Theochem) 341 (1995), 201–215.
[52] A. Jäckle and H.-D. Meyer. Reactive scattering using the multiconfiguration time-dependent Hartree
approximation: General aspects and application to the collinear H+H2 → H2 +H reaction. J. Chem. Phys.
102 (1995), 5605.
[53] A. P. J. Jansen and H. Burghgraef. MCTDH study of CH4 dissociation on Ni(111). Surf. Sci. 344 (1995),
149–158.
[54] A. Capellini and A. P. J. Jansen. Convergence study of multi-configuration time-dependent hartree simu-
lations: H2 scattering from LiF(001). J. Chem. Phys. 104 (1996), 3366–3372.
[55] U. Manthe and F. Matzkies. Iterative diagonalization within the multi-configurational time-dependent
Hartree approach: Calculation of vibrationally excited states and reaction rates. Chem. Phys. Lett. 252
(1996), 71.
[56] U. Manthe. A time-dependent discrete variable representation for (multi-configuration) Hartree methods.
J. Chem. Phys. 105 (1996), 6989.
[57] M. Ehara, H.-D. Meyer, and L. S. Cederbaum. Multi-configuration time-dependent Hartree (MCTDH)
study on rotational and diffractive inelastic molecule-surface scattering. J. Chem. Phys. 105 (1996), 8865–
8877.
[58] K. Museth and G. D. Billing. Generalization of the multiconfigurational time-dependent Hartree method
to nonadiabatic systems. J. Chem. Phys. 105 (1996), 9191.
[59] F. Matzkies and U. Manthe. A multi-configurational time-dependent Hartree approach to the direct
calculation of thermal rate constants. J. Chem. Phys. 106 (1997), 2646.
[60] T. Gerdts and U. Manthe. The resonance Raman spectrum of CH3 I: An application of the MCTDH
approach. J. Chem. Phys. 107 (1997), 6584.
[61] A. Jäckle. Die zeitabhängige Multikonfigurations-Hartree Methode und ihre Anwendung auf reaktive
Streuprozesse. PhD thesis, Universität Heidelberg, 1997.
[62] H.-D. Meyer, G. A. Worth, and J.-Y. Fang. Comment on “Generalization of the multiconfigurational
time-dependent Hartree method to nonadiabatic systems” [J. Chem. Phys. 105, 9191 (1996)]. J. Chem.
Phys. 109 (1998), 349.
[63] K. Museth and G. D. Billing. Response to “Comment on ‘Generalization of the multiconfigurational
time-dependent Hartree method to nonadiabatic systems’ ” [J. Chem. Phys. 109, 349 (1998)]. J. Chem.
Phys. 109 (1998), 351.
List of MCTDH references 187

[64] H.-D. Meyer. Multiconfiguration time-dependent Hartree method. In The Encyclopedia of Computational
Chemistry (Chichester, 1998), P. v. R. Schleyer, N. L. Allinger, T. Clark, J. Gasteiger, P. A. Kollman, H. F.
Schaefer III, and P. R. Schreiner, Eds., vol. 5, John Wiley and Sons, pp. 3011–3018.
[65] R. Milot and A. P. J. Jansen. Ten-dimensional wave packet simulations of methane scattering. J. Chem.
Phys. 109 (1998), 1966–1975.
[66] F. Matzkies and U. Manthe. Accurate quantum calculations of thermal rate constants employing MCTDH:
H2 +OH → H+H2 O and D2 +OH → D+DOH. J. Chem. Phys. 108 (1998), 4828.
[67] F. Matzkies and U. Manthe. Accurate reaction rate calculations including internal and rotational motion:
A statistical MCTDH approach. J. Chem. Phys. 110 (1999), 88.
[68] A. Jäckle, M.-C. Heitz, and H.-D. Meyer. Reaction cross sections for the H+D2 (ν = 0, 1) system for col-
lision up to 2.5 eV: A multiconfiguration time-dependent Hartree wave-packet propagation study. J. Chem.
Phys. 110 (1999), 241–248.
[69] I. Burghardt, H.-D. Meyer, and L. S. Cederbaum. Approaches to the approximate treatment of complex
molecular systems by the multiconfiguration time-dependent Hartree method. J. Chem. Phys. 111 (1999),
2927–2939.
[70] A. Raab, I. Burghardt, and H.-D. Meyer. The multiconfiguration time-dependent Hartree method gener-
alized to the propagation of density operators. J. Chem. Phys. 111 (1999), 8759–8772.
[71] R. Milot and A. P. J. Jansen. Energy distribution analysis of the wave packet simulations of CH4 and CD4
scattering. Surf. Sci. 452 (2000), 179–190.
[72] R. Milot and A. P. J. Jansen. Bond breaking in vibrationally excited methane on transition-metal catalysts.
Phys. Rev. B 61 (2000), 15657–15660.
[73] G. A. Worth. Accurate wave packet propagation for large molecular systems: The multi-configuration
time-dependent Hartree (MCTDH) method with selected configurations. J. Chem. Phys. 112 (2000),
8322–8329.
[74] A. Raab. Untersuchung der Dynamik quantenmechanischer Systeme in Wechselwirkung mit Umgebungen
mit Hilfe der zeitabhängigen Multikonfigurations-Hartree-Methode. PhD thesis, Universität Heidelberg,
2000.
[75] M. H. Beck. Berechnung von Schwingungsrotationsspektren mit Hilfe der zeitabhängigen Multikonfigu-
rations-Hartree- und der Filter-Diagonalisierungs-Methode. PhD thesis, Universität Heidelberg, 2000.
[76] A. Raab. On the Dirac-Frenkel/McLachlan variational principle. Chem. Phys. Lett. 319 (2000), 674–678.
[77] A. Raab and H.-D. Meyer. Multi-configurational expansions of density operators: Equations of motion
and their properties. Theor. Chem. Acc. 104 (2000), 358–369.
[78] A. Raab and H.-D. Meyer. A numerical study on the performance of the multiconfiguration time-
dependent Hartree method for density operators. J. Chem. Phys. 112 (2000), 10718–10729.
[79] F. Huarte-Larrañaga and U. Manthe. Full dimensional quantum calculations of the CH4 +H → CH3 +H2
reaction rate. J. Chem. Phys. 113 (2000), 5115.
[80] U. Manthe and F. Matzkies. Rotational effects in the H2 +OH → H+H2 O reaction rate: Full-dimensional
close-coupling results. J. Chem. Phys. 113 (2000), 5725.
[81] F. Matzkies and U. Manthe. Combined iterative diagonalization and statistical sampling in accurate
reaction rate calculations: Rotational effects in O+HCl → OH+Cl. J. Chem. Phys. 112 (2000), 130.
[82] H. Wang. Basis set approach to the quantum dissipative dynamics: Application of the multiconfiguration
time-dependent Hartree method to the spin-boson problem. J. Chem. Phys. 113 (2000), 9948.
[83] M.-C. Heitz and H.-D. Meyer. Rotational and diffractive inelastic scattering of a diatom on a corrugated
surface: A multiconfiguration time-dependent Hartree (MCTDH) study on N2 /LiF(001). J. Chem. Phys.
114 (2001), 1382–1392.
[84] G. A. Worth. Quantum dynamics using pseudo-particle trajectories: A new approach based on the multi-
configuration time-dependent Hartree method. J. Chem. Phys. 114 (2001), 1524–1532.
[85] S. Sukiasyan and H.-D. Meyer. On the effect of initial rotation on reactivity. A multi-configuration time-
dependent Hartree (MCTDH) wave-packet propagation study on the H+D2 and D+H2 reactive scattering
systems. J. Phys. Chem. A 105 (2001), 2604–2611.
[86] F. Gatti, M. H. Beck, G. A. Worth, and H.-D. Meyer. A hybrid approach of the multi-configuration time-
dependent Hartree and filter-diagonalisation methods for computing bound-state spectra. Application to
HO2 . Phys. Chem. Chem. Phys. 3 (2001), 1576–1582.
188 List of MCTDH references

e2 E B
[87] S. Mahapatra, G. A. Worth, H. D. Meyer, L. S. Cederbaum, and H. Köppel. The A e 2 B2 photoelectron
bands of allene beyond the linear coupling scheme: An ab initio dynamical study including all fifteen
vibrational modes. J. Phys. Chem. A 105 (2001), 5567–5576.
[88] C. Cattarius, G. A. Worth, H.-D. Meyer, and L. S. Cederbaum. All mode dynamics at the conical inter-
section of an octa-atomic molecule: Multi-configuration time-dependent Hartree (MCTDH) investigation
on the butatriene cation. J. Chem. Phys. 115 (2001), 2088–2100.
[89] H. Wang, M. Thoss, and W. Miller. Systematic convergence in the dynamical hybrid approach for complex
systems: A numerical exact methodology. J. Chem. Phys. 115 (2001), 2979.
[90] M. Thoss, H. Wang, and W. H. Miller. Self-consistent hybrid approach for complex systems: Application
to the spin-boson model with debye spectral density. J. Chem. Phys. 115 (2001), 2991.
[91] C. Meier and U. Manthe. Full-dimensional quantum study of the vibrational predissociation of the I2 ...Ne2
cluster. J. Chem. Phys. 115 (2001), 5477.
[92] F. Huarte-Larrañaga and U. Manthe. Vibrational excitation in the transition state: The CH4 +H →
CH3 +H2 reaction rate constant in an extended temperature interval. J. Chem. Phys. 116 (2002), 2863.
[93] H. Naundorf, G. A. Worth, H.-D. Meyer, and O. Kühn. Multiconfiguration time-dependent hartree dynam-
ics on an ab initio reaction surface: Ultrafast laser-driven proton motion in phthalic acid monomethylester.
J. Phys. Chem. A 106 (2002), 719.
[94] T. N. Rescigno, W. A. Isaacs, A. E. Orel, H.-D. Meyer, and C. W. McCurdy. Theoretical study of resonant
excitation of CO2 by electron impact. Phys. Rev. A 65 (2002), 32716.
[95] S. Sukiasyan and H.-D. Meyer. Reaction cross section for the H+D2 (ν0 = 1) → HD+D and D+H2 (ν0 =
1) → DH+H systems. A multi-configuration time-dependent Hartree (MCTDH) wave-packet propagation
study. J. Chem. Phys. 116 (2002), 10641–10647.
[96] H. Köppel, M. Döscher, I. Baldea, H.-D. Meyer, and P. G. Szalay. Multistate vibronic interactions in the
benzene radical cation. II. Quantum dynamical simulations. J. Chem. Phys. 117 (2002), 2657–2671.
[97] U. Manthe. Reaction Rates: Accurat quantum dynamical calculations for polyatomic systems. J. Theor.
Comp. Chem. 1 (2002), 153.
[98] F. Huarte-Larrañaga and U. Manthe. Accurate quantum dynamics of a combustion reaction: Thermal rate
′′
constants of O(3 P) + CH4 (X1 A1 ) → OH(X2 Π) + CH3 (X2 A2 ). J. Chem. Phys. 117 (2002), 4635.
[99] M. Nest and H.-D. Meyer. Benchmark calculations on high-dimensional Henon-Heiles potentials with
the Multi-Configuration Time-Dependent Hartree (MCTDH) Method. J. Chem. Phys. 117 (2002), 10499–
10505.
[100] J. Trin, M. Monnerville, B. Pouilly, and H.-D. Meyer. Photodissociation of the ArHBr complex inves-
tigated with the Multi–Configuration Time–Dependent Hartree (MCTDH) approach. J. Chem. Phys. 118
(2003), 600–609.
[101] G. Worth and I. Burghardt. Full quantum mechanical molecular dynamics using Gaussian wavepackets.
Chem. Phys. Lett. 368 (2003), 502–508.
[102] C. McCurdy, W. A. Isaacs, H.-D. Meyer, and T. Rescigno. Resonant vibrational excitation of CO2 by
electron impact: Nuclear dynamics on the coupled components of the 2 Πu resonance. Phys. Rev. A 67
(2003), 042708–1–19.
[103] F. Huarte-Larrañaga and U. Manthe. Quantum mechanical calculation of the OH + HCl → H2 O + Cl
reaction rate: Full-dimensional accurate, centrifugal sudden, and J-shifting results. J. Chem. Phys. 118
(2003), 8261.
[104] M. Nest and H.-D. Meyer. Dissipative quantum dynamics of anharmonic oscillators with the Multi-
Configuration Time-Dependent Hartree (MCTDH) Method. J. Chem. Phys. 119 (2003), 24.
[105] H. Wang and M. Thoss. Multilayer formulation of the multiconfiguration time-dependent Hartree theory.
J. Chem. Phys. 119 (2003), 1289–1299.
[106] H. Wang and M. Thoss. Theoretical study of ultrafast photoinduced electron transfer processes in mixed-
valence systems. J. Phys. Chem. A 107 (2003), 2126–2136.
[107] D. Egorova, M. Thoss, W. Domcke, and H. Wang. Modeling of ultrafast electron-transfer processes:
Validity of multilevel Redfield theory. J. Chem. Phys. 119 (2003), 2761.
[108] M. Petković and O. Kühn. Multidimensional hydrogen bond dynamics in Salicylaldimine: Coherent
nuclear wave packet motion versus intramolecular vibrational energy redistribution. J. Phys. Chem. A 107
(2003), 8458–8466.
List of MCTDH references 189

[109] M. Thoss, W. Domcke, and H. Wang. Theoretical study of vibrational wave-packet dynamics in electron-
transfer systems. Chem. Phys. 296 (2004), 217–229.
[110] G. Worth, H.-D. Meyer, and L. Cederbaum. Multidimensional dynamics involving a conical intersec-
tion: Wavepacket calculations using the MCTDH method. In Conical intersections: Electronic structure,
dynamics and spectroscopy, W. Domcke, D. Yarkony, and H. Köppel, Eds. World Scientific, Singapore,
2004, pp. 583–617.
[111] F. Richter, M. Hochlaf, P. Rosmus, F. Gatti, and H.-D. Meyer. A study of mode–selective trans–cis
isomerisation in HONO using ab initio methodology. J. Chem. Phys. 120 (2004), 1306–1317.
[112] F. Richter, P. Rosmus, F. Gatti, and H.-D. Meyer. Time–dependent wavepacket study on trans–cis iso-
merisation of HONO. J. Chem. Phys. 120 (2004), 6072–6084.
[113] C. Iung, F. Gatti, and H.-D. Meyer. Intramolecular vibrational energy redistribution in the highly excited
Fluoroform molecule: A quantum mechanical study using the MCTDH algorithm. J. Chem. Phys. 120
(2004), 6992–6998.
[114] R. van Harrevelt and U. Manthe. Multiconfigurational time-dependent Hartree calculations for dissocia-
tive adsorption of H2 on Cu(100). J. Chem. Phys. 121 (2004), 3829–3835.
[115] D. J. Haxton, Z. Zhang, H.-D. Meyer, T. N. Rescigno, and C. W. McCurdy. Dynamics of dissociative
attachment of electrons to water through the 2 B1 metastable state of the anion. Phys. Rev. A 69 (2004),
062714.
[116] T. Wu, H.-J. Werner, and U. Manthe. First-principles theory for the H + CH4 → H2 + CH3 reaction.
Science 306 (2004), 2227–2229.
[117] B. Lasorne, F. Gatti, E. Baloitcha, H.-D. Meyer, and M. Desouter-Lecomte. Cumulative isomerization
probability studied by various transition state wave packet methods including the MCTDH algorithm.
benchmark: HCN → CNH. J. Chem. Phys. 121 (2004), 644–654.
[118] F. Gatti and H.-D. Meyer. Intramolecular vibrational energy redistribution in Toluene: A nine dimensional
quantum mechanical study using the MCTDH algorithm. Chem. Phys. 304 (2004), 3–15.
[119] M. Petković and O. Kühn. Ultrafast wave packet dynamics of an intramolecular hydrogen transfer system:
from vibrational motion to reaction control. Chem. Phys. 304 (2004), 91.
[120] E. V. Gromov, A. B. Trofimov, N. M. Vitkovskaya, H. Köppel, J. Schirmer, H.-D. Meyer, and L. S.
Cederbaum. Theoretical study of excitations in furan: Spectra and molecular dynamics. J. Chem. Phys.
121 (2004), 4585.
[121] R. van Harrevelt and U. Manthe. Degeneracy in discrete variable representations: General considerations
and applications to the multiconfigurational time-dependent hartree approach. J. Chem. Phys. 121 (2004),
5623.
[122] M. D. Coutinho-Neto, A. Viel, and U. Manthe. The ground state tunneling splitting of malonaldehyde:
Accurate full dimensional quantum dynamics calculations. J. Chem. Phys. 121 (2004), 9207–9210.
[123] C. Cattarius and H. D. Meyer. Multidimensional density operator propagations in open systems: Model
studies on vibrational relaxations and surface sticking processes. J. Chem. Phys. 121 (2004), 9283–9296.
[124] O. Vendrell and H.-D. Meyer. Proton conduction along a chain of water molecules. Development of a
linear model and quantum dynamical investigations using the multiconfiguration time-dependent Hartree
method. J. Chem. Phys. 122 (2005), 104505.
[125] K. Giese, H. Ushiyama, K. Takatsuka, and O. Kühn. Dynamical hydrogen atom tunneling in
dichlorotropolone: A combined quantum, semiclassical, and classical study. J. Chem. Phys. 122 (2005),
124307.
[126] S. Woittequand, C. Toubin, B. Pouilly, M. Monnerville, S. Briquez, and H.-D. Meyer. Photodissociation
of a HCl molecule adsorbed on ice. Chem. Phys. Lett. 406 (2005), 202–209.
[127] B.Pouilly, M. Monnerville, F. Gatti, and H.-D. Meyer. Wave packet study of the UV photodissociation of
the Ar2 HBr complex. J. Chem. Phys. 122 (2005), 184313.
[128] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Multi-electron giant dipole resonances of atoms in crossed
electric and magnetic fields. Eur. Phys. Lett. 71 (2005), 373–379.
[129] K. Giese and O. Kühn. The all-Cartesian reaction plane Hamiltonian: Formulation and application to the
H-atom transfer in tropolone. J. Chem. Phys. 123 (2005), 054315.
[130] R. van Harrevelt and U. Manthe. Multidimensional time-dependent discrete variable representations in
multiconfiguration hartree calculations. J. Chem. Phys. 123 (2005), 064106.
190 List of MCTDH references

[131] S. Zöllner, H.-D. Meyer, and P. Schmelcher. N-electron giant dipole states in crossed electric and magnetic
fields. Phys. Rev. A 72 (2005), 033416.
[132] A. Markmann, G. Worth, S. Mahapatra, H.-D. Meyer, H. Köppel, and L. Cederbaum. Simulation of a
complex spectrum: Interplay of five electronic states and 21 vibrational degrees of freedom in C5 H+
4 .
J. Chem. Phys. 123 (2005), 204310.
[133] C. Crespos, H.-D. Meyer, R. C. Mowrey, and G. J. Kroes. Multiconfiguration time-dependent Hartree
method applied to molecular dissociation on surfaces: H2 +Pt(111). J. Chem. Phys. 124 (2006), 074706.
[134] G. Pasin, F. Gatti, C. Iung, and H.-D. Meyer. Theoretical investigation of Intramolecular Vibrational
Energy Redistribution in highly excited HFCO. J. Chem. Phys. 124 (2006), 194304.
[135] D. V. Tsivlin, H.-D. Meyer, and V. May. Vibrational excitations in α-helical polypeptides: Multiexiton
self-trapping and related infrared transient absorption. J. Chem. Phys. 124 (2006), 134907.
[136] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Correlations in ultracold trapped few-boson systems: Tran-
sition from condensation to fermionization. Phys. Rev. A 74 (2006), 063611.
[137] G. Pasin, C. Iung, F. Gatti, and H.-D. Meyer. Theoretical investigation of highly excited vibrational states
in DFCO: Calculation of the out-of-plane bending states and simulation of the intramolecular vibrational
energy redistribution. J. Chem. Phys. 126 (2007), 024302.
[138] T. S. Venkatesan, S. Mahapatra, H.-D. Meyer, H. Köppel, and L. S. Cederbaum. Multimode Jahn-Teller
and Pseudo-Jahn-Teller interactions in the cyclopropane radical cation: Complex vibronic spectra and
nonradiative decay dynamics. J. Phys. Chem. A 111 (2007), 1746.
[139] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Excitations of few-body systems in one-dimensional har-
monic and double wells. Phys. Rev. A 75 (2007), 043608.
[140] C. Matthies, S. Zöllner, H.-D. Meyer, and P. Schmelcher. Quantum dynamics of two bosons in an
anharmonic trap: Collective versus internal excitations. Phys. Rev. A 76 (2007), 023602.
[141] M. R. Brill, F. Gatti, D. Lauvergnat, and H.-D. Meyer. Photoinduced nonadiabatic dynamics of ethene: Six
dimensional wave packet propagations using two different approximations of the kinetic energy operator.
Chem. Phys. 338 (2007), 186–199.
[142] O. Vendrell, F. Gatti, and H.-D. Meyer. Dynamics and infrared spectroscopy of the protonated water
dimer. Angew. Chem. Int. Ed. 46 (2007), 6918–6921.
[143] A. N. Panda, F. Otto, F. Gatti, and H.-D. Meyer. Rovibrational energy transfer in ortho-H2 + para-H2
collisions. J. Chem. Phys. 127 (2007), 114310.
[144] F. Richter, F. Gatti, C. Léonard, F. Le Quéré, and H.-D. Meyer. Time–dependent wave packet study on
trans–cis isomerisation of HONO driven by an external field. J. Chem. Phys. 127 (2007), 164315.
[145] S. Woittequand, D. Duflot, M. Monnerville, B. Pouilly, C. Toubin, S. Briquez, and H.-D. Meyer. Classical
and quantum studies of the photodissociation of a HX (X=Cl,F) molecule adsorbed on ice. J. Chem. Phys.
127 (2007), 164717.
[146] O. Vendrell, F. Gatti, D. Lauvergnat, and H.-D. Meyer. Full dimensional (15D) quantum-dynamical
simulation of the protonated water dimer I: Hamiltonian setup and analysis of the ground vibrational state.
J. Chem. Phys. 127 (2007), 184302.
[147] F. Otto, F. Gatti, and H.-D. Meyer. Rotational excitations in para-H2 + para-H2 collisions: Full- and
reduced-dimensional quantum wave packet studies comparing different potential energy surfaces. J. Chem.
Phys. 128 (2008), 064305.
[148] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Few-boson dynamics in double wells: From single-atom to
correlated pair tunneling. Phys. Rev. Lett. 100 (2008), 040401.
[149] M. Brill, O. Vendrell, F. Gatti, and H.-D. Meyer. Shared memory parallelisation of the multi-configuration
time-dependent hartree method and application to the dynamics and spectroscopy of the protonated water-
dimer. In High Performance Computing in Science and Engineering 07 (Heidelberg, 2008), W. E. Nagel,
D. B. Kröner, and M. Resch, Eds., Springer, pp. 141–156.
[150] M. Basler, E. Gindensperger, H.-D. Meyer, and L. S. Cederbaum. Quantum dynamics through conical
intersections in macrosystems: Combining effective modes and time-dependent Hartree. Chem. Phys. 347
(2008), 78.
[151] B. Brüggemann, P. Person, H.-D. Meyer, and V. May. Frequency dispersed transient absorption spectra
of dissolved perylene: A case study using the density matrix version of the MCTDH method. Chem. Phys.
347 (2008), 152–165.
List of MCTDH references 191

[152] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Tunneling dynamics of a few bosons in a double well. Phys.
Rev. A 78 (2008), 013621.
[153] S. Zöllner, H.-D. Meyer, and P. Schmelcher. Composite fermionization of one-dimensional bose-bose
mixtures. Phys. Rev. A 78 (2008), 013629.
[154] G. A. Worth, H.-D. Meyer, H. Köppel, L. S. Cederbaum, and I. Burghardt. Using the MCTDH wavepacket
propagation method to describe multimode non-adiabatic dynamics. Int. Rev. Phys. Chem. 27 (2008), 569–
606.
[155] O. Vendrell and H.-D. Meyer. A proton between two waters: insight from full-dimensional quantum-
dynamics simulations of the [H2 O-H-OH2 ]+ cluster. Phys. Chem. Chem. Phys. 10 (2008), 4692–4703.
[156] S. Faraji, H.-D. Meyer, and H. Köppel. Multistate vibronic interactions in difluorobenzene radical cations.
II Quantum dynamical simulations. J. Chem. Phys. 129 (2008), 074311.
[157] J. M. Bowman, T. Carrington Jr., and H.-D. Meyer. Variational quantum approaches for computing
vibrational energies of polyatomic molecules. Mol. Phys. 106 (2008), 2145–2182.
[158] G. Pasin, C. Iung, F. Gatti, F. Richter, C. Léonard, and H.-D. Meyer. Theoretical investigation of in-
tramolecular vibrational energy redistribution in HFCO and DFCO induced by an external field. J. Chem.
Phys. 129 (2008), 144304.
[159] U. Manthe. The state averaged multi-configurational time-dependent Hartree approach: vibrational state
and reaction rate calculations. J. Chem. Phys. 128 (2008), 064108.
[160] U. Manthe. A multilayer multiconfigurational time-dependent Hartree approach for quantum dynamics
on general potential energy surfaces. J. Chem. Phys. 128 (2008), 164116.
[161] M. Eroms, O. Vendrell, M. Jungen, H.-D. Meyer, and L. S. Cederbaum. Nuclear dynamics during the
resonant Auger decay of water molecules. J. Chem. Phys. 130 (2009), 154307.
[162] A. U. J. Lode, A. I. Streltsov, O. E. Alon, H.-D. Meyer, and L. S. Cederbaum. Exact decay and tunneling
dynamics of interacting few boson systems. J. Phys. B 42 (2009), 044018.
[163] U. Manthe. Layered discrete variable representations and their application within the multiconfigurational
time-dependent hartree approach. J. Chem. Phys. 130 (2009), 054109.
[164] O. Vendrell, F. Gatti, and H.-D. Meyer. Strong isotope effects in the infrared spectrum of the Zundel
cation. Angew. Chem. Int. Ed. 48 (2009), 352 – 355.
[165] O. Vendrell, M. Brill, F. Gatti, D. Lauvergnat, and H.-D. Meyer. Full dimensional (15D) quantum-
dynamical simulation of the protonated water dimer III: mixed Jacobi-valence parametrization and bench-
mark results for the zero-point energy, vibrationally excited states and infrared spectrum. J. Chem. Phys.
130 (2009), 234305.
[166] O. Vendrell, F. Gatti, and H.-D. Meyer. Full dimensional (15D) quantum-dynamical simulation of the
protonated water dimer IV: Isotope effects in the infrared spectra of D(D2 O)+ + +
2 , H(D2 O)2 and D(H2 O)2
isotopologues. J. Chem. Phys. 131 (2009), 034308.
[167] M. Brill, O. Vendrell, and H.-D. Meyer. Shared memory parallelization of the multiconfiguration time-
dependent Hartree method and application to the dynamics and spectroscopy of the protonated water
dimer. In Advances in the Theory of Atomic and Molecular Systems, P. Piecuch, J. Maruani, G. Delgado-
Barrio, and S. Wilson, Eds., vol. 20. Springer Verlag, 2009, p. 69.
[168] F. Otto, F. Gatti, and H.-D. Meyer. Erratum: ”Rotational excitations in para-H2 + para-H2 collisions:
Full- and reduced-dimensional quantum wave packet studies comparing different potential energy sur-
faces”. J. Chem. Phys. 131 (2009), 049901.
[169] S. Woittequand, C. Toubin, M. Monerville, S. Briquez, B. Pouilly, and H.-D. Meyer. Multiconfiguration
time-dependent Hartree and classical dynamics studies of the photodissociation of HF and HCL molecules
adsorbed on ice: Extension to three dimensions. J. Chem. Phys. 131 (2009), 194303.
[170] J. Seibt, T. Winkler, K. Renziehausen, V. Dehm, F. Würthner, H.-D. Meyer, and V. Engel. Vibronic
transitions and quantum dynamics in molecular oligomers: A theoretical analysis with an application to
aggregates of perylene bisimides. J. Phys. Chem. 113 (2009), 13475.
[171] M. Brill, O. Vendrell, and H.-D. Meyer. Distributed memory parallelisation of the multi-configuration
time-dependent hartree method. In High Performance Computing in Science and Engineering 09 (Heidel-
berg, 2010), W. E. Nagel, D. B. Kröner, and M. Resch, Eds., Springer, pp. 147–163.
[172] S. Bhattacharya, A. N. Panda, and H.-D. Meyer. Multiconfiguration time-dependent Hartree approach to
study the OH+H2 reaction. J. Chem. Phys. 132 (2010), 214304.
192 List of MCTDH references

[173] M. Eroms, M. Jungen, and H.-D. Meyer. Nonadiabatic Nuclear Dynamics after Valence Ionization of
H2 O. J. Phys. Chem. A 114 (2010), 9893–9901.
[174] S. A. Ndengué, F. Gatti, R. Schinke, H.-D. Meyer, and R. Jost. Absorption cross section of ozone
Isotopologues calculated with the multiconfiguration time-dependent Hartree (MCTDH) method: I. The
Hartley and Huggins bands. J. Phys. Chem. A 114 (2010), 9855–9863.
[175] A. U. J. Lode, A. I. Streltsov, O. E. Alon, H.-D. Meyer, and L. S. Cederbaum. Corrigendum: Exact decay
and tunneling dynamics of interacting few boson systems. J. Phys. B 43 (2010), 029802.
[176] R. Marquardt, M. Sanrey, F. Gatti, and F. L. Quere. Full-dimensional quantum dynamics of vibrationally
highly excited NHD2 . J. Chem. Phys. 133 (2010), 174302.
[177] D. J. Haxton, K. V. Lawler, and C. W. McCurdy. Multiconfiguration time-dependent Hartree-Fock treat-
ment of electronic and nuclear dynamics in diatomic molecules. Phys. Rev. A 83 (2011), 063416.
[178] M. Schröder, F. Gatti, and H.-D. Meyer. Theoretical studies of the tunneling splitting of malonaldehyde
using the multiconfiguration time-dependent Hartree approach. J. Chem. Phys. 134 (2011), 234307.
[179] T. Ernst, D. W. Hallwood, J. Gulliksen, H.-D. Meyer, and J. Brand. Simulating strongly correlated
multiparticle systems in a truncated Hilbert space. Phys. Rev. A 84 (2011), 023623.
[180] K. Giri, E. Chapman, C. S. Sanz, and G. Worth. A full-dimensional coupled-surface study of the photodis-
sociation dynamics of ammonia using the multiconfiguration time-dependent Hartree method. J. Chem.
Phys. 135 (2011), 044311.
[181] L. Blancafort, F. Gatti, and H.-D. Meyer. Quantum dynamics study of fulvene double bond photoisomer-
ization: The role of intramolecular vibrational energy redistribution and excitation energy. J. Chem. Phys.
135 (2011), 134303.
[182] S. Bhattacharya, A. N. Panda, and H.-D. Meyer. Cross sections and rate constants for OH+H2 reaction
on three different potential energy surfaces for ro-vibrational excited reagents. J. Chem. Phys. 135 (2011),
194302.
[183] Y.-C. Chiang, F. Otto, H.-D. Meyer, and L. S. Cederbaum. Interrelation between the distributions of
kinetic energy release and emitted electron energy following the decay of electronic states. Phys. Rev.
Lett. 107 (Oct 2011), 173001.
[184] S. Bhattacharya, A. Kirwai, A. Panda, and H.-D. Meyer. Full dimensional quantum scattering study of
the H2 + CN reaction. J. Chem. Sci. 124 (2012), 65–73.
[185] M. Sala, F. Gatti, D. Lauvergnat, and H.-D. Meyer. Effect of the overall rotation on the cis-trans isomeri-
sation of HONO induced by an external field. Phys. Chem. Chem. Phys. 14 (2012), 3791–3801.
[186] L. Joubert-Doriol, B. Lasorne, F. Gatti, M. Schröder, O. Vendrell, and H.-D. Meyer. Suitable coordinates
for quantum dynamics: Applications using the multiconfiguration time-dependent Hartree (MCTDH) al-
gorithm. Comp. Theor. Chem. 990 (2012), 75–89.
[187] M. Sala, S. Guérin, F. Gatti, R. Marquardt, and H.-D. Meyer. Laser induced enhancement of tunneling in
NHD2 . J. Chem. Phys. 136 (2012), 194308.
[188] Y.-C. Chiang, F. Otto, H.-D. Meyer, and L. S. Cederbaum. Kinetic energy release in fragmentation
processes following electron emission: A time-dependent approach. J. Chem. Phys. 136 (2012), 114111.
[189] F. Otto, F. Gatti, and H.-D. Meyer. Rovibrational energy transfer in collisions of H2 with D2 . A full-
dimensional wave packet propagation study. Mol. Phys. 110 (2012), 619.
[190] K. Sadri, D. Lauvergnat, F. Gatti, and H.-D. Meyer. Numeric kinetic energy operators for molecules in
polyspherical coordinates. J. Chem. Phys. 136 (2012), 234112.
[191] M. Eroms, M. Jungen, and H.-D. Meyer. Vibronic coupling effects in resonat Auger spectra of H2 O.
J. Phys. Chem. A 116 (2012), 11140.
[192] J. J. Somoza, B. Lasorne, M. Robb, H.-D. Meyer, D. Lauvergnat, and F. Gatti. A generalised 17-state
vibronic-coupling Hamiltonian model for ethylene. J. Chem. Phys. 137 (2012), 084304.
[193] Q. Meng, S. Faraji, O. Vendrell, and H.-D. Meyer. Full dimensional quantum-mechanical simulations for
the vibronic dynamics of diflurorbenzene radical cation isomers using the multilayer multiconfiguration
time-dependent Hartree method. J. Chem. Phys. 137 (2012), 134302.
[194] S. A. Ndengué, R. Schinke, F. Gatti, H.-D. Meyer, and R. Jost. Comparison of the Huggins Band for Six
Ozone Isotopologues: Vibrational Levels and Absorption Cross Section. J. Phys. Chem. A 116 (2012),
12260–12270.
List of MCTDH references 193

[195] S. A. Ndengué, R. Schinke, F. Gatti, H.-D. Meyer, and R. Jost. Ozone Photodissociation: Isotopic and
Electronic Branching Ratios for Symmetric and Asymmetric Isotopologues. J. Phys. Chem. A 116 (2012),
12271–12279.
[196] Q. Meng and H.-D. Meyer. A multilayer MCTDH study on the full dimensional vibronic dynamics of
naphthalene and anthracene cations. J. Chem. Phys. 138 (2013), 014313.
[197] Q. Meng and H.-D. Meyer. MCTDH study on vibrational states of the CO/Cu(100) system. J. Chem.
Phys. 139 (2013), 164709.
[198] G. J. Halasz, A. Vibok, H.-D. Meyer, and L. S. Cederbaum. Effect of Light-Induced Conical Intersection
on the Photodissociation Dynamics of the D+
2 Molecule. J. Phys. Chem. A 117 (2013), 8528–8535.

[199] R. F. Malenda, F. Gatti, H.-D. Meyer, D. Talbi, and A. P. Hickman. Comparison of the multi-configuration,
time-dependent Hartree (MCTDH) method with the Arthurs and Dalgarno coupled-channel method for
rotationally inelastic scattering. Chem. Phys. Lett. 585 (2013), 184–188.
[200] D. Peláez and H.-D. Meyer. The multigrid POTFIT (MGPF) method: Grid representations of potentials
for quantum dynamics of large systems. J. Chem. Phys. 138 (2013), 014108.
[201] B. Lasorne, J. Jornet-Somoza, H.-D. Meyer, D. Lauvergnat, M. A. Robb, and F. Gatti. Vertical transition
energies vs. absorption maxima: Illustration with the UV absorption spectrum of ethylene. Spectrochimica
Acta part A 119 (2014), 52–58.
[202] D. Peláez, K. Sadri, and H.-D. Meyer. Full-dimensional MCTDH/MGPF study of the ground and lowest
lying vibrational states of the bihydroxide H3 O−
2 complex. Spectrochimica Acta part A 119 (2014), 42–51.

[203] L. Joubert-Doriol, D. Lauvergnat, H.-D. Meyer, and F. Gatti. A generalized vibronic-coupling Hamilto-
nian model for benzopyran. J. Chem. Phys. 140 (2014), 044301.
[204] M. Schröder and H.-D. Meyer. Calculation of the vibrational excited states of malonaldehyde and their
tunneling splittings with the multi-configuration time-dependent Hartree method. J. Chem. Phys. 141
(2014), 034116.
[205] S. Ndengue, S. Madronich, F. Gatti, H.-D. Meyer, O. Motapon, and R. Jost. Ozone photolysis: Strong
isotopologue/isotopomer selectivity in the stratosphere. J. Geophys. Res. Atmos. 119 (2014), 4286.
[206] K. Sadri, D. Lauvergnat, F. Gatti, and H.-D. Meyer. Rovibrational spectroscopy using a kinetic energy op-
erator in Eckart frame and the multi-configuration time-dependent Hartree (MCTDH) approach. J. Chem.
Phys. 141 (2014), 114101.
[207] Q. Meng and H.-D. Meyer. A full-dimensional multilayer multiconfiguration time-dependent Hartree
study on the ultraviolet absorption spectrum of formaldehyde oxide. J. Chem. Phys. 141 (2014), 124309.
[208] Q. Meng and H.-D. Meyer. Expansion Hamiltonian model for a diatomic molecule adsorbed on a surface:
Vibrational states of the CO/Cu(100) system including surface vibrations. J. Chem. Phys. 143 (2015),
164310.
[209] S. Ndengue, R. Daves, F. Gatti, and H.-D. Meyer. Resonances of HCO computed using an approach
based on the Multiconfiguration Time-Dependent Hartree method. J. Phys. Chem. A 119 (2015), 12043.
[210] N. Ansari and H.-D. Meyer. Isotope effects of ground and lowest vibrational states of H3−x Dx O−
2
complexes. J. Chem. Phys. 144 (2016), 054308.
[211] G. Füchsel, P. S. Thomas, J. den Uyl, Y. Öztürk, F. Nattino, H.-D. Meyer, and G.-J. Kroes. Rotational
effects on the dissociation dynamics of CHD3 on Pt(111). Phys. Chem. Chem. Phys. 18 (2016), 8174–
8185.
[212] Q. Meng and H.-D. Meyer. Lattice effects of surface cell: Multilayer multiconfiguration time-dependent
Hartree study on surface scattering of CO/Cu(100). J. Chem. Phys. 146 (2017), 184305.
[213] D. Peláez and H.-D. Meyer. On the infrared absorption spectrum of the hydrated hydroxide (H3 O−
2 )
cluster anion. Chem. Phys. 482 (2017), 100–105.
[214] S. Ndengué, R. Dawes, F. Gatti, and H.-D. Meyer. Atom-Triatom Rigid Rotor Inelastic Scattering with
the MultiConfiguration Time Dependent Hartree approach. Chem. Phys. Lett. 668 (2017), 42–46.
[215] D. Mendive-Tapia, T. Firmino, H.-D. Meyer, and F. Gatti. Towards a systematic convergence of Multi-
Layer (ML) multi-configuration time-dependent Hartree nuclear wavefunctions: the ML-spawning algo-
rithm. Chem. Phys. 482 (2017), 113–123.
[216] F. Gatti, B. Lasorne, H.-D. Meyer, and A. Nauts. Applications of Quantum Dynamics in Chemistry,
vol. 98. in: Lectures Notes in Chemistry, Springer, Heidelberg, 2017.
194 List of MCTDH references

[217] M. Schröder and H.-D. Meyer. Calculation of global, high-dimensional potential energy surface fits
in sum-of-products form using monte-carlo methods. In High Performance Computing in Science and
Engineering ’17 (2018), W. E. Nagel, D. H. Kröner, and M. M. Resch, Eds., Springer International
Publishing.
[218] D. Mendive-Tapia, E. Mangaud, T. Firmino, A. de la Lande, M. Desouter-Lecomte, H.-D. Meyer,
and F. Gatti. Multidimensional quantum mechanical modeling of electron transfer and electronic coher-
ence in plant cryptochromes: The role of initial bath conditions. J. Phys. Chem. B 122 (2018), 126–136.
[219] H.-D. Meyer and H. Wang. On regularizing the MCTDH equations of motion. J. Chem. Phys. 148 (2018),
124105.
[220] H. Wang and H.-D. Meyer. On regularizing the ML-MCTDH equations of motion. J. Chem. Phys. 149
(2018), 044119.
[221] S. Scheit, S. Goswami, H.-D. Meyer, and H. Köppel. Fully quantal treatment of nonadiabatic molecular
photodynamics: General considerations and application to the benzene cation. Comp. Theo. Chem. 1150
(2019), 71–84.
[222] F. Köhler, K. Keiler, S. Mistakidis, H.-D. Meyer, and P. Schmelcher. Dynamical pruning of the non-
equilibrium quantum dynamics of trapped ultracold bosons. J. Chem. Phys. 151 (2019), 054108.
[223] S. Ndengué, Y. Scribano, F. Gatti, and R. Dawes. State-to-state inelastic rotational cross sections in five-
atom systems with the multiconfiguration time dependent Hartree method. J. Chem. Phys. 151 (2019),
134301.
[224] M. Schröder. Transforming high-dimensional potential energy surfaces into a canonical polyadic decom-
position using Monte Carlo methods. J. Chem. Phys. 152 (2020), 024108.
[225] S. Sur, S. A. Ndengué, E. Quintas-Sánchez, C. Bop, F. Lique, and R. Dawes. Rotationally inelastic
scattering of O3 -Ar: state-to-state rates with the multiconfigurational time dependent Hartree method.
Phys. Chem. Chem. Phys. 22 (2020), 1869.
[226] Q. Meng, M. Schröder, and H.-D. Meyer. High-dimensional quantum dynamics study on excitation-
specific surface scattering including lattice effects of a five-atom surface cell. J. Chem. Theory Comput.
17 (2021), 2702.
[227] H. Wang and H.-D. Meyer. Importance of appropriately regularizing the ML-MCTDH equations of
motion. J. Phys. Chem. A 125 (2021), 3077.
[228] S. Mainali, F. Gatti, D. Iouchtchenko, P.-N. Roy, and H.-D. Meyer. Comparison of the multi-layer
multi-configuration time-dependent Hartree (ML-MCTDH) method and the density matrix renormaliza-
tion group (DMRG) for ground state properties of linear rotor chains. J. Chem. Phys. 154 (2021), 174106.
[229] N. Ng, S. Wenderoth, R. R. Seelam, E. Rabani, H.-D. Meyer, M. Thoss, and M. Kolodrubetz. Localization
dynamics in a centrally coupled system. Phys. Rev. B 103 (2021), 134201.
[230] T. Weike and U. Manthe. Symmetries in the multi-configurational time-dependent Hartree wavefunction
representation and propagation. J. Chem. Phys. 154 (2021), 194108.
[231] L. P. Lindoy, B. Kloss, and D. R. Reichman. Time evolution of ML-MCTDH wavefunctions. I. Gauge
conditions, basis functions, and singularities. J. Chem. Phys. 155 (2021), 174108.
[232] L. P. Lindoy, B. Kloss, and D. R. Reichman. Time evolution of ML-MCTDH wavefunctions. II. Applica-
tion of the projector splitting integrator. J. Chem. Phys. 155 (2021), 174109.
[233] S. Han, M. Schröder, F. Gatti, H.-D. Meyer, D. Lauvergnat, D. Yarkony, and H. Guo. Representation of
Diabatic Potential Energy Matrices for Multiconfiguration Time-Dependent Hartree Treatments of High-
Dimensional Nonadiabatic Photodissociation Dynamics. J. Chem. Theory Comput. 18 (2022), 4627–4638.
[234] M. Schröder, F. Gatti, D. Lauvergnat, H.-D. Meyer, and O. Vendrell. The coupling of the hydrated proton
to its first solvation shell. Nature Communications 13 (2022), 6170.
[235] D. Mendive-Tapia, H.-D. Meyer, and O. Vendrell. Optimal mode combinations in the Multiconfigu-
ration Time-Dependent Hartree method through multivariate statistics: Factor analysis and hierarchical
clustering. J. Chem. Theory Comput. 19 (2023), 1144.
Index

ABM integrator, 85, 87 CSIL integrator, see SIL integrator


Adiabatic correction, see Correction
Adiabatic population, 113 Diagonalisation, 30
Analysis Discrete variable representation, see DVR
flux analysis, 110 Distributed memory, see Calculations
of accuracy, 104 DOF, mode, and muld potentials, 69
of efficiency, 107 DVR, 38
of electronic populations, 112 exponential, 41
of PES, 118 extended Legendre (KLeg), 44
of primitive basis, 104 Hermite, 38
of PSI, 117 Legendre, 40
of results, 101 radial Hermite, 38
of single-particle basis, 106 restricted Legendre, 43
of system evolution, 107 sine, 41
of system spectrum, 109 three-dimensional rotational (Wigner), 45
reaction probabilities, 110 two-dimensional Legendre (PLeg), 44
analysis interface, 101 DVR file, see File
Auto file, see File
Autospec program, see Program Efield program, see Program
Auxiliary Operators, 68 Electronic basis, see Basis
Energy cut-off, 68
Basis Energy distribution, 80
electronic, 92 Energy weights, 27
primitive, 38 Error estimate
single-particle, 47, 92 of the SIL integrator, 88
Bosons, 96 Error message, 30
BS integrator, 85, 87 Error tolerance
of the ABM integrator, 87
Calculations of the BS integrator, 87
continuing, 31 of the CMF scheme, 87
distributed memory, 34 of the RK5/8 integrator, 87
parallel, 31, 34 of the SIL integrator, 87
shared memory, 31 Exponential DVR, see DVR
starting, 30 Extended Legendre, see Legendre
stopping, 31 Extended Legendre DVR, see DVR
CAP, 64
order, 64 Fast Fourier transform, see FFT
starting point, 64 FBR, 38
strength, 64 Fdcheck program, see Program
CDVR, see Correlation DVR Fdmatch program, see Program
Check file, see File FFT, 41
CMF scheme, see Constant mean-field scheme Temperton, 42
Colbert-Miller DVR, see DVR, sine File
Complex absorbing potential, see CAP auto, 24, 109
Constant mean-field scheme, 86 check, 106, 112
Continuing a calculation, see Calculations chk.pl, 7
Correction dvr, 38
adiabatic, 80 eigval, 11
diabatic, 80 enerd, 80, 110
Correlation DVR, 90 flux, 110

195
196 Index

flux.log, 110 KLeg, 44


gridpop, 104, 107 KLeg , see DVR
gtau, 110
input, 121, 157 Labels section, see Section
iteration, 121 Lanczos algorithm, 30
log, 24, 121 Lanczos integrator, see SIL integrator
natpot, 121 Lanczos-Arnoldi integrator, see SIL integrator
operator, 50 Legendre
orben, 27 DVR, see DVR
output, 24, 102, 121 extended, 75
pes, 5, 118 function, see Function
prodwei, 121 Log file, see File, see File
psi, 24, 117
ptiming, 31, 34 Metropolis sampling, 135
restart, 78 Mode combination, 48
rlx info, 15, 29 Monte-Carlo, 135
spectrum.pl, 4, 8, 109 Muld potentials, 69
stop, 31 Multi-packet, 80
surface, 67 Multi-set, 92
timing, 107, 121
vpot, 121 Name-directory, 24
wtt, 110 Natpot, 63
File number, 59 Natpot file, see File
Filter program, see Program Natural orbital, see Orbital
Finite basis-set representation, see FBR Natural population, see Population
Flux program, see Program Natural potential, see Potential
Fourier-transformed potential, see Potential Non-adiabatic system, see System
Function Numerically exact calculation, 29
Gaussian, 73
harmonic oscillator, 38 Op define section, see Section
Legendre, 40, 74 Operator file, see File
particle-in-a-box, 41 Operator section, see Section
spherical harmonic, 43, 75 Operator, 1D, user-defined, 56
Optcntrl program, see Program
Gaussian function, see Function Orben file, see File
Golden rules, 71 Orbital
Gridpop file, see File energies, 27
interaction picture, 89
Hamiltonian section, see Section natural, 89
Harmonic oscillator DVR, see DVR, Hermite Output file, see File, see File
Harmonic oscillator function, see Function
Henon-Heiles, 53 Parallel calculation, see Calculations, see Calculations
Hermite DVR, see DVR Parameter section, see Section
Particle-in-a-box function, see Function
Improved block-relaxation, see Wavepacket Plall program, see Program
Improved relaxation, see Wavepacket, 89 Plane wave, 42
Init wf section, see Section Plane-wave DVR, see DVR, exponential
Initial stepsize Plauto program, see Program
for the CMF scheme, 87 Plbrlx program, see Program, see Program
for the ABM integrator, 88 Plcap program, see Program
for the BS integrator, 88 PLeg, 45
for the RK5/8 integrator, 88 PLeg , see DVR
Initial wavefunction, see Wavefunction Plfdspec program, see Program
Input file, see File, see File Plpit program, see Program
Installing package, 176 Plpweight program, see Program
Integration order, 88 Plqdq program, see Program
Integration schemes, 85 Plrlx program, see Program, see Program
Integrator section, see Section Plspec program, see Program
Interaction picture orbital, see Orbital Plspeed program, see Program
Iteration file, see File Plstate program, see Program
Index 197

Plupdate program, see Program Radial harmonic oscillator DVR, see DVR, radial Her-
Population mite
natural, 106 Radial Hermite DVR, see DVR
of grid points, 104 Rdcheck program, see Program
Potential Rdgpop program, see Program
ab initio, 124 Rdrlx program, see Program, see Program
Fourier-transform of, 131 readsrf, 124
multi-dimensional, 60, 69 Reflex program, see Program
natural, 63, 120 Relaxation, see Wavepacket
non-separable, 60 relevant region, 120
one-dimensional, 59 Restart file, see File
separable, 58 Restricted Legendre DVR, see DVR
Potfit program, see Program RK5/8 integrator, 85, 87
Primitive basis, see Basis Rotator DVR, see DVR, Legendre
Primitive-basis section, see Section Run section, see Section
Product form, 53, 91
Prodwei file, see File Section
Program correlated-weight, 122
adpop, 113 Hamiltonian, 53, 92, 157
adproj, 114 init wf, 73, 157
analysis, 101 integrator, 85, 157
autospec, 4, 8, 109, 111 labels, 63, 157
efield, 21 natpot-basis, 121
fdcheck, 13 op define, 50, 157
fdmatch, 13 operator, 50, 121, 157
filter, 12 parameter, 51, 157
flux, 111 primitive-basis, 38, 92, 122, 157
mcpotfit, 135 run, 23, 121, 157
optcntrl, 21 separable-weight, 122
plall, 5 spf-basis, 47, 93, 157
plauto, 5 Shared memory, see Calculations
plbrlx, 16, 29 Showd1d program, see Program
plcap, 65 Showpot program, see Program, see Program
plfdspec, 13 Showrst program, see Program
plflux, 9, 110, 111 Showspf program, see Program
plpit, 121 Showsys program, see Program
plpweight, 121 SIL integrator, 87
plqdq, 5 Sine DVR, see DVR
plrlx, 15, 16, 29 Single-particle basis, see Basis
plspec, 5, 8, 109, 111 Single-particle function, 47
plspeed, 5 multi-mode, 48
plstate, 7, 112 Single-particle operator, 53
plupdate, 5 Single-particle-basis section, see Section, spf-basis
plwtt, 9, 110 Single-set, 92
potfit, 9, 120 Spectrum, see Analysis
projection, 128 Spf-basis section, see Section
rdcheck, 7, 106, 112 Spherical harmonic function, see Function
rdgpop, 104 Spherical harmonics FBR, 43
rdrlx, 15, 16, 29 Starting a calculation, see Calculations
reflex, 65 Stop file, see File
showd1d, 4, 9, 107 Stopping a calculation, see Calculations
showpot, 119, 121 Structure of the WF array, 175
showrst, 108 Surface file, see File
showspf, 108 svn-repository, Subversion, 181
showsys, 5, 117, 118 Symbolic expression
Program structure, 160 built-in, 53, 91, 161
Projection program, see Program user-defined, 56
Propagation, see Wavepacket System, bosonic, see Bosons
Psi file, see File System, non-adiabatic, 91
198 Index

TDDVR, see Time-dependent DVR


TDH, see Time-dependent Hartree
Temperton FFT, see FFT
Thermal averaging, 155
Three-Dimensional rotational DVR, see DVR
Time-dependent DVR, 90
Time-dependent Hartree, 47
Time-dependent operators, 72
Timing file, see File, see File
Two-dimensional Legendre DVR, see DVR

Variable mean-field scheme, 85


VMF scheme, see Variable mean-field scheme
Vpot file, see File

Wavefunction
initial, 73, 95
structure of, 175
Wavepacket
improved block-relaxation, 15, 26
improved relaxation, 14, 26
propagation, 25
relaxation, 25
Wigner , see DVR

You might also like