9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-08 22:43:38 +01:00

Compare commits

..

30 Commits

Author SHA1 Message Date
b28273ce8d Merge branch 'dev-lct' of github.com:QuantumPackage/qp2 into dev-lct 2019-06-15 00:46:29 +02:00
Emmanuel Giner LCT
f877b41ef5 added kinetic density 2019-06-15 00:45:51 +02:00
Emmanuel Giner LCT
35f7f7b773 added scan functional 2019-06-15 00:45:51 +02:00
191d8ff0af Added qp_tunnel 2019-06-15 00:43:09 +02:00
7cb3321152 Merge branch 'dev' of github.com:QuantumPackage/qp2 into dev 2019-06-15 00:42:04 +02:00
6479c294e8 Updated documentation 2019-06-15 00:29:13 +02:00
51f81843a6 Updated documentation 2019-06-15 00:20:35 +02:00
Emmanuel Giner LCT
a6bff0220f added kinetic density 2019-06-13 19:07:01 +02:00
Emmanuel Giner LCT
244b130a72 added scan functional 2019-06-13 15:58:04 +02:00
Anthony Scemama
5d6a3201fe
Merge pull request #48 from QuantumPackage/master
Merge release version
2019-06-11 11:53:47 +02:00
Anthony Scemama
2026a1d11f
Merge pull request #46 from QuantumPackage/dev-lct
Dev lct
2019-06-11 11:16:33 +02:00
da0ce1e11f Added bibtex entry 2019-06-11 10:47:03 +02:00
Emmanuel Giner LCT
c568f0b943 Merge branch 'master' into dev-lct 2019-06-08 16:40:13 +02:00
Emmanuel Giner LCT
de0802a56d Merge branch 'dev-lcpq' into dev-lct 2019-06-08 16:39:38 +02:00
Emmanuel Giner LCT
ff4f6d1c98 modifs in ec_lyp 2019-06-08 16:39:12 +02:00
Anthony Scemama
231b071d78
Merge pull request #45 from QuantumPackage/dev-lcpq
Dev lcpq
2019-06-08 16:24:33 +02:00
22ab996d00 Merge branch 'anbenali-Fix_Bug_ECP' 2019-06-08 15:52:55 +02:00
00375418e5 Merge branch 'Fix_Bug_ECP' of https://github.com/anbenali/qp2 into anbenali-Fix_Bug_ECP 2019-06-08 15:52:33 +02:00
Emmanuel Giner LCT
71c186e67a added gradients of the squared of the total density 2019-06-04 19:35:09 +02:00
Barthelemy Pradines LCT
4093466b95 fixed little bug 2019-05-31 17:43:05 +02:00
Barthelemy Pradines LCT
419681278b Merge branch 'dev-lct' of https://github.com/QuantumPackage/qp2 into dev-lct 2019-05-31 17:37:43 +02:00
Barthelemy Pradines LCT
e13175e328 added regular_range_Hartree_operator 2019-05-31 17:36:16 +02:00
Emmanuel Giner LCT
f343b5c00a Merge branch 'dev-lcpq' into dev-lct 2019-05-31 15:35:35 +02:00
Emmanuel Giner LCT
9acc90d659 Merge branch 'dev-lct' of https://github.com/QuantumPackage/qp2 into dev-lct 2019-05-31 15:35:01 +02:00
anbenali
70536970b0 Fix small format issue in ECP 2019-05-29 12:03:06 -05:00
Emmanuel Giner LCT
76ead1cdfb added ec_lyp 2019-05-28 19:31:47 +02:00
bdc56d4ee3
Merge pull request #42 from QuantumPackage/dev-lcpq
Dev lcpq
2019-05-28 13:51:38 +02:00
anbenali
5d951efd51 Update Readme file with description of Basis Set 2019-05-24 13:55:43 -05:00
anbenali
0b3cd3fdef ECP from ncsu 2019-05-24 12:19:23 -05:00
anbenali
83a9ce67db Adding Basis Sets and ECP from NCSU. When available He core ECP are chosen instead of large core. This applies to Na Mg Al Si P S Cl and Ar 2019-05-24 12:18:48 -05:00
79 changed files with 2315 additions and 337 deletions

View File

@ -46,7 +46,7 @@ Requirements
- `GMP <https://gmplib.org/>`_ : Gnu Multiple Precision Arithmetic Library
- |OCaml| compiler with |OPAM| package manager
- `Bubblewrap <https://github.com/projectatomic/bubblewrap>`_ : Sandboxing tool required by Opam
- `libcap https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git`_ : POSIX capabilities required by Bubblewrap
- `libcap <https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git>`_ : POSIX capabilities required by Bubblewrap
- |Ninja| : a parallel build system

View File

