Menu

Users.Interpolation.Main

Burkhard Schmidt

About interpolations in the Matlab/Octave version of WavePacket

Several constituents (e.g. the potential energy function, dipole moments, initial wave functions) of the Hamiltonian in WavePacket may use external files to load data and interpolate them to the grid on which the actual calculation is running. These files need to have certain names and a specific arrangement of the data, both of which are described on this page.

File Names

So far, there are four places where data is interpolated from external files. You can use an interpolated potential, interpolated dipole moment, interpolated initial wave function, and an interpolated electric field. In the case of the interpolated electric field, you can choose any file name you want and just have to supply it as a parameter. In all other cases, the file must be in the current working directory and have the special name

  • ''pot_$m.dat'' and ''pot_$m_$n.dat'' for the interpolation of the potential energy surfaces and couplings (diabatic representation!), respectively
  • ''d_$p_$m.dat'' and ''d_$p_$m_$n.dat'' for the interpolation of permanent and transition dipole moments, respectively
  • ''wav_$m.dat'' for the interpolation of the initial wave function (optionally: ''wav_$m_im.dat'' if an imaginary part is needed)

The values ''$m'' and ''$n'' here denote row/column indices of the coupled Schrödinger equations (''coupled channels'') in diabatic representation. For example, ''pot_1.dat'' gives the potential energy surface of the first channel, while ''pot_1_2.dat'' gives the diabatic coupling between the first and the second channel. Since both the dipole matrix and the potential energy matrix are Hermitian, you only have to supply only half of the non-diagonal elements, namely the ones with ''$m < $n''; all other files are ignored. Otherwise, any missing files are supposed to contain only zeros.

Finally, for the dipole moment, WavePacket uses an arbitrary number of polarization directions; the first one is the projection of the dipole along the first (x) coordinate (''$p = 1''), the next one along the second (y) coordinate (''$p = 2''), and so on. For example, ''d_2_1.dat'' gives the second component of the permanent dipole of the first channel, while ''d_2_1_2.dat'' gives the second component of the transition dipole coupling between the first and the second channel. Note that also more than 3 components are allowed; the number of components follows the number of components of the amplitude (vector) of the external electric field.

File Layout

The data points from which we interpolate must obviously be given on a grid with the same dimension as the one used for the calculation. For one-dimensional setups, they are simply arbitrary pairs of a coordinate and a value. For 2 or more dimensions, the data is fed to some MatLab/Octave routine for interpolation, which is a bit picky about the exact format. The layout of the data is then as follows:

  • The data is given as a set of columns, where the n-th column denotes the n-th coordinate except the last column, which denotes the value. The columns must be separated by a space or a comma. As an example, the line that assigns a value of 5 to the point with x1=1, x2=0 would be

    1 0 5

  • The data must be given on a rectangular grid, i.e., a direct product of one-dimensional grids. If for example, there are N1 points x1, ..., xN1 along the first coordinate and N2 points y1, ..., yN2 along the second coordinate, then for each point (xi, yj) with 1 ≤ i ≤ N1, 1 ≤ j ≤ N2, a value must be supplied, and no other points may be present.

  • The values must be ordered such that the first coordinate varies the fastest, then the second and so forth. An example of a correct file with xi ∈ {0,5}, yj ∈ {1,3} would be

    0 1 5.6
    5 1 3.7
    0 3 2.1
    5 3 2.3


Related

Wiki: FAQ.Main
Wiki: Reference.Files.Main
Wiki: Reference.Programs.qm_bound
Wiki: Reference.Programs.qm_propa
Wiki: Reference.Variables.hamilt.dip
Wiki: Reference.Variables.hamilt.pot
Wiki: Reference.Variables.time.corr
Wiki: Reference.Variables.time.pulse
Wiki: Users.Main