mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Added spindeterminants EZFIO routines
This commit is contained in:
parent
6e4523524b
commit
3284b9d645
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
|
@ -21,7 +21,7 @@ $(ALL_MODULES): ezfio
|
||||
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
|
||||
|
||||
# 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
|
||||
cd $(EZFIO_DIR);\
|
||||
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\
|
||||
|
Loading…
Reference in New Issue
Block a user