mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
commit
ed0aaefbea
@ -6,7 +6,7 @@ python:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get install gfortran liblapack-dev zip
|
- sudo apt-get install gfortran liblapack-dev
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./setup_environment.sh --robot
|
- ./setup_environment.sh --robot
|
||||||
|
57
Makefile
57
Makefile
@ -2,7 +2,7 @@ BLUE=[34m
|
|||||||
BLACK=(B[m
|
BLACK=(B[m
|
||||||
|
|
||||||
|
|
||||||
.PHONY: doc src curl m4 ocaml irpf90 emsl build binary
|
.PHONY: doc src ocaml build binary
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@echo -----------------------------------------------
|
@echo -----------------------------------------------
|
||||||
@ -26,72 +26,23 @@ build:
|
|||||||
@echo source quantum_package.rc
|
@echo source quantum_package.rc
|
||||||
@echo -----------------------------------------------
|
@echo -----------------------------------------------
|
||||||
else
|
else
|
||||||
build: EZFIO curl m4 irpf90 emsl
|
build:
|
||||||
$(MAKE) -C src
|
$(MAKE) -C src
|
||||||
$(MAKE) -C ocaml
|
$(MAKE) -C ocaml
|
||||||
endif
|
endif
|
||||||
|
|
||||||
curl: bin/curl
|
|
||||||
m4: bin/m4
|
|
||||||
irpf90: bin/irpf90
|
|
||||||
emsl: EMSL_Basis
|
|
||||||
|
|
||||||
binary:
|
binary:
|
||||||
$(QPACKAGE_ROOT)/scripts/make_binary.sh
|
$(QPACKAGE_ROOT)/scripts/make_binary.sh
|
||||||
|
|
||||||
resultsFile:
|
|
||||||
$(info $(BLUE)===== Installing resultsFile ===== $(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
$(QPACKAGE_ROOT)/scripts/install_resultsFile.sh
|
|
||||||
|
|
||||||
EZFIO: bin/irpf90
|
|
||||||
$(info $(BLUE)===== Installing EZFIO ===== $(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_ezfio.sh | tee install_ezfio.log
|
|
||||||
|
|
||||||
EMSL_Basis:
|
|
||||||
$(info $(BLUE)===== Installing EMSL_Basis_Set_Exchange_Local ===== $(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_emsl.sh | tee install_emsl.log
|
|
||||||
|
|
||||||
zlib:
|
|
||||||
$(info $(BLUE)===== Installing Zlib ===== $(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_zlib.sh | tee install_zlib.log
|
|
||||||
|
|
||||||
|
|
||||||
bin/irpf90:
|
|
||||||
$(info $(BLUE)===== Installing IRPF90 ===== $(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_irpf90.sh | tee install_irpf90.log
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
$(MAKE) -C doc
|
$(MAKE) -C doc
|
||||||
|
|
||||||
src: irpf90 EZFIO ocaml
|
src:
|
||||||
@export QPACKAGE_ROOT=$$PWD ; \
|
|
||||||
$(MAKE) -C src
|
$(MAKE) -C src
|
||||||
|
|
||||||
bin/curl:
|
ocaml:
|
||||||
$(info $(BLUE)===== Installing curl =====$(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_curl.sh | tee install_curl.log
|
|
||||||
|
|
||||||
bin/m4:
|
|
||||||
$(info $(BLUE)===== Installing m4 =====$(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_m4.sh | tee install_m4.log
|
|
||||||
|
|
||||||
|
|
||||||
ocaml: curl m4 emsl zlib
|
|
||||||
- rm -f -- ocaml/Qptypes.ml
|
|
||||||
$(MAKE) ocaml/Qptypes.ml
|
$(MAKE) ocaml/Qptypes.ml
|
||||||
|
|
||||||
ocaml/Qptypes.ml:
|
|
||||||
$(info $(BLUE)===== Installing ocaml =====$(BLACK))
|
|
||||||
@sleep 1
|
|
||||||
QPACKAGE_ROOT=$$PWD ./scripts/install_ocaml.sh | tee install_ocaml.log
|
|
||||||
|
|
||||||
veryclean:
|
veryclean:
|
||||||
rm -rf EZFIO
|
rm -rf EZFIO
|
||||||
$(MAKE) EZFIO
|
$(MAKE) EZFIO
|
||||||
|
@ -52,7 +52,9 @@ doc: qpackage.odocl
|
|||||||
$(OCAMLBUILD) $*.byte -use-ocamlfind $(PKGS)
|
$(OCAMLBUILD) $*.byte -use-ocamlfind $(PKGS)
|
||||||
ln -s $*.byte $*
|
ln -s $*.byte $*
|
||||||
|
|
||||||
%.native: $(MLFILES) $(MLIFILES) executables
|
qp_run.native: $(MLFILES) $(MLIFILES) executables
|
||||||
|
|
||||||
|
%.native: $(MLFILES) $(MLIFILES)
|
||||||
rm -f -- $*
|
rm -f -- $*
|
||||||
$(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS)
|
$(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS)
|
||||||
ln -s $*.native $*
|
ln -s $*.native $*
|
||||||
@ -65,7 +67,6 @@ qptypes_generator.byte: qptypes_generator.ml
|
|||||||
|
|
||||||
Qptypes.ml: qptypes_generator.byte
|
Qptypes.ml: qptypes_generator.byte
|
||||||
./qptypes_generator.byte > Qptypes.ml
|
./qptypes_generator.byte > Qptypes.ml
|
||||||
rm qptypes_generator.byte
|
|
||||||
|
|
||||||
${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml:
|
${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml:
|
||||||
$(MAKE) -C ${QPACKAGE_ROOT}/src ezfio
|
$(MAKE) -C ${QPACKAGE_ROOT}/src ezfio
|
||||||
|
@ -32,3 +32,4 @@ Build failed for module $MODULE
|
|||||||
fi
|
fi
|
||||||
cd ${OLDPWD}
|
cd ${OLDPWD}
|
||||||
done
|
done
|
||||||
|
${QPACKAGE_ROOT}/scripts/create_executables_list.sh
|
||||||
|
@ -18,6 +18,8 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
|||||||
|
|
||||||
check_current_dir_is_src
|
check_current_dir_is_src
|
||||||
|
|
||||||
|
IRPF90="${QPACKAGE_ROOT}/bin/irpf90 ${IRPF90_FLAGS}"
|
||||||
|
|
||||||
|
|
||||||
# Check if the user's config exists
|
# Check if the user's config exists
|
||||||
if [[ ! -f ${QPACKAGE_ROOT}/src/Makefile.config ]]
|
if [[ ! -f ${QPACKAGE_ROOT}/src/Makefile.config ]]
|
||||||
|
@ -11,23 +11,6 @@ BLACK="(B[m"
|
|||||||
QPACKAGE_ROOT="$( cd "$(dirname "$BASH_SOURCE")" ; pwd -P )"
|
QPACKAGE_ROOT="$( cd "$(dirname "$BASH_SOURCE")" ; pwd -P )"
|
||||||
|
|
||||||
|
|
||||||
if [[ -z "${IRPF90}" ]] ;
|
|
||||||
then
|
|
||||||
make irpf90
|
|
||||||
IRPF90="${QPACKAGE_ROOT}"/bin/irpf90
|
|
||||||
if [[ ! -x "${IRPF90}" ]]
|
|
||||||
then
|
|
||||||
echo $RED "Error in IRPF90 installation" $BLACK
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -z ${OCAMLBREW_BASE} ]]
|
|
||||||
then
|
|
||||||
export OCAMLBREW_BASE="$HOME/ocamlbrew"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << EOF > quantum_package.rc
|
cat << EOF > quantum_package.rc
|
||||||
export IRPF90="${IRPF90}"
|
export IRPF90="${IRPF90}"
|
||||||
export QPACKAGE_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}") ; pwd -P )
|
export QPACKAGE_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}") ; pwd -P )
|
||||||
@ -58,7 +41,6 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -x ${QPACKAGE_ROOT}/bin/irpman ]]
|
if [[ ! -x ${QPACKAGE_ROOT}/bin/irpman ]]
|
||||||
then
|
then
|
||||||
echo $RED "Error in IRPF90 installation" $BLACK
|
echo $RED "Error in IRPF90 installation" $BLACK
|
||||||
|
10
src/Dets/spindeterminants.ezfio_config
Normal file
10
src/Dets/spindeterminants.ezfio_config
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
spindeterminants
|
||||||
|
n_det_alpha integer
|
||||||
|
n_det_beta integer
|
||||||
|
n_int integer
|
||||||
|
bit_kind integer
|
||||||
|
n_states integer
|
||||||
|
psi_det_alpha integer*8 (spindeterminants_n_int*spindeterminants_bit_kind/8,spindeterminants_n_det_alpha)
|
||||||
|
psi_det_beta integer*8 (spindeterminants_n_int*spindeterminants_bit_kind/8,spindeterminants_n_det_beta)
|
||||||
|
psi_coef_matrix double precision (spindeterminants_n_det_alpha,spindeterminants_n_det_beta,spindeterminants_n_states)
|
||||||
|
|
44
src/Dets/spindeterminants.irp.f
Normal file
44
src/Dets/spindeterminants.irp.f
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
subroutine write_spindeterminants
|
||||||
|
use bitmasks
|
||||||
|
implicit none
|
||||||
|
integer*8, allocatable :: tmpdet(:,:)
|
||||||
|
integer :: N_int2
|
||||||
|
integer :: i,j,k
|
||||||
|
integer*8 :: det_8(100)
|
||||||
|
integer(bit_kind) :: det_bk((100*8)/bit_kind)
|
||||||
|
equivalence (det_8, det_bk)
|
||||||
|
|
||||||
|
N_int2 = (N_int*bit_kind)/8
|
||||||
|
call ezfio_set_spindeterminants_n_det_alpha(N_det_alpha_unique)
|
||||||
|
call ezfio_set_spindeterminants_n_det_beta(N_det_beta_unique)
|
||||||
|
call ezfio_set_spindeterminants_n_int(N_int)
|
||||||
|
call ezfio_set_spindeterminants_bit_kind(bit_kind)
|
||||||
|
call ezfio_set_spindeterminants_n_states(N_states)
|
||||||
|
|
||||||
|
allocate(tmpdet(N_int2,N_det_alpha_unique))
|
||||||
|
do i=1,N_det_alpha_unique
|
||||||
|
do k=1,N_int
|
||||||
|
det_bk(k) = psi_det_alpha_unique(k,i)
|
||||||
|
enddo
|
||||||
|
do k=1,N_int2
|
||||||
|
tmpdet(k,i) = det_8(k)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
call ezfio_set_spindeterminants_psi_det_alpha(psi_det_alpha_unique)
|
||||||
|
deallocate(tmpdet)
|
||||||
|
|
||||||
|
allocate(tmpdet(N_int2,N_det_beta_unique))
|
||||||
|
do i=1,N_det_beta_unique
|
||||||
|
do k=1,N_int
|
||||||
|
det_bk(k) = psi_det_beta_unique(k,i)
|
||||||
|
enddo
|
||||||
|
do k=1,N_int2
|
||||||
|
tmpdet(k,i) = det_8(k)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
call ezfio_set_spindeterminants_psi_det_beta(psi_det_beta_unique)
|
||||||
|
deallocate(tmpdet)
|
||||||
|
|
||||||
|
call ezfio_set_spindeterminants_psi_coef_matrix(psi_svd_matrix)
|
||||||
|
|
||||||
|
end
|
@ -71,7 +71,7 @@ subroutine damping_SCF
|
|||||||
delta_alpha = D_new_alpha - D_alpha
|
delta_alpha = D_new_alpha - D_alpha
|
||||||
delta_beta = D_new_beta - D_beta
|
delta_beta = D_new_beta - D_beta
|
||||||
|
|
||||||
lambda = 1.d0
|
lambda = .5d0
|
||||||
E_half = 0.d0
|
E_half = 0.d0
|
||||||
do while (E_half > E)
|
do while (E_half > E)
|
||||||
HF_density_matrix_ao_alpha = D_alpha + lambda * delta_alpha
|
HF_density_matrix_ao_alpha = D_alpha + lambda * delta_alpha
|
||||||
|
@ -21,7 +21,7 @@ $(ALL_MODULES): ezfio
|
|||||||
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
|
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
|
||||||
|
|
||||||
# Define the EZFIO rules
|
# Define the EZFIO rules
|
||||||
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
|
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
|
||||||
$(QPACKAGE_ROOT)/scripts/prepare_ezfio.sh
|
$(QPACKAGE_ROOT)/scripts/prepare_ezfio.sh
|
||||||
cd $(EZFIO_DIR);\
|
cd $(EZFIO_DIR);\
|
||||||
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\
|
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\
|
||||||
|
@ -22,8 +22,9 @@ subroutine trap_signals
|
|||||||
! What to do when a signal is caught. Here, trap Ctrl-C and call the control_C subroutine.
|
! What to do when a signal is caught. Here, trap Ctrl-C and call the control_C subroutine.
|
||||||
END_DOC
|
END_DOC
|
||||||
integer, external :: catch_signal
|
integer, external :: catch_signal
|
||||||
integer, parameter :: sigusr2 = 12
|
integer :: sigusr2, status
|
||||||
call signal (sigusr2, catch_signal)
|
sigusr2 = 12
|
||||||
|
call signal (sigusr2, catch_signal,status)
|
||||||
end subroutine trap_signals
|
end subroutine trap_signals
|
||||||
|
|
||||||
integer function catch_signal(signum)
|
integer function catch_signal(signum)
|
||||||
|
Loading…
Reference in New Issue
Block a user