10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 12:23:43 +01:00

Merge remote-tracking branch 'origin/dev' into features_periodic

This commit is contained in:
Anthony Scemama 2020-01-13 14:14:01 +01:00
commit 514b3172fc
9 changed files with 150 additions and 35 deletions

63
config/ifort_rome.cfg Normal file
View File

@ -0,0 +1,63 @@
# Common flags
##############
#
# -mkl=[parallel|sequential] : Use the MKL library
# --ninja : Allow the utilisation of ninja. It is mandatory !
# --align=32 : Align all provided arrays on a 32-byte boundary
#
[COMMON]
FC : ifort -fpic
LAPACK_LIB : -mkl=parallel
IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32
# Global options
################
#
# 1 : Activate
# 0 : Deactivate
#
[OPTION]
MODE : OPT ; [ OPT | PROFILE | DEBUG ] : Chooses the section below
CACHE : 0 ; Enable cache_compile.py
OPENMP : 1 ; Append OpenMP flags
# Optimization flags
####################
#
# -xHost : Compile a binary optimized for the current architecture
# -O2 : O3 not better than O2.
# -ip : Inter-procedural optimizations
# -ftz : Flushes denormal results to zero
#
[OPT]
FC : -traceback
FCFLAGS : -O2 -ip -g -march=core-avx2 -align array64byte -fma -ftz -fomit-frame-pointer
# Profiling flags
#################
#
[PROFILE]
FC : -p -g
FCFLAGS : -xSSE4.2 -O2 -ip -ftz
# Debugging flags
#################
#
# -traceback : Activate backtrace on runtime
# -fpe0 : All floating point exaceptions
# -C : Checks uninitialized variables, array subscripts, etc...
# -g : Extra debugging information
# -xSSE2 : Valgrind needs a very simple x86 executable
#
[DEBUG]
FC : -g -traceback
FCFLAGS : -xSSE2 -C -fpe0 -implicitnone
# OpenMP flags
#################
#
[OPENMP]
FC : -qopenmp
IRPF90_FLAGS : --openmp

2
configure vendored
View File

@ -82,7 +82,7 @@ function execute () {
}
PACKAGES=""
OCAML_PACKAGES="ocamlbuild cryptokit zmq sexplib.v0.11.0 ppx_sexp_conv ppx_deriving getopt"
OCAML_PACKAGES="ocamlbuild cryptokit zmq sexplib ppx_sexp_conv ppx_deriving getopt"
while true ; do
case "$1" in

View File

