<div dir="ltr">In cegterg, <font face="courier new, monospace">sc(i,j) = <\phi_i | S | \phi_j ></font>, not just <font face="courier new, monospace"><\phi_i | \phi_j></font>, so ultra-softs should should result in sc = identity, assuming they were previously ortho-normalized. The overlap matrix, S, is density independent, so wave-functions from previous SCF iterations should have sc = identity. <div>
<br></div><div>Initial wave-functions are computed as eigenvectors of the full [generalized] eigen-problem, so they should also be ortho-normal wrt S.</div><div><br></div><div>For molecular dynamics, if using ultra-softs, the S matrix is ionic position dependent, so the first SCF iteration after each ionic step will have sc /= identity, regardless of extrapolation.</div>
<div><br></div><div>For MD using norm conserving PPs (or no projectors, in my test case), extrapolation is the problem.</div><div><br></div><div>In this light, I think the simplest thing to do is add the switch:</div><div>
<font face="courier new, monospace"> if (iter > 1) then</font></div><div>which gives future developers the ability to break the ortho-normality condition currently imposed in init_wfc and only overpays no more than once per ionic step. In the code, I think this could just be<font face="courier new, monospace"> (.not. lrot)</font>.</div>
<div><br></div><div>For that matter, lrot seems to be using a similar trick to re-use a previous diagonalization, but <font face="courier new, monospace">lrot = true</font> in the cases above that break ortho-normality. The affect should be that the first set of correction vectors added to the subspace aren't corrections to true eigenvectors, which could slow down convergence but won't cause it to fail. I think I'd argue that it should be <font face="courier new, monospace">lrot = (iter > 1)</font> as well.</div>
<div><br></div><div>What am I missing?</div><div>Max</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 21, 2014 at 2:36 AM, Paolo Giannozzi <span dir="ltr"><<a href="mailto:paolo.giannozzi@uniud.it" target="_blank">paolo.giannozzi@uniud.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, 2014-01-20 at 14:13 -0600, Maxwell Hutchinson wrote:<br>
<br>
> In the initialization part of the Davidson solver, cegterg, sc is<br>
> computed from evc with a zgemm and mp_sum. evc should be coming into<br>
> cegterg already orthonormalized, so this should be unnecessary. Are<br>
> there cases where this is not true?<br>
<br>
</div>if you have ultrasoft pseudopotentials or PAW, wavefunctions (evc) are<br>
not orthonormal. Since the S matrix is not saved from the previous<br>
self-consistency step, it has to be recalculated in any case. For<br>
norm-conserving PP's, this should not be needed, but the way it is<br>
implemented now guarantees that the routine works (or doesn't fail)<br>
even if input wavefunctions are not normalized. I suspect that this<br>
is actually used in Molecular Dynamics run, when wavefunctions are<br>
extrapolated: ther eis no guarantee that they are orthonormal.<br>
<br>
P.<br>
<div class="im"><br>
> Unless very little refinement is necessary, this won't affect<br>
> performance much. It's shorter, though. See:<br>
> <a href="https://github.com/maxhutch/quantum-espresso/commit/69f5c2dba36945a9d0ed3f8ece5e8a768f1316a2" target="_blank">https://github.com/maxhutch/quantum-espresso/commit/69f5c2dba36945a9d0ed3f8ece5e8a768f1316a2</a><br>
><br>
><br>
><br>
> Thanks,<br>
> Max<br>
</div>> _______________________________________________<br>
> Q-e-developers mailing list<br>
> <a href="mailto:Q-e-developers@qe-forge.org">Q-e-developers@qe-forge.org</a><br>
> <a href="http://qe-forge.org/mailman/listinfo/q-e-developers" target="_blank">http://qe-forge.org/mailman/listinfo/q-e-developers</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Paolo Giannozzi, Dept. Chemistry&Physics&Environment,<br>
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy<br>
Phone <a href="tel:%2B39-0432-558216" value="+390432558216">+39-0432-558216</a>, fax <a href="tel:%2B39-0432-558222" value="+390432558222">+39-0432-558222</a><br>
<br>
</font></span></blockquote></div><br></div>