[go: up one dir, main page]

Menu

[107f32]: / README  Maximize  Restore  History

Download this file

116 lines (91 with data), 4.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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 Schroedinger and the Liouville-von-Neumann equations;
  switching can be done with few lines of code
- multiple coupled equations can be solved
- Lindblad and Redfield dissipation is implemented
- only equally-spaced grids / plane wave expansions 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
- diagonalization of the Hamiltonian matrix to solve for eigenstates and -energies

Also, there is some optimization lacking for complex Hamiltonians etc.
Naturally, we plan to extend this in the nearer future.


System requirements
===================

To be able to compile the code at all, 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 file 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}"
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. Several solutions can be found under the demos (everything below
directory Demos/), and in the acceptance tests under test/acceptance/. The
documentation also contains a small tutorial that should cover the basic
concepts of the library.

The documentation is also available online: 
http://wavepacket.sourceforge.net/cpp-doc/0.1.2/index.xhtml