mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
Merge branch 'master' of github.com:LCPQ/quantum_package into LCPQ-master
This commit is contained in:
commit
7aa81feb5f
42
README.md
42
README.md
@ -32,27 +32,21 @@ Demo
|
||||
|
||||
### 1) Configure
|
||||
|
||||
$ ./configure <config_file> (--production | --development)
|
||||
|
||||
For example you can type `./configure config/gfortran.cfg --production`
|
||||
$ ./configure <config_file>
|
||||
|
||||
For example you can type `./configure config/gfortran.cfg`
|
||||
|
||||
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.
|
||||
It's not a Makefile, but a Ninja file (so don't type `make` is hopeless, type `ninja` instead)
|
||||
It's not a Makefile, but a Ninja file (so don't type `make` it's hopeless, type `ninja` instead)
|
||||
|
||||
####Compilation Flags (`<config_file>`)
|
||||
#### 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
|
||||
@ -75,24 +69,16 @@ Usage:
|
||||
|
||||
### 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
|
||||
Just type `ninja` if you are in `$QP_ROOT`. The compilation will take approximately 3 min.
|
||||
|
||||
### 5) Testing if all is ok
|
||||
|
||||
cd tests ; ./run_tests.sh
|
||||
|
||||
|
||||
|
||||
# Note on EZFIO.cfg
|
||||
|
||||
##Format specification :
|
||||
## Format specification:
|
||||
|
||||
```
|
||||
Required:
|
||||
@ -119,7 +105,7 @@ Optional:
|
||||
(by default is <module_lower>)
|
||||
```
|
||||
|
||||
##Example of EZFIO.cfg:
|
||||
## Example of EZFIO.cfg:
|
||||
|
||||
```
|
||||
[thresh_SCF]
|
||||
@ -135,19 +121,23 @@ doc: Calculated HF energy
|
||||
interface: ezfio
|
||||
```
|
||||
|
||||
#FAQ
|
||||
# FAQ
|
||||
|
||||
### My hartree-Fock segfault !
|
||||
|
||||
A old version of Lapack have a bug. Just relax your convergence criterium
|
||||
|
||||
|
||||
### 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/`
|
||||
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`.
|
||||
|
||||
#### Fix
|
||||
|
||||
- rm $QP_ROOT/install/EZFIO/config/*
|
||||
- ninja
|
||||
|
||||
|
||||
### Error: Seg Fault (139)
|
||||
|
||||
@ -160,7 +150,7 @@ Program exited with code 139.
|
||||
|
||||
It's caused when we call the DGEMM routine of LAPACK.
|
||||
|
||||
##### Fix
|
||||
#### Fix
|
||||
|
||||
Set `ulimit -s unlimited`, before runing `qp_run`. It seems to fix the problem.
|
||||
|
||||
|
@ -10,6 +10,7 @@ type t =
|
||||
|Na|Mg |Al|Si|P |S |Cl|Ar
|
||||
|K |Ca|Sc|Ti|V |Cr|Mn|Fe|Co|Ni|Cu|Zn|Ga|Ge|As|Se|Br|Kr
|
||||
|Rb|Sr|Y |Zr|Nb|Mo|Tc|Ru|Rh|Pd|Ag|Cd|In|Sn|Sb|Te|I |Xe
|
||||
|Pt
|
||||
with sexp
|
||||
|
||||
let of_string x =
|
||||
@ -69,6 +70,7 @@ let of_string x =
|
||||
| "Te" | "Tellurium" -> Te
|
||||
| "I" | "Iodine" -> I
|
||||
| "Xe" | "Xenon" -> Xe
|
||||
| "Pt" | "Platinum" -> Pt
|
||||
| x -> raise (ElementError ("Element "^x^" unknown"))
|
||||
|
||||
|
||||
@ -128,6 +130,7 @@ let to_string = function
|
||||
| Te -> "Te"
|
||||
| I -> "I"
|
||||
| Xe -> "Xe"
|
||||
| Pt -> "Pt"
|
||||
|
||||
|
||||
let to_long_string = function
|
||||
@ -186,6 +189,7 @@ let to_long_string = function
|
||||
| Te -> "Tellurium"
|
||||
| I -> "Iodine"
|
||||
| Xe -> "Xenon"
|
||||
| Pt -> "Platinum"
|
||||
|
||||
|
||||
let to_charge c =
|
||||
@ -245,6 +249,7 @@ let to_charge c =
|
||||
| Te -> 52
|
||||
| I -> 53
|
||||
| Xe -> 54
|
||||
| Pt -> 78
|
||||
in Charge.of_int result
|
||||
|
||||
|
||||
@ -304,6 +309,7 @@ let of_charge c = match (Charge.to_int c) with
|
||||
| 52 -> Te
|
||||
| 53 -> I
|
||||
| 54 -> Xe
|
||||
| 78 -> Pt
|
||||
| x -> raise (ElementError ("Element of charge "^(string_of_int x)^" unknown"))
|
||||
|
||||
|
||||
@ -364,6 +370,7 @@ let covalent_radius x =
|
||||
| Te -> 1.38
|
||||
| I -> 1.39
|
||||
| Xe -> 1.40
|
||||
| Pt -> 1.30
|
||||
in
|
||||
Units.angstrom_to_bohr *. (result x)
|
||||
|> Positive_float.of_float
|
||||
@ -425,6 +432,7 @@ let vdw_radius x =
|
||||
| Te -> 2.06
|
||||
| I -> 1.98
|
||||
| Xe -> 2.16
|
||||
| Pt -> 1.75
|
||||
in
|
||||
Units.angstrom_to_bohr *. (result x)
|
||||
|> Positive_float.of_float
|
||||
@ -486,6 +494,7 @@ let mass x =
|
||||
| Te -> 127.60
|
||||
| I -> 126.90447
|
||||
| Xe -> 131.293
|
||||
| Pt -> 195.084
|
||||
in
|
||||
result x
|
||||
|> Positive_float.of_float
|
||||
|
@ -7,6 +7,7 @@ type t =
|
||||
|Na|Mg |Al|Si|P |S |Cl|Ar
|
||||
|K |Ca|Sc|Ti|V |Cr|Mn|Fe|Co|Ni|Cu|Zn|Ga|Ge|As|Se|Br|Kr
|
||||
|Rb|Sr|Y |Zr|Nb|Mo|Tc|Ru|Rh|Pd|Ag|Cd|In|Sn|Sb|Te|I |Xe
|
||||
|Pt
|
||||
with sexp
|
||||
|
||||
(** String conversion functions *)
|
||||
|
Loading…
Reference in New Issue
Block a user