| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2019-02-19 | 5.6 kB | |
| WavePacket-6.0.0.zip | 2018-12-20 | 1.4 MB | |
| Totals: 2 Items | 1.4 MB | 0 | |
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) propagation may look as follows
qm_setup(); state=wave(); qm_init(state); qm_propa(state); qm_cleanup();
Alternatively, the workflow for a classical trajectory 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, no less than 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 number. Note that if the seed is not set, a different sequence is used in every propagation.
Alternatively, these settings can also be performed inside 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 promising. Starting from the present version 6, WavePacket also encompasses surface hopping trajectory methods, which can be activated by certain settings 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 will be 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), see also the News section of our WavePacket (Matlab) wiki. 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 |
| 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.
- The package folder +plot has been renamed to +vis in order to avoid confusion with variable named "plots".
For a detailed description of all the changes, see also the Ticket tool.
This version runs flawlessly for all of our demo examples with Matlab R2018b under Windows 10. Should you encounter problems with other Matlab versions and/or other operating systems, please don't hesitate to contact us.