Clean up and bug fix

svn-origin-rev: 6909
This commit is contained in:
Manuel Guidon 2008-01-30 13:38:04 +00:00
parent c0e963e0a1
commit 71d934b4e4
2 changed files with 3 additions and 7 deletions

View file

@ -749,10 +749,8 @@ CONTAINS
CALL qs_vxc_create(qs_env=qs_env,&
vxc_rho=v_rspace_new, vxc_tau=v_tau_rspace, exc=energy%exc, &
just_energy=.TRUE., gapw_xc=gapw_xc, error=error)
! write(*,*) "GPW exc ", energy%exc
IF (gapw .OR. gapw_xc) THEN
CALL calculate_vxc_atom(qs_env,.TRUE.,error=error)
! write(*,*) "GAPW exc ", energy%exc1
END IF
END IF
@ -1209,8 +1207,6 @@ CONTAINS
energy%s2_restraint = 0.0_dp
ENDIF
! write(*,*) "GPW exc ", energy%exc
! write(*,*) "GAPW exc ", energy%exc1
! sum all energy terms to obtain the total energy
energy%total = energy%core_overlap + energy%core_self + &
energy%core + energy%hartree + &

View file

@ -116,8 +116,8 @@ MODULE xc_adiabatic_methods
c = -1.0_dp / adiabatic_lambda -b/(hf_energy(1)-dfa_energy-hf_energy(2))
dExc_da = 1.0_dp
dExc_db = 1.0_dp/c -(LOG((1.0_dp + c))/(c*c))
dExc_dc = -b/(c*c*c*(1.0_dp+c))*(2.0_dp*c+c*c-2.0_dp*LOG((1.0_dp+c))-2.0_dp*LOG((1.0_dp+c))*c)
dExc_db = 1.0_dp/c -(LOG(ABS(1.0_dp + c))/(c*c))
dExc_dc = -b/(c*c*c*(1.0_dp+c))*(2.0_dp*c+c*c-2.0_dp*LOG(ABS(1.0_dp+c))-2.0_dp*LOG(ABS(1.0_dp+c))*c)
da_dEx1 = 1.0_dp
da_ddW0 = 0.0_dp
@ -139,7 +139,7 @@ MODULE xc_adiabatic_methods
scale_dDFA = dExc_da*da_dDFA + dExc_db*db_dDFA + dExc_dc*dc_dDFA
scale_dEx2 = dExc_da*da_dEx2 + dExc_db*db_dEx2 + dExc_dc*dc_dEx2
total_energy_xc = a + b/(c*c)*(c-LOG((1.0_dp+c)))
total_energy_xc = a + b/(c*c)*(c-LOG(ABS(1.0_dp+c)))
END SUBROUTINE rescale_MCY3_pade