mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-08 20:33:26 +01:00
Compiles with gfortran
This commit is contained in:
parent
06efe7ca16
commit
d89cbacca5
@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
# -ffast-math and the Fortran-specific
|
# -ffast-math and the Fortran-specific
|
||||||
# -fno-protect-parens and -fstack-arrays.
|
# -fno-protect-parens and -fstack-arrays.
|
||||||
[OPT]
|
[OPT]
|
||||||
FCFLAGS : -Ofast
|
FCFLAGS : -Ofast -march=native
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
|
@ -12,7 +12,7 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
|
|||||||
! E0 in the denominator of the PT2
|
! E0 in the denominator of the PT2
|
||||||
END_DOC
|
END_DOC
|
||||||
if (initialize_pt2_E0_denominator) then
|
if (initialize_pt2_E0_denominator) then
|
||||||
pt2_E0_denominator(1:N_states) = CI_electronic_energy(1:N_states)
|
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||||
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||||
call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator')
|
call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator')
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
program pt2_stoch
|
program pt2_stoch
|
||||||
implicit none
|
implicit none
|
||||||
initialize_pt2_E0_denominator = .False.
|
|
||||||
read_wf = .True.
|
read_wf = .True.
|
||||||
SOFT_TOUCH initialize_pt2_E0_denominator read_wf
|
SOFT_TOUCH read_wf
|
||||||
PROVIDE mo_bielec_integrals_in_map
|
PROVIDE mo_bielec_integrals_in_map
|
||||||
call run
|
call run
|
||||||
end
|
end
|
||||||
@ -19,17 +18,12 @@ subroutine run
|
|||||||
|
|
||||||
double precision :: E_CI_before(N_states), relative_error
|
double precision :: E_CI_before(N_states), relative_error
|
||||||
|
|
||||||
if (.true.) then
|
|
||||||
call ezfio_get_full_ci_zmq_energy(E_CI_before(1))
|
|
||||||
pt2_e0_denominator(:) = E_CI_before(1) - nuclear_repulsion
|
|
||||||
SOFT_TOUCH pt2_e0_denominator read_wf
|
|
||||||
endif
|
|
||||||
allocate (pt2(N_states))
|
allocate (pt2(N_states))
|
||||||
pt2 = 0.d0
|
pt2 = 0.d0
|
||||||
|
|
||||||
threshold_selectors = 1.d0
|
threshold_selectors = 1.d0
|
||||||
threshold_generators = 1d0
|
threshold_generators = 1d0
|
||||||
relative_error = 1.d-6
|
relative_error = 1.d-4
|
||||||
call ZMQ_pt2(pt2, relative_error)
|
call ZMQ_pt2(pt2, relative_error)
|
||||||
print *, 'Final step'
|
print *, 'Final step'
|
||||||
print *, 'N_det = ', N_det
|
print *, 'N_det = ', N_det
|
||||||
|
@ -18,24 +18,33 @@ subroutine get_excitation_degree(key1,key2,degree,Nint)
|
|||||||
select case (Nint)
|
select case (Nint)
|
||||||
|
|
||||||
case (1)
|
case (1)
|
||||||
xorvec(1:2) = xor( key1(1:2), key2(1:2))
|
xorvec(1) = xor( key1(1), key2(1))
|
||||||
|
xorvec(2) = xor( key1(2), key2(2))
|
||||||
degree = sum(popcnt(xorvec(1:2)))
|
degree = sum(popcnt(xorvec(1:2)))
|
||||||
|
|
||||||
case (2)
|
case (2)
|
||||||
xorvec(1:4) = xor( key1(1:4), key2(1:4))
|
xorvec(1) = xor( key1(1), key2(1))
|
||||||
|
xorvec(2) = xor( key1(2), key2(2))
|
||||||
|
xorvec(3) = xor( key1(3), key2(3))
|
||||||
|
xorvec(4) = xor( key1(4), key2(4))
|
||||||
degree = sum(popcnt(xorvec(1:4)))
|
degree = sum(popcnt(xorvec(1:4)))
|
||||||
|
|
||||||
case (3)
|
case (3)
|
||||||
xorvec(1:6) = xor( key1(1:6), key2(1:6))
|
do l=1,6
|
||||||
|
xorvec(l) = xor( key1(l), key2(l))
|
||||||
|
enddo
|
||||||
degree = sum(popcnt(xorvec(1:6)))
|
degree = sum(popcnt(xorvec(1:6)))
|
||||||
|
|
||||||
case (4)
|
case (4)
|
||||||
xorvec(1:8) = xor( key1(1:8), key2(1:8))
|
do l=1,8
|
||||||
|
xorvec(l) = xor( key1(l), key2(l))
|
||||||
|
enddo
|
||||||
degree = sum(popcnt(xorvec(1:8)))
|
degree = sum(popcnt(xorvec(1:8)))
|
||||||
|
|
||||||
case default
|
case default
|
||||||
l = ishft(Nint,1)
|
do l=1,ishft(Nint,1)
|
||||||
xorvec(1:l) = xor( key1(1:l), key2(1:l))
|
xorvec(l) = xor( key1(l), key2(l))
|
||||||
|
enddo
|
||||||
degree = sum(popcnt(xorvec(1:l)))
|
degree = sum(popcnt(xorvec(1:l)))
|
||||||
|
|
||||||
end select
|
end select
|
||||||
@ -2254,19 +2263,27 @@ subroutine get_excitation_degree_spin(key1,key2,degree,Nint)
|
|||||||
degree = popcnt(xorvec(1))
|
degree = popcnt(xorvec(1))
|
||||||
|
|
||||||
case (2)
|
case (2)
|
||||||
xorvec(1:2) = xor( key1(1:2), key2(1:2))
|
xorvec(1) = xor( key1(1), key2(1))
|
||||||
degree = sum(popcnt(xorvec(1:2)))
|
xorvec(2) = xor( key1(2), key2(2))
|
||||||
|
degree = popcnt(xorvec(1))+popcnt(xorvec(2))
|
||||||
|
|
||||||
case (3)
|
case (3)
|
||||||
xorvec(1:3) = xor( key1(1:3), key2(1:3))
|
xorvec(1) = xor( key1(1), key2(1))
|
||||||
|
xorvec(2) = xor( key1(2), key2(2))
|
||||||
|
xorvec(3) = xor( key1(3), key2(3))
|
||||||
degree = sum(popcnt(xorvec(1:3)))
|
degree = sum(popcnt(xorvec(1:3)))
|
||||||
|
|
||||||
case (4)
|
case (4)
|
||||||
xorvec(1:4) = xor( key1(1:4), key2(1:4))
|
xorvec(1) = xor( key1(1), key2(1))
|
||||||
|
xorvec(2) = xor( key1(2), key2(2))
|
||||||
|
xorvec(3) = xor( key1(3), key2(3))
|
||||||
|
xorvec(4) = xor( key1(4), key2(4))
|
||||||
degree = sum(popcnt(xorvec(1:4)))
|
degree = sum(popcnt(xorvec(1:4)))
|
||||||
|
|
||||||
case default
|
case default
|
||||||
xorvec(1:Nint) = xor( key1(1:Nint), key2(1:Nint))
|
do l=1,N_int
|
||||||
|
xorvec(l) = xor( key1(l), key2(l))
|
||||||
|
enddo
|
||||||
degree = sum(popcnt(xorvec(1:Nint)))
|
degree = sum(popcnt(xorvec(1:Nint)))
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
Loading…
Reference in New Issue
Block a user