Commit 3720c1c6 authored by Daniel Wortmann's avatar Daniel Wortmann

Small bugfix in xc-pot/libxc_postprocess_gga.f90

parent 8889da81
......@@ -51,10 +51,10 @@ CONTAINS
nsp=SIZE(v_xc,1) !no of points
n_sigma=MERGE(1,3,SIZE(v_xc,2)==1) !See in _mt routine
ALLOCATE(vsigma_g(stars%ng3,n_sigma),vsigma(nsp,n_sigma))
ALLOCATE(vsigma_g(stars%ng3,n_sigma),vsigma(nsp,n_sigma));vsigma_g=0.0
vsigma=TRANSPOSE(grad%vsigma) !create a (nsp,n_sigma) matrix
CALL pw_from_grid(xcpot,stars,.FALSE.,vsigma,vsigma_g)
!vsigma_g(:,1)=vsigma_g(:,1)*stars%nstr(:)
ALLOCATE(grad_sigma%gr(3,nsp,n_sigma))
CALL pw_to_grid(xcpot,n_sigma,.false.,stars,cell,vsigma_g,grad_sigma)
......@@ -72,7 +72,7 @@ CONTAINS
INTEGER:: i
IF (SIZE(v_xc,2)==1) THEN !Single spin
DO i=1,SIZE(v_xc,1) !loop over points
v_xc(i,1)=v_xc(i,1)-2*dot_PRODUCT(grad_sigma%gr(:,i,1),grad%gr(:,i,1))-2*vsigma(i,1)*grad%laplace(i,1))
v_xc(i,1)=v_xc(i,1)-2*dot_PRODUCT(grad_sigma%gr(:,i,1),grad%gr(:,i,1))-2*vsigma(i,1)*grad%laplace(i,1)
ENDDO
ELSE !two spins
DO i=1,SIZE(v_xc,1) !loop over points
......
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