Menu

Version 6.0.0 released (20-Dec-2018)

This version (Git hash value 3ce026a...) of WavePacket features major code extensions for fully classical as well as quantum-classical (e.g. surface hopping trajectory) propagations. Thus, it is now possible to compare fully quantum versus quantum-classical versus fully classical dynamics for exactly the same physical system (kinetic and potential energy, initial conditions, time stepping, etc.), specified by the same initialization file qm_init.m. Then a typical workflow for a quantum (wavefunction based) propagation may look as follows

qm_setup(); state=wave(); qm_init(state); qm_propa(state); qm_cleanup();

Alternatively, the workflow for a classical (trajectory based) simulation may look like this

qm_setup(); state=traj(); qm_init(state); qm_propa(state); qm_cleanup();

To achieve this flexibility, there has been a major restucturing of our Matlab codes, mostly connected with the introduction of a more object-oriented programming style (currently, almost 100 class definitions have been implemented). In the examples above, the second command constructs an object state which can belong to class wave (for wavefunctions, represented on grids) or to class traj (for classical densities, represented by swarms of trajectories). In the latter case, additional arguments passed to the constructor can be used to specify, e.g., the number of trajectories and a (positive integer) "seed" for Matlab's built-in random number generator. For the example

state = traj (10000, 42);

we specify a simulation with 10000 trajectories and seed the random number generator to ensure a predictable sequence of random numbers. Note that if the seed is not set, a different sequence is used in every propagation.

Alternatively, the respective properties of object state can also be set directly (either inside or outside the initialization function qm_init.m )

state.n_p = 10000;       % number of phase space points/particles
state.rnd_seed = 42;     % seed the random number generator
state.sav_export = true; % toggle saving of wavefunctions|trajectories

where the last line (also available for objects of class wave) has been added to illustrate another change concerning saving the wavefunctions or trajectory bundles during the propagation to data files. Unless further (optional!) properties are set otherwise, you will then find the wavefunctions or trajectory bundles for all timesteps in data file wave_1.mat or traj_1.mat, respectively, in the current working directory.

If non-adiabatic dynamics along several coupled potential energy surfaces in many dimensions is to be treated, mixed quantum-classical dynamics simulations may be a promising approach. Starting from the present version 6.0, WavePacket also encompasses surface hopping trajectory methods, which can be activated by certain settings (typically inside the qm_init function)

time.hop = hop.fssh;    % Choice of SHT variant
time.hop.rescale = 1;   % Rescale momenta after hopping
time.hop.sca_nac = 1;   % Rescale along NAC coupling vectors

which specifies the use J. C. Tully's fewest switches surface hopping (FSSH) algorithm. In this example, rescaling of the momenta is switched on, and the rescaling is to be done along the (first order) non-adiabatic coupling vectors. Other choices are the multiple switches surface hopping (hop.mssh) or the Landau-Zener based single switch surface hopping (hop.lz_1 or hop.lz_2) approaches.

Additional settings to object state can be made, e.g., inside the initialization function qm_init.m . There you may want to use the following code snippets:

switch class(state)
    case 'wave'
        ... ... ... # settings for wavefunctions only
    case 'traj'  
        ... ... ... # settings for trajectory bundles only
end

Even though most of the code changes of Version 6.0 are under the hood, a few of those changes will also be visible externally, leading to minor issues with backward incompatibility of the initialization (normally provided through self-written Matlab function qm_init.m). In the following, we list the most important changes:

parameters of ... until V5.3.0 since V6.0.0
Initial wave function psi.dof{·} time.dof{·}
Initial wave function psi.corr{·} time.corr{·}
Additional multiplicative operators space.amo{·} hamilt.amo{·}
Pulsed electric field time.efield time.pulse{·}

Note also the following changes

  • All "@" signs in previously used qm_init.m files will have to dropped, because all Matlab function handles have been replaced by Matlab classes now, i.e. for the choice of a Morse potential energy function
    hamilt.pot.handle = @pot.morse
    will have to be replaced by calling a constructor
    hamilt.pot = pot.morse
    and similarly for the choice of kinetic energy functions, negative imaginary potentials, dipole moments, etc

  • The package folder +plot has been renamed to +vis in order to avoid confusion with variable named "plots", i.e. for the choice of a surface plot representing the time evolving density
    plots.density.type = 'surface'
    will have to be replaced by calling a constructor
    plots.density = vis.surface
    and similarly for the plots of expectation values and absorption spectra
    plots.expect = vis.expect
    plots.spectrum = vis.spectrum

Related

Wiki: Reference.Programs.qm_init

Posted by Burkhard Schmidt 2019-02-19

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.