mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-12 17:13:54 +01:00
Compiles again
This commit is contained in:
parent
0d5de32c29
commit
dc590f5bb5
@ -6,6 +6,11 @@
|
||||
QPACKAGE_ROOT=${PWD}
|
||||
PACKAGES="core cryptokit"
|
||||
|
||||
function asksure() {
|
||||
echo -n "Are you sure (Y/N)? "
|
||||
return $retval
|
||||
}
|
||||
|
||||
if [[ -f quantum_package.rc ]]
|
||||
then
|
||||
source quantum_package.rc
|
||||
@ -14,7 +19,18 @@ make -C ocaml Qptypes.ml &> /dev/null
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
|
||||
rm -rf -- ${HOME}/ocamlbrew
|
||||
if [[ -d ${HOME}/ocamlbrew ]]
|
||||
then
|
||||
echo "Remove directory ${HOME}/ocamlbrew? [Y/n]"
|
||||
while read -r -n 1 -s answer; do
|
||||
if [[ $answer = [YyNn] ]]; then
|
||||
[[ $answer = [Yy] ]] && rm -rf -- ${HOME}/ocamlbrew
|
||||
[[ $answer = [Nn] ]] && exit 1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
scripts/fetch_from_web.py "https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install" ocamlbrew-install.sh
|
||||
cat < ocamlbrew-install.sh | env OCAMLBREW_FLAGS="-r" bash | tee ocamlbrew_install.log
|
||||
grep "source " ocamlbrew_install.log | grep "etc/ocamlbrew.bashrc" >> quantum_package.rc
|
||||
|
@ -213,53 +213,6 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
subroutine read_dets(det,Nint,Ndet)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reads the determinants from the EZFIO file
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: Nint,Ndet
|
||||
integer(bit_kind), intent(out) :: det(Nint,2,Ndet)
|
||||
integer*8, allocatable :: psi_det_read(:,:,:)
|
||||
double precision, allocatable :: psi_coef_read(:,:)
|
||||
integer*8 :: det_8(100)
|
||||
integer(bit_kind) :: det_bk((100*8)/bit_kind)
|
||||
integer :: N_int2
|
||||
integer :: i,k
|
||||
equivalence (det_8, det_bk)
|
||||
|
||||
call ezfio_get_determinants_N_int(N_int2)
|
||||
ASSERT (N_int2 == Nint)
|
||||
call ezfio_get_determinants_bit_kind(k)
|
||||
ASSERT (k == bit_kind)
|
||||
|
||||
N_int2 = (Nint*bit_kind)/8
|
||||
allocate (psi_det_read(N_int2,2,Ndet))
|
||||
call ezfio_get_determinants_psi_det (psi_det_read)
|
||||
! print*,'N_int2 = ',N_int2,N_int
|
||||
! print*,'k',k,bit_kind
|
||||
! print*,'psi_det_read = ',Ndet
|
||||
do i=1,Ndet
|
||||
do k=1,N_int2
|
||||
det_8(k) = psi_det_read(k,1,i)
|
||||
enddo
|
||||
do k=1,Nint
|
||||
det(k,1,i) = det_bk(k)
|
||||
enddo
|
||||
do k=1,N_int2
|
||||
det_8(k) = psi_det_read(k,2,i)
|
||||
enddo
|
||||
do k=1,Nint
|
||||
det(k,2,i) = det_bk(k)
|
||||
enddo
|
||||
enddo
|
||||
deallocate(psi_det_read)
|
||||
|
||||
end
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states_diag) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
@ -31,45 +31,6 @@ double precision function overlap_gaussian_x(A_center,B_center,alpha,beta,power_
|
||||
overlap_gaussian_x*= fact_p
|
||||
end
|
||||
|
||||
subroutine test(alpha,beta,gama,a,b,A_center,B_center,Nucl_center,overlap_x,overlap_y,overlap_z,overlap)
|
||||
implicit none
|
||||
include 'constants.F'
|
||||
integer, intent(in) :: a(3),b(3) ! powers : (x-xa)**a_x = (x-A(1))**a(1)
|
||||
double precision, intent(in) :: alpha, beta, gama ! exponents
|
||||
double precision, intent(in) :: A_center(3) ! A center
|
||||
double precision, intent(in) :: B_center (3) ! B center
|
||||
double precision, intent(in) :: Nucl_center(3) ! B center
|
||||
double precision, intent(out) :: overlap_x,overlap_y,overlap_z,overlap
|
||||
integer :: i,j
|
||||
double precision :: dx,Lx,nx,x(3)
|
||||
nx = 100000000
|
||||
Lx = 25.d0
|
||||
dx = dble(Lx/nx)
|
||||
overlap_x = 0.d0
|
||||
overlap_y = 0.d0
|
||||
overlap_z = 0.d0
|
||||
x(1) = -12.5d0
|
||||
x(2) = -12.5d0
|
||||
x(3) = -12.5d0
|
||||
do i = 1,nx
|
||||
overlap_x += (x(1) - A_center(1))**a(1) * (x(1) - B_center(1))**b(1) &
|
||||
* dexp(-alpha*(x(1) - A_center(1))**2) * dexp(-beta*(x(1) - B_center(1))**2) * dexp(-gama*(x(1) - Nucl_center(1))**2)
|
||||
|
||||
overlap_y += (x(2) - A_center(2))**a(2) * (x(2) - B_center(2))**b(2) &
|
||||
* dexp(-alpha*(x(2) - A_center(2))**2) * dexp(-beta*(x(2) - B_center(2))**2) * dexp(-gama*(x(2) - Nucl_center(2))**2)
|
||||
overlap_z += (x(3) - A_center(3))**a(3) * (x(3) - B_center(3))**b(3) &
|
||||
* dexp(-alpha*(x(3) - A_center(3))**2) * dexp(-beta*(x(3) - B_center(3))**2) * dexp(-gama*(x(3) - Nucl_center(3))**2)
|
||||
x(1) += dx
|
||||
x(2) += dx
|
||||
x(3) += dx
|
||||
enddo
|
||||
overlap_x = overlap_x * dx
|
||||
overlap_y = overlap_y * dx
|
||||
overlap_z = overlap_z * dx
|
||||
overlap = overlap_x * overlap_y * overlap_z
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine overlap_A_B_C(dim,alpha,beta,gama,a,b,A_center,B_center,Nucl_center,overlap)
|
||||
implicit none
|
||||
|
Loading…
Reference in New Issue
Block a user