<div dir="ltr"><p class="MsoNormal">Dear Matt</p><p class="MsoNormal"><br></p><p class="MsoNormal">Could you please let me know if the orbitals projected on the CARTESIAN - GTOs are normalized?<o:p></o:p></p><p class="MsoNormal"><br></p>
<p class="MsoNormal">The basis set (Normalized-Cartesian-GTOs) printed in the MOLDEN formatted file is consistent with the basis set printed by the NWCHEM code. </p><p class="MsoNormal">When I use the MOLDEN formatted file printed by NWCHEM, my code gives the right number of electrons. </p><p class="MsoNormal">When I use the orbitals printed by CP2K, I am not able to get the right number of electrons in the system. </p><p class="MsoNormal">Considering that the basis set is the same, the CP2K orbitals projected on the Normalized-Cartesian-GTOs could not be normalized.<o:p></o:p></p><div><br></div><div>Best Regards</div><div>Luca </div><div><br></div><br>On Tuesday, July 31, 2018 at 8:09:31 AM UTC+2, Luca wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Dear Matt<div><br></div><div>the correct clause should be</div><div><br></div><div><pre style="background-image:initial;background-position:initial;background-repeat:initial"><span style="font-size:11pt;font-family:Calibri,sans-serif"> I</span>F (ABS(mo_coeff(orbmap(orbital))<wbr>) .GT. 10.0**(-digits))</pre><pre style="background-image:initial;background-position:initial;background-repeat:initial"><br></pre><pre style="background-image:initial;background-position:initial;background-repeat:initial"><br></pre><pre style="background-image:initial;background-position:initial;background-repeat:initial">Best Regards</pre><pre style="background-image:initial;background-position:initial;background-repeat:initial">Luca</pre><div><br></div><div><br></div><div><br>On Monday, July 30, 2018 at 8:30:38 AM UTC+2, Luca wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="MsoNormal">Dear Matt</p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black">The following</span><span style="color:black"> code seems to give the correct MOLDEN-FORMAT. Please note that: </span></p><p class="MsoNormal" style="text-indent:0px;margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> 1) I modified (irow_in+orbital ) in (irow_in+orbital – 1)</span></p><p class="MsoNormal" style="text-indent:0px;margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> 2) I tested </span>molden<span style="color:black"> formatted files containing no more than s,p,d functions.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black">DO orbital = 1, 15</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> IF (orbmap(orbital) .NE. 0) THEN</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> WRITE (iw, fmtstr1) irow_in+orbital - 1 , mo_coeff(orbmap(orbital))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black"> END IF </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black">END DO</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">By adding the following clause:</p>
<pre style="background-image:initial;background-position:initial;background-repeat:initial"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> I</span>F (mo_coeff(orbmap(orbital)) .GT. 10.0**(-digits))</pre>
<p class="MsoNormal"> </p>
<p class="MsoNormal">One obtains an incomplete MODLEN formatted file since it misses some coefficients greater than <span style="color:black">10.0**(-digits). </span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Best</span><span style="color:black"> Regards.</span></p>
<p class="MsoNormal"><span style="color:black">Luca </span></p><br>On Saturday, July 28, 2018 at 6:41:21 PM UTC+2, Matt W wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hmmm, could you try recompiling after changing the lines around 323 - 330 to something like <div><br></div><div><pre style="color:rgb(0,0,0)"> DO orbital = 1, 15<font></font>
IF (orbmap(orbital) .NE. 0) THEN<font></font>
WRITE (iw, fmtstr1) irow_in+orbital, mo_coeff(orbmap(orbital))<font></font>
IF (mo_coeff(orbmap(orbital)) .GT. 10.0**(-digits)) THEN<font></font>
WRITE(6,*) "skipping this orbital"<font></font>
END IF<font></font>
END IF<font></font>
END DO</pre><div><br></div><div>i.e. take the original write statement out of the if clause. This should print all coefficients in molden format. </div><div><br></div><div>If that works then I can try and see why the if statement doesn't work as expected ...</div><div><br></div><div>Matt</div><div><br>On Saturday, July 28, 2018 at 5:05:04 PM UTC+1, Luca wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Dear Matt</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Thank you for your answer. However, I still believe that the printed formats do not differ only for the ordering. Furthermore, modifying NDIGITS does not fix the issue. </font></font></p><p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">This means that the printed MOLDEN file cannot be used for quantitative post-processing.</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">I performed tests on H atoms and the H2 molecule, and in both the cases, the MOLDEN-file does not contain the right orbitals. </font></font></p><p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Below I will report the H case. The orbital printed in the MOLDEN FORMAT is not normalized, as you can easily check by printing the OVERLAP matrix. </font></font></p><p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Please find below the different formats and the overlap (NDIGITS = 12) :</font></font></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">CP2K-FORMAT : Occupied orbital of H</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 1 1 H 1s 0.860523926375 </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 2 1 H 2s -0.147897200557 </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 3 1 H 2px -0.000000000000 </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 4 1 H 2py -0.000000000000 </font></font></p>
<div style="border-top-width:initial;border-right-width:initial;border-left-width:initial;border-style:none none solid;border-bottom-width:1pt;border-bottom-color:windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border-width:initial;border-style:none;padding:0in"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 5 1 H 2pz -0.000000000000 </font></font></p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">MOLDEN-Format :Occupied orbital of H </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">One = -0.25103226963873182</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> Spin= Alpha</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> Occup= 1.0000000000000000</font></font></p>
<div style="border-top-width:initial;border-right-width:initial;border-left-width:initial;border-style:none none solid;border-bottom-width:1pt;border-bottom-color:windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border-width:initial;border-style:none;padding:0in"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 2 8.605239264E-01</font></font></p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">OVERLAP</font></font></p>
<p class="MsoNormal"> <font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr> 1s </font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr>2s </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">1 1 H 1s 1.000000008914 -0.933553473764</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">2 1 H 2s -0.933553473764 1.000000029566</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">------------------------------</font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr>------------------------------</font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr>------------------------------</font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr>------------------------------</font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"><wbr>-----------------</font></font></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">The right MOLDEN FORMAT should be (I tested it):</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 1 0.860523926375 </font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit"> 2 -0.147897200557 </font></font></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Best Regards.</font></font></p>
<p class="MsoNormal"><font style="vertical-align:inherit"><font style="vertical-align:inherit">Luca </font></font></p></div></blockquote></div></div></div></blockquote></div></blockquote></div></div></div></blockquote></div>