From 2daeb9ab946f7126b1333362ef6c2285a2bc2ff7 Mon Sep 17 00:00:00 2001 From: edoapra Date: Tue, 18 Jul 2023 13:38:02 -0700 Subject: [PATCH] fix for closed shell --- src/nwdft/zora/dft_zora_EPR.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nwdft/zora/dft_zora_EPR.F b/src/nwdft/zora/dft_zora_EPR.F index 64747c62ea..3456cf2382 100644 --- a/src/nwdft/zora/dft_zora_EPR.F +++ b/src/nwdft/zora/dft_zora_EPR.F @@ -362,7 +362,8 @@ c & f15.8,',',f15.8,') nocc=(', c & i4,',',i4,')') c endif c ---- calculate total occupation alpha and beta --- END -c if (noc(1) .ne. noc(2)) then +c if (noc(1) .ne. noc(2)) then + if(ipol.eq.2) then if (ac_occ(1) .ne. ac_occ(2)) then c coeffpol=4.0d0/(noc(1)-noc(2)) coeffpol=4.0d0/(ac_occ(1)-ac_occ(2)) @@ -372,7 +373,8 @@ c coeffpol=4.0d0/(noc(1)-noc(2)) & 'noc=(',i3,',',i3,') ', & '-> closed shell system not allowed!') call errquit('get_dia12_par1_EPR error ',0,0) - endif + endif + endif factor=(-0.25d0)*coeffpol*ppt c if (ga_nodeid().eq.0) c & write(*,*) 'coeffpol=',coeffpol