Your fixing is never ever going to work. Key is the modification of xfac in the data block that is in cdft.fh . This is what is used by the CPHF routine and outside of hnd_giaox.F. You cannot simply fix this within this one routine. CPHF does the response calculation using the RHS constructed in hnd_giaox.F. There it also uses the HF Exchange.
I can see why it may not have compiled, forgot to define do_wah as a logical.
Hence, in the hnd_giaox.F file I provided, add somewhere at the top where all the variables are defined:
logical do_wah
Also, in the input add the following (as you already figured out):
set dft:wah .true.
If it doesn't compile, get me the error message.
Bert
Bert
[QUOTE=Ohlincha Nov 16th 5:07 am]Bert,
I don't see much difference between the original 6.1 and my modified 6.1 code.
The number of iterations are the same, and while there's a small change in the computed shift, it's small relative what should be obtained if the WIlson-Amos-Handy method has been successfully implemented (isotropic shifts -- C: 4.7 ppm and O: -44 ppm; see first post for references)
Here's my test case
title "co nmr"
echo
geometry
c 0 0 0
o 0 0 1.13
end
basis
* library "dzp (dunning)"
end
property
shielding
end
dft
direct
grid fine
mult 1
xc HFexch 0.05 slater 0.95 becke88 nonlocal 0.72 vwn_5 1 perdew91 0.81
end
task dft property
Running it using my modified binary (v6.1) I get:
600 iter nsub residual time
601 ---- ------ -------- ---------
602 1 3 1.70D-01 4.9
603 2 6 1.70D-03 5.6
604 3 9 2.93D-05 6.3
For C I get
621 isotropic = -2.8388$
622 anisotropy = 413.3050$
and for O I get
650 isotropic = -64.1336$
651 anisotropy = 711.1241$
and with the original binary I see
600 iter nsub residual time$
601 ---- ------ -------- ---------$
602 1 3 1.69D-01 5.0$
603 2 6 1.84D-03 5.8$
604 3 9 2.47D-05 6.5$
For C I get
621 isotropic = 5.1483$
622 anisotropy = 401.3242$
and for O I get
650 isotropic = -60.6964$
651 anisotropy = 705.9682$
when I do
cat *|grep "xfac ="
I can't find any unedited examples -- i.e. I've already changed them all to 0 and have commented out "if (use_theory.eq.'dft') xfac = bgj_kfac()"
I guess the most plausible explanation would be that there's more to these NMR calculations than it at first appears to be -- but then again, as you point out there should be a change in the number of iterations and there isn't.
|