@ -1,13 +1,28 @@
# Quantum Package 2.0
<img src="https://raw.githubusercontent.com/QuantumPackage/qp2/master/data/qp2.png" width="250">
[*Quantum package 2.0: an open-source determinant-driven suite of programs*](https://pubs.acs.org/doi/10.1021/acs.jctc.9b00176)\
Y. Garniron, K. Gasperich, T. Applencourt, A. Benali, A. Ferté, J. Paquier, B. Pradines, R. Assaraf, P. Reinhardt, J. Toulouse, P. Barbaresco, N. Renon, G. David, J. P. Malrieu, M. Véril, M. Caffarel, P. F. Loos, E. Giner and A. Scemama\
J. Chem. Theory Comput. (2019)\
J. Chem. Theory Comput., 15:6, 3591--3609, (2019)\
https://arxiv.org/abs/1902.08154
<img src="https://raw.githubusercontent.com/QuantumPackage/qp2/master/data/qp2.png" width="250">
```
@article{doi:10.1021/acs.jctc.9b00176,
author = {Garniron, Yann and Applencourt, Thomas and Gasperich, Kevin and Benali, Anouar and Ferté, Anthony and Paquier, Julien and Pradines, Barthélémy and Assaraf, Roland and Reinhardt, Peter and Toulouse, Julien and Barbaresco, Pierrette and Renon, Nicolas and David, Grégoire and Malrieu, Jean-Paul and Véril, Mickaël and Caffarel, Michel and Loos, Pierre-François and Giner, Emmanuel and Scemama, Anthony},
title = {Quantum Package 2.0: An Open-Source Determinant-Driven Suite of Programs},
journal = {Journal of Chemical Theory and Computation},
volume = {15},
number = {6},
pages = {3591-3609},
year = {2019},
doi = {10.1021/acs.jctc.9b00176},
note ={PMID: 31082265},
URL = { https://doi.org/10.1021/acs.jctc.9b00176 },
eprint = { https://doi.org/10.1021/acs.jctc.9b00176 }
}
```
# Getting started

View File

@ -1,71 +0,0 @@
#!/usr/bin/env python2
"""
Creates an ssh tunnel for using slaves on another network.
Launch a server on the front-end node of the cluster on which the master
process runs. Then start a client ont the front-end node of the distant
cluster.
Usage:
qp_tunnel server EZFIO_DIR
qp_tunnel client <address> EZFIO_DIR
Options:
-h --help
"""
import os
import sys
import zmq
try:
import qp_path
except ImportError:
print "source .quantum_package.rc"
raise
from docopt import docopt
from ezfio import ezfio
def get_address(filename):
with open(os.path.join(filename,'work','qp_run_address'),'r') as f:
a = f.readlines()[0].strip()
return a
def set_address(filename,address):
with open(os.path.join(filename,'work','qp_run_address'),'r') as f:
backup = f.readlines()
with open(os.path.join(filename,'work','qp_run_address'),'w') as f:
f.write('\n'.join([address]+backup))
def main_server(arguments,filename):
destination = get_address(filename)
print destination
def main_client(arguments,filename):
destination = arguments["<address>"]
print destination
def main(arguments):
"""Main function"""
print arguments
filename = arguments["EZFIO_DIR"]
if arguments["server"]:
return main_server(arguments, filename)
if arguments["client"]:
return main_client(arguments, filename)
if __name__ == '__main__':
ARGUMENTS = docopt(__doc__)
main(ARGUMENTS)

View File

@ -1,5 +1,5 @@
BORON
S 9 1.00
S 9
1 11.76050 -0.0036757
2 5.150520 0.0250517
3 2.578276 -0.1249228
@ -9,15 +9,15 @@ BORON
7 0.161898 0.4308431
8 0.081044 0.2486558
9 0.040569 0.0317295
S 1 1.00
S 1
1 0.614105 1.000000
S 1 1.00
S 1
1 0.375720 1.000000
S 1 1.00
S 1
1 0.170896 1.000000
S 1 1.00
S 1
1 0.070664 1.000000
P 9 1.00
P 9
1 7.470701 0.0047397
2 3.735743 0.0376009
3 1.868068 0.0510600
@ -27,37 +27,37 @@ P 9 1.00
7 0.116803 0.2850185
8 0.058408 0.1448808
9 0.029207 0.0176962
P 1 1.00
P 1
1 0.566611 1.000000
P 1 1.00
P 1
1 0.436327 1.000000
P 1 1.00
P 1
1 0.143772 1.000000
P 1 1.00
P 1
1 0.057917 1.000000
D 1 1.00
D 1
1 1.022256 1.000000
D 1 1.00
D 1
1 0.808233 1.000000
D 1 1.00
D 1
1 0.380163 1.000000
D 1 1.00
D 1
1 0.134838 1.000000
F 1 1.00
F 1
1 1.002171 1.000000
F 1 1.00
F 1
1 0.799174 1.000000
F 1 1.00
F 1
1 0.272717 1.000000
G 1 1.00
G 1
1 0.824366 1.000000
G 1 1.00
G 1
1 0.486131 1.000000
H 1 1.00
H 1
1 0.632779 1.000000
CARBON
S 9 1.00
S 9
1 13.073594 0.0051583
2 6.541187 0.0603424
3 4.573411 -0.1978471
@ -67,15 +67,15 @@ CARBON
7 0.231300 0.4336405
8 0.102619 0.2131940
9 0.051344 0.0049848
S 1 1.00
S 1
1 0.098302 1.000000
S 1 1.00
S 1
1 0.232034 1.000000
S 1 1.00
S 1
1 0.744448 1.000000
S 1 1.00
S 1
1 1.009914 1.000000
P 9 1.00
P 9
1 9.934169 0.0209076
2 3.886955 0.0572698
3 1.871016 0.1122682
@ -85,33 +85,33 @@ P 9 1.00
7 0.117063 0.2016934
8 0.058547 0.0453575
9 0.029281 0.0029775
P 1 1.00
P 1
1 0.084047 1.000000
P 1 1.00
P 1
1 0.216618 1.000000
P 1 1.00
P 1
1 0.576869 1.000000
P 1 1.00
P 1
1 1.006252 1.000000
D 1 1.00
D 1
1 0.206619 1.000000
D 1 1.00
D 1
1 0.606933 1.000000
D 1 1.00
D 1
1 1.001526 1.000000
D 1 1.00
D 1
1 1.504882 1.000000
F 1 1.00
F 1
1 0.400573 1.000000
F 1 1.00
F 1
1 1.099564 1.000000
F 1 1.00
F 1
1 1.501091 1.000000
G 1 1.00
G 1
1 0.797648 1.000000
G 1 1.00
G 1
1 1.401343 1.000000
H 1 1.00
H 1
1 1.001703 1.000000
NITROGEN
@ -320,7 +320,7 @@ G 1
H 1
1 0.249975 1.00000000
MG
MAGNESIUM
S 12
1 63.931893 -0.00079400
2 31.602596 0.00747900
@ -500,7 +500,7 @@ G 1
H 1
1 0.441969 1.00000000
SI
SILICON
S 12
1 96.651837 -0.00044000
2 48.652547 0.01867100
@ -625,7 +625,7 @@ S 1
1 0.216983 1.00000000
S 1
1 0.094992 1.00000000
PHOSPHORUS 12
P 12
1 48.154282 0.01288400
2 25.406431 0.09709500
3 13.404555 0.17821500
@ -638,7 +638,7 @@ PHOSPHORUS 12
10 0.152550 -0.00006600
11 0.080486 0.00012900
12 0.042465 -0.00002900
PHOSPHORUS 12
P 12
1 48.154282 -0.00315200
2 25.406431 -0.02300600
3 13.404555 -0.04239800
@ -651,13 +651,13 @@ PHOSPHORUS 12
10 0.152550 0.34480600
11 0.080486 0.18173100
12 0.042465 0.03664900
PHOSPHORUS 1
P 1
1 2.103768 1.00000000
PHOSPHORUS 1
P 1
1 0.988246 1.00000000
PHOSPHORUS 1
P 1
1 0.464229 1.00000000
PHOSPHORUS 1
P 1
1 0.218072 1.00000000
D 1
1 2.461614 1.00000000
@ -681,7 +681,7 @@ H 1
1 0.737477 1.00000000
SULFUR
SULFUR 12
S 12
1 306.317903 0.00006400
2 146.602801 -0.00078500
3 70.163647 0.02247100
@ -694,7 +694,7 @@ SULFUR
10 0.403554 0.00443600
11 0.193140 -0.00101500
12 0.092436 0.00050700
SULFUR 12
S 12
1 306.317903 0.00002100
2 146.602801 -0.00000400
3 70.163647 -0.00611900
@ -707,13 +707,13 @@ SULFUR 12
10 0.403554 0.52928200
11 0.193140 0.46625400
12 0.092436 0.12580000
SULFUR 1
S 1
1 1.476765 1.00000000
SULFUR 1
S 1
1 0.646261 1.00000000
SULFUR 1
S 1
1 0.282816 1.00000000
SULFUR 1
S 1
1 0.123766 1.00000000
P 12
1 55.148271 0.01344700
@ -1206,7 +1206,7 @@ H 1
I 1
1 2.384691 1.00000000
TI
TITANIUM
S 13
1 68.910511 0.00061600
2 33.720700 -0.00750100
@ -2742,7 +2742,7 @@ H 1
I 1
1 3.729940 1.00000000
NI
NICKEL
S 13
1 97.161835 0.00070900
2 51.187866 -0.01239900

View File

@ -1,5 +1,5 @@
BORON
S 9 1.00
S 9
1 11.76050 -0.0036757
2 5.150520 0.0250517
3 2.578276 -0.1249228
@ -9,9 +9,9 @@ BORON
7 0.161898 0.4308431
8 0.081044 0.2486558
9 0.040569 0.0317295
S 1 1.00
S 1
1 0.082513 1.000000
P 9 1.00
P 9
1 7.470701 0.0047397
2 3.735743 0.0376009
3 1.868068 0.0510600
@ -21,13 +21,13 @@ P 9 1.00
7 0.116803 0.2850185
8 0.058408 0.1448808
9 0.029207 0.0176962
P 1 1.00
P 1
1 0.086803 1.000000
D 1 1.00
D 1
1 0.349879 1.000000
CARBON
S 9 1.00
S 9
1 13.073594 0.0051583
2 6.541187 0.0603424
3 4.573411 -0.1978471
@ -37,9 +37,9 @@ CARBON
7 0.231300 0.4336405
8 0.102619 0.2131940
9 0.051344 0.0049848
S 1 1.00
S 1
1 0.127852 1.000000
P 9 1.00
P 9
1 9.934169 0.0209076
2 3.886955 0.0572698
3 1.871016 0.1122682
@ -49,9 +49,9 @@ P 9 1.00
7 0.117063 0.2016934
8 0.058547 0.0453575
9 0.029281 0.0029775
P 1 1.00
P 1
1 0.149161 1.000000
D 1 1.00
D 1
1 0.561160 1.000000
NITROGEN
@ -170,7 +170,7 @@ P 1
D 1
1 0.093145 1.00000000
MG
MAGNESIUM
S 12
1 63.931893 -0.00079400
2 31.602596 0.00747900
@ -290,7 +290,7 @@ P 1
D 1
1 0.189387 1.00000000
SI
SILICON
S 12
1 96.651837 -0.00044000
2 48.652547 0.01867100
@ -379,7 +379,7 @@ S 12
12 0.072398 0.12409900
S 1
1 0.111116 1.00000000
PHOSPHORUS 12
P 12
1 48.154282 0.01288400
2 25.406431 0.09709500
3 13.404555 0.17821500
@ -392,7 +392,7 @@ PHOSPHORUS 12
10 0.152550 -0.00006600
11 0.080486 0.00012900
12 0.042465 -0.00002900
PHOSPHORUS 12
P 12
1 48.154282 -0.00315200
2 25.406431 -0.02300600
3 13.404555 -0.04239800
@ -405,13 +405,13 @@ PHOSPHORUS 12
10 0.152550 0.34480600
11 0.080486 0.18173100
12 0.042465 0.03664900
PHOSPHORUS 1
P 1
1 0.110006 1.00000000
D 1
1 0.373518 1.00000000
SULFUR
SULFUR 12
S 12
1 306.317903 0.00006400
2 146.602801 -0.00078500
3 70.163647 0.02247100
@ -424,7 +424,7 @@ SULFUR
10 0.403554 0.00443600
11 0.193140 -0.00101500
12 0.092436 0.00050700
SULFUR 12
S 12
1 306.317903 0.00002100
2 146.602801 -0.00000400
3 70.163647 -0.00611900
@ -437,7 +437,7 @@ SULFUR 12
10 0.403554 0.52928200
11 0.193140 0.46625400
12 0.092436 0.12580000
SULFUR 1
S 1
1 0.138193 1.00000000
P 12
1 55.148271 0.01344700
@ -708,7 +708,7 @@ D 1
F 1
1 0.280673 1.00000000
TI
TITANIUM
S 13
1 68.910511 0.00061600
2 33.720700 -0.00750100
@ -1770,3 +1770,4 @@ D 1
F 1
1 3.171936 1.00000000

View File

@ -1,5 +1,5 @@
BORON
S 9 1.00
S 9
1 11.76050 -0.0036757
2 5.150520 0.0250517
3 2.578276 -0.1249228
@ -9,13 +9,13 @@ BORON
7 0.161898 0.4308431
8 0.081044 0.2486558
9 0.040569 0.0317295
S 1 1.00
S 1
1 0.422217 1.000000
S 1 1.00
S 1
1 0.305133 1.000000
S 1 1.00
S 1
1 0.082968 1.000000
P 9 1.00
P 9
1 7.470701 0.0047397
2 3.735743 0.0376009
3 1.868068 0.0510600
@ -25,27 +25,27 @@ P 9 1.00
7 0.116803 0.2850185
8 0.058408 0.1448808
9 0.029207 0.0176962
P 1 1.00
P 1
1 0.447031 1.000000
P 1 1.00
P 1
1 0.196614 1.000000
P 1 1.00
P 1
1 0.066445 1.000000
D 1 1.00
D 1
1 1.142614 1.000000
D 1 1.00
D 1
1 0.410733 1.000000
D 1 1.00
D 1
1 0.149100 1.000000
F 1 1.00
F 1
1 0.870011 1.000000
F 1 1.00
F 1
1 0.315902 1.000000
G 1 1.00
G 1
1 0.710746 1.000000
CARBON
S 9 1.00
S 9
1 13.073594 0.0051583
2 6.541187 0.0603424
3 4.573411 -0.1978471
@ -55,13 +55,13 @@ CARBON
7 0.231300 0.4336405
8 0.102619 0.2131940
9 0.051344 0.0049848
S 1 1.00
S 1
1 0.846879 1.000000
S 1 1.00
S 1
1 0.269659 1.000000
S 1 1.00
S 1
1 0.109576 1.000000
P 9 1.00
P 9
1 9.934169 0.0209076
2 3.886955 0.0572698
3 1.871016 0.1122682
@ -71,23 +71,23 @@ P 9 1.00
7 0.117063 0.2016934
8 0.058547 0.0453575
9 0.029281 0.0029775
P 1 1.00
P 1
1 0.804681 1.000000
P 1 1.00
P 1
1 0.313254 1.000000
P 1 1.00
P 1
1 0.105389 1.000000
D 1 1.00
D 1
1 2.013760 1.000000
D 1 1.00
D 1
1 0.684884 1.000000
D 1 1.00
D 1
1 0.240171 1.000000
F 1 1.00
F 1
1 0.457302 1.000000
F 1 1.00
F 1
1 1.324930 1.000000
G 1 1.00
G 1
1 1.034180 1.000000
NITROGEN
@ -260,7 +260,7 @@ F 1
G 1
1 0.169674 1.00000000
MG
MAGNESIUM
S 12
1 63.931893 -0.00079400
2 31.602596 0.00747900
@ -416,7 +416,7 @@ F 1
G 1
1 0.352315 1.00000000
SI
SILICON
S 12
1 96.651837 -0.00044000
2 48.652547 0.01867100
@ -527,7 +527,7 @@ S 1
1 0.276109 1.00000000
S 1
1 0.110986 1.00000000
PHOSPHORUS 12
P 12
1 48.154282 0.01288400
2 25.406431 0.09709500
3 13.404555 0.17821500
@ -540,7 +540,7 @@ PHOSPHORUS 12
10 0.152550 -0.00006600
11 0.080486 0.00012900
12 0.042465 -0.00002900
PHOSPHORUS 12
P 12
1 48.154282 -0.00315200
2 25.406431 -0.02300600
3 13.404555 -0.04239800
@ -553,11 +553,11 @@ PHOSPHORUS 12
10 0.152550 0.34480600
11 0.080486 0.18173100
12 0.042465 0.03664900
PHOSPHORUS 1
P 1
1 1.581855 1.00000000
PHOSPHORUS 1
P 1
1 0.658132 1.00000000
PHOSPHORUS 1
P 1
1 0.273816 1.00000000
D 1
1 0.984476 1.00000000
@ -573,7 +573,7 @@ G 1
1 0.589583 1.00000000
SULFUR
SULFUR 12
S 12
1 306.317903 0.00006400
2 146.602801 -0.00078500
3 70.163647 0.02247100
@ -586,7 +586,7 @@ SULFUR
10 0.403554 0.00443600
11 0.193140 -0.00101500
12 0.092436 0.00050700
SULFUR 12
S 12
1 306.317903 0.00002100
2 146.602801 -0.00000400
3 70.163647 -0.00611900
@ -599,11 +599,11 @@ SULFUR 12
10 0.403554 0.52928200
11 0.193140 0.46625400
12 0.092436 0.12580000
SULFUR 1
S 1
1 0.893039 1.00000000
SULFUR 1
S 1
1 0.358094 1.00000000
SULFUR 1
S 1
1 0.143590 1.00000000
P 12
1 55.148271 0.01344700
@ -1014,7 +1014,7 @@ G 1
H 1
1 3.057835 1.00000000
TI
TITANIUM
S 13
1 68.910511 0.00061600
2 33.720700 -0.00750100
@ -2262,7 +2262,7 @@ G 1
H 1
1 2.901601 1.00000000
NI
NICKEL
S 13
1 97.161835 0.00070900
2 51.187866 -0.01239900
@ -2886,3 +2886,4 @@ G 1
H 1
1 4.405055 1.00000000

View File

@ -1,5 +1,5 @@
BORON
S 9 1.00
S 9
1 11.76050 -0.0036757
2 5.150520 0.0250517
3 2.578276 -0.1249228
@ -9,11 +9,11 @@ BORON
7 0.161898 0.4308431
8 0.081044 0.2486558
9 0.040569 0.0317295
S 1 1.00
S 1
1 0.626026 1.000000
S 1 1.00
S 1
1 0.092094 1.000000
P 9 1.00
P 9
1 7.470701 0.0047397
2 3.735743 0.0376009
3 1.868068 0.0510600
@ -23,19 +23,19 @@ P 9 1.00
7 0.116803 0.2850185
8 0.058408 0.1448808
9 0.029207 0.0176962
P 1 1.00
P 1
1 0.235016 1.000000
P 1 1.00
P 1
1 0.082056 1.000000
D 1 1.00
D 1
1 0.699153 1.000000
D 1 1.00
D 1
1 0.207316 1.000000
F 1 1.00
F 1
1 0.478872 1.000000
CARBON
S 9 1.00
S 9
1 13.073594 0.0051583
2 6.541187 0.0603424
3 4.573411 -0.1978471
@ -45,11 +45,11 @@ CARBON
7 0.231300 0.4336405
8 0.102619 0.2131940
9 0.051344 0.0049848
S 1 1.00
S 1
1 0.921552 1.000000
S 1 1.00
S 1
1 0.132800 1.000000
P 9 1.00
P 9
1 9.934169 0.0209076
2 3.886955 0.0572698
3 1.871016 0.1122682
@ -59,15 +59,15 @@ P 9 1.00
7 0.117063 0.2016934
8 0.058547 0.0453575
9 0.029281 0.0029775
P 1 1.00
P 1
1 0.376742 1.000000
P 1 1.00
P 1
1 0.126772 1.000000
D 1 1.00
D 1
1 1.141611 1.000000
D 1 1.00
D 1
1 0.329486 1.000000
F 1 1.00
F 1
1 0.773485 1.000000
NITROGEN
@ -210,7 +210,7 @@ D 1
F 1
1 0.134692 1.00000000
MG
MAGNESIUM
S 12
1 63.931893 -0.00079400
2 31.602596 0.00747900
@ -346,7 +346,7 @@ D 1
F 1
1 0.254342 1.00000000
SI
SILICON
S 12
1 96.651837 -0.00044000
2 48.652547 0.01867100
@ -445,7 +445,7 @@ S 1
1 0.115599 1.00000000
S 1
1 0.725938 1.00000000
PHOSPHORUS 12
P 12
1 48.154282 0.01288400
2 25.406431 0.09709500
3 13.404555 0.17821500
@ -458,7 +458,7 @@ PHOSPHORUS 12
10 0.152550 -0.00006600
11 0.080486 0.00012900
12 0.042465 -0.00002900
PHOSPHORUS 12
P 12
1 48.154282 -0.00315200
2 25.406431 -0.02300600
3 13.404555 -0.04239800
@ -471,9 +471,9 @@ PHOSPHORUS 12
10 0.152550 0.34480600
11 0.080486 0.18173100
12 0.042465 0.03664900
PHOSPHORUS 1
P 1
1 0.093233 1.00000000
PHOSPHORUS 1
P 1
1 0.625438 1.00000000
D 1
1 0.214392 1.00000000
@ -483,7 +483,7 @@ F 1
1 0.457026 1.00000000
SULFUR
SULFUR 12
S 12
1 306.317903 0.00006400
2 146.602801 -0.00078500
3 70.163647 0.02247100
@ -496,7 +496,7 @@ SULFUR
10 0.403554 0.00443600
11 0.193140 -0.00101500
12 0.092436 0.00050700
SULFUR 12
S 12
1 306.317903 0.00002100
2 146.602801 -0.00000400
3 70.163647 -0.00611900
@ -509,9 +509,9 @@ SULFUR 12
10 0.403554 0.52928200
11 0.193140 0.46625400
12 0.092436 0.12580000
SULFUR 1
S 1
1 0.898845 1.00000000
SULFUR 1
S 1
1 0.146364 1.00000000
P 12
1 55.148271 0.01344700
@ -848,7 +848,7 @@ F 1
G 1
1 0.413265 1.00000000
TI
TITANIUM
S 13
1 68.910511 0.00061600
2 33.720700 -0.00750100
@ -1820,7 +1820,7 @@ F 1
G 1
1 2.525364 1.00000000
NI
NICKEL
S 13
1 97.161835 0.00070900
2 51.187866 -0.01239900
@ -2306,3 +2306,4 @@ F 1
G 1
1 4.099533 1.00000000

View File

@ -176,6 +176,7 @@ Providers
* :c:data:`ao_num`
* :c:data:`ao_power`
* :c:data:`ao_prim_num`
* :c:data:`mu_erf`
* :c:data:`n_pt_max_integrals`
* :c:data:`nucl_coord`
@ -214,6 +215,7 @@ Providers
* :c:data:`ao_prim_num`
* :c:data:`ezfio_filename`
* :c:data:`io_ao_two_e_integrals_erf`
* :c:data:`mu_erf`
* :c:data:`n_pt_max_integrals`
* :c:data:`nproc`
* :c:data:`nucl_coord`
@ -290,6 +292,7 @@ Subroutines / functions
* :c:data:`ao_power`
* :c:data:`ao_expo_ordered_transp`
* :c:data:`ao_prim_num`
* :c:data:`mu_erf`
* :c:data:`ao_nucl`
* :c:data:`nucl_coord`

View File

@ -1016,6 +1016,70 @@ Subroutines / functions
* :c:func:`two_e_integrals_index`
.. c:function:: get_ao_two_e_integrals_non_zero_jl:
File : :file:`ao_two_e_ints/map_integrals.irp.f`
.. code:: fortran
subroutine get_ao_two_e_integrals_non_zero_jl(j,l,thresh,sze_max,sze,out_val,out_val_index,non_zero_int)
Gets multiple AO bi-electronic integral from the AO map .
All non-zero i are retrieved for j,k,l fixed.
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_integrals_map`
* :c:data:`ao_overlap_abs`
* :c:data:`ao_two_e_integral_schwartz`
* :c:data:`ao_two_e_integrals_in_map`
Calls:
.. hlist::
:columns: 3
* :c:func:`map_get`
* :c:func:`two_e_integrals_index`
.. c:function:: get_ao_two_e_integrals_non_zero_jl_from_list:
File : :file:`ao_two_e_ints/map_integrals.irp.f`
.. code:: fortran
subroutine get_ao_two_e_integrals_non_zero_jl_from_list(j,l,thresh,list,n_list,sze_max,out_val,out_val_index,non_zero_int)
Gets multiple AO two-electron integrals from the AO map .
All non-zero i are retrieved for j,k,l fixed.
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_integrals_map`
* :c:data:`ao_overlap_abs`
* :c:data:`ao_two_e_integral_schwartz`
* :c:data:`ao_two_e_integrals_in_map`
Calls:
.. hlist::
:columns: 3
* :c:func:`map_get`
* :c:func:`two_e_integrals_index`
.. c:function:: give_polynom_mult_center_x:
@ -1243,6 +1307,8 @@ Subroutines / functions
* :c:func:`get_ao_two_e_integral_erf`
* :c:func:`get_ao_two_e_integrals_erf_non_zero`
* :c:func:`get_ao_two_e_integrals_non_zero`
* :c:func:`get_ao_two_e_integrals_non_zero_jl`
* :c:func:`get_ao_two_e_integrals_non_zero_jl_from_list`
* :c:func:`get_mo_two_e_integral_erf`
* :c:func:`get_mo_two_e_integrals_coulomb_ii`
* :c:func:`get_mo_two_e_integrals_erf`

View File

@ -93,6 +93,12 @@ EZFIO parameters
Total number of grid points
.. option:: thresh_grid
threshold on the weight of a given grid point
Default: 1.e-20
Providers
---------
@ -210,6 +216,7 @@ Providers
* :c:data:`n_points_final_grid`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
@ -244,6 +251,40 @@ Providers
* :c:data:`one_e_dm_no_core_and_grad_alpha_in_r`
.. c:var:: final_grid_points_per_atom
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
double precision, allocatable :: final_grid_points_per_atom (3,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: final_weight_at_r_vector_per_atom (n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom (3,n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`n_points_radial_grid`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
.. c:var:: final_weight_at_r
@ -263,10 +304,10 @@ Providers
* :c:data:`alpha_knowles`
* :c:data:`angular_quadrature_points`
* :c:data:`grid_atomic_number`
* :c:data:`grid_points_radial`
* :c:data:`m_knowles`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_charge`
* :c:data:`nucl_num`
* :c:data:`weight_at_r`
@ -276,6 +317,9 @@ Providers
:columns: 3
* :c:data:`final_grid_points`
* :c:data:`final_grid_points_per_atom`
* :c:data:`n_points_final_grid`
* :c:data:`n_pts_per_atom`
.. c:var:: final_weight_at_r_vector
@ -309,6 +353,7 @@ Providers
* :c:data:`n_points_final_grid`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
@ -343,6 +388,69 @@ Providers
* :c:data:`one_e_dm_no_core_and_grad_alpha_in_r`
.. c:var:: final_weight_at_r_vector_per_atom
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
double precision, allocatable :: final_grid_points_per_atom (3,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: final_weight_at_r_vector_per_atom (n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom (3,n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`n_points_radial_grid`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
.. c:var:: grid_atomic_number
File : :file:`becke_numerical_grid/atomic_number.irp.f`
.. code:: fortran
integer, allocatable :: grid_atomic_number (nucl_num)
Atomic number used to adjust the grid
Needs:
.. hlist::
:columns: 3
* :c:data:`nucl_charge`
* :c:data:`nucl_num`
Needed by:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
.. c:var:: grid_points_per_atom
@ -362,10 +470,10 @@ Providers
* :c:data:`alpha_knowles`
* :c:data:`angular_quadrature_points`
* :c:data:`grid_atomic_number`
* :c:data:`grid_points_radial`
* :c:data:`m_knowles`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_charge`
* :c:data:`nucl_coord`
* :c:data:`nucl_num`
@ -375,6 +483,7 @@ Providers
:columns: 3
* :c:data:`final_grid_points`
* :c:data:`final_grid_points_per_atom`
* :c:data:`one_e_dm_alpha_in_r`
* :c:data:`weight_at_r`
@ -439,6 +548,7 @@ Providers
* :c:data:`n_points_final_grid`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
@ -473,6 +583,74 @@ Providers
* :c:data:`one_e_dm_no_core_and_grad_alpha_in_r`
.. c:var:: index_final_points_per_atom
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
double precision, allocatable :: final_grid_points_per_atom (3,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: final_weight_at_r_vector_per_atom (n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom (3,n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`n_points_radial_grid`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
.. c:var:: index_final_points_per_atom_reverse
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
double precision, allocatable :: final_grid_points_per_atom (3,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: final_weight_at_r_vector_per_atom (n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom (3,n_pts_max_per_atom,nucl_num)
integer, allocatable :: index_final_points_per_atom_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`n_points_radial_grid`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
.. c:var:: index_final_points_reverse
@ -504,6 +682,7 @@ Providers
* :c:data:`n_points_final_grid`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
@ -576,8 +755,10 @@ Providers
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
@ -681,11 +862,13 @@ Providers
* :c:data:`angular_quadrature_points`
* :c:data:`final_grid_points`
* :c:data:`final_grid_points_per_atom`
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`grid_points_radial`
* :c:data:`n_points_final_grid`
* :c:data:`n_points_grid_per_atom`
* :c:data:`n_pts_per_atom`
* :c:data:`one_e_dm_alpha_in_r`
* :c:data:`weight_at_r`
@ -721,15 +904,81 @@ Providers
* :c:data:`angular_quadrature_points`
* :c:data:`final_grid_points`
* :c:data:`final_grid_points_per_atom`
* :c:data:`final_weight_at_r`
* :c:data:`grid_points_per_atom`
* :c:data:`grid_points_radial`
* :c:data:`n_points_final_grid`
* :c:data:`n_points_grid_per_atom`
* :c:data:`n_pts_per_atom`
* :c:data:`one_e_dm_alpha_in_r`
* :c:data:`weight_at_r`
.. c:var:: n_pts_max_per_atom
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
integer, allocatable :: n_pts_per_atom (nucl_num)
integer :: n_pts_max_per_atom
Number of points which are non zero
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
* :c:data:`final_grid_points_per_atom`
.. c:var:: n_pts_per_atom
File : :file:`becke_numerical_grid/grid_becke_per_atom.irp.f`
.. code:: fortran
integer, allocatable :: n_pts_per_atom (nucl_num)
integer :: n_pts_max_per_atom
Number of points which are non zero
Needs:
.. hlist::
:columns: 3
* :c:data:`final_weight_at_r`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
Needed by:
.. hlist::
:columns: 3
* :c:data:`aos_in_r_array_per_atom`
* :c:data:`final_grid_points_per_atom`
.. c:var:: weight_at_r
@ -754,7 +1003,6 @@ Providers
* :c:data:`grid_points_per_atom`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_charge`
* :c:data:`nucl_coord_transp`
* :c:data:`nucl_dist_inv`
* :c:data:`nucl_num`
@ -824,7 +1072,6 @@ Subroutines / functions
* :c:data:`nucl_dist_inv`
* :c:data:`slater_bragg_type_inter_distance_ua`
* :c:data:`nucl_coord_transp`
* :c:data:`nucl_charge`
* :c:data:`nucl_num`

View File

@ -727,9 +727,40 @@ Providers
* :c:data:`c0_weight`
* :c:data:`n_states`
* :c:data:`pt2_match_weight`
* :c:data:`state_average_weight`
* :c:data:`variance_match_weight`
* :c:data:`weight_selection`
.. c:var:: variance_match_weight
File : :file:`cipsi/selection.irp.f`
.. code:: fortran
double precision, allocatable :: variance_match_weight (N_states)
Weights adjusted along the selection to make the variances
of each state coincide.
Needs:
.. hlist::
:columns: 3
* :c:data:`n_states`
Needed by:
.. hlist::
:columns: 3
* :c:data:`selection_weight`
Subroutines / functions
-----------------------
@ -879,6 +910,7 @@ Subroutines / functions
* :c:data:`selection_weight`
* :c:data:`mo_num`
* :c:data:`n_states`
* :c:data:`weight_selection`
* :c:data:`n_int`
* :c:data:`psi_det_hii`
* :c:data:`do_only_1h1p`
@ -1181,6 +1213,7 @@ Subroutines / functions
:columns: 3
* :c:data:`generators_bitmask`
* :c:data:`selection_weight`
* :c:data:`pt2_stoch_istate`
* :c:data:`psi_selectors`
* :c:data:`psi_det`
@ -1203,6 +1236,7 @@ Subroutines / functions
* :c:data:`n_det_generators`
* :c:data:`psi_det_generators`
* :c:data:`n_int`
* :c:data:`pseudo_sym`
* :c:data:`psi_det_generators`
Called by:
@ -1551,12 +1585,14 @@ Subroutines / functions
* :c:data:`correlation_energy_ratio_max`
* :c:data:`n_iter`
* :c:data:`psi_energy_with_nucl_rep`
* :c:data:`selection_factor`
* :c:data:`psi_occ_pattern`
* :c:data:`n_det_max`
* :c:data:`n_states`
* :c:data:`h_apply_buffer_allocated`
* :c:data:`n_det`
* :c:data:`s2_eig`
* :c:data:`variance_max`
* :c:data:`do_pt2`
* :c:data:`psi_energy`
* :c:data:`pt2_relative_error`
@ -1619,6 +1655,7 @@ Subroutines / functions
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
* :c:data:`variance_match_weight`
.. c:function:: run_pt2_slave:
@ -1776,16 +1813,18 @@ Subroutines / functions
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`mo_num`
* :c:data:`psi_det_sorted`
* :c:data:`psi_bilinear_matrix_transp_rows_loc`
* :c:data:`n_states`
* :c:data:`pt2_f`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`elec_alpha_num`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`weight_selection`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`n_int`
* :c:data:`psi_det_alpha_unique`
* :c:data:`psi_det_sorted`
* :c:data:`psi_det_sorted`
* :c:data:`pseudo_sym`
* :c:data:`psi_bilinear_matrix_columns_loc`
* :c:data:`psi_selectors_coef_transp`
@ -1859,6 +1898,7 @@ Subroutines / functions
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`selection_weight`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
@ -1879,6 +1919,7 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`selection_weight`
* :c:data:`pt2_stoch_istate`
* :c:data:`psi_det`
* :c:data:`zmq_state`
@ -1935,6 +1976,7 @@ Subroutines / functions
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`selection_weight`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
@ -1959,6 +2001,7 @@ Subroutines / functions
* :c:data:`correlation_energy_ratio_max`
* :c:data:`n_iter`
* :c:data:`psi_energy_with_nucl_rep`
* :c:data:`selection_factor`
* :c:data:`psi_occ_pattern`
* :c:data:`pt2_max`
* :c:data:`n_det_max`
@ -2028,6 +2071,7 @@ Subroutines / functions
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
* :c:data:`variance_match_weight`
.. c:function:: select_connected:
@ -2351,6 +2395,43 @@ Subroutines / functions
* :c:func:`check_mem`
.. c:function:: update_pt2_and_variance_weights:
File : :file:`cipsi/selection.irp.f`
.. code:: fortran
subroutine update_pt2_and_variance_weights(pt2, variance, norm, N_st)
Updates the rPT2- and Variance- matching weights.
Needs:
.. hlist::
:columns: 3
* :c:data:`pt2_match_weight`
* :c:data:`variance_match_weight`
Called by:
.. hlist::
:columns: 3
* :c:func:`zmq_pt2`
* :c:func:`zmq_selection`
Touches:
.. hlist::
:columns: 3
* :c:data:`pt2_match_weight`
* :c:data:`variance_match_weight`
.. c:function:: zmq_pt2:
@ -2368,6 +2449,7 @@ Subroutines / functions
:columns: 3
* :c:data:`psi_det_sorted`
* :c:data:`selection_weight`
* :c:data:`pt2_stoch_istate`
* :c:data:`psi_selectors`
* :c:data:`psi_bilinear_matrix_values`
@ -2378,7 +2460,7 @@ Subroutines / functions
* :c:data:`state_average_weight`
* :c:data:`n_det`
* :c:data:`s2_eig`
* :c:data:`pt2_match_weight`
* :c:data:`psi_det_sorted`
* :c:data:`pt2_j`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`psi_bilinear_matrix_transp_values`
@ -2396,7 +2478,7 @@ Subroutines / functions
* :c:data:`threshold_generators`
* :c:data:`psi_det_beta_unique`
* :c:data:`det_to_occ_pattern`
* :c:data:`psi_det_sorted`
* :c:data:`global_selection_buffer`
* :c:data:`psi_bilinear_matrix_transp_rows_loc`
* :c:data:`n_states`
* :c:data:`pt2_f`
@ -2405,7 +2487,7 @@ Subroutines / functions
* :c:data:`n_int`
* :c:data:`psi_det_hii`
* :c:data:`pt2_j`
* :c:data:`global_selection_buffer`
* :c:data:`pseudo_sym`
* :c:data:`pt2_w`
* :c:data:`pt2_u`
@ -2434,6 +2516,7 @@ Subroutines / functions
* :c:func:`pt2_slave_inproc`
* :c:func:`remove_duplicates_in_selection_buffer`
* :c:func:`resident_memory`
* :c:func:`update_pt2_and_variance_weights`
* :c:func:`write_double`
* :c:func:`write_int`
* :c:func:`zmq_selection`
@ -2453,6 +2536,7 @@ Subroutines / functions
* :c:data:`pt2_match_weight`
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
* :c:data:`variance_match_weight`
.. c:function:: zmq_selection:
@ -2472,12 +2556,12 @@ Subroutines / functions
:columns: 3
* :c:data:`psi_det_sorted`
* :c:data:`selection_weight`
* :c:data:`psi_selectors`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`n_det`
* :c:data:`psi_bilinear_matrix_columns_loc`
* :c:data:`n_det_selectors`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`psi_det_alpha_unique`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`state_average_weight`
@ -2493,8 +2577,9 @@ Subroutines / functions
* :c:data:`n_states`
* :c:data:`pt2_f`
* :c:data:`n_det_generators`
* :c:data:`pt2_match_weight`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`n_int`
* :c:data:`pseudo_sym`
Called by:
@ -2519,6 +2604,7 @@ Subroutines / functions
* :c:func:`save_wavefunction`
* :c:func:`selection_collector`
* :c:func:`selection_slave_inproc`
* :c:func:`update_pt2_and_variance_weights`
* :c:func:`write_double`
Touches:
@ -2534,4 +2620,5 @@ Subroutines / functions
* :c:data:`psi_det_size`
* :c:data:`psi_det_sorted_bit`
* :c:data:`pt2_match_weight`
* :c:data:`variance_match_weight`

View File

@ -1756,6 +1756,40 @@ Subroutines / functions
* :c:func:`i_wee_j_single`
.. c:function:: print_energy_components:
File : :file:`davidson/print_e_components.irp.f`
.. code:: fortran
subroutine print_energy_components()
Prints the different components of the energy.
Needs:
.. hlist::
:columns: 3
* :c:data:`mo_integrals_n_e`
* :c:data:`n_states`
* :c:data:`mo_pseudo_integrals`
* :c:data:`mo_kinetic_integrals`
* :c:data:`mo_num`
* :c:data:`nuclear_repulsion`
* :c:data:`psi_energy`
* :c:data:`one_e_dm_mo_alpha`
Called by:
.. hlist::
:columns: 3
* :c:func:`print_summary`
.. c:function:: u_0_h_u_0:

View File

@ -61,12 +61,18 @@ EZFIO parameters
Default: True
.. option:: used_weight
.. option:: weight_one_e_dm
Weight used in the calculation of the one-electron density matrix. 0: 1./(c_0^2), 1: 1/N_states, 2: input state-average weight, 3: 1/(Norm_L3(Psi))
Default: 1
.. option:: weight_selection
Weight used in the selection. 0: input state-average weight, 1: 1./(c_0^2), 2: rPT2 matching, 3: variance matching, 4: variance and rPT2 matching, 5: variance minimization and matching
Default: 2
.. option:: threshold_generators
Thresholds on generators (fraction of the square of the norm)
@ -119,6 +125,12 @@ EZFIO parameters
Weight of the states in state-average calculations.
.. option:: selection_factor
f such that the number of determinants to add is f * N_det * sqrt(N_states)
Default: 1.
.. option:: thresh_sym
Thresholds to check if a determinant is connected with HF
@ -3638,7 +3650,7 @@ Providers
* :c:data:`c0_weight`
* :c:data:`n_states`
* :c:data:`used_weight`
* :c:data:`weight_one_e_dm`
Needed by:
@ -3648,6 +3660,7 @@ Providers
* :c:data:`det_alpha_norm`
* :c:data:`one_e_dm_mo_alpha_average`
* :c:data:`psi_average_norm_contrib`
* :c:data:`selection_weight`
.. c:var:: weight_occ_pattern

View File

@ -199,6 +199,70 @@ Providers
* :c:data:`potential_xc_alpha_ao_sr_lda`
.. c:var:: aos_in_r_array_per_atom
File : :file:`dft_utils_in_r/ao_in_r.irp.f`
.. code:: fortran
double precision, allocatable :: aos_in_r_array_per_atom (ao_num,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: aos_in_r_array_per_atom_transp (n_pts_max_per_atom,ao_num,nucl_num)
aos_in_r_array_per_atom(i,j,k) = value of the ith ao on the jth grid point attached on the kth atom
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_coef_normalized_ordered_transp_per_nucl`
* :c:data:`ao_expo_ordered_transp_per_nucl`
* :c:data:`ao_num`
* :c:data:`ao_power_ordered_transp_per_nucl`
* :c:data:`ao_prim_num`
* :c:data:`final_grid_points_per_atom`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_aos_transposed`
* :c:data:`nucl_coord`
* :c:data:`nucl_n_aos`
* :c:data:`nucl_num`
.. c:var:: aos_in_r_array_per_atom_transp
File : :file:`dft_utils_in_r/ao_in_r.irp.f`
.. code:: fortran
double precision, allocatable :: aos_in_r_array_per_atom (ao_num,n_pts_max_per_atom,nucl_num)
double precision, allocatable :: aos_in_r_array_per_atom_transp (n_pts_max_per_atom,ao_num,nucl_num)
aos_in_r_array_per_atom(i,j,k) = value of the ith ao on the jth grid point attached on the kth atom
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_coef_normalized_ordered_transp_per_nucl`
* :c:data:`ao_expo_ordered_transp_per_nucl`
* :c:data:`ao_num`
* :c:data:`ao_power_ordered_transp_per_nucl`
* :c:data:`ao_prim_num`
* :c:data:`final_grid_points_per_atom`
* :c:data:`n_pts_per_atom`
* :c:data:`nucl_aos_transposed`
* :c:data:`nucl_coord`
* :c:data:`nucl_n_aos`
* :c:data:`nucl_num`
.. c:var:: aos_in_r_array_transp

View File

@ -146,6 +146,7 @@ Providers
* :c:data:`read_wf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
* :c:data:`selection_factor`
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`thresh_scf`
@ -153,8 +154,9 @@ Providers
* :c:data:`threshold_davidson`
* :c:data:`threshold_diis`
* :c:data:`threshold_generators`
* :c:data:`used_weight`
* :c:data:`variance_max`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
.. c:var:: ezfio_work_dir
@ -296,6 +298,7 @@ Providers
* :c:data:`read_wf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
* :c:data:`selection_factor`
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`thresh_scf`
@ -303,8 +306,9 @@ Providers
* :c:data:`threshold_davidson`
* :c:data:`threshold_diis`
* :c:data:`threshold_generators`
* :c:data:`used_weight`
* :c:data:`variance_max`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
.. c:var:: output_wall_time_0
@ -411,6 +415,7 @@ Providers
* :c:data:`read_wf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
* :c:data:`selection_factor`
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`thresh_scf`
@ -418,8 +423,9 @@ Providers
* :c:data:`threshold_davidson`
* :c:data:`threshold_diis`
* :c:data:`threshold_generators`
* :c:data:`used_weight`
* :c:data:`variance_max`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
.. c:var:: qp_kill_filename
@ -764,6 +770,7 @@ Subroutines / functions
* :c:func:`roothaan_hall_scf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
* :c:data:`selection_factor`
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`thresh_scf`
@ -771,8 +778,9 @@ Subroutines / functions
* :c:data:`threshold_davidson`
* :c:data:`threshold_diis`
* :c:data:`threshold_generators`
* :c:data:`used_weight`
* :c:data:`variance_max`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
Calls:

View File

@ -160,6 +160,13 @@ Subroutines / functions
* :c:func:`run_cipsi`
* :c:func:`run_stochastic_cipsi`
Calls:
.. hlist::
:columns: 3
* :c:func:`print_energy_components`
.. c:function:: save_iterations:

View File

@ -174,6 +174,7 @@ Providers
* :c:data:`read_wf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
* :c:data:`selection_factor`
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`thresh_scf`
@ -181,8 +182,9 @@ Providers
* :c:data:`threshold_davidson`
* :c:data:`threshold_diis`
* :c:data:`threshold_generators`
* :c:data:`used_weight`
* :c:data:`variance_max`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
.. c:var:: mpi_rank

View File

@ -103,6 +103,8 @@ Index of Providers
* :c:data:`aos_grad_in_r_array_transp`
* :c:data:`aos_grad_in_r_array_transp_xyz`
* :c:data:`aos_in_r_array`
* :c:data:`aos_in_r_array_per_atom`
* :c:data:`aos_in_r_array_per_atom_transp`
* :c:data:`aos_in_r_array_transp`
* :c:data:`aos_lapl_in_r_array`
* :c:data:`aos_lapl_in_r_array_transp`
@ -251,8 +253,10 @@ Index of Providers
* :c:data:`fact_inv`
* :c:data:`file_lock`
* :c:data:`final_grid_points`
* :c:data:`final_grid_points_per_atom`
* :c:data:`final_weight_at_r`
* :c:data:`final_weight_at_r_vector`
* :c:data:`final_weight_at_r_vector_per_atom`
* :c:data:`fock_matrix_alpha_no_xc_ao`
* :c:data:`fock_matrix_ao`
* :c:data:`fock_matrix_ao_alpha`
@ -282,6 +286,7 @@ Index of Providers
* :c:data:`give_polynomial_mult_center_one_e_erf_opt`
* :c:data:`global_selection_buffer`
* :c:data:`global_selection_buffer_lock`
* :c:data:`grid_atomic_number`
* :c:data:`grid_points_per_atom`
* :c:data:`grid_points_radial`
* :c:data:`grid_type_sgn`
@ -313,6 +318,8 @@ Index of Providers
* :c:data:`inact_bitmask`
* :c:data:`inact_virt_bitmask`
* :c:data:`index_final_points`
* :c:data:`index_final_points_per_atom`
* :c:data:`index_final_points_per_atom_reverse`
* :c:data:`index_final_points_reverse`
* :c:data:`index_holes_bitmask`
* :c:data:`index_particl_bitmask`
@ -460,6 +467,8 @@ Index of Providers
* :c:data:`n_points_radial_grid`
* :c:data:`n_pt_max_i_x`
* :c:data:`n_pt_max_integrals`
* :c:data:`n_pts_max_per_atom`
* :c:data:`n_pts_per_atom`
* :c:data:`n_single_exc_bitmasks`
* :c:data:`n_states`
* :c:data:`n_states_diag`
@ -754,6 +763,7 @@ Index of Providers
* :c:data:`selection_criterion`
* :c:data:`selection_criterion_factor`
* :c:data:`selection_criterion_min`
* :c:data:`selection_factor`
* :c:data:`selection_weight`
* :c:data:`short_range_hartree`
* :c:data:`short_range_hartree_operator`
@ -775,6 +785,7 @@ Index of Providers
* :c:data:`state_following`
* :c:data:`target_energy`
* :c:data:`theta_angular_integration_lebedev`
* :c:data:`thresh_grid`
* :c:data:`thresh_scf`
* :c:data:`thresh_sym`
* :c:data:`threshold_davidson`
@ -792,11 +803,14 @@ Index of Providers
* :c:data:`unpaired_alpha_electrons`
* :c:data:`used_weight`
* :c:data:`var_pt2_ratio`
* :c:data:`variance_match_weight`
* :c:data:`variance_max`
* :c:data:`virt_bitmask`
* :c:data:`virt_bitmask_4`
* :c:data:`weight_at_r`
* :c:data:`weight_occ_pattern`
* :c:data:`weight_one_e_dm`
* :c:data:`weight_selection`
* :c:data:`weights_angular_integration_lebedev`
* :c:data:`weights_angular_points`
* :c:data:`write_ao_integrals_e_n`
@ -1033,6 +1047,8 @@ Index of Subroutines/Functions
* :c:func:`get_ao_two_e_integrals_erf`
* :c:func:`get_ao_two_e_integrals_erf_non_zero`
* :c:func:`get_ao_two_e_integrals_non_zero`
* :c:func:`get_ao_two_e_integrals_non_zero_jl`
* :c:func:`get_ao_two_e_integrals_non_zero_jl_from_list`
* :c:func:`get_d0`
* :c:func:`get_d1`
* :c:func:`get_d2`
@ -1280,6 +1296,7 @@ Index of Subroutines/Functions
* :c:func:`print_ci_vectors`
* :c:func:`print_det`
* :c:func:`print_e_conv`
* :c:func:`print_energy_components`
* :c:func:`print_extrapolated_energy`
* :c:func:`print_generators_bitmasks_holes`
* :c:func:`print_generators_bitmasks_holes_for_one_generator`
@ -1418,6 +1435,7 @@ Index of Subroutines/Functions
* :c:func:`u_0_s2_u_0`
* :c:func:`u_dot_u`
* :c:func:`u_dot_v`
* :c:func:`update_pt2_and_variance_weights`
* :c:func:`v_e_n`
* :c:func:`v_grad_rho_oc_to_v_grad_rho_ab`
* :c:func:`v_phi`

View File

@ -89,5 +89,7 @@ fci
* :c:data:`pt2_match_weight`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`selection_weight`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
* :c:data:`variance_match_weight`

View File

@ -55,5 +55,6 @@ pt2
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`selection_weight`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`

View File

@ -0,0 +1,37 @@
.. _rotate_mos:
.. program:: rotate_mos
==========
rotate_mos
==========
Rotates molecular orbitals i and j by combining them as
$1/\sqrt{2} ( \phi_i + \phi_j )$ and
$1/\sqrt{2} ( \phi_i - \phi_j )$.
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_num`
* :c:data:`mo_num`
* :c:data:`mo_coef`
Calls:
.. hlist::
:columns: 3
* :c:func:`save_mos`
Touches:
.. hlist::
:columns: 3
* :c:data:`mo_coef`

View File

@ -0,0 +1,39 @@
.. _sort_by_fock_energies:
.. program:: sort_by_fock_energies
=====================
sort_by_fock_energies
=====================
Program that saves the current |MOs| ordered by diagonal element of the Fock operator.
Warning : the Fock operator, and therefore its matrix elements, depends on the occupancy.
Needs:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_mo`
* :c:data:`ao_num`
* :c:data:`mo_num`
* :c:data:`mo_coef`
Calls:
.. hlist::
:columns: 3
* :c:func:`dsort`
* :c:func:`save_mos`
Touches:
.. hlist::
:columns: 3
* :c:data:`mo_coef`

View File

@ -0,0 +1,27 @@
.. _swap_mos:
.. program:: swap_mos
========
swap_mos
========
Swaps the indices of two molecular orbitals
Needs:
.. hlist::
:columns: 3
* :c:data:`ao_num`
* :c:data:`mo_coef`
Calls:
.. hlist::
:columns: 3
* :c:func:`save_mos`

View File

@ -0,0 +1,19 @@
.. _test:
.. program:: test
====
test
====
Calls:
.. hlist::
:columns: 3
* :c:func:`two_e_integrals_index`
* :c:func:`two_e_integrals_index_reverse`

View File

@ -28,18 +28,22 @@
year = 2019,
month = {may},
publisher = {American Chemical Society ({ACS})},
author = {Pierre-Francois Loos and Bartélémy Pradines and Anthony Scemama and Julien Toulouse and Emmanuel Giner},
title = {A Density-Based Basis-Set Correction For Wave Function Theory},
volume = {10},
number = {11},
pages = {2931--2937},
author = {Pierre-Fran{\c{c}}ois Loos and Barth{\'{e}}l{\'{e}}my Pradines and Anthony Scemama and Julien Toulouse and Emmanuel Giner},
title = {A Density-Based Basis-Set Correction for Wave Function Theory},
journal = {The Journal of Physical Chemistry Letters}
}
@article{Garniron_2019,
doi = {10.1021/acs.jctc.9b00176},
url = {https://doi.org/10.1021%2Facs.jctc.9b00176},
year = 2019,
month = {may},
publisher = {American Chemical Society ({ACS})},
author = {Yann Garniron and Thomas Applencourt and Kevin Gasperich and Anouar Benali and Anthony Ferte and Julien Paquier and Bartélémy Pradines and Roland Assaraf and Peter Reinhardt and Julien Toulouse and Pierrette Barbaresco and Nicolas Renon and Gregoire David and Jean-Paul Malrieu and Mickael Veril and Michel Caffarel and Pierre-Francois Loos and Emmanuel Giner and Anthony Scemama},
author = {Yann Garniron and Thomas Applencourt and Kevin Gasperich and Anouar Benali and Anthony Fert{\'{e}} and Julien Paquier and Barth{\'{e}}l{\'{e}}my Pradines and Roland Assaraf and Peter Reinhardt and Julien Toulouse and Pierrette Barbaresco and Nicolas Renon and Gr{\'{e}}goire David and Jean-Paul Malrieu and Mickaël V{\'{e}}ril and Michel Caffarel and Pierre-Fran{\c{c}}ois Loos and Emmanuel Giner and Anthony Scemama},
title = {Quantum Package 2.0: An Open-Source Determinant-Driven Suite of Programs},
journal = {Journal of Chemical Theory and Computation}
}

View File

@ -0,0 +1,89 @@
.. _qp_tunnel:
=========
qp_tunnel
=========
.. TODO
.. program:: qp_tunnel
Establishes a tunnel to allow communications between machines within
different networks, for example multiple MPI slave jobs running on
different clusters.
Usage
-----
.. code:: bash
qp_tunnel [-g] (ADDRESS|EZFIO_DIR)
``EZFIO_DIR`` is the name of the |EZFIO| directory containing the data,
and ``ADDRESS`` is the address of another tunnel.
.. option:: -h, --help
Displays the help message
.. option:: -g, --get-input
Download the EZFIO directory from the remote instance of qp_tunnel.
Example
-------
.. code:: text
+-------------------+ +------------------+
| | | |
| N1_1 N1_2 N1_3 | | N2_1 N2_2 N2_3 |
| | | | | | | | | |
| +----+----+ | | +----+----+ |
| | | | | |
| C1 F1 | | F2 C2 |
| +---------=----=--------+ |
| | | |
+-------------------+ +------------------+
Imagine you have two clusters, C1 and C2. Each cluster is accessible via SSH
on a front-end named respectively F1 and F2. Groups of nodes N1 and N2 have
been reserved by the batch scheduling system on both clusters.
Each node in N1 is on the same network as the other nodes of N1, but they
can't access the network on which the nodes of N2 are.
1) Start a parallel simulation on the cluster C1, running on nodes N1.
We assume that there is a shared file system, such that F1 can access
the EZFIO directory. We also assume that F1 can communicate with the
nodes of N1.
2) Run a tunnel on the front-end F1 and keep it running:
.. code:: bash
me@f1 $ qp_tunnel my_directory.ezfio
Connect to:
tcp://31.122.230.47:42379
Ready
3) On the front-end F2, run another instance connecting to the other one,
which will fetch the |EZFIO| directory:
.. code:: bash
me@f2 $ qp_tunnel --get-input tcp://31.122.230.47:42379
Connect to:
tcp://31.122.209.139:42379
Communication [ OK ]
Getting input... my_directory.ezfio ...done
Ready
4) Keep the tunnel running, and you can now run a slave simulation within the
nodes N2.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CIS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "CIS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
cis \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CISD" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "CISD" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
cisd \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CONFIGURE" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "CONFIGURE" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
configure \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "DIAGONALIZE_H" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "DIAGONALIZE_H" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
diagonalize_h \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "EXCITED_STATES" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "EXCITED_STATES" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
excited_states \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FCI" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "FCI" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
fci \- | Quantum Package >
.
@ -125,10 +125,10 @@ Touches:
\fBpsi_occ_pattern\fP
.IP \(bu 2
\fBc0_weight\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBdistributed_davidson\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBpsi_coef\fP
.IP \(bu 2
@ -143,10 +143,10 @@ Touches:
\fBpsi_energy\fP
.IP \(bu 2
\fBpsi_occ_pattern\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBpsi_energy\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBpt2_e0_denominator\fP
.IP \(bu 2
@ -156,9 +156,13 @@ Touches:
.IP \(bu 2
\fBread_wf\fP
.IP \(bu 2
\fBselection_weight\fP
.IP \(bu 2
\fBstate_average_weight\fP
.IP \(bu 2
\fBthreshold_generators\fP
.IP \(bu 2
\fBvariance_match_weight\fP
.UNINDENT
.UNINDENT
.UNINDENT

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FCIDUMP" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "FCIDUMP" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
fcidump \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FOUR_IDX_TRANSFORM" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "FOUR_IDX_TRANSFORM" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
four_idx_transform \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "INTERFACES" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "INTERFACES" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
interfaces \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "KS_SCF" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "KS_SCF" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
ks_scf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "MOLDEN" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "MOLDEN" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
molden \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "NATURAL_ORBITALS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "NATURAL_ORBITALS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
natural_orbitals \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PLUGINS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PLUGINS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
plugins \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINT_CI_VECTORS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PRINT_CI_VECTORS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
print_ci_vectors \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINT_E_CONV" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PRINT_E_CONV" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
print_e_conv \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINT_WF" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PRINT_WF" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
print_wf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINTING" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PRINTING" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
printing \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PT2" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "PT2" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
pt2 \- | Quantum Package >
.
@ -104,6 +104,8 @@ Touches:
.IP \(bu 2
\fBread_wf\fP
.IP \(bu 2
\fBselection_weight\fP
.IP \(bu 2
\fBstate_average_weight\fP
.IP \(bu 2
\fBthreshold_generators\fP

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_CONVERT_OUTPUT_TO_EZFIO" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_CONVERT_OUTPUT_TO_EZFIO" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_convert_output_to_ezfio \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_CREATE_EZFIO" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_CREATE_EZFIO" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_create_ezfio \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_EDIT" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_EDIT" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_edit \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_EXPORT_AS_TGZ" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_EXPORT_AS_TGZ" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_export_as_tgz \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_PLUGINS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_PLUGINS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_plugins \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_RESET" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_RESET" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_reset \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_RUN" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_RUN" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_run \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_SET_FROZEN_CORE" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_SET_FROZEN_CORE" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_set_frozen_core \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_SET_MO_CLASS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_SET_MO_CLASS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_set_mo_class \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_STOP" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_STOP" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_stop \- | Quantum Package >
.

139
man/qp_tunnel.1 Normal file
View File

@ -0,0 +1,139 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_TUNNEL" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_tunnel \- | Quantum Package >
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
Establishes a tunnel to allow communications between machines within
different networks, for example multiple MPI slave jobs running on
different clusters.
.SH USAGE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
qp_tunnel [\-g] (ADDRESS|EZFIO_DIR)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBEZFIO_DIR\fP is the name of the \fI\%EZFIO\fP directory containing the data,
and \fBADDRESS\fP is the address of another tunnel.
.INDENT 0.0
.TP
.B \-h, \-\-help
Displays the help message
.UNINDENT
.INDENT 0.0
.TP
.B \-g, \-\-get\-input
Download the EZFIO directory from the remote instance of qp_tunnel.
.UNINDENT
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| | | |
| N1_1 N1_2 N1_3 | | N2_1 N2_2 N2_3 |
| | | | | | | | | |
| +\-\-\-\-+\-\-\-\-+ | | +\-\-\-\-+\-\-\-\-+ |
| | | | | |
| C1 F1 | | F2 C2 |
| +\-\-\-\-\-\-\-\-\-=\-\-\-\-=\-\-\-\-\-\-\-\-+ |
| | | |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Imagine you have two clusters, C1 and C2. Each cluster is accessible via SSH
on a front\-end named respectively F1 and F2. Groups of nodes N1 and N2 have
been reserved by the batch scheduling system on both clusters.
Each node in N1 is on the same network as the other nodes of N1, but they
cant access the network on which the nodes of N2 are.
.INDENT 0.0
.IP 1. 3
Start a parallel simulation on the cluster C1, running on nodes N1.
We assume that there is a shared file system, such that F1 can access
the EZFIO directory. We also assume that F1 can communicate with the
nodes of N1.
.IP 2. 3
Run a tunnel on the front\-end F1 and keep it running:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
me@f1 $ qp_tunnel my_directory.ezfio
Connect to:
tcp://31.122.230.47:42379
Ready
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 3. 3
On the front\-end F2, run another instance connecting to the other one,
which will fetch the \fI\%EZFIO\fP directory:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
me@f2 $ qp_tunnel \-\-get\-input tcp://31.122.230.47:42379
Connect to:
tcp://31.122.209.139:42379
Communication [ OK ]
Getting input... my_directory.ezfio ...done
Ready
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 4. 3
Keep the tunnel running, and you can now run a slave simulation within the
nodes N2.
.UNINDENT
.SH AUTHOR
A. Scemama, E. Giner
.SH COPYRIGHT
2019, A. Scemama, E. Giner
.\" Generated by docutils manpage writer.
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_UPDATE" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QP_UPDATE" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qp_update \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QPSH" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "QPSH" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
qpsh \- | Quantum Package >
.

85
man/rotate_mos.1 Normal file
View File

@ -0,0 +1,85 @@
.\" Man page generated from reStructuredText.
.
.TH "ROTATE_MOS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
rotate_mos \- | Quantum Package >
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.INDENT 0.0
.INDENT 3.5
Rotates molecular orbitals i and j by combining them as
$1/sqrt{2} ( phi_i + phi_j )$ and
$1/sqrt{2} ( phi_i - phi_j )$.
.sp
Needs:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBao_num\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBmo_num\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBmo_coef\fP
.UNINDENT
.UNINDENT
.sp
Calls:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBsave_mos()\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.sp
Touches:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBmo_coef\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH AUTHOR
A. Scemama, E. Giner
.SH COPYRIGHT
2019, A. Scemama, E. Giner
.\" Generated by docutils manpage writer.
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "RS_KS_SCF" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "RS_KS_SCF" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
rs_ks_scf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_NATORB" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "SAVE_NATORB" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
save_natorb \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_ONE_E_DM" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "SAVE_ONE_E_DM" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
save_one_e_dm \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_ORTHO_MOS" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "SAVE_ORTHO_MOS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
save_ortho_mos \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SCF" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "SCF" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
scf \- | Quantum Package >
.

View File

@ -0,0 +1,89 @@
.\" Man page generated from reStructuredText.
.
.TH "SORT_BY_FOCK_ENERGIES" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
sort_by_fock_energies \- | Quantum Package >
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.INDENT 0.0
.INDENT 3.5
Program that saves the current MOs ordered by diagonal element of the Fock operator.
.sp
Warning : the Fock operator, and therefore its matrix elements, depends on the occupancy.
.sp
Needs:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBfock_matrix_mo\fP
.IP \(bu 2
\fBao_num\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBmo_num\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBmo_coef\fP
.UNINDENT
.UNINDENT
.sp
Calls:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBdsort()\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBsave_mos()\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.sp
Touches:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBmo_coef\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH AUTHOR
A. Scemama, E. Giner
.SH COPYRIGHT
2019, A. Scemama, E. Giner
.\" Generated by docutils manpage writer.
.

69
man/swap_mos.1 Normal file
View File

@ -0,0 +1,69 @@
.\" Man page generated from reStructuredText.
.
.TH "SWAP_MOS" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
swap_mos \- | Quantum Package >
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.INDENT 0.0
.INDENT 3.5
Swaps the indices of two molecular orbitals
.sp
Needs:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBao_num\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBmo_coef\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.sp
Calls:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBsave_mos()\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH AUTHOR
A. Scemama, E. Giner
.SH COPYRIGHT
2019, A. Scemama, E. Giner
.\" Generated by docutils manpage writer.
.

55
man/test.1 Normal file
View File

@ -0,0 +1,55 @@
.\" Man page generated from reStructuredText.
.
.TH "TEST" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
test \- | Quantum Package >
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.INDENT 0.0
.INDENT 3.5
Calls:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBtwo_e_integrals_index()\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBtwo_e_integrals_index_reverse()\fP
.UNINDENT
.INDENT 2.0
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH AUTHOR
A. Scemama, E. Giner
.SH COPYRIGHT
2019, A. Scemama, E. Giner
.\" Generated by docutils manpage writer.
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "WRITE_INTEGRALS_ERF" "1" "May 28, 2019" "2.0" "Quantum Package"
.TH "WRITE_INTEGRALS_ERF" "1" "Jun 15, 2019" "2.0" "Quantum Package"
.SH NAME
write_integrals_erf \- | Quantum Package >
.

View File

@ -1,4 +1,4 @@
PKG core ZMQ cryptokit
PKG core zmq cryptokit
B _build/

402
ocaml/qp_tunnel.ml Normal file
View File

@ -0,0 +1,402 @@
open Qputils
open Qptypes
type ezfio_or_address = EZFIO of string | ADDRESS of string
type req_or_sub = REQ | SUB
let localport = 42379
let () =
let open Command_line in
begin
"Creates an ssh tunnel for using slaves on another network. Launch a server on the front-end node of the cluster on which the master process runs. Then start a client ont the front-end node of the distant cluster."
|> set_footer_doc ;
[ { short='g' ; long="get-input" ; opt=Optional ;
doc="Downloads the EZFIO directory." ;
arg=Without_arg; } ;
anonymous
"(EZFIO_DIR|ADDRESS)"
Mandatory
"EZFIO directory or address.";
] |> set_specs
end;
let arg =
let x =
match Command_line.anon_args () with
| [x] -> x
| _ -> begin
Command_line.help () ;
failwith "EZFIO_FILE or ADDRESS is missing"
end
in
if Sys.file_exists x && Sys.is_directory x then
EZFIO x
else
ADDRESS x
in
let localhost =
Lazy.force TaskServer.ip_address
in
let long_address =
match arg with
| ADDRESS x -> x
| EZFIO x ->
let ic =
Filename.concat (Qpackage.ezfio_work x) "qp_run_address"
|> open_in
in
let result =
input_line ic
|> String.trim
in
close_in ic;
result
in
let protocol, address, port =
match String.split_on_char ':' long_address with
| t :: a :: p :: [] -> t, a, int_of_string p
| _ -> failwith @@
Printf.sprintf "%s : Malformed address" long_address
in
let zmq_context =
Zmq.Context.create ()
in
(** Check availability of the ports *)
let localport =
let dummy_socket =
Zmq.Socket.create zmq_context Zmq.Socket.rep
in
let rec try_new_port port_number =
try
List.iter (fun i ->
let address =
Printf.sprintf "tcp://%s:%d" localhost (port_number+i)
in
Zmq.Socket.bind dummy_socket address;
Zmq.Socket.unbind dummy_socket address
) [ 0;1;2;3;4;5;6;7;8;9 ] ;
port_number
with
| Unix.Unix_error _ -> try_new_port (port_number+100)
in
let result =
try_new_port localport
in
Zmq.Socket.close dummy_socket;
result
in
let create_socket sock_type bind_or_connect addr =
let socket =
Zmq.Socket.create zmq_context sock_type
in
let () =
try
bind_or_connect socket addr
with
| _ -> failwith @@
Printf.sprintf "Unable to establish connection to %s." addr
in
socket
in
(* Handle termination *)
let run_status = ref true in
let handler =
Sys.Signal_handle (fun signum ->
run_status := false;
Sys.set_signal signum Sys.Signal_default
)
in
Sys.set_signal Sys.sigusr1 handler;
Sys.set_signal Sys.sigint handler;
let new_thread req_or_sub addr_in addr_out =
let socket_in, socket_out =
match req_or_sub with
| REQ ->
create_socket Zmq.Socket.rep Zmq.Socket.bind addr_in,
create_socket Zmq.Socket.req Zmq.Socket.connect addr_out
| SUB ->
create_socket Zmq.Socket.sub Zmq.Socket.connect addr_in,
create_socket Zmq.Socket.pub Zmq.Socket.bind addr_out
in
if req_or_sub = SUB then
Zmq.Socket.subscribe socket_in "";
let action =
match req_or_sub with
| REQ -> (fun () ->
Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out;
Zmq.Socket.recv_all socket_out |> Zmq.Socket.send_all socket_in )
| SUB -> (fun () ->
Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out)
in
let pollitem =
Zmq.Poll.mask_of
[| (socket_in, Zmq.Poll.In) |]
in
while !run_status do
let polling =
Zmq.Poll.poll ~timeout:1000 pollitem
in
match polling.(0) with
| Some Zmq.Poll.In -> action ()
| None -> ()
| Some Zmq.Poll.In_out
| Some Zmq.Poll.Out -> ()
done;
Zmq.Socket.close socket_in;
Zmq.Socket.close socket_out;
in
let ocaml_thread =
let addr_out =
Printf.sprintf "tcp:%s:%d" address port
in
let addr_in =
Printf.sprintf "tcp://*:%d" localport
in
let f () =
new_thread REQ addr_in addr_out
in
(Thread.create f) ()
in
Printf.printf "Connect to:\ntcp://%s:%d\n%!" localhost localport;
let fortran_thread =
let addr_out =
Printf.sprintf "tcp:%s:%d" address (port+2)
in
let addr_in =
Printf.sprintf "tcp://*:%d" (localport+2)
in
let f () =
new_thread REQ addr_in addr_out
in
(Thread.create f) ()
in
let pub_thread =
let addr_in =
Printf.sprintf "tcp:%s:%d" address (port+1)
in
let addr_out =
Printf.sprintf "tcp://*:%d" (localport+1)
in
let f () =
new_thread SUB addr_in addr_out
in
(Thread.create f) ()
in
let input_thread =
let f () =
let addr_out =
match arg with
| EZFIO _ -> None
| ADDRESS _ -> Some (
Printf.sprintf "tcp:%s:%d" address (port+9) )
in
let addr_in =
Printf.sprintf "tcp://*:%d" (localport+9)
in
let socket_in =
create_socket Zmq.Socket.rep Zmq.Socket.bind addr_in
in
let socket_out =
match addr_out with
| Some addr_out -> Some (
create_socket Zmq.Socket.req Zmq.Socket.connect addr_out)
| None -> None
in
let temp_file =
Filename.temp_file "qp_tunnel" ".tar.gz"
in
let get_ezfio_filename () =
match arg with
| EZFIO x -> x
| ADDRESS _ ->
begin
match socket_out with
| None -> assert false
| Some socket_out -> (
Zmq.Socket.send socket_out "get_ezfio_filename" ;
Zmq.Socket.recv socket_out
)
end
in
let get_input () =
match arg with
| EZFIO x ->
begin
Printf.sprintf "tar -zcf %s %s" temp_file x
|> Sys.command |> ignore;
let fd =
Unix.openfile temp_file [Unix.O_RDONLY] 0o640
in
let len =
Unix.lseek fd 0 Unix.SEEK_END
in
ignore @@ Unix.lseek fd 0 Unix.SEEK_SET ;
let bstr =
Unix.map_file fd Bigarray.char
Bigarray.c_layout false [| len |]
|> Bigarray.array1_of_genarray
in
let result =
String.init len (fun i -> bstr.{i}) ;
in
Unix.close fd;
Sys.remove temp_file;
result
end
| ADDRESS _ ->
begin
match socket_out with
| None -> assert false
| Some socket_out -> (
Zmq.Socket.send socket_out "get_input" ;
Zmq.Socket.recv socket_out
)
end
in
let () =
match socket_out with
| None -> ()
| Some socket_out ->
Zmq.Socket.send socket_out "test";
Printf.printf "Communication [ %s ]\n%!" (Zmq.Socket.recv socket_out);
in
(* Download input if asked *)
if Command_line.get_bool "get-input" then
begin
match arg with
| EZFIO _ -> ()
| ADDRESS _ ->
begin
Printf.printf "Getting input... %!";
let ezfio_filename =
get_ezfio_filename ()
in
Printf.printf "%s%!" ezfio_filename;
let oc =
open_out temp_file
in
get_input ()
|> output_string oc;
close_out oc;
Printf.sprintf "tar -zxf %s" temp_file
|> Sys.command |> ignore ;
let oc =
Filename.concat (Qpackage.ezfio_work ezfio_filename) "qp_run_address"
|> open_out
in
Printf.fprintf oc "tcp://%s:%d\n" localhost localport;
close_out oc;
Printf.printf " ...done\n%!"
end
end;
(* Main loop *)
let pollitem =
Zmq.Poll.mask_of [| (socket_in, Zmq.Poll.In) |]
in
let action () =
match Zmq.Socket.recv socket_in with
| "get_input" -> get_input ()
|> Zmq.Socket.send socket_in
| "get_ezfio_filename" -> get_ezfio_filename ()
|> Zmq.Socket.send socket_in
| "test" -> Zmq.Socket.send socket_in "OK"
| x -> Printf.sprintf "Message '%s' not understood" x
|> Zmq.Socket.send socket_in
in
Printf.printf "Ready\n%!";
while !run_status do
let polling =
Zmq.Poll.poll ~timeout:1000 pollitem
in
match polling.(0) with
| Some Zmq.Poll.In -> action ()
| None -> ()
| Some Zmq.Poll.In_out
| Some Zmq.Poll.Out -> ()
done;
let () =
match socket_out with
| Some socket_out -> Zmq.Socket.close socket_out
| None -> ()
in
Zmq.Socket.close socket_in
in
(Thread.create f) ()
in
(* Termination *)
Thread.join input_thread;
Thread.join fortran_thread;
Thread.join pub_thread;
Thread.join ocaml_thread;
Zmq.Context.terminate zmq_context;
Printf.printf "qp_tunnel exited properly.\n"

View File

@ -109,6 +109,101 @@ end
grad_dm_b *= 2.d0
end
subroutine density_and_grad_lapl_alpha_beta_and_all_aos_and_grad_aos_at_r(r,dm_a,dm_b, grad_dm_a, grad_dm_b, lapl_dm_a, lapl_dm_b, aos_array, grad_aos_array, lapl_aos_array)
implicit none
BEGIN_DOC
! input:
!
! * r(1) ==> r(1) = x, r(2) = y, r(3) = z
!
! output:
!
! * dm_a = alpha density evaluated at r
! * dm_b = beta density evaluated at r
! * aos_array(i) = ao(i) evaluated at r
! * grad_dm_a(1) = X gradient of the alpha density evaluated in r
! * grad_dm_a(1) = X gradient of the beta density evaluated in r
! * grad_aos_array(1) = X gradient of the aos(i) evaluated at r
!
END_DOC
double precision, intent(in) :: r(3)
double precision, intent(out) :: dm_a(N_states),dm_b(N_states)
double precision, intent(out) :: grad_dm_a(3,N_states),grad_dm_b(3,N_states)
double precision, intent(out) :: lapl_dm_a(3,N_states),lapl_dm_b(3,N_states)
double precision, intent(out) :: grad_aos_array(3,ao_num)
double precision, intent(out) :: lapl_aos_array(3,ao_num)
integer :: i,j,istate
double precision :: aos_array(ao_num),aos_array_bis(ao_num),u_dot_v
double precision :: aos_grad_array(ao_num,3), aos_grad_array_bis(ao_num,3)
double precision :: aos_lapl_array(ao_num,3)
call give_all_aos_and_grad_and_lapl_at_r(r,aos_array,grad_aos_array,lapl_aos_array)
do i = 1, ao_num
do j = 1, 3
aos_grad_array(i,j) = grad_aos_array(j,i)
aos_lapl_array(i,j) = lapl_aos_array(j,i)
enddo
enddo
do istate = 1, N_states
! alpha density
! aos_array_bis = \rho_ao * aos_array
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_array,1,0.d0,aos_array_bis,1)
dm_a(istate) = u_dot_v(aos_array,aos_array_bis,ao_num)
! grad_dm(1) = \sum_i aos_grad_array(i,1) * aos_array_bis(i)
grad_dm_a(1,istate) = u_dot_v(aos_grad_array(1,1),aos_array_bis,ao_num)
grad_dm_a(2,istate) = u_dot_v(aos_grad_array(1,2),aos_array_bis,ao_num)
grad_dm_a(3,istate) = u_dot_v(aos_grad_array(1,3),aos_array_bis,ao_num)
! lapl_dm(1) = \sum_i aos_lapl_array(i,1) * aos_array_bis(i)
lapl_dm_a(1,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,1),aos_array_bis,ao_num)
lapl_dm_a(2,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,2),aos_array_bis,ao_num)
lapl_dm_a(3,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,3),aos_array_bis,ao_num)
! aos_grad_array_bis(1) = \rho_ao * aos_grad_array(1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,1),1,0.d0,aos_grad_array_bis(1,1),1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,2),1,0.d0,aos_grad_array_bis(1,2),1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,3),1,0.d0,aos_grad_array_bis(1,3),1)
! lapl_dm(1) += \sum_i aos_grad_array(i,1) * aos_grad_array_bis(i)
lapl_dm_a(1,istate) += 2.d0 * u_dot_v(aos_grad_array(1,1),aos_grad_array_bis,ao_num)
lapl_dm_a(2,istate) += 2.d0 * u_dot_v(aos_grad_array(1,2),aos_grad_array_bis,ao_num)
lapl_dm_a(3,istate) += 2.d0 * u_dot_v(aos_grad_array(1,3),aos_grad_array_bis,ao_num)
! beta density
call dsymv('U',ao_num,1.d0,one_e_dm_beta_ao_for_dft(1,1,istate),size(one_e_dm_beta_ao_for_dft,1),aos_array,1,0.d0,aos_array_bis,1)
dm_b(istate) = u_dot_v(aos_array,aos_array_bis,ao_num)
! grad_dm(1) = \sum_i aos_grad_array(i,1) * aos_array_bis(i)
grad_dm_b(1,istate) = u_dot_v(aos_grad_array(1,1),aos_array_bis,ao_num)
grad_dm_b(2,istate) = u_dot_v(aos_grad_array(1,2),aos_array_bis,ao_num)
grad_dm_b(3,istate) = u_dot_v(aos_grad_array(1,3),aos_array_bis,ao_num)
! lapl_dm(1) = \sum_i aos_lapl_array(i,1) * aos_array_bis(i)
lapl_dm_b(1,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,1),aos_array_bis,ao_num)
lapl_dm_b(2,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,2),aos_array_bis,ao_num)
lapl_dm_b(3,istate) = 2.d0 * u_dot_v(aos_lapl_array(1,3),aos_array_bis,ao_num)
! aos_grad_array_bis(1) = \rho_ao * aos_grad_array(1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,1),1,0.d0,aos_grad_array_bis(1,1),1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,2),1,0.d0,aos_grad_array_bis(1,2),1)
call dsymv('U',ao_num,1.d0,one_e_dm_alpha_ao_for_dft(1,1,istate),size(one_e_dm_alpha_ao_for_dft,1),aos_grad_array(1,3),1,0.d0,aos_grad_array_bis(1,3),1)
! lapl_dm(1) += \sum_i aos_grad_array(i,1) * aos_grad_array_bis(i)
lapl_dm_b(1,istate) += 2.d0 * u_dot_v(aos_grad_array(1,1),aos_grad_array_bis,ao_num)
lapl_dm_b(2,istate) += 2.d0 * u_dot_v(aos_grad_array(1,2),aos_grad_array_bis,ao_num)
lapl_dm_b(3,istate) += 2.d0 * u_dot_v(aos_grad_array(1,3),aos_grad_array_bis,ao_num)
enddo
grad_dm_a *= 2.d0
grad_dm_b *= 2.d0
end
subroutine dm_dft_alpha_beta_no_core_at_r(r,dm_a,dm_b)
implicit none
BEGIN_DOC
@ -257,12 +352,13 @@ END_PROVIDER
&BEGIN_PROVIDER [double precision, one_e_dm_and_grad_beta_in_r, (4,n_points_final_grid,N_states) ]
&BEGIN_PROVIDER [double precision, one_e_grad_2_dm_alpha_at_r, (n_points_final_grid,N_states) ]
&BEGIN_PROVIDER [double precision, one_e_grad_2_dm_beta_at_r, (n_points_final_grid,N_states) ]
&BEGIN_PROVIDER [double precision, one_e_grad_dm_squared_at_r, (3,n_points_final_grid,N_states) ]
BEGIN_DOC
! one_e_dm_and_grad_alpha_in_r(1,i,i_state) = d\dx n_alpha(r_i,istate)
! one_e_dm_and_grad_alpha_in_r(2,i,i_state) = d\dy n_alpha(r_i,istate)
! one_e_dm_and_grad_alpha_in_r(3,i,i_state) = d\dz n_alpha(r_i,istate)
! one_e_dm_and_grad_alpha_in_r(4,i,i_state) = n_alpha(r_i,istate)
! one_e_grad_2_dm_alpha_at_r(i,istate) = d\dx n_alpha(r_i,istate)^2 + d\dy n_alpha(r_i,istate)^2 + d\dz n_alpha(r_i,istate)^2
! one_e_grad_2_dm_alpha_at_r(i,istate) = (d\dx n_alpha(r_i,istate))^2 + (d\dy n_alpha(r_i,istate))^2 + (d\dz n_alpha(r_i,istate))^2
! where r_i is the ith point of the grid and istate is the state number
END_DOC
implicit none
@ -291,6 +387,9 @@ END_PROVIDER
one_e_dm_and_grad_beta_in_r(3,i,istate) = dm_b_grad(3,istate)
one_e_dm_and_grad_beta_in_r(4,i,istate) = dm_b(istate)
one_e_grad_2_dm_beta_at_r(i,istate) = dm_b_grad(1,istate) * dm_b_grad(1,istate) + dm_b_grad(2,istate) * dm_b_grad(2,istate) + dm_b_grad(3,istate) * dm_b_grad(3,istate)
one_e_grad_dm_squared_at_r(1,i,istate) = 2.D0 * (dm_a_grad(1,istate) + dm_b_grad(1,istate) ) * (one_e_dm_and_grad_alpha_in_r(4,i,istate) + one_e_dm_and_grad_beta_in_r(4,i,istate))
one_e_grad_dm_squared_at_r(2,i,istate) = 2.D0 * (dm_a_grad(2,istate) + dm_b_grad(2,istate) ) * (one_e_dm_and_grad_alpha_in_r(4,i,istate) + one_e_dm_and_grad_beta_in_r(4,i,istate))
one_e_grad_dm_squared_at_r(3,i,istate) = 2.D0 * (dm_a_grad(3,istate) + dm_b_grad(3,istate) ) * (one_e_dm_and_grad_alpha_in_r(4,i,istate) + one_e_dm_and_grad_beta_in_r(4,i,istate))
enddo
enddo

View File

@ -0,0 +1,15 @@
BEGIN_PROVIDER [double precision, kinetic_density_generalized, (n_points_final_grid)]
implicit none
integer :: i,j,m,i_point
kinetic_density_generalized = 0.d0
do i_point = 1, n_points_final_grid
do i = 1, mo_num
do j = 1, mo_num
do m = 1, 3
kinetic_density_generalized(i_point) += 0.5d0 * mos_grad_in_r_array_tranp(m,j,i_point) * mos_grad_in_r_array_tranp(m,i,i_point) * one_e_dm_mo_for_dft(j,i,1)
enddo
enddo
enddo
enddo
END_PROVIDER

View File

@ -22,6 +22,7 @@
BEGIN_PROVIDER[double precision, mos_grad_in_r_array,(mo_num,n_points_final_grid,3)]
&BEGIN_PROVIDER[double precision, mos_grad_in_r_array_tranp,(3,mo_num,n_points_final_grid)]
implicit none
BEGIN_DOC
! mos_grad_in_r_array(i,j,k) = value of the kth component of the gradient of ith mo on the jth grid point
@ -35,6 +36,35 @@
do m=1,3
call dgemm('N','N',mo_num,n_points_final_grid,ao_num,1.d0,mo_coef_transp,mo_num,aos_grad_in_r_array(1,1,m),ao_num,0.d0,mos_grad_in_r_array(1,1,m),mo_num)
enddo
integer :: i,j
do i = 1, n_points_final_grid
do j = 1, mo_num
do m = 1, 3
mos_grad_in_r_array_tranp(m,j,i) = mos_grad_in_r_array(j,i,m)
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, alpha_dens_kin_in_r, (n_points_final_grid)]
&BEGIN_PROVIDER [double precision, beta_dens_kin_in_r, (n_points_final_grid)]
implicit none
integer :: i,m,j
alpha_dens_kin_in_r = 0.d0
beta_dens_kin_in_r = 0.d0
do i = 1, n_points_final_grid
do j = 1, elec_alpha_num
do m = 1, 3
alpha_dens_kin_in_r(i) += 0.5d0 * mos_grad_in_r_array_tranp(m,j,i)**2.d0
enddo
enddo
do j = 1, elec_beta_num
do m = 1, 3
beta_dens_kin_in_r(i) += 0.5d0 * mos_grad_in_r_array_tranp(m,j,i)**2.d0
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, mos_lapl_in_r_array,(mo_num,n_points_final_grid,3)]

View File

@ -0,0 +1,125 @@
subroutine give_all_stuffs_in_r_for_lyp_88(r,rho,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_2)
implicit none
double precision, intent(in) :: r(3)
double precision, intent(out) :: rho_a(N_states),rho_b(N_states),grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_2(N_states),rho(N_states)
double precision :: grad_rho_a(3,N_states),grad_rho_b(3,N_states),grad_rho_a_b(N_states)
double precision :: grad_aos_array(3,ao_num),aos_array(ao_num)
call density_and_grad_alpha_beta_and_all_aos_and_grad_aos_at_r(r,rho_a,rho_b, grad_rho_a, grad_rho_b, aos_array, grad_aos_array)
integer :: i,istate
rho = rho_a + rho_b
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do istate = 1, N_states
do i = 1, 3
grad_rho_a_2(istate) += grad_rho_a(i,istate) * grad_rho_a(i,istate)
grad_rho_b_2(istate) += grad_rho_b(i,istate) * grad_rho_b(i,istate)
grad_rho_a_b(istate) += grad_rho_a(i,istate) * grad_rho_b(i,istate)
enddo
enddo
grad_rho_2 = grad_rho_a_2 + grad_rho_b_2 + 2.d0 * grad_rho_a_b
end
double precision function ec_lyp_88(rho,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_2)
implicit none
BEGIN_DOC
! LYP functional of the Lee, Yan, Parr, Phys. Rev B 1988, Vol 37, page 785.
! The expression used is the one by Miehlich, Savin, Stoll, Preuss, CPL, 1989 which gets rid of the laplacian of the density
END_DOC
include 'constants.include.F'
! Input variables
double precision, intent(in) :: rho,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_2
! Local variables
double precision :: a,b,c,d,c_f,omega,delta
double precision :: rho_13,rho_inv_13,rho_83,rho_113,rho_inv_113,denom
double precision :: thr,huge_num,rho_inv
double precision :: cst_2_113,cst_8_3,rho_2,rho_a_2,rho_b_2
double precision :: tmp1,tmp2,tmp3,tmp4
double precision :: big1,big2,big3
! Constants of the LYP correlation functional
a = 0.04918d0
b = 0.132d0
c = 0.2533d0
d = 0.349d0
ec_lyp_88 = 0.d0
thr = 1d-15
huge_num = 1.d0/thr
if(dabs(rho_a).lt.thr)then
return
endif
if(dabs(rho_b).lt.thr)then
return
endif
if(rho.lt.0.d0)then
print*,'pb !! rho.lt.0.d0'
stop
endif
rho_13 = rho**(1.d0/3.d0)
rho_113 = rho**(11.d0/3.d0)
if(dabs(rho_13) < thr) then
rho_inv_13 = huge_num
else
rho_inv_13 = 1.d0/rho_13
endif
if (dabs(rho_113) < thr) then
rho_inv_113 = huge_num
else
rho_inv_113 = 1.d0/rho_113
endif
if (dabs(rho) < thr) then
rho_inv = huge_num
else
rho_inv = 1.d0/rho
endif
! Useful quantities to predefine
denom = 1d0/(1d0 + d*rho_inv_13)
omega = rho_inv_113*exp(-c*rho_inv_13)*denom
delta = c*rho_inv_13 + d*rho_inv_13*denom
c_f = 0.3d0*(3.d0*pi*pi)**(2.d0/3.d0)
rho_2 = rho *rho
rho_a_2 = rho_a*rho_a
rho_b_2 = rho_b*rho_b
cst_2_113 = 2.d0**(11.d0/3.d0)
cst_8_3 = 8.d0/3.d0
! first term in the equation (2) of Preuss CPL, 1989
big1 = 4.d0*denom*rho_a*rho_b*rho_inv
tmp1 = cst_2_113*c_f*(rho_a**cst_8_3 + rho_b**cst_8_3)
tmp2 = (47.d0/18.d0 - 7.d0/18.d0*delta)*grad_rho_2
tmp3 = - (5d0/2d0 - 1.d0/18d0*delta)*(grad_rho_a_2 + grad_rho_b_2)
tmp4 = - (delta - 11d0)/9d0*(rho_a*rho_inv*grad_rho_a_2 + rho_b*rho_inv*grad_rho_b_2)
big2 = rho_a*rho_b*(tmp1 + tmp2 + tmp3 + tmp4)
tmp1 = -2d0/3d0*rho_2*grad_rho_2
tmp2 = grad_rho_b_2*(2d0/3d0*rho_2 - rho_a_2)
tmp3 = grad_rho_a_2*(2d0/3d0*rho_2 - rho_b_2)
big3 = tmp1 + tmp2 + tmp3
ec_lyp_88 = -a*big1 -a*b*omega*big2 -a*b*omega*big3
end

View File

@ -0,0 +1,100 @@
double precision function ec_scan(rho_a,rho_b,tau,grad_rho_2)
include 'constants.include.F'
implicit none
double precision, intent(in) :: rho_a,rho_b,tau,grad_rho_2
double precision :: cst_13,cst_23,cst_43,cst_53,rho_inv,cst_18,cst_3pi2
double precision :: thr,nup,ndo,xi,s,spin_d,drho,drho2,rho,inv_1alph,e_c_lsda1,h0
double precision :: rs,t_w,t_unif,ds_xi,alpha,fc_alpha,step_f,cst_1alph,beta_inf
double precision :: c_1c,c_2c,d_c,e_c_ldsa1,h1,phi,t,beta_rs,gama,a,w_1,g_at2,phi_3,e_c_1
double precision :: b_1c,b_2c,b_3c,dx_xi,gc_xi,e_c_lsda0,w_0,g_inf,cx_xi,x_inf,f0,e_c_0
thr = 1.d-12
nup = max(rho_a,thr)
ndo = max(rho_b,thr)
rho = nup + ndo
ec_scan = 0.d0
if((rho).lt.thr)return
! constants ...
rho_inv = 1.d0/rho
cst_13 = 1.d0/3.d0
cst_23 = 2.d0 * cst_13
cst_43 = 4.d0 * cst_13
cst_53 = 5.d0 * cst_13
cst_18 = 1.d0/8.d0
cst_3pi2 = 3.d0 * pi*pi
drho2 = max(grad_rho_2,thr)
drho = dsqrt(drho2)
if((nup-ndo).gt.0.d0)then
spin_d = max(nup-ndo,thr)
else
spin_d = min(nup-ndo,-thr)
endif
c_1c = 0.64d0
c_2c = 1.5d0
d_c = 0.7d0
b_1c = 0.0285764d0
b_2c = 0.0889d0
b_3c = 0.125541d0
gama = 0.031091d0
! correlation energy lsda1
call ec_only_lda_sr(0.d0,nup,ndo,e_c_lsda1)
xi = spin_d/rho
rs = (cst_43 * pi * rho)**(-cst_13)
s = drho/( 2.d0 * cst_3pi2**(cst_13) * rho**cst_43 )
t_w = drho2 * cst_18 * rho_inv
ds_xi = 0.5d0 * ( (1.d0+xi)**cst_53 + (1.d0 - xi)**cst_53)
t_unif = 0.3d0 * (cst_3pi2)**cst_23 * rho**cst_53*ds_xi
t_unif = max(t_unif,thr)
alpha = (tau - t_w)/t_unif
cst_1alph= 1.d0 - alpha
if(cst_1alph.gt.0.d0)then
cst_1alph= max(cst_1alph,thr)
else
cst_1alph= min(cst_1alph,-thr)
endif
inv_1alph= 1.d0/cst_1alph
phi = 0.5d0 * ( (1.d0+xi)**cst_23 + (1.d0 - xi)**cst_23)
phi_3 = phi*phi*phi
t = (cst_3pi2/16.d0)**cst_13 * s / (phi * rs**0.5d0)
w_1 = dexp(-e_c_lsda1/(gama * phi_3)) - 1.d0
a = beta_rs(rs) /(gama * w_1)
g_at2 = 1.d0/(1.d0 + 4.d0 * a*t*t)**0.25d0
h1 = gama * phi_3 * dlog(1.d0 + w_1 * (1.d0 - g_at2))
! interpolation function
fc_alpha = dexp(-c_1c * alpha * inv_1alph) * step_f(cst_1alph) - d_c * dexp(c_2c * inv_1alph) * step_f(-cst_1alph)
! first part of the correlation energy
e_c_1 = e_c_lsda1 + h1
dx_xi = 0.5d0 * ( (1.d0+xi)**cst_43 + (1.d0 - xi)**cst_43)
gc_xi = (1.d0 - 2.3631d0 * (dx_xi - 1.d0) ) * (1.d0 - xi**12.d0)
e_c_lsda0= - b_1c / (1.d0 + b_2c * rs**0.5d0 + b_3c * rs)
w_0 = dexp(-e_c_lsda0/b_1c) - 1.d0
beta_inf = 0.066725d0 * 0.1d0 / 0.1778d0
cx_xi = -3.d0/(4.d0*pi) * (9.d0 * pi/4.d0)**cst_13 * dx_xi
x_inf = 0.128026d0
f0 = -0.9d0
g_inf = 1.d0/(1.d0 + 4.d0 * x_inf * s*s)**0.25d0
h0 = b_1c * dlog(1.d0 + w_0 * (1.d0 - g_inf))
e_c_0 = (e_c_lsda0 + h0) * gc_xi
ec_scan = e_c_1 + fc_alpha * (e_c_0 - e_c_1)
end
double precision function step_f(x)
implicit none
double precision, intent(in) :: x
if(x.lt.0.d0)then
step_f = 0.d0
else
step_f = 1.d0
endif
end
double precision function beta_rs(rs)
implicit none
double precision, intent(in) ::rs
beta_rs(rs) = 0.066725d0 * (1.d0 + 0.1d0 * rs)/(1.d0 + 0.1778d0 * rs)
end

View File

@ -35,3 +35,40 @@
short_range_Hartree = short_range_Hartree * 0.5d0
print*, 'short_range_Hartree',short_range_Hartree
END_PROVIDER
BEGIN_PROVIDER [double precision, regular_range_Hartree_operator, (mo_num,mo_num,N_states)]
&BEGIN_PROVIDER [double precision, regular_range_Hartree, (N_states)]
implicit none
BEGIN_DOC
! regular_range_Hartree_operator(i,j) = $\int dr i(r)j(r) \int r' \rho(r') W_{ee}^{sr}$
!
! regular_range_Hartree = $1/2 \sum_{i,j} \rho_{ij} \mathtt{regular_range_Hartree_operator}(i,j)$
!
! = $1/2 \int dr \int r' \rho(r) \rho(r') W_{ee}^{sr}$
END_DOC
integer :: i,j,k,l,m,n,istate
double precision :: get_two_e_integral
double precision :: integral, contrib
double precision :: integrals_array(mo_num,mo_num)
regular_range_Hartree_operator = 0.d0
regular_range_Hartree = 0.d0
do i = 1, mo_num
do j = 1, mo_num
if(dabs(one_e_dm_average_mo_for_dft(j,i)).le.1.d-12)cycle
call get_mo_two_e_integrals_i1j1(i,j,mo_num,integrals_array,mo_integrals_map)
do istate = 1, N_states
do k = 1, mo_num
do l = 1, mo_num
integral = integrals_array(l,k)
contrib = one_e_dm_mo_for_dft(i,j,istate) * integral
regular_range_Hartree_operator(l,k,istate) += contrib
regular_range_Hartree(istate) += contrib * one_e_dm_mo_for_dft(k,l,istate)
enddo
enddo
enddo
enddo
enddo
regular_range_Hartree = regular_range_Hartree * 0.5d0
print*, 'regular_range_Hartree',regular_range_Hartree
END_PROVIDER

View File

@ -1,17 +1,26 @@
program rotate_mos
implicit none
BEGIN_DOC
! Rotates molecular orbitals i and j by combining them as
! $1/\sqrt{2} ( \phi_i + \phi_j )$ and
! $1/\sqrt{2} ( \phi_i - \phi_j )$.
END_DOC
integer :: iorb,jorb
read(5,*)iorb,jorb
double precision, allocatable :: mo_coef_tmp(:,:)
allocate(mo_coef_tmp(ao_num,mo_num))
mo_coef_tmp = mo_coef
integer :: i,j
double precision :: dsqrt2_inv
double precision, allocatable :: mo_coef_tmp(:,:)
read(5,*)iorb,jorb
allocate(mo_coef_tmp(ao_num,mo_num))
mo_coef_tmp = mo_coef
dsqrt2_inv = 1.d0/dsqrt(2.d0)
do i = 1, ao_num
mo_coef(i,iorb) = dsqrt2_inv * ( mo_coef_tmp(i,iorb) + mo_coef_tmp(i,jorb) )
mo_coef(i,jorb) = dsqrt2_inv * ( mo_coef_tmp(i,iorb) - mo_coef_tmp(i,jorb) )
enddo
touch mo_coef
call save_mos

View File

@ -1,6 +1,6 @@
program sort_by_fock_energies
BEGIN_DOC
! programs that save the current mos ordered by Diagonal element of the Fock operator.
! Program that saves the current |MOs| ordered by diagonal element of the Fock operator.
!
! Warning : the Fock operator, and therefore its matrix elements, depends on the occupancy.
END_DOC
@ -8,16 +8,21 @@ program sort_by_fock_energies
integer :: i,j,k
integer, allocatable :: iorder(:)
double precision, allocatable :: fock_energies_tmp(:), new_mo_coef(:,:)
allocate(iorder(mo_num), fock_energies_tmp(mo_num),new_mo_coef(ao_num,mo_num))
do i = 1, mo_num
fock_energies_tmp(i) = Fock_matrix_diag_mo(i)
print*,'fock_energies_tmp(i) = ',fock_energies_tmp(i)
iorder(i) = i
enddo
print*,''
print*,'Sorting by Fock energies'
print*,''
call dsort(fock_energies_tmp,iorder,mo_num)
do i = 1, mo_num
k = iorder(i)
print*,'fock_energies_new(i) = ',fock_energies_tmp(i)
@ -25,6 +30,7 @@ program sort_by_fock_energies
new_mo_coef(j,i) = mo_coef(j,k)
enddo
enddo
mo_coef = new_mo_coef
touch mo_coef
call save_mos

View File

@ -1,5 +1,8 @@
program swap_mos
implicit none
BEGIN_DOC
! Swaps the indices of two molecular orbitals
END_DOC
integer :: i,j, i1, i2
double precision :: x
print *, 'MOs to swap?'

View File

@ -301,7 +301,6 @@ function new_zmq_push_socket(thread)
END_DOC
integer, intent(in) :: thread
integer :: rc
character*(8), external :: zmq_port
integer(ZMQ_PTR) :: new_zmq_push_socket
call omp_set_lock(zmq_lock)
@ -425,7 +424,6 @@ subroutine end_zmq_pair_socket(zmq_socket_pair)
END_DOC
integer(ZMQ_PTR), intent(in) :: zmq_socket_pair
integer :: rc
character*(8), external :: zmq_port
call omp_set_lock(zmq_lock)
rc = f77_zmq_close(zmq_socket_pair)
@ -445,7 +443,6 @@ subroutine end_zmq_pull_socket(zmq_socket_pull)
END_DOC
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
integer :: rc
character*(8), external :: zmq_port
! rc = f77_zmq_setsockopt(zmq_socket_pull,ZMQ_LINGER,0,4)
! if (rc /= 0) then
@ -472,7 +469,6 @@ subroutine end_zmq_push_socket(zmq_socket_push,thread)
integer, intent(in) :: thread
integer(ZMQ_PTR), intent(in) :: zmq_socket_push
integer :: rc
character*(8), external :: zmq_port
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,300000,4)
if (rc /= 0) then
@ -1032,7 +1028,6 @@ subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
! Terminate the socket from the application to qp_run
END_DOC
integer(ZMQ_PTR), intent(in) :: zmq_to_qp_run_socket
character*(8), external :: zmq_port
integer :: rc
rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,300000,4)