Commit 9f422347 authored by Matthias Redies's avatar Matthias Redies

remove pw-way. check for negative kED

parent 2ee48ec3
......@@ -300,6 +300,9 @@ CONTAINS
IF(PRESENT(kinEnergyDen_KS)) THEN
! apply correction in eq (4) in https://doi.org/10.1063/1.1565316
kinEnergyDen_libXC = transpose(0.25 * grad%laplace - 0.5 * kinEnergyDen_KS)
if(any(kinEnergyDen_libXC < 0.0)) write (*,*) "kED negative", &
minval(kinEnergyDen_libxc)
call xc_f03_mgga_exc(xcpot%exc_func_x, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
transpose(grad%laplace), kinEnergyDen_libXC, exc)
......
......@@ -34,18 +34,13 @@ CONTAINS
call save_npy("kinED_pw_schroeway_precut.npy",kinEnergyDen_RS)
endif
if(any(kinEnergyDen_RS < eps)) then
write (6,*) " lowest kinetic energy density cutoff = ", minval(kinEnergyDen_RS)
kinEnergyDen_RS = max(kinEnergyDen_RS, eps)
endif
if(is_pw) then
call save_npy("kinED_pw_schroeway.npy",kinEnergyDen_RS)
write (*,*) "read new"
open(unit=69, file="kin_ED_pwway.dat")
read(69,*) kinEnergyDen_RS
close(69)
!write (*,*) "read new"
!open(unit=69, file="kin_ED_pwway.dat")
!read(69,*) kinEnergyDen_RS
!close(69)
endif
#else
CALL juDFT_error("MetaGGA require LibXC",hint="compile Fleur with LibXC (e.g. by giving '-external libxc' to ./configure")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment