<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default" style="margin:0px;padding:0px;border:0px">With my limited knowledge of fortran, I went through source codes of DFTB+ and cp2k and might have an idea for the difference in results.</div><div class="gmail_default" style="margin:0px;padding:0px;border:0px"><br></div><div class="gmail_default" style="margin:0px;padding:0px;border:0px">First, the construction of H0, S, and gamma matrix seem to be consistent between two codes.  However, it seems they differ on how SCC (self-consistent charge) was applied.  In DFTB+, the self-consistent charge was the Mulliken charge on atoms.  In cp2k, it seems that H0, S, and gamma matrix was fed into KS-DFT framework so the self-consistent charge was the electron density in the real space.  Ideally this needs the basis functions which are not contained in skf files so perhaps some default Gaussian basis functions were used.  If the previous observation is correct, there seems to be an issue in the implementation of SCC-DFTB in cp2k. </div><div class="gmail_default" style="margin:0px;padding:0px;border:0px"><br></div><div class="gmail_default" style="margin:0px;padding:0px;border:0px">Thanks, Wei</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 24, 2018 at 4:09 PM Wei Lai <<a href="mailto:wei.w...@gmail.com">wei.w...@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">With the intention to help with the discussion, I took the liberty to post the following numbers.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">If I turn off “minimum image convention” or “mic” in qs_neighbor_lists.F (version 5.1; this was done automatically in version 6.1), the periodic nonscc results of cp2k are close to those from dftb+.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">nonscc total energy:  -14.90396117681518 (cp2k) vs -14.9042897104 (dftb+).</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Maxime was using 6.0 development version and the nonscc total energy was -15.00558399676375.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">However, the difference in the periodic scc case became more dramatic:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">core energy: -14.7017837002 (dftb+), -11.35591447406040 (cp2k, alpha=0.3), -13.03486875813706 (cp2k, alpha=0.5), -13.89182287767537 (Maxime, alpha=0.3)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">scc energy:  1.2109415266 (dftb+), 2.94796400907580 (cp2k, alpha=0.3), 2.06305475569169 (cp2k, alpha=0.5), 0.07851968376930 (Maxime, alpha=0.3)</font></div><div style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks, Wei</div><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 24, 2018 at 6:08 AM Thomas Kühne <<a href="mailto:tku...@gmail.com" target="_blank">tku...@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Maxime, <div><br></div><div>your input files looks good to me. </div><div>How large is the difference in the </div><div>periodic cases? </div><div><br></div><div>Merry Christmas, </div><div>Thomas</div><div><br><div><blockquote type="cite"><div>Am 22.12.2018 um 22:45 schrieb Maxime Van den Bossche <<a href="mailto:maxime.cp.v...@gmail.com" target="_blank">maxime.cp.v...@gmail.com</a>>:</div><br class="gmail-m_3981287126391961698gmail-m_-5842622605320494778Apple-interchange-newline"><div><div dir="ltr"><div>Hi all,<br><br>I also did a quick comparison now between CP2K and DFTB+<br>for a simple rocksalt MgO structure (8 atoms in total,<br>using the OT minimizer in CP2K). The input and output <br>files for both codes are attached. <br><br>What I found so far:<br><br>* Without periodicity, the two codes agree quite well<br>  in terms of the H0 and SCC energies (up to ~1e-4 Ha)<br>  as well as the Mulliken charges.<br><br>* In the periodic case, so far I haven't managed to<br>  get comparable results with the two codes. The CP2K<br>  results indeed appear sensitive to the choice of the <br>  Ewald alpha parameter, similar to what Wei observed.<br>  For each of the three ALPHA values I tried, the resulting<br>  energies and SCC charges are quite different from DFTB+.<br><br>* In contrast to Wei, though, I also get different results<br>  for both codes in non-self-consistent calculations<br>  (but at least here the CP2K results indeed no longer<br>  depend on ALPHA).<br><br>It would be great if you could check whether my CP2K<br>inputs have been appropriate. If so, I hope this example will</div><div>help to get to the bottom of this.</div><div><br></div><div>Best,<br>Maxime</div></div><div><br class="gmail-m_3981287126391961698gmail-m_-5842622605320494778webkit-block-placeholder"></div>

-- <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+uns...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank">https://groups.google.com/group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
<span id="gmail-m_3981287126391961698gmail-m_-5842622605320494778cid:164a1990-a003-4a76-8805-f2d3b4fefeff"><files.zip></span></div></blockquote></div><br></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cp2k/RfYbOq3j0DM/unsubscribe" target="_blank">https://groups.google.com/d/topic/cp2k/RfYbOq3j0DM/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:cp2k+uns...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank">https://groups.google.com/group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div></div></div></div></div>
</blockquote></div>