diff --git a/GoDuck b/GoDuck index 1157f50..e4226a1 100755 Binary files a/GoDuck and b/GoDuck differ diff --git a/src/ADC/Makefile b/src/ADC/Makefile index c77a6e6..6ca514e 100644 --- a/src/ADC/Makefile +++ b/src/ADC/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/AOtoMO/Makefile b/src/AOtoMO/Makefile index c77a6e6..6ca514e 100644 --- a/src/AOtoMO/Makefile +++ b/src/AOtoMO/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/BasCor/Makefile b/src/BasCor/Makefile index c77a6e6..6ca514e 100644 --- a/src/BasCor/Makefile +++ b/src/BasCor/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/CC/Makefile b/src/CC/Makefile index c77a6e6..6ca514e 100644 --- a/src/CC/Makefile +++ b/src/CC/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/CI/Makefile b/src/CI/Makefile index c77a6e6..6ca514e 100644 --- a/src/CI/Makefile +++ b/src/CI/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/HF/Makefile b/src/HF/Makefile index c77a6e6..6ca514e 100644 --- a/src/HF/Makefile +++ b/src/HF/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/MBPT/Makefile b/src/MBPT/Makefile index c77a6e6..6ca514e 100644 --- a/src/MBPT/Makefile +++ b/src/MBPT/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/MC/Makefile b/src/MC/Makefile index c77a6e6..6ca514e 100644 --- a/src/MC/Makefile +++ b/src/MC/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/MP/Makefile b/src/MP/Makefile index c77a6e6..6ca514e 100644 --- a/src/MP/Makefile +++ b/src/MP/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/RPA/Makefile b/src/RPA/Makefile index c77a6e6..6ca514e 100644 --- a/src/RPA/Makefile +++ b/src/RPA/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug diff --git a/src/eDFT/US51_lda_exchange_energy.f90 b/src/eDFT/US51_lda_exchange_energy.f90 index b21d673..382af99 100644 --- a/src/eDFT/US51_lda_exchange_energy.f90 +++ b/src/eDFT/US51_lda_exchange_energy.f90 @@ -1,4 +1,4 @@ -subroutine US51_lda_exchange_energy(nGrid,weight,rho,Ex) +subroutine US51_lda_exchange_energy(nGrid,weight,rho,ExLDA) use xc_f90_lib_m @@ -15,41 +15,40 @@ subroutine US51_lda_exchange_energy(nGrid,weight,rho,Ex) ! Local variables + integer(8) :: nGri8 integer :: iG - double precision :: alpha,r,alphaw,a2,b2,c2,a1,b1,c1 + double precision :: r + double precision,allocatable :: Ex(:) + + TYPE(xc_f90_func_t) :: xc_func + TYPE(xc_f90_func_info_t) :: xc_info + integer :: func_id = 1 ! Output variables - double precision :: Ex + double precision :: ExLDA -! Cxw2 parameters for He N->N+1 -! a2 = 0.135068d0 -! b2 = -0.00774769d0 -! c2 = -0.0278205d0 +! Memory allocation + + nGri8 = int(nGrid,8) + print*,nGri8 + allocate(Ex(nGrid)) -! Cxw1 parameters for He N->N-1 -! a1 = 0.420243d0 -! b1 = 0.0700561d0 -! c1 = -0.288301d0 + call xc_f90_func_init(xc_func, func_id, XC_POLARIZED) + xc_info = xc_f90_func_get_info(xc_func) + call xc_f90_lda_exc(xc_func, nGri8, rho(1), Ex(1)) -! Cx coefficient for Slater LDA exchange + ExLDA = 0d0 - alpha = -(3d0/2d0)*(3d0/(4d0*pi))**(1d0/3d0) +! do iG=1,nGrid -! alphaw = alpha*(1d0 - wEns(2)*(1d0 - wEns(2))*(a1 + b1*(wEns(2) - 0.5d0) + c1*(wEns(2) - 0.5d0)**2)) -! Compute LDA exchange energy +! write(*,"(F8.6,1X,F9.6)") rho(iG), Ex(iG) - Ex = 0d0 - do iG=1,nGrid +! ExLDA = ExLDA + weight(iG)*Ex(iG) - r = max(0d0,rho(iG)) +! enddo - if(r > threshold) then + call xc_f90_func_end(xc_func) - Ex = Ex + weight(iG)*alpha*r**(4d0/3d0) - - endif - - enddo end subroutine US51_lda_exchange_energy diff --git a/src/make_ninja.py b/src/make_ninja.py index c6bd2f5..fb2a3bb 100755 --- a/src/make_ninja.py +++ b/src/make_ninja.py @@ -24,7 +24,7 @@ if not DEBUG: compile_gfortran_mac = """ FC = gfortran AR = libtool -FFLAGS = -I$IDIR -J$IDIR -Wall -Wno-unused -Wno-unused-dummy-argument -O3 +FFLAGS = -I$IDIR -J$IDIR -fbacktrace -g -Wall -Wno-unused -Wno-unused-dummy-argument -O3 CC = gcc CXX = g++ LAPACK=-lblas -llapack @@ -34,7 +34,7 @@ else: compile_gfortran_mac = """ FC = gfortran AR = libtool -FFLAGS = -I$IDIR -J$IDIR -Wall -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant +FFLAGS = -I$IDIR -J$IDIR -fbacktrace -Wall -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant CC = gcc CXX = g++ LAPACK=-lblas -llapack @@ -133,6 +133,7 @@ rule install_qcaml command = cd $QUACK_ROOT/qcaml-tools ; ./install_qcaml.sh pool = console description = Installing QCaml + generator = true build $QUACK_ROOT/qcaml-tools/qcaml/README.md: install_qcaml generator = true @@ -256,8 +257,11 @@ def create_makefile(directory): ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug """) diff --git a/src/utils/Makefile b/src/utils/Makefile index c77a6e6..6ca514e 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -2,6 +2,9 @@ default: ninja make -C .. +clean: + ninja -t clean + debug: - ninja + ninja -t clean make -C .. debug