<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;}
@font-face
        {font-family:"Helvetica Neue";
        panose-1:2 0 5 3 0 0 0 2 0 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;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:447967364;
        mso-list-template-ids:-1445670778;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1
        {mso-list-id:690686898;
        mso-list-type:hybrid;
        mso-list-template-ids:340820164 134807569 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l1:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
</head>
<body lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Hi Ilya<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">Thanks for contributing and fixing the print issue.<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">Indeed, ROKS produces only one set of orbitals, since there is also only one Hamiltonian, i.e. Kohn-Sham matrix, but different orbital occupations are applied for spin-up
 (alpha) and spin-down (beta) electrons which results in an alpha and beta electronic density matrix.<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">The LOW-SPIN ROKS implementation in CP2K based on OT plus ROTATION is experimental as indicated by a warning printed in the output. That implementation has not been
 maintained since a long time. Therefore, I am wondering, if the implementation works properly, e.g. for the new test case O2_mo_cubes.inp. I tried tighter thresholds and a larger cutoff and box size, but the SCF did not converge. What’s your experience and
 how do the results compare to ROKS in CPMD?<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">Best<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 id="mail-editor-reference-message-container">
<div>
<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 Ilya Fedorov <ilyafedorov19@gmail.com><br>
<b>Date: </b>Thursday, 16 November 2023 at 10:59<br>
<b>To: </b>cp2k <cp2k@googlegroups.com><br>
<b>Subject: </b>[CP2K:19518] Re: Problem with the calculation of the CUBE file and Wannier Centres using the ROKS method?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">I solved the problem and it was accepted into the code.<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="font-size:11.0pt">As I understand it, for ROKS the UKS base is used, and different spins of the same orbital have the same density. This allows to rely on the UKS codes, while you can use MO_CUBES only for spin-1.
 (regtest: QS/regtest-lsroks/O2_mo_cubes.inp)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="font-size:11.0pt">I added such an implementation in the code. Only two method supports:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l0 level2 lfo1">
<![if !supportLists]><span style="font-family:"Courier New""><span style="mso-list:Ignore">o<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span style="font-size:11.0pt">NONE: No rotation, just print the orbital centers.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l0 level2 lfo1">
<![if !supportLists]><span style="font-family:"Courier New""><span style="mso-list:Ignore">o<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span style="font-size:11.0pt">JACOBI: Only doubly occupied orbitals rotate; for singly occupied orbitals, no rotation occurs (like the NONE method). (regtest: QS/regtest-lsroks/O2_loc_wan_jac.inp)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">It is possible to use only NONE and JACOBI. Other methods can be added in the future, but ROKS calculates quite slowly, and speeding up the Wannier calculation does not make a big
 contribution here.<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">Commits: https://github.com/cp2k/cp2k/pull/3108<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">четверг, 24 августа 2023 г. в 15:19:45 UTC+3, Ilya Fedorov:
<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 style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">Dear colleagues,
</span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue""> </span><span style="font-family:"Helvetica Neue"">Could you please help me to understand the CP2K implementation of ROKS and the Wannier Centers.</span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">I am facing the following two problems. I can't find an answer in the documentation. And, unfortunately, I don't really understand in the code.</span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">1) The ROKS implementation in CP2K uses a spin-restricted calculation with multiple density matrices. As I understand it, this leads to some problems with
 printing CUBE files (for example, for each orbital it prints two cube files for spin_1 and spin_2). Which one is correct? Maybe the sum of them gives a correct density? </span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-US" style="font-family:"Helvetica Neue"">(in log it print “</span><span lang="EN-GB" style="font-family:"Helvetica Neue"">Unclear how we define MOs in the restricted case ... skipping”)</span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-US" style="font-family:"Helvetica Neue""> </span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">2) I’m trying to use Wannier Centres with ROKS, but it doesn’t work in CP2K. As I understand this is also a multiple density matrix problem. I need Wannier
 Centres only (Many-body Position operator, no Jacobi rotation). Right now I use Wannier + ROKS in CPMD, and in CPMD the rotation is just switched off for the last two orbitals (diag(1,1)).</span><span style="font-family:"Helvetica Neue""> </span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">Best regards</span><o:p></o:p></p>
<p style="margin-left:36.0pt;line-height:150%"><span lang="EN-GB" style="font-family:"Helvetica Neue"">Ilya</span><o:p></o:p></p>
</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/c479ab3a-9ed0-4750-9997-94a532c92a84n%40googlegroups.com?utm_medium=email&utm_source=footer">
https://groups.google.com/d/msgid/cp2k/c479ab3a-9ed0-4750-9997-94a532c92a84n%40googlegroups.com</a>.<o:p></o:p></span></p>
</div>
</div>
</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/ZRAP278MB08276C263F989BE031C62029F4B0A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/ZRAP278MB08276C263F989BE031C62029F4B0A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM</a>.<br />