10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00
This repository is version 1 of QP. This version is not supported any more. Version 2 is available here : https://github.com/QuantumPackage/qp2
Go to file
madgal 113f0757ee Added save iterations to Full_CI_ZMQ (#203)
* Added/Updated files to save iterations 

Modified EZFIO.cfg to include iteratively saved data if the keyword of "full_ci_zmq/iterative" is set to true in the ezfio. The default is false. 
Will save the number of total iterations in full_ci_zmq/n_iter
Saves the number of determinants in full_ci_zmq/n_det_iter
Saves the energy in full_ci_zmq/energy_iter.
Saves the energy_pt2  in full_ci_zmq/energybefore_pt2_iter
These results are the same as the output of the program at every iteration.

Modified fci_zmq.irp.f to include calls to fci_iterations.irp.f at each iteration (starting at N_det==1 and including the final call to do the final pt2 correction)

Created fci_iterations as a subroutine to save the number of determinants, energy, and energy+pt2 for every iteration and saves the results in the full_ci_zmq output directory.

* Updated files to include 3 save options 

Updated "iterative" in EZFIO.cfg to be an integer that can take the values of 1 (Append), 2 (Overwrite), or 3 (Do not save). 
Updated fci_iterations to be simpler and include the three options.

Also updated the output so that only N_det, energy, and pt2 are output. The user must manipulate from there.

* Delete fci_iterations.irp.f

The file was modified and moved to fci_iterations.f90

* Fixed the comments

* Rename fci_iterations to dump_fci_iterations_value

Changed name to be clear on purpose.

* Updated files for iterative saving

Renamed fci_iterations to dump_fci_iterations_value for clarity
In EZFIO.cfg changed keyword "iterative" to "iterative_save" for clarity
Update dump_fci_iterations_value with "iterative_save" keyword
Removed call to dump_fci_iterations on line 27 in fci_zmq
Updated fci_zmq with the name change for calls

* Delete fci_zmq.irp.f

* Delete fci_zmq_pt2.irp.f

* Delete EZFIO.cfg

* Get latest updates from master

* Added calls to dump_fci_iterations_value

* Readded dump_fci_iterations_value

* Updated EZFIO.cfg
2017-06-27 20:30:09 +02:00
bin Improved setup scripts to auto-install curl and m4 2014-10-23 22:40:21 +02:00
config Working on Slater dressing 2017-06-08 22:15:42 +02:00
data Fixed bug 2017-06-19 11:14:03 +02:00
doc fix #169 2016-10-24 16:54:54 -05:00
include Updated install scripts 2016-12-02 12:04:38 +01:00
install Removed gmp and zarith dependencies by forcing cryptokit 1.10 2016-12-02 16:20:02 +01:00
lib Add Downloads and lib 2015-06-08 15:02:08 +02:00
ocaml Working on dressing 2017-06-20 19:26:14 +02:00
plugins Added save iterations to Full_CI_ZMQ (#203) 2017-06-27 20:30:09 +02:00
promela Promela model 2017-05-02 22:53:59 +02:00
scripts Review 2017-06-19 09:42:52 +02:00
src Fixed ddcc1a5 2017-06-26 20:59:59 +02:00
tests Fixed ddcc1a5 2017-06-26 20:59:59 +02:00
.gitattributes Added gitattributes 2015-04-02 12:30:34 +02:00
.gitignore block config/ifort.cfg 2016-09-09 19:41:17 +02:00
.travis.yml Update Travis to trusty 2017-06-16 18:07:27 +02:00
configure Removed production mode in configure 2017-05-23 18:37:41 +02:00
LICENSE Initial commit 2014-04-01 02:24:45 -07:00
README.md Merge (#54) 2017-06-08 21:31:43 +02:00

QP
Build Status Gitter

Set of quantum chemistry programs and libraries. (under GNU GENERAL PUBLIC LICENSE v2)

For more information, you can visit the wiki of the project, or below for the installation instructions.

Demo

Full-CI energy of C2 in 2 minutes

Frozen-core Full-CI energy of Ti

Installation

Requirements

  • Fortran compiler (ifort and gfortran are tested)
  • Python >= 2.6
  • GNU make
  • Bash
  • Blas/Lapack
  • unzip
  • g++ (For ninja)

Standard installation

1) Configure

$ ./configure <config_file> (--production | --development)

For example you can type ./configure config/gfortran.cfg --production

This command has two purposes :

  • Download and install all the requirements. Installing OCaml and the Core library may take some time (up to 20min on an old machine).
  • Create the file which contains all the dependencies for the binaries.
    Its not a Makefile, but a Ninja file (so dont type make is hopeless, type ninja instead)

####Compilation Flags (<config_file>)

<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.

What utilization of the code will you do?

  • If you only want the binaries (for production workflow) use the flag --production. It compiles faster.
  • Else if you are a developer and you want to be able to compile specific modules use: --development. It will create the build.ninja in each module.

2) Load environment variables

source quantum_package.rc

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.

Optional) Add some modules

Usage:
       qp_module.py create -n <name> [<children_modules>...]
       qp_module.py download -n <name> [<path_folder>...]
       qp_module.py install <name>...
       qp_module.py list (--installed | --available-local)
       qp_module.py uninstall <name>

For exemple you can type : qp_module.py install Full_CI

3) Compiling the Fortran

Just type ninja if you are in $QP_ROOT (or ninja -f $QP_ROOT/build.ninja elsewhere). The compilation will take approximately 3 min.

If you have set the --developement flag you can go in any module directory and run ninja to build only this particular module. You can type ninja all in a module to compile all the submodules.

4) Compiling the OCaml

make -C $QP_ROOT/ocaml

5) Testing if all is ok

cd tests ; ./run_tests.sh

Note on EZFIO.cfg

##Format specification :

Required:
    [<provider_name>]   The name of the provider in irp.f90 and in the EZFIO lib
    doc:<str>           The plain text documentation
    type:<str>          A type supported by the OCaml.
                            type `ei_handler.py get_supported_type` for a list
    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
Optional:
    default: <str>      The default value,
                            needed if 'ocaml' is in interface list.
                           ! No list is allowed for now !
    size: <str>         The size information.
                            (by default is one)
                            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
                             (by default is <provider_name>)
    ezfio_dir: <str>    Will be the directory of EZFIO.
                              (by default is <module_lower>)

##Example of EZFIO.cfg:

[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

#FAQ

Error: ezfio_* is already defined.

Why ?

You have two or more ezfio configuration files for the same variable. Check files in $QP_ROOT/install/EZFIO/config/

Fix

- rm $QP_ROOT/install/EZFIO/config/*
- ninja 

Error: Seg Fault (139)

Segmentation fault (core dumped)
Program exited with code 139.

Why ?

Its caused when we call the DGEMM routine of LAPACK.

Fix

Set ulimit -s unlimited, before runing qp_run. It seems to fix the problem.