In the following, you'll find the lists of parameters to be specified for the three types of FBR/DVR schemes currently implemented in this version of WavePacket:
| xyz | MATLAB class for Fast Fourier Transform scheme |
|---|---|
| mass | mass entering the kinetic energy operator −1/(2m) ∂²/∂x² |
| n_pts | number of grid points (equal in position and momentum grid) |
| x_min | lower bound of the position grid |
| x_max | upper bound of the position grid |
| periodic | if set to true, assume periodic boundary conditions for the Hamiltonian, otherwise use kinetic energy corrections for non-periodicity. Only used for the TISE. |
| xyz | MATLAB class for Gauss-Hermite scheme |
|---|---|
| mass | mass entering the kinetic energy operator −1/(2m) ∂²/∂x². Normally not used independently, but needed together with omega to scale the points we get from Gaussian quadrature. |
| omega | the angular frequency of the potential. The force constant is related to this by k=m ω². Needed for scaling of the quadrature points. |
| r_e | the equilibrium position of the harmonic oscillator. Needed for shifting the quadrature points. |
| n_pts | the number of points (= number of basis functions) |
The Hermite DVR is suited for an expansion in eigenfunctions of the harmonic oscillator (Hermite polynomials times an exponential). In contrast to other DVR methods, the grid points are not natively bounded to some interval, but can lie anywhere (of course, they are always located somewhere around the minimum of the harmonic oscillator).
Furthermore, the Gauss-Hermite quadrature is conveniently defined in scaled coordinates (corresponding to m ω = 1, re = 0). To use them for real problems, you have to supply the shift and the properties of the harmonic potential you want to use.
| xyz | MATLAB class for Gauss-Legendre scheme |
|---|---|
| mass | Mass entering the kinetic energy operator L²/(2mR²) |
| R_dof | Index of the degree of freedom that is used for the R in the kinetic energy operator. May not be set together with R_0 (raises an error) |
| R_0 | for a rigid rotator the fixed value of R that enters the kinetic energy operator. May not be set together with R_dof |
| l_max | The maximum angular momentum of the spectral basis, which is also the number of grid points in position space |
| m_0 | (constant) value of the minor quantum number. The spectral basis goes from l = m_0 to (and including) l_max, therefore it has (l_max - m_0 + 1) elements. |
The Legendre DVR is used for problems where the minor quantum number (most often called m) is conserved while the major quantum number (typically named l) can vary. Note that for homonuclear diatomic molecules, symmetry arguments require that l is always either even or odd. If your potential does not fulfill this automatically (linearly polarized lasers do), you have to add the required symmetry by hand (not yet implemented). The Legendre DVR considers the quantum number l as (angular) momentum.
All grid classes behave to some extend in a similar manner, which is outlined here. For historical reasons, they use the old Matlab object-oriented scheme, which is not perfect in several respects.
Each grid implements one DVR method (see the corresponding section in the WavePacket central Wiki. The DVR grid gives the points where the wave function is defined, the weights are the appropriate weights to use for integrating, and the FBR grid defines some quantum number of the basis functions, which is grid-dependent.
The convention is that an integration in the DVR always requires the given weights, while an integration in the FBR can be done by just summing up; that is, when transforming to the FBR, proper normalization is taken care of.
For additional information, see also our documentation of the WavePacket global variable "space".
init()
This function returns the DVR, FBR, and weight grids. It is called internally during the setup of the calculation. This function needs to be called before the grid can be used.
init_kin (split)
This function sets up the internal kinetic energy operator and its exponentiated form with the given splitting factor; each grid has a (diagonal) associated kinetic energy. This function is called internally during the setup of the calculation, and needs to be called before the kinetic energy operator can be used.
dvr2fbr (psiDVR)
Takes as input argument a wave function in the DVR, and returns the corresponding wave function in the FBR.
fbr2dvr (psiFBR)
Takes as input argument a wave function in the FBR and returns the corresponding wave function in the DVR.
matrix2dvr (opFBR)
Takes a matrix in the FBR and converts it into the DVR.
kinetic2dvr ()
Returns the matrix corresponding to the underlying kinetic energy operator of the grid in the DVR representation. Used in qm_bound for constructing the Hamiltonian to diagonalize.
kinetic (new)
Applies the kinetic energy operator for this dimension to the wave function (for all (coupled) channels!). The result is stored in psi.dvr.new_ND. If new == true, the input wave function comes from psi.dvr.new_ND, otherwise we take it from psi.dvr.grid_ND.
kinetic_exp
Takes the wavefunction stored in psi.dvr.grid_ND (for all (coupled) channels!) and applies the operator exp(-iKfactor*dt) to it. The result is stored again in psi.dvr.grid_ND afterwards.
momentum (psi)
Applies some momentum operator to the input wave function psi. The definition of the momentum operator is not meaningful for any grid except the fft grid; this function should therefore generally be avoided.
transform (n_pts, orig)
Transforms the original wave function orig to another grid of the same type with n_pts grid points and all other parameters set to those of the current grid. Note that this function should not be used for interpolation since the results are generally inferior to splines and similar techniques. Its main use is to calculate the cross correlation between wave functions given on different grids (e.g., to check the convergence with respect to the grid size).
Every grid class offers the following public properties. Most of them can be set to tune the grid.
label
the name associated with the degree of freedom
dof
the index of the degree of freedom (i.e., for psi.dvr.grid_ND(i,j,k), we access the gridpoint i in the first DOF, j in the second etc.)
n_pts
The number of grid points.
dvr_min
The lower bound of the DVR grid; used e.g. for auto-determining ranges when plotting. Read-only.
dvr_max
The upper bound of the DVR grid. Read-only
fbr_min
The lower bound (quantum number or whatever) of the FBR grid. Read-only.
fbr_max
The upper bound of the FBR grid. Read-only.
kin_max
The maximum kinetic energy of the internal kinetic energy that can be represented on the grid. Read-only.
nokin
If set, all calls to grid_kinetic and grid_kinetic_exp do nothing, i.e., effectively disables the internal kinetic energy operator. Useful for implementing your own kinetic energy operators.