<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="DE-CH" style="font-size:11.0pt;mso-fareast-language:EN-US">Hi<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE-CH" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">You want to normalize a contracted Gaussian function (cgf) basis set, which is performed in two steps: (1) normalization of the primitive Cartesian Gaussian functions
and thereafter (2) normalization of the contracted Gaussian functions as indicated in
<a href="https://github.com/cp2k/cp2k/blob/f26eaef31a9d3f80ca30d8d2f11790a2a072e370/src/aobasis/basis_set_types.F#L1075">
line 1075</a>. This is all in Cartesian representation. For the spherical orbital representation, you will need a further Cartesian to spherical orbital transformation step. CP2K calculates integrals internally in the Cartesian representation, but the default
printout, e.g. for the overlap integral matrix, is in spherical orbitals.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Firstly, I would try to reproduce the normalization for an uncontracted basis set (one primitive function per l only). In the next step, you can try two primitive functions.
Normalization is required to keep for instance the electron count (trace of PS).
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Matthias
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">cp2k@googlegroups.com <cp2k@googlegroups.com> on behalf of Aleksandros Sobczyk <sobczykalek@gmail.com><br>
<b>Date: </b>Friday, 17 March 2023 at 16:59<br>
<b>To: </b>cp2k <cp2k@googlegroups.com><br>
<b>Subject: </b>Re: [CP2K:18552] Re: Evaluation of basis functions over a grid and computation of overlap integrals<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Below is the precise example we are using.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">These un-normalized orbitals:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="font-size:11.0pt;color:black;background:yellow">Sr SZV-MOLOPT-SR-GTH SZV-MOLOPT-SR-GTH-q10<br>
1<br>
2 0 1 6 2 1<br>
7.290111894735 0.069364270475 -0.016182746349 0.035659445929<br>
2.536776771327 -0.571246927373 0.158928639982 -0.195822349727<br>
1.283099546928 0.167836311459 -0.041157757852 0.260320252229<br>
0.532449841650 0.904733330629 -0.431882417196 0.555386362294<br>
0.211628059408 0.250907816117 -0.073959284415 0.267635587013<br>
0.050841303698 0.007135721199 0.825600560103 0.001214128781</span></b><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">after the normalization (cp2k output) become as follows:<br>
<b><span style="color:black;background:yellow">Sr SZV-MOLOPT-SR-GTH SZV-MOLOPT-SR-GTH-q10<br>
1<br>
2 0 1 6 2 1<br>
7.290111894735 0.221325 -0.071449 0.684627<br>
2.536776771327 -0.825808 0.317914 -1.004793<br>
1.283099546928 0.145521 -0.049379 0.569764<br>
0.532449841650 0.405577 -0.267899 0.404860<br>
0.211628059408 0.056304 -0.022965 0.061570<br>
0.050841303698 0.000549 0.087969 0.000047</span></b><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">None of the two aforementioned normalization procedures can reproduce this.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">On Friday, March 17, 2023 at 4:54:28 PM UTC+1 Aleksandros Sobczyk wrote:<o:p></o:p></span></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">
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Update on this:<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">There appear to be two (maybe more) normalization procedures for orbital coefficients:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">1) <a href="https://github.com/cp2k/cp2k/blob/f26eaef31a9d3f80ca30d8d2f11790a2a072e370/src/aobasis/basis_set_types.F#L1099" target="_blank">https://github.com/cp2k/cp2k/blob/f26eaef31a9d3f80ca30d8d2f11790a2a072e370/src/aobasis/basis_set_types.F#L1099</a><br>
2) <a href="https://github.com/cp2k/cp2k/blob/f26eaef31a9d3f80ca30d8d2f11790a2a072e370/src/atom_types.F#L2374" target="_blank">https://github.com/cp2k/cp2k/blob/f26eaef31a9d3f80ca30d8d2f11790a2a072e370/src/atom_types.F#L2374</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">The results of 1) seem to be closer to the output of cp2k (for s-orbitals). For p-orbitals it starts to diverge.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">It would be great if someone can confirm which normalization method is used internally for contracted Gaussians.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">(what is the goal of the normalization? are the primitive Gaussians normalized to integrate to 1? is it something more advanced?)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Best regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Aleksandros Sobczyk<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">On Monday, March 13, 2023 at 11:00:04 AM UTC+1 Aleksandros Sobczyk wrote:<o:p></o:p></span></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">
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Dear prof. Hutter and CP2K developers,<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span style="font-size:11.0pt"><br>
The example helped to figure out how to reproduce the overlap matrix for our systems. We had to apply the following two steps:<br>
<br>
1) For the basis sets, we had to use the normalized coefficients that are found inside the output file of CP2K. The un-normalized coefficients from the original BASIS_SET file did not work (as you suggested). For now, we can directly use the CP2K output to
derive these normalized coefficients for our experiments, but it would be also helpful to know how to reproduce them (i.e., what is the normalization procedure).<br>
<br>
2) We also had to scale all the exponents of all the basis sets by a factor of (1/0.529)^2 (to convert Angstrom to atomic units). This was an arbitrary guess, but without it the overlaps do not match.<br>
<br>
Could you confirm that this is the correct way to compute the orbital overlaps? (and if not, propose the correct way).
<br>
It would also be helpful if these details can be documented, e.g. in this page: <a href="https://www.cp2k.org/basis_sets" target="_blank">
https://www.cp2k.org/basis_sets</a><br>
<br>
Best regards and thank you again for the feedback,<br>
Aleksandros Sobczyk<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">On Friday, March 10, 2023 at 6:35:28 PM UTC+1 Aleksandros Sobczyk wrote:<o:p></o:p></span></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">
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Dear Prof. Hutter,<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Thank you very much for your reply and for the example.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Let us investigate it with my colleagues and see if we can resolve our problem.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Best regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span style="font-size:11.0pt">Aleksandros<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">On Friday, March 10, 2023 at 3:18:28 PM UTC+1 Jürg Hutter wrote:<o:p></o:p></span></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">
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Hi
<br>
<br>
are you assuming normalized or un-normalized Gaussians? <br>
The basis set input in CP2K uses (like all QC codes) normalized Gaussians. <br>
Internally, CP2K works with un-normalized Cartesian Gaussians, i.e. the <br>
coefficients are adapted at the beginning of the calculation. <br>
<br>
I have attached a simple example where you can play with the basis set <br>
in the input and the overlap matrix is printed. <br>
<br>
regards <br>
JH <br>
<br>
________________________________________ <br>
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Aleksandros Sobczyk <sobcz...@gmail.com>
<br>
Sent: Friday, March 10, 2023 2:26 PM <br>
To: cp2k <br>
Subject: [CP2K:18530] Re: Evaluation of basis functions over a grid and computation of overlap integrals
<br>
<br>
Update: I have also calculated several overlap integrals analytically (for s-orbitals which are simpler), they still don't match the values of the S matrix.
<br>
Any feedback would be greatly appreciated. <br>
<br>
On Wednesday, March 8, 2023 at 12:57:02 PM UTC+1 Aleksandros Sobczyk wrote: <br>
Hello, <br>
<br>
I have a set of atoms in real-space and the corresponding SZV basis sets. <br>
I want to evaluate each basis function over a grid of points in the cell. <br>
E.g., I have a grid of 3d points [r1, r2, ..., rk] and I want to evaluate each <br>
Φj(r1), Φj(r2), ... Φj(rk) <br>
As a test, I tried to numerically integrate Φj * conj(Φj) over the grid that it was evaluated, and compare the result with the corresponding entry S[j, j] of the overlap matrix that
<br>
is returned by CP2K. <br>
Unfortunately my integral differs substantially from the element S[j, j], so I am doing something wrong.
<br>
<br>
Can we find somewhere more detailed documentation on the precise mathematical formulation of the basis sets, and also on the specific algorithms that are used by CP2K to compute the overlap integrals?
<br>
(So far I have followed as precisely as possible the following page: <a href="https://www.cp2k.org/basis_sets" target="_blank">
https://www.cp2k.org/basis_sets</a> <br>
but it is still missing information, e.g. are the coefficients normalized? do we assume that the spherical harmonics include the phase factor? etc.)
<br>
<br>
Thanks a lot in advance! <br>
Aleksandros <br>
<br>
-- <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 cp2k+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/fa61a2bc-2c9c-4771-8606-445d46af9148n%40googlegroups.com" target="_blank">
https://groups.google.com/d/msgid/cp2k/fa61a2bc-2c9c-4771-8606-445d46af9148n%40googlegroups.com</a><<a href="https://groups.google.com/d/msgid/cp2k/fa61a2bc-2c9c-4771-8606-445d46af9148n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/cp2k/fa61a2bc-2c9c-4771-8606-445d46af9148n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<o:p></o:p></span></p>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">--
<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="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/073f7bb7-8358-47b8-ba7c-06fe5075ff6cn%40googlegroups.com?utm_medium=email&utm_source=footer">
https://groups.google.com/d/msgid/cp2k/073f7bb7-8358-47b8-ba7c-06fe5075ff6cn%40googlegroups.com</a>.<o:p></o:p></span></p>
</div>
</body>
</html>
<p></p>
-- <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="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZRAP278MB08271DA6C4EF55654EE56F8AF4BD9%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/ZRAP278MB08271DA6C4EF55654EE56F8AF4BD9%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM</a>.<br />