As discussed during the hackathon, many people seem to have notes about various parts of quantics code base. Let’s collect these notes in this topic!
General advice for navigating Quantics
Quantics is a large code, sieving through it can be difficult! However, it doesn’t need to be. Here is some advice collected from notes made by some of the current Quantics developers, we hope this can be of some use!
DISCLAIMER: The current (outdated) documentation is available at: quantics/doc/quantics/input.html, these notes are only a placeholder until the new documentation is published.
ALSO, some terms are left with ?, meaning we are unsure about its definition (feel free to edit if known).
The code itself was developed from the MCTDH package out of Heidelberg Germany, therefore some of the variables have german derivations. The common ones are:
| German | English |
|---|---|
| eingabe (shortened to ein) | input |
| dicht | density |
| zeig | pointer |
| etf | spf |
Sometimes, blocks of memory are allocated with the names:
| Name | Type |
|---|---|
| mr | reals |
| mi | integers |
| mc | complex |
| ml | logicals |
In general to find variables, subroutines etc. I use some grep functions:
-
grep -r --include=" \*.f90 " "{insert keyword}" -
grep -r --include=" \*.F90 " "{insert keyword}" -
e.g.
grep -r --include=" \*.F90 " "program quantics"would return:HDmctdh/quantics.F90: program quantics
Simply navigate to your quantics directory, or into the HDmctdh directory (contains most of the central source code). These functions will only search through the fortran files.
Generally,
-
Existing videos describing Quantics processes and procedure can be found at: Worth Group
-
There is also the phelp script located in
bin/phelpwhich has a lot of definitions of variables and dimensions that are useful. -
HDmctdh/include/maxv.f90also contains useful definitions of (maximum) dimensions. -
A list of the different ab initio types (abintype) can be found in
HDmctdh/lib/utilities/ioqc.f90 -
The code has a library containing linear algebra routines that are sometimes used (i.e., mmtxdd). The naming convention and the definition of each subroutine can be found in
HDmctdh/lib/linear/mmlib.F90.
There are many directories within the Quantics package, most of which are intuitive, but here is an overview of the main ones:
| Directory | Description |
|---|---|
| HDmctdh | Quantics source code |
| Install | Installation and compilation code |
| Packages | Contains installation and source code for external Quantics packages (i.e. those asked about when running install_quantics) |
| Tests | Contains the automated Elk_test which tests various input files |
| Inputs | Contains example input and operator files (some used in tutorials), useful for seeing general conditions for calculations |
Below is the general structure of Quantics.
Contents of HDmctdh:
| Directory | Description |
|---|---|
| analyse | All analyse programs for plotting/calculating values from Quantics outputs |
| dynwf | Dynamic wavefunction code |
| gendvr | Generating a DVR/FBR representation of the Hamiltonian and SPFs |
| geninwf | Create the initial wavepacket |
| genoper | Create the Hamiltonian |
| Include | Connects routines via common blocks (often imported at the top of modules e.g. use global) |
| Interfaces | Control interfaces with external packages |
| lib | Independent routines from Quantics (e.g. integrators or linear algebra calculations) |
| mcpotfit | ? |
| mctdh | Central modules (including Quantics) |
| mctdhlib | Modules that are used in multiple sections of the code |
| ml-mctdh | Routines for interaction between ML modules and MCTDH |
| npottools | ? |
| propdo | Propagation of the density operator |
| proprw | ? |
| proptr | Propagation of the trajectories |
| propwf | Propagation of the wavefunction |
| surfaces | ? |
For direct dynamics: include/dirdyn.f90 contains many variable definitions as its head.
