10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-19 04:22:36 +01:00
quantum_package/README.md

157 lines
5.0 KiB
Markdown
Raw Normal View History

2016-03-19 18:26:39 +01:00
![QP](https://raw.githubusercontent.com/LCPQ/quantum_package/master/data/qp.png)
2016-03-19 18:25:04 +01:00
[![Build Status](https://travis-ci.org/LCPQ/quantum_package.svg?branch=master)](https://travis-ci.org/LCPQ/quantum_package)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/LCPQ/quantum_package?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2015-03-25 11:31:42 +01:00
2015-06-18 13:54:42 +02:00
Set of quantum chemistry programs and libraries.
(under GNU GENERAL PUBLIC LICENSE v2)
2014-11-09 18:28:40 +01:00
For more information, you can visit the [wiki of the project](http://github.com/LCPQ/quantum_package/wiki), or below for the installation instructions.
2015-06-18 13:51:27 +02:00
2016-10-07 21:00:10 +02:00
2016-10-07 20:58:30 +02:00
2016-02-06 18:45:11 +01:00
Demo
====
2016-02-07 22:01:50 +01:00
[![Full-CI energy of C2 in 2 minutes](https://i.vimeocdn.com/video/555047954_295x166.jpg)](https://vimeo.com/scemama/quantum_package_demo "Quantum Package Demo")
2016-02-06 18:45:11 +01:00
2016-10-07 21:00:10 +02:00
[![Frozen-core Full-CI energy of Ti](https://raw.githubusercontent.com/LCPQ/quantum_package/master/data/Titanium.png)](https://raw.githubusercontent.com/LCPQ/quantum_package/master/data/Titanium.png "Convergence of Ti in cc-pv{DTQ}Z")
2016-02-06 18:45:11 +01:00
2015-06-18 13:51:27 +02:00
# Installation
2016-01-26 01:40:14 +01:00
2015-06-18 13:51:27 +02:00
## Requirements
2015-06-18 13:54:42 +02:00
* Fortran compiler (`ifort` and `gfortran` are tested)
2015-06-18 13:51:27 +02:00
* Python >= 2.6
* GNU make
* Bash
2016-12-02 11:09:20 +01:00
* Blas/Lapack
2015-09-30 13:36:53 +02:00
* unzip
2015-10-08 13:08:23 +02:00
* g++ (For ninja)
2015-06-18 13:51:27 +02:00
## Standard installation
### 1) Configure
2017-07-17 15:53:49 +02:00
$ ./configure <config_file>
For example you can type `./configure config/gfortran.cfg`
2015-06-18 13:51:27 +02:00
2016-01-26 01:40:14 +01:00
This command has two purposes :
2015-06-18 13:51:27 +02:00
- Download and install all the requirements.
2015-10-05 14:27:18 +02:00
Installing OCaml and the Core library may take some time (up to 20min on an old machine).
2016-01-26 01:40:14 +01:00
- Create the file which contains all the dependencies for the binaries.
2017-07-17 15:53:49 +02:00
It's not a Makefile, but a Ninja file (so don't type `make` it's hopeless, type `ninja` instead)
2015-06-18 13:51:27 +02:00
2017-07-17 15:53:49 +02:00
#### Compilation Flags (`<config_file>`)
2015-06-18 13:51:27 +02:00
2016-01-26 01:40:14 +01:00
`<config_file>` is the path to the file which contains all the compilation flags (optimization flags, Lapack libary, etc). There are two example configure files in ``$QP_ROOT/config`` : ``ifort.cfg`` and ``gfortran.cfg``. You can copy these files to create a new file adapted to your architecture.
2015-06-18 13:51:27 +02:00
2016-01-26 01:40:14 +01:00
### 2) Load environment variables
2015-06-18 13:51:27 +02:00
source quantum_package.rc
2016-01-26 01:40:14 +01:00
2015-06-18 13:51:27 +02:00
This file contains all the environment variables needed by the quantum package both to compile and run. This should also be done before running calculations.
2016-01-26 01:40:14 +01:00
### Optional) Add some modules
2015-06-18 13:51:27 +02:00
2016-02-03 17:56:48 +01:00
```
Usage:
qp_module.py create -n <name> [<children_modules>...]
2015-09-30 13:36:53 +02:00
qp_module.py download -n <name> [<path_folder>...]
2016-02-03 17:56:48 +01:00
qp_module.py install <name>...
qp_module.py list (--installed | --available-local)
qp_module.py uninstall <name>
```
2015-06-18 13:51:27 +02:00
For exemple you can type :
2015-09-30 13:36:53 +02:00
`qp_module.py install Full_CI`
2015-06-18 13:51:27 +02:00
2016-01-26 01:40:14 +01:00
### 3) Compiling the Fortran
2015-06-18 13:51:27 +02:00
2017-07-17 15:53:49 +02:00
Just type `ninja` if you are in `$QP_ROOT`. The compilation will take approximately 3 min.
2015-06-18 13:51:27 +02:00
### 5) Testing if all is ok
2017-02-10 23:49:33 +01:00
cd tests ; ./run_tests.sh
2015-06-18 13:51:27 +02:00
2015-06-19 18:58:36 +02:00
# Note on EZFIO.cfg
2017-07-17 15:54:47 +02:00
## Format specification:
2015-06-19 18:58:36 +02:00
2015-06-19 18:58:58 +02:00
```
2015-06-19 18:58:36 +02:00
Required:
[<provider_name>] The name of the provider in irp.f90 and in the EZFIO lib
doc:<str> The plain text documentation
2016-01-26 01:40:14 +01:00
type:<str> A type supported by the OCaml.
2015-06-19 18:58:36 +02:00
type `ei_handler.py get_supported_type` for a list
2016-01-26 01:40:14 +01:00
interface:<str> The interface is a list of strings sepeared by "," which can contain :
- ezfio : to build the EZFIO API
- provider : to build the corresponding providers
- ocaml : to build the corresponding bindings in OCaml
2015-06-19 18:58:36 +02:00
Optional:
2016-01-26 01:40:14 +01:00
default: <str> The default value,
needed if 'ocaml' is in interface list.
2015-06-19 18:58:36 +02:00
! No list is allowed for now !
size: <str> The size information.
(by default is one)
2016-01-26 01:40:14 +01:00
Example : 1; =sum(ao_num); (ao_num,3)
WARNING : The module and the value are separed by a "." not a "_".
For example (determinants.n_det)
ezfio_name: <str> The name in the EZFIO API
2015-06-19 18:58:36 +02:00
(by default is <provider_name>)
2016-01-26 01:40:14 +01:00
ezfio_dir: <str> Will be the directory of EZFIO.
2015-06-19 18:58:36 +02:00
(by default is <module_lower>)
2015-06-19 18:58:58 +02:00
```
2015-06-19 18:58:36 +02:00
2017-07-17 15:54:47 +02:00
## Example of EZFIO.cfg:
2015-06-19 18:58:36 +02:00
```
[thresh_SCF]
doc: Threshold on the convergence of the Hartree Fock energy
type: Threshold
default: 1.e-10
interface: provider,ezfio,ocaml
size: 1
[energy]
type: Strictly_negative_float
doc: Calculated HF energy
interface: ezfio
2015-07-15 14:31:48 +02:00
```
2017-07-17 15:53:49 +02:00
# FAQ
### My hartree-Fock segfault !
A old version of Lapack have a bug. Just relax your convergence criterium
2015-07-15 14:31:48 +02:00
### Error: ezfio_* is already defined.
#### Why ?
2017-07-17 15:53:49 +02:00
You have two or more ezfio configuration files for the same variable. Check files in `$QP_ROOT/install/EZFIO/config/` and the all the `EZFIO.cfg`.
2015-07-15 14:31:48 +02:00
#### Fix
- rm $QP_ROOT/install/EZFIO/config/*
2015-10-05 14:27:18 +02:00
- ninja
2016-02-12 13:48:43 +01:00
### Error: Seg Fault (139)
```
Segmentation fault (core dumped)
Program exited with code 139.
```
#### Why ?
2016-10-07 20:58:30 +02:00
It's caused when we call the DGEMM routine of LAPACK.
2016-02-12 13:48:43 +01:00
2017-07-17 15:54:47 +02:00
#### Fix
2016-02-12 13:48:43 +01:00
2017-02-10 23:49:33 +01:00
Set `ulimit -s unlimited`, before runing `qp_run`. It seems to fix the problem.
2016-02-12 13:48:43 +01:00