Dear Matthias,<div><br></div><div>Sorry to bother you again. I have tried both one-electron integral and two-electron integral ways to derive <a|erf(alpha_c*r)/r|b>, and they gave me the same results, which is encouraging. However, there is one remaining question about the normalization factor.</div><div><br></div><div>The eq.30 of this <a href="https://pubs.rsc.org/en/content/articlelanding/2000/CP/b001167n#!divAbstract">work</a> shows that there is a nomalization factor N = (alpha_c^2/pi)^(3/2) when rewriting <a|erf(alpha_c*r)/r|b> to a three-center two-electron repulsion integral <ab||c>. But in the work of <a href="https://www.sciencedirect.com/science/article/pii/002199917890092X">McMurchie and Davidson</a>, the expression for lambda in eq. (3.31) seems to be for unnormalized case. If the lambda is multiplied by N = (alpha_c^2/pi)^(3/2), the result will be perfectly in agreement with my result of ferf (i.e. 2*pi*zetp*f0*sqrt(zetc*zetw)).</div><div><br></div><div>Since the ferf in aobasis/ai_verfc.F matches the the form of lambda, is it supposed to be mutiplied by N? Or has it already been multiplied somewhere else in the code?</div><div><br></div><div>Best,</div><div><br></div><div>Junting</div><div><br><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">在2020年9月14日星期一 UTC+8 下午10:29:52<Matthias Krack> 写道:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dear Junting<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The one-electron integral <a_c|-Z_c*erf(alpha*|r - R_c|)/(|r - R_c|)|b> can be rewritten as a three-center two-electron repulsion integral <ab||c> (see eq. 30
of this <a href="https://doi.org/10.1039/B001167N" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://doi.org/10.1039/B001167N&source=gmail&ust=1600447109811000&usg=AFQjCNGsiexrygKJojP3sVi6I2s9YhDXlA">work</a>).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">HTH<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Matthias<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href data-email-masked rel="nofollow">c...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">c...@googlegroups.com</a>>
<b>On Behalf Of </b>Junting<br>
<b>Sent:</b> Montag, 14. September 2020 16:14<br>
<b>To:</b> cp2k <<a href data-email-masked rel="nofollow">c...@googlegroups.com</a>><br>
<b>Subject:</b> Re: [CP2K:13870] A question about a formula in CP2K source code<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dear Matthias,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you so much for providing me with this insightful work!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">However, Eq (3.31) is in Two-electron Integral part, and seems not to involve error function. The <a|erf(r)/r|b> term is one-electron integral, describing the interaction between electron and core, instead of eletron repulsion. I still
do not understand how these two are related.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">And from intuition, if zetc goes to infinity, ferf should become the same as fnuc. But according to source code, they seem quite different, which also makes me confused.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Junting<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"MS Gothic"">在</span>2020<span style="font-family:"MS Gothic"">年</span>9<span style="font-family:"MS Gothic"">月</span>14<span style="font-family:"MS Gothic"">日星期一</span> UTC+8
<span style="font-family:"MS Gothic"">下午</span>4:15:43<Matthias Krack> <span style="font-family:"MS Gothic"">
写道:</span><u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dear Junting</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Did you compare your results with the work of
<a href="https://www.sciencedirect.com/science/article/pii/002199917890092X" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://www.sciencedirect.com/science/article/pii/002199917890092X&source=gmail&ust=1600447109811000&usg=AFQjCNF5PzWlbCsWqQ9IcMsN7s5Q7fQEwQ">
McMurchie and Davidson</a> from 1978? The expression for lambda in eq. (3.31) seems to match the implemented ferf for the basic integral.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Matthias</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<span><a href data-email-masked rel="nofollow">c...@googlegroups.com</a></span> <<span><a href data-email-masked rel="nofollow">c...@googlegroups.com</a></span>>
<b>On Behalf Of </b>Junting<br>
<b>Sent:</b> Montag, 14. September 2020 05:13<br>
<b>To:</b> cp2k <<span><a href data-email-masked rel="nofollow">c...@googlegroups.com</a></span>><br>
<b>Subject:</b> [CP2K:13866] A question about a formula in CP2K source code</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Dear CP2K users and developers,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I am reading the source code of CP2K, and I have got lots of insights about formulas and algorithms from it. However, I have encountered a question when reading the aobasis/ai_verfc.F
file in src directory.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The ai_verfc module is used for calculating the matrix <a|erfc(r)/r|b> in all-electron calculation. This term is divided into a nuclear term <a|1/r|b> and an error function term
<a|erf(r)/r|b>. In the code prefactors corresponding these two terms are calculated by <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">fnuc = 2.0_dp*pi*zetp*f0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ferf = 2.0_dp*SQRT(pi**5*zetw)*zetp*zetq*f0<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">and the basic s-orbital integrals are calculated by prefactors and incomplete gamma function<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">t = rcp2/zetp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">CALL fgamma(nmax-1, t, f)<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal">vnuc(1, 1, n) = fnuc*f(n-1)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">t = -f4*rcp2/zetp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">CALL fgamma(nmax-1, t, f)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">verf(1, 1, n) = ferf*f(n-1)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Then the integrals over p or higher orbitals are calculated by a recursion procedure as is discussed in the literature: S. Obara and A. Saika, J. Chem. Phys. 84, 3963 (1986).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">My question is that according to my derivations, my result for fnuc is consistent with the code, but my ferf is <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ferf = 2.0_dp*pi*zetp*f0*(-f4)**(n-0.5)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">which is not consistent with the code, and is dependent on the parameter n in the incomplete gamma function f(n).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">And it is reasonable that on the limit of zetc going to infinity, the error function term <a|erf(r)/r|b> should be the same as the nuclear term <a|1/r|b>. But according to source
code, it seems not to be the case.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Therefore I want to ask, is this a potential mistake in the source code, or did I miss anything else in the derivations? I really appreciate it if someone could help me solve this
question.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Best wishes,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Junting<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal">--
<br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<span><a href data-email-masked rel="nofollow">cp...@googlegroups.com</a></span>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/89673088-6dba-4f9f-9cf8-464569253964o%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://groups.google.com/d/msgid/cp2k/89673088-6dba-4f9f-9cf8-464569253964o%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1600447109813000&usg=AFQjCNFaQjeCX-LVC5M6laqJ_9akHUTSNw">
https://groups.google.com/d/msgid/cp2k/89673088-6dba-4f9f-9cf8-464569253964o%40googlegroups.com</a>.<u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>.<br></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/e6dafc7a-0a1b-49ec-bd14-86583294e012n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://groups.google.com/d/msgid/cp2k/e6dafc7a-0a1b-49ec-bd14-86583294e012n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1600447109813000&usg=AFQjCNHLiMhDDKiW5odck2rVDW99GO4VRw">
https://groups.google.com/d/msgid/cp2k/e6dafc7a-0a1b-49ec-bd14-86583294e012n%40googlegroups.com</a>.<u></u><u></u></p>
</div>
</div>
</blockquote></div>