Read Me
Description
===========
This is a C++ library to numerically solve the Schroedinger equation for
distinguishable particles.
The code is under the GNU General Public License; see the accompagnying license
file for the lawyer text.
The current status in brief:
- you can solve the time-dependent and time-independent Schroedinger equation
- you can solve Liouville-von-Neumann equations;
Lindblad and Redfield dissipation is implemented
- multiple coupled equations can be solved; multiple coupled channels
(/electronic states) are also supported
- plane wave expansions and a spherical harmonics grid are implemented
- Some common operators are defined, in particular Cartesian kinetic energy and
harmonic and Morse potentials.
- Various operators allow extension with user-defined functions (potentials and such,
time-dependent laser fields), and complex operators can be composed from elementary
ones (addition, multiplication)
- Several ODE propagators as well as the Chebychev polynomial method are implemented
- initial product states can be set up from various standard types; more complex
compositions are partially supported
- you can print standard values and calculate and print out expectation values
Also, there is some optimization lacking for complex Hamiltonians etc.
Naturally, we plan to extend this in the nearer future.
System requirements
===================
Note that there is a virtual machine image on the homepage for quick&simple installation.
See https://sourceforge.net/p/wavepacket/cpp/wiki/VirtualMachine/
To be able to compile the code, you need the following:
* CMake, at least version 3.5
* a compiler that implements the C++-11 standard.
One of the later g++ (around version 4.7) or CLang++ version 3.2 should be fine.
* the tensor library that we use
- clone it via git
git clone https://github.com/juanjosegarciaripoll/tensor.git
then compile and install it (usual autoconf setup)
- note that you will need to enable FFTW support, which also requires the fftw libraries
(run the configure script with "--with-fftw")
- you can also try out the mps-bundle, which may offer more convenient compilation
git clone https://github.com/juanjosegarciaripoll/mps-bundle.git
* the boost libraries from http://www.boost.org
- You need at least boost version 1.56
* doxygen if you want to build the documentation ("make build-doc")
Compilation and getting started
===============================
Simple Installation
-------------------
Since version 0.1.2, WavePacket uses CMake for the setup of the build process.
Assuming you have all requirements installed in standard locations, you can
compile and install the library by the following steps. They assume
the wavepacket directory (where this Readme resides) to be ${WP_SRCDIR}.
1. Create a new build directory where the binary files will be placed
(we do a so-called out-of-source build)
2. In the build directory, run "cmake ${WP_SRCDIR}"
Depending on your CMake and Boost version, there may be a warning about
imported targets in FindBoost.cmake. You can safely ignore that.
3. In the build directory, run "make -j 4" (or however many cores you have).
You can also build the documentation with "make build-doc"
4. Check that everything went ok by running "test/TestRunner"; all tests should be
green (rarely, a test can fail by chance, then a rerun should be green, if you
still have problems, drop a mail).
5. Install everything by running "make install"
afterwards you can remove the build directory if you wish
Configuration
-------------
You can change various settings of the build process by defining variables to
your preferences. There are three ways to do so:
1. When you originally run cmake, add flags "-D<var>=<value>", for example
cmake -DCMAKE_BUILD_TYPE=Debug ${WP_SRCDIR}
2. After running cmake once, run
ccmake ${WP_SRCDIR}
This fires up a textmode program where you can edit the variables and
reconfigure/regenerate the build system by hitting "c", then "g".
Some variables are marked as advanced, hit "t" to be able to edit them.
3. After running cmake once, run "cmake-gui" for a graphical interface for
the editing of the variables.
The most important variables that you may wish to change:
* TENSOR_CONFIG
the full path to the tensor-config script that was installed together
with the tensor library. Only needed if you installed into an uncommon
directory.
* Opt_BuildDemos
If you set this to "OFF", the demos will not be built.
* CMAKE_INSTALL_PREFIX
defines the root path where all the libraries and such will be installed.
Default is "/usr/local"
* CMAKE_CXX_COMPILER
the full path to the C++ compiler to use
First Steps
-----------
In the directory template/ you can find an example program with the CMake file
and documentation that can serve as a template to write and compile your own
programs.
The package documentation is also available online:
http://wavepacket.sourceforge.net/cpp-doc/0.1.4/index.xhtml
It contains a small tutorial that should cover the basic concepts of the library.
Also, some special use-cases/demos are discussed in depth. Several solutions to
common problems can be found under the demos (everything below directory
Demos/), and in the acceptance tests under test/acceptance/.