<font size="4">Hello CP2K developers,<br />            A few days ago on GitHub, we discussed whether the KERKER or BROYDEN mixing method is more suitable for magnetic system calculations. Following up on that, I have done some tests and found that the KERKER mixing method may be more appropriate for magnetic systems than BROYDEN. Below is my testing procedure.<br />             I used two test models: a unit cell model of NiFe(OH)₂ and the (010) surface of gamma-NiOOH. For the NiFe(OH)₂ unit cell, the test procedure was as follows. First, with SMEAR enabled, the number of iterations for the SCF calculation was set to 100. I then tested the effects of different mixing methods, ALPHA, and BETA on convergence. The test results are shown in Table 1. Figure 1 shows a screenshot of the SCF results for the first 50 steps of Test1, which used the KERKER mixing method with ALPHA = 0.2 and BETA at its default value. Both Table 1 and Figure 1 indicate that under these parameters, SCF does not converge and shows no trend toward convergence. In Test2, ALPHA was reduced to 0.03 while keeping other parameters the same as in Test1. Figure 1 and Table 1 show that a convergence trend appears, albeit slowly. After 100 iterations, the convergence value reached 0.00041471. Although it has not yet met the convergence criterion, I believe that increasing the number of iterations would lead to successful convergence. Test3 further reduced BETA to 0.8 based on Test2. After 100 iterations, the convergence value was 0.00159217, which is slower than Test2. However, based on my previous experience, if the parameters in Test2 struggle to converge, trying the parameters in Test3 can be a useful alternative.</font><div><font size="4"><img alt="图片2.jpg" width="534px" height="264px" src="cid:51ca086b-3772-4ab7-8980-703dc7ed3c24" /><br />       <img alt="图片3.jpg" width="503px" height="534px" src="cid:c1c877aa-8a61-4a9f-be57-577dff9d4f34" />  </font></div><div><font size="4">                                   Fingure 1 Convergence results for unit cell</font></div><div><font size="4">          I further tested BROYDEN as the wavefunction mixing method, as shown in Figure 1 and Table 1. Compared to KERKER, its convergence performance is noticeably worse. The SCF results show persistent oscillations without a clear trend of convergence. Additionally, compared to Test4, reducing both ALPHA and BETA to 0.01 still resulted in a convergence value of 0.07070099 after 100 iterations, but without a distinct convergence trend. Subsequently, I disabled SMEAR and reran the same tests. The results are shown in the lower half of Table 1. Compared to the cases with SMEAR enabled, convergence did not improve. For the same wavefunction mixing method, ALPHA, and BETA, convergence actually worsened. For example, with SMEAR disabled, using the KERKER method with ALPHA = 0.03 gave a convergence value of 0.00082845 after 100 iterations, which is higher than the case with SMEAR enabled. For the BROYDEN method with ALPHA = 0.2 and default BETA, the convergence value increased to 0.07480723, still worse than KERKER. Moreover, as shown in Figure 1, when appropriate ALPHA and BETA values are used with the KERKER method, convergence steadily improves with increasing iterations rather than oscillating continuously.<br />        Based on these results, I draw the following conclusions:<br />        1.<span style="white-space: pre;">  </span>The KERKER mixing method may be more suitable for magnetic systems than BROYDEN.<br />        2.<span style="white-space: pre;"> </span>Default parameters for KERKER generally struggle to achieve convergence; ALPHA needs to be reduced to 0.03 or even lower.<br />           Further, I selected the (010) surface of gamma-NiOOH to test SCF convergence. The results are shown in Table 2 and Figure 2. First, I tested convergence with SMEAR enabled and ADDED_MOS set to 20. Similar to the unit cell calculations, when ALPHA = 0.2, KERKER failed to converge and showed no trend toward convergence. For TEST3 and TEST4, after lowering ALPHA, an interesting phenomenon was observed. In both cases, a clear convergence trend initially appeared, but after reaching a certain value, the convergence residual began to increase again. For TEST3 (ALPHA reduced to 0.03), the residual gradually decreased to 0.0350084 within the first 50 iterations, but then it started to diverge. For TEST4 (BETA reduced to 0.8 and ALPHA reduced to 0.01), the residual decreased to 0.00089041 within the first 75 steps, then gradually increased to 0.02504273.</font></div><div><font size="4"><img alt="图片4.jpg" width="534px" height="310px" src="cid:f98a51aa-b8ec-4be0-b9c2-8cbb1f03b83f" /><br />          <img alt="图片5.jpg" width="488px" height="534px" src="cid:f9b2d08e-17ae-4446-96fc-dbedc49d9365" />  </font></div><div><font size="4">                       Figure 2 </font><span style="font-size: large;">Convergence results for slab</span></div><div><font size="4">          For BROYDEN, the convergence behavior was more complex. With ALPHA = 0.2 and BETA = 0.8, the residual reached 0.05432726 after 200 iterations. However, when ALPHA and BETA were both reduced to 0.01, the convergence worsened, and the SCF residual oscillated continuously without a clear trend.<br />             Considering that unoccupied orbitals might affect convergence, I set ADDED_MOS to -1 -1 and reran the tests. The results in the lower half of Table 2 show no significant differences.<br />In summary, I conclude:<br />           1.<span style="white-space: pre;">     </span>KERKER may be more suitable than BROYDEN for convergence in magnetic systems.<br />             2.<span style="white-space: pre;">    </span>Default parameters for KERKER generally struggle to achieve convergence; ALPHA needs to be reduced to 0.03 or even lower.</font></div><div><font size="4">            The difficulty of achieving SCF convergence for magnetic systems in CP2K has been a longstanding issue. I would like to ask the CP2K developers to review my testing procedure and input files and provide suggestions for optimizing the input. Additionally, I have a question:<br />          1.<span style="white-space: pre;">       </span>What does the warning "WARNING in qs_scf_post_gpw.F:1841 :: Spin contamination estimate not implemented for k-points" mean, and how can it be resolved?</font></div><div><font size="4">        The input files and results have been compressed into a ZIP file and are provided as an attachment.<br />Thank you very much<br /></font></div><div><font size="4"><br /></font></div><div><div><font size="4"><br /></font></div></div>

<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 visit <a href="https://groups.google.com/d/msgid/cp2k/baa7ef08-8b4d-4d88-9ac6-7204a4810702n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/baa7ef08-8b4d-4d88-9ac6-7204a4810702n%40googlegroups.com</a>.<br />