mirror of
https://github.com/LCPQ/quantum_package
synced 2025-03-30 21:41:49 +02:00
Added Generators_full module
This commit is contained in:
parent
4125127c2a
commit
cbf39830bc
0
src/Generators_full/ASSUMPTIONS.rst
Normal file
0
src/Generators_full/ASSUMPTIONS.rst
Normal file
8
src/Generators_full/Makefile
Normal file
8
src/Generators_full/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
OBJ=
|
||||
|
||||
include $(QPACKAGE_ROOT)/src/Makefile.common
|
1
src/Generators_full/NEEDED_MODULES
Normal file
1
src/Generators_full/NEEDED_MODULES
Normal file
@ -0,0 +1 @@
|
||||
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MonoInts MOs Nuclei Output Utils
|
7
src/Generators_full/README.rst
Normal file
7
src/Generators_full/README.rst
Normal file
@ -0,0 +1,7 @@
|
||||
======================
|
||||
Generators_full Module
|
||||
======================
|
||||
|
||||
All the determinants of the wave function are generators. In this way, the Full CI
|
||||
space is explored.
|
||||
|
44
src/Generators_full/generators.irp.f
Normal file
44
src/Generators_full/generators.irp.f
Normal file
@ -0,0 +1,44 @@
|
||||
use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [ double precision, generators_threshold ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Percentage of the norm of the state-averaged wave function to
|
||||
! consider for the generators
|
||||
END_DOC
|
||||
generators_threshold = 0.97d0
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the number of generators is 1 : the
|
||||
! Hartree-Fock determinant
|
||||
END_DOC
|
||||
integer :: i
|
||||
double precision :: norm
|
||||
call write_time(output_dets)
|
||||
norm = 0.d0
|
||||
N_det_generators = N_det
|
||||
do i=1,N_det
|
||||
norm = norm + psi_average_norm_contrib_sorted(i)
|
||||
if (norm > generators_threshold) then
|
||||
N_det_generators = i-1
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
N_det_generators = max(N_det_generators,1)
|
||||
call write_int(output_dets,N_det_generators,'Number of generators')
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
! Hartree-Fock determinant
|
||||
END_DOC
|
||||
psi_generators = psi_det_sorted
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
33
src/Generators_full/tests/Makefile
Normal file
33
src/Generators_full/tests/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
OPENMP =1
|
||||
PROFILE =0
|
||||
DEBUG = 0
|
||||
|
||||
IRPF90+= -I tests
|
||||
|
||||
REF_FILES=$(subst %.irp.f, %.ref, $(wildcard *.irp.f))
|
||||
|
||||
.PHONY: clean executables serial_tests parallel_tests
|
||||
|
||||
all: clean executables serial_tests parallel_tests
|
||||
|
||||
parallel_tests: $(REF_FILES)
|
||||
@echo ; echo " ---- Running parallel tests ----" ; echo
|
||||
@OMP_NUM_THREADS=10 ${QPACKAGE_ROOT}/scripts/run_tests.py
|
||||
|
||||
serial_tests: $(REF_FILES)
|
||||
@echo ; echo " ---- Running serial tests ----" ; echo
|
||||
@OMP_NUM_THREADS=1 ${QPACKAGE_ROOT}/scripts/run_tests.py
|
||||
|
||||
executables: $(wildcard *.irp.f) veryclean
|
||||
$(MAKE) -C ..
|
||||
|
||||
%.ref: $(wildcard $(QPACKAGE_ROOT)/data/inputs/*.md5) executables
|
||||
$(QPACKAGE_ROOT)/scripts/create_test_ref.sh $*
|
||||
|
||||
clean:
|
||||
$(MAKE) -C .. clean
|
||||
|
||||
veryclean:
|
||||
$(MAKE) -C .. veryclean
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user