2020-01-21 11:21:49 +01:00
|
|
|
QCaml (Quantum Camel)
|
|
|
|
=====================
|
|
|
|
|
2020-01-21 17:13:44 +01:00
|
|
|
<img src="data/chamo_bg.png" width="300" >
|
2020-01-21 11:21:49 +01:00
|
|
|
|
2020-09-26 12:02:53 +02:00
|
|
|
QCaml is a quantum chemistry software written in OCaml.
|
|
|
|
|
2018-02-06 17:39:14 +01:00
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
|
|
|
* BLAS/LAPACK : Linear algebra
|
|
|
|
* LaCaml : LAPACK OCaml interface
|
2023-04-20 10:55:32 +02:00
|
|
|
* gmp : GNU Multiple Precision arithmetic library
|
2018-03-06 00:47:33 +01:00
|
|
|
* Zarith : Arbitrary-precision integers
|
2020-09-26 12:02:53 +02:00
|
|
|
* GetOpt : Parsing of command-line
|
2018-07-04 20:24:51 +02:00
|
|
|
* Alcotest : Lightweight testing framework
|
2023-04-20 10:55:32 +02:00
|
|
|
* odoc-ltxhtml : https://github.com/akabe/odoc-ltxhtml
|
2018-03-20 14:11:31 +01:00
|
|
|
|
2020-09-26 12:02:53 +02:00
|
|
|
```bash
|
2023-04-20 10:55:32 +02:00
|
|
|
opam install dune lacaml getopt alcotest zarith camlp-streams
|
2020-09-26 12:02:53 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
To use the Intel MKL library:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
export LACAML_LIBS="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_rt -lpthread -lm -ldl"
|
2023-02-24 17:16:39 +01:00
|
|
|
opam install --assume-depexts lacaml
|
2020-09-26 12:02:53 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
How to build the project
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
Run `make` to compile the libraries and executables that are
|
|
|
|
meant to be installed.
|
|
|
|
```
|
2024-06-20 15:38:37 +02:00
|
|
|
$ make
|
2020-09-26 12:02:53 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
How to run tests
|
|
|
|
----------------
|
|
|
|
|
|
|
|
```
|
|
|
|
$ make test
|
|
|
|
```
|
|
|
|
|
|
|
|
How to use local libraries interactively
|
|
|
|
----------------------------------------
|
|
|
|
|
|
|
|
Use `dune utop DIR` where DIR if the folder contains the `dune`
|
|
|
|
file for a library. For instance, our `sub2` sample library can be
|
|
|
|
used as follows:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ dune utop sub2/lib
|
|
|
|
...
|
|
|
|
utop # Proj_sub2.A.do_something ();;
|
|
|
|
1525373137.245 seconds have elapsed since 1970-01-01T00:00:00.
|
|
|
|
- : unit = ()
|
|
|
|
```
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
The project can be installed with or without opam.
|
|
|
|
Without opam, you can run the following which relies directly on
|
|
|
|
dune:
|
|
|
|
```
|
|
|
|
$ make install
|
|
|
|
```
|
|
|
|
Similarly:
|
|
|
|
```
|
|
|
|
$ make uninstall
|
|
|
|
```
|
|
|
|
|
|
|
|
With opam, you can install the current development version of your
|
|
|
|
project as a single opam package. It will override the currently
|
|
|
|
installed package of the same name, if any:
|
|
|
|
```
|
2020-09-26 16:45:52 +02:00
|
|
|
$ opam pin add QCaml .
|
2020-09-26 12:02:53 +02:00
|
|
|
```
|
|
|
|
For more information on `opam pin`, please consult the opam documentation.
|
2018-10-16 19:09:00 +02:00
|
|
|
|
2020-09-26 12:02:53 +02:00
|
|
|
The advantage of the opam-based method is that other opam packages can
|
|
|
|
depend on this one, and opam will recompile them automatically as
|
|
|
|
necessary.
|
2024-06-20 15:38:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
Profiling
|
|
|
|
---------
|
|
|
|
|
|
|
|
The Landmarks memory profiler can be used.
|
|
|
|
|
|
|
|
|