@ -1,4 +1,24 @@
%%% ARXIV TO BE UPDATED %%%
@article{Loos2020Jan,
author = {Loos, Pierre-François and Scemama, Anthony and Jacquemin, Denis},
title = {{The Quest For Highly Accurate Excitation Energies: A Computational Perspective}},
journal = {arXiv},
year = {2020},
month = {Jan},
eprint = {2001.00416},
url = {https://arxiv.org/abs/2001.00416}
}
@article{Loos2019Dec,
author = {Loos, Pierre-François and Lipparini, Filippo and Boggio-Pasqua, Martial and Scemama, Anthony and Jacquemin, Denis},
title = {{A Mountaineering Strategy to Excited States: Highly-Accurate Energies and Benchmarks for Medium Size Molecules}},
journal = {arXiv},
year = {2019},
month = {Dec},
eprint = {1912.04173},
url = {https://arxiv.org/abs/1912.04173}
}
@article{Loos2019Oct,
author = {Loos, Pierre-François and Pradines, Barthélémy and Scemama, Anthony and Giner, Emmanuel and Toulouse, Julien},
title = {{A Density-Based Basis-Set Incompleteness Correction for GW Methods}},
@ -9,17 +29,20 @@
url = {https://arxiv.org/abs/1910.12238}
}
@article{Hollett2019Aug,
author = {Hollett, Joshua W. and Loos, Pierre-Fran{\c{c}}ois},
title = {{Capturing static and dynamic correlation with $\Delta \text{NO}$-MP2 and $\Delta \text{NO}$-CCSD}},
journal = {arXiv},
year = {2019},
month = {Aug},
eprint = {1908.09914},
url = {https://arxiv.org/abs/1908.09914}
}
%%%% PUBLISHED PAPERS
@article{Hollett2020Jan,
author = {Hollett, Joshua W. and Loos, Pierre-Fran{\c{c}}ois},
title = {{Capturing static and dynamic correlation with {$\Delta$}NO-MP2 and {$\Delta$}NO-CCSD}},
journal = {J. Chem. Phys.},
volume = {152},
number = {1},
pages = {014101},
year = {2020},
month = {Jan},
issn = {0021-9606},
publisher = {American Institute of Physics},
doi = {10.1063/1.5140669}
}
@article{Giner2019Oct,
author = {Giner, Emmanuel and Scemama, Anthony and Toulouse, Julien and Loos, Pierre-Fran{\c{c}}ois},

View File

@ -644,7 +644,7 @@ If a file with the same name as the basis set exists, this file will be read. O
{ opt=Optional ; short='c'; long="charge";
arg=With_arg "<int>";
doc="Total charge of the molecule. Default is 0."} ;
doc="Total charge of the molecule. Default is 0. For negative values, use m instead of -, for ex m1"} ;
{ opt=Optional ; short='d'; long="dummy";
arg=With_arg "<float>";
@ -686,7 +686,10 @@ If a file with the same name as the basis set exists, this file will be read. O
let charge =
match Command_line.get "charge" with
| None -> 0
| Some x -> int_of_string x
| Some x -> ( if x.[0] = 'm' then
~- (int_of_string (String.sub x 1 (String.length x - 1)))
else
int_of_string x )
in
let dummy =

View File

@ -31,11 +31,12 @@ subroutine run_pt2_slave(thread,iproc,energy)
double precision, intent(in) :: energy(N_states_diag)
integer, intent(in) :: thread, iproc
if (N_det > nproc*(elec_alpha_num * (mo_num-elec_alpha_num))**2) then
call run_pt2_slave_large(thread,iproc,energy)
else
call run_pt2_slave_small(thread,iproc,energy)
endif
call run_pt2_slave_large(thread,iproc,energy)
! if (N_det > nproc*(elec_alpha_num * (mo_num-elec_alpha_num))**2) then
! call run_pt2_slave_large(thread,iproc,energy)
! else
! call run_pt2_slave_small(thread,iproc,energy)
! endif
end
subroutine run_pt2_slave_small(thread,iproc,energy)

View File

@ -114,9 +114,25 @@ BEGIN_PROVIDER [ double precision, selection_weight, (N_states) ]
print *, '# var weight ', real(variance_match_weight(:),4)
case (6)
print *, 'Using CI coefficient weight in selection'
print *, 'Using CI coefficient-based selection'
selection_weight(1:N_states) = c0_weight(1:N_states)
case (7)
print *, 'Input weights multiplied by variance- and pt2-matching'
selection_weight(1:N_states) = c0_weight(1:N_states) * sqrt(variance_match_weight(1:N_states) * pt2_match_weight(1:N_states)) * state_average_weight(1:N_states)
print *, '# PT2 weight ', real(pt2_match_weight(:),4)
print *, '# var weight ', real(variance_match_weight(:),4)
case (8)
print *, 'Input weights multiplied by pt2-matching'
selection_weight(1:N_states) = c0_weight(1:N_states) * pt2_match_weight(1:N_states) * state_average_weight(1:N_states)
print *, '# PT2 weight ', real(pt2_match_weight(:),4)
case (9)
print *, 'Input weights multiplied by variance-matching'
selection_weight(1:N_states) = c0_weight(1:N_states) * variance_match_weight(1:N_states) * state_average_weight(1:N_states)
print *, '# var weight ', real(variance_match_weight(:),4)
end select
print *, '# Total weight ', real(selection_weight(:),4)
@ -784,10 +800,6 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
select case (weight_selection)
case(0:4)
! Energy selection
w = w + e_pert * selection_weight(istate)
case(5)
! Variance selection
w = w - alpha_h_psi * alpha_h_psi * selection_weight(istate)
@ -795,6 +807,10 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
case(6)
w = w - coef * coef * selection_weight(istate)
case default
! Energy selection
w = w + e_pert * selection_weight(istate)
end select
end do

View File

@ -42,7 +42,7 @@ default: 2
[weight_selection]
type: integer
doc: 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, 6: CI coefficients
doc: 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, 6: CI coefficients 7: input state-average multiplied by variance and rPT2 matching 8: input state-average multiplied by rPT2 matching 9: input state-average multiplied by variance matching
interface: ezfio,provider,ocaml
default: 2

View File

@ -489,6 +489,25 @@ subroutine save_wavefunction
endif
end
subroutine save_wavefunction_qmcpack
implicit none
use bitmasks
BEGIN_DOC
! Save the wave function into the |EZFIO| file
END_DOC
! Trick to avoid re-reading the wave function every time N_det changes
! This Trick destroys determinants when saving for qmcpack
!read_wf = .False.
if (N_det < N_states) then
return
endif
if (mpi_master) then
call save_wavefunction_general(N_det,N_states,psi_det_sorted,size(psi_coef_sorted,1),psi_coef_sorted)
endif
end
subroutine save_wavefunction_unsorted
implicit none

View File

@ -241,12 +241,7 @@ IRP_ENDIF
stop 'Unable to set ZMQ_LINGER on pull socket'
endif
! rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVBUF,100000000,4)
! if (rc /= 0) then
! stop 'Unable to set ZMQ_RCVBUF on pull socket'
! endif
rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,50,4)
rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,10,4)
if (rc /= 0) then
stop 'Unable to set ZMQ_RCVHWM on pull socket'
endif
@ -326,11 +321,6 @@ IRP_ENDIF
stop 'Unable to set ZMQ_SNDHWM on push socket'
endif
! rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDBUF,100000000,4)
! if (rc /= 0) then
! stop 'Unable to set ZMQ_SNDBUF on push socket'
! endif
rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_IMMEDIATE,1,4)
if (rc /= 0) then
stop 'Unable to set ZMQ_IMMEDIATE on push socket'