<div dir="ltr">Hi Jiabo,<div><br></div><div>The filer matrix diagonalisation method can speed up your calculations (using diagonalisation) for large systems (N atoms > ~300, depending on the system).  Basically the method will reduce the basis set size to that of an optimised single zeta minimum basis at every SCF step based on the Hamiltonian and density at that step.  The speed up comes from the reduced basis size (as diagonalisation is an N**3 process), although there will be some cost associated in generating the optimised basis set, involving a series of fixed sized smaller matrix diagonalisations.</div><div><br></div><div>For a random water box, for example, for ~400 atoms (~130 H2O molecules), our tests has shown around 2 times speedup using <a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION/FILTER_MATRIX.html#AUTO_CUTOFF_SCALE" id="list_AUTO_CUTOFF_SCALE" style="font-family: arial, sans-serif; line-height: 17px;">AUTO_CUTOFF_SCALE</a> set to 0.4, and over 6 times speed up for 1500 atoms (~500 H2O molecules).</div><div><br></div><div>There are several parameters that are important to accuracy and speed.</div><div><br></div><div><ul class="disc" style="color: rgb(0, 0, 0);"><li style="margin-left: 0em; padding-left: 0em; text-indent: 0em;"><font face="arial, sans-serif"><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION/FILTER_MATRIX.html#AUTO_CUTOFF_SCALE" id="list_AUTO_CUTOFF_SCALE">AUTO_CUTOFF_SCALE</a>  controls the interaction range around each atom one wants to take into account during the generation of the optimised basis.</font></li></ul><div><font color="#000000" face="arial, sans-serif"><span style="line-height: 17px;">The longer the range, the more accurate is your calculation, but will also make the optimisation step slower, as well as requiring more memory.  The shorter the range the faster the calculation.  At AUTO_CUTOFF_SCALE = 1.0  (default), any atoms with their widest gaussians overlapping each other will be considered as a neighbour and taken into consideration.   I would recommend to first try AUTO_CUTOFF_SCALE = 0.4.</span></font></div><div><font color="#000000" face="arial, sans-serif"><span style="line-height: 17px;"><br></span></font></div><div><font face="arial, sans-serif"><span style="line-height: 17px;">Set </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION/FILTER_MATRIX.html#list_COLLECTIVE_COMMUNICATION" id="COLLECTIVE_COMMUNICATION" style="line-height: 17px;">COLLECTIVE_COMMUNICATION</a> to T if you find the MPI communications dominate your times.  The default value for this parameter differs depending on the version of CP2K you are using.  The most recent version has this set to F.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Further more, as a current limitation, some times, depending on the symmetry of the system, if AUTO_CUTOFF_SCALE is set too low, the generated optimised basis may become linearly dependent and cause the calculation to fail.  In this case, you can either increase the value of FILTER_TEMPERATURE to a higher value, and if that does not help, then increase AUTO_CUTOFF_SCALE to a larger value.  If you are doing calculation on a non-periodic molecular system, never increase AUTO_CUTOFF_SCALE too high that all atoms becomes neighbours of all other atoms.  If this happens, then the method will always fail.  This does not apply for periodic systems.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">If you plan to try out this method, I would recommend use the newest development version of CP2K, as the implementation is very new, and is still being improved.  At the moment, I am trying to solve this very issue of linear dependency of optimised orbitals due to symmetry of certain systems.  Also, the performance of the </font><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION/FILTER_MATRIX.html#list_COLLECTIVE_COMMUNICATION" id="COLLECTIVE_COMMUNICATION" style="font-family: arial, sans-serif; line-height: 17px;">COLLECTIVE_COMMUNICATION</a> = T mode is being improved as well (with a better usage of L2 cache).</div><font face="arial, sans-serif"><br>I hope this is helpful.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Best regards,</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Lianheng<br><br><br>On Monday, 27 July 2015 17:52:17 UTC+1, jiabo  wrote:</font><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><font face="arial, sans-serif">Hi CP2K users</font><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Do you ha</font>ve the experience in using <span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Filter matrix diagonalization algorithm in </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT.html" style="font-family:monospace;text-transform:uppercase" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT.html\46sa\75D\46sntz\0751\46usg\75AFQjCNH42eMbqSTc0h4a5XR-VcX-H7l-EQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT.html\46sa\75D\46sntz\0751\46usg\75AFQjCNH42eMbqSTc0h4a5XR-VcX-H7l-EQ';return true;">CP2K_INPUT</a><span style="color:rgb(0,0,0);font-family:monospace;text-transform:uppercase"> / </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL.html" style="font-family:monospace;text-transform:uppercase" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFytOvaXh8BF3xyg6_ovKZj5GmYVw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFytOvaXh8BF3xyg6_ovKZj5GmYVw';return true;">FORCE_EVAL</a><span style="color:rgb(0,0,0);font-family:monospace;text-transform:uppercase"> / </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT.html" style="font-family:monospace;text-transform:uppercase" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFWZVxdGXpJNQBFRBiRFtwZcv-yxw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFWZVxdGXpJNQBFRBiRFtwZcv-yxw';return true;">D<wbr>FT</a><span style="color:rgb(0,0,0);font-family:monospace;text-transform:uppercase"> / </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF.html" style="font-family:monospace;text-transform:uppercase" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FSCF.html\46sa\75D\46sntz\0751\46usg\75AFQjCNG1AwCePgekCM--EaNFNM5CV2MvgQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FSCF.html\46sa\75D\46sntz\0751\46usg\75AFQjCNG1AwCePgekCM--EaNFNM5CV2MvgQ';return true;">SCF</a><span style="color:rgb(0,0,0);font-family:monospace;text-transform:uppercase"> / </span><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION.html" style="font-family:monospace;text-transform:uppercase" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FSCF%2FDIAGONALIZATION.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGGvw5xmCGmb022DI1lj9fHTh5kFg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FSCF%2FDIAGONALIZATION.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGGvw5xmCGmb022DI1lj9fHTh5kFg';return true;">DIAGONALIZATION</a><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">  section? Comparing to the standard diagonalisation, can it speed up the calculation and any limitations it has?</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Cheers,</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Jiabo </span></div></div></blockquote></div></div>