While running bound state calculations with qm_bound or wavepacket|trajectory propagations with qm_propa, there is already the possibility to do visualization on the fly. If, however, you want to repeat and/or modify the visualization, you may use this Matlab function which reads wavefunctions or trajectory bundles calculated (and saved!) by qm_bound or qm_propa and visualizes them (again).
The MATLAB function qm_movie can be found here
Note that qm_movie.m works only with objects of all of the main classes currently available in WavePacket, see the following table:
class name | description |
---|---|
wave | wavefunctions, represented on grids |
ket | state vecors, in eigen/energy representation |
rho | density matrices, in eigen/energy representation |
traj | classical densities, represented by swarms of trajectories |
mssh | multiple switches surface hopping trajectories |
fssh | fewest switches surface hopping trajectories |
sssh | single switch surface hopping trajectories |
The name of directory where wavefunctions or trajectory bundles are read from, as well as the filename(s), are taken from the respective properties of object state, i.e.,
state.save_dir state.save_file
For further information on how wavefunctions are saved and/or loaded, see also here.
You have to make sure that - while running bound state calculations with qm_bound or wavepacket|trajectory propagations with qm_propa, the sequence of propagated data is saved to unformatted Matlab data files which is achieved by the following code line
state.save_export = true;
For more details see our Wiki page on visualization in the Matlab version of WavePacket
Note that function qm_init should be run previously in order to initialize all variables in use. Of particular interest is the following structure:
Wiki: Reference.Classes.traj
Wiki: Reference.Classes.wave
Wiki: Reference.Files.Main
Wiki: Reference.Programs.Main
Wiki: Reference.Programs.qm_bound
Wiki: Reference.Programs.qm_init
Wiki: Reference.Programs.qm_propa
Wiki: Reference.Variables.plots
Wiki: Reference.Variables.time
Wiki: Users.Basics.Main
Wiki: Users.Graphics.Main
Wiki: Users.Graphics.Movies
Wiki: Users.Graphics.Plots
Wiki: Users.Saving.Main