<div dir="ltr">Dear QE Devs,<div><br></div><div>I need to calculate the matrix element of the P operator, so I'm trying to understand the code in PW/src/commutator_Hx_psi.f90. Please check if my understanding is correct. At the end of the email I also have a more direct question/suggestion.</div><div><br></div><div>The INPUT_BANDS says that this code calculates "velocity operator i*m*[H, x] times mass". At first I had the impression that I could understand this as the operator (approximately)</div><div><br></div><div><img alt="m_0 v = p+\frac{\hbar}{4m_{0}c^{2}}(\sigma\times\nabla U)-\frac{p^{3}}{2m_{0}^{2}c^{2}}" title="m_0 v = p+\frac{\hbar}{4m_{0}c^{2}}(\sigma\times\nabla U)-\frac{p^{3}}{2m_{0}^{2}c^{2}}" class="va_li" src="https://s0.wp.com/latex.php?zoom=3&bg=ffffff&fg=000000&s=0&latex=m%5F0%09v%09=%09p%2B%5Cfrac{%5Chbar}{4m%5F{0}c%5E{2}}(%5Csigma%5Ctimes%5Cnabla%09U)-%5Cfrac{p%5E{3}}{2m%5F{0}%5E{2}c%5E{2}}" id="l0.8334903209149291" height="26" style="display: inline; vertical-align: -9.667px;" width="239"></div><div><br></div><div>where the first term comes from the kinetic energy, the second from SOC, and the third from the mass-velocity fine structure correction. I'm aware that higher order corrections would be included as well by the FR pseudos.</div><div><br></div><div>Reading the code, I see that near line 77 contains only the kinetic part (first term above), where p acting on the plane-waves gives (k+G),</div><div><br></div><div>77    ! this is  the kinetic contribution to [H,x]:  -2i (k+G)_ipol * psi<br></div><div><br></div><div>The code that follows after line 92, near the commented "goto 111" deals with the commutator with the non-local potential. If I understand correctly, for a full relativistic pseudo, this part of the code would account for the SOC and p^3 terms above (via pseudos + Dirac equation). Correct?</div><div><br></div><div>So, if I just want the matrix element of p without the fine structure terms, I could just uncomment the "goto 111", right?</div><div><br></div><div>If that's correct, could you add an argument "p_only=true/false" to the routine commutator_Hx_psi(...) that could control this behaviour? Something like this:</div><div><br></div><div>-------------------------------------------------------------</div><div>subroutine commutator_Hx_psi (ik, nbnd_calc, vpol, becp1, becp2, dpsi, p_only_)<br></div><div>INTEGER, OPTIONAL :: p_only_</div><div>INTEGER :: p_only</div><div>...</div><div>p_only = 0 ! default to false</div><div>if (present(p_only_)) p_only = p_only_</div><div>...<br></div><div>if (p_only == 1) goto 111</div><div>-------------------------------------------------------------<br></div><div><br></div><div>This modification would help me a lot! And it would not affect other codes, since the default value of p_only is set to false.</div><div><br></div><div>Best,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial"><div>--<br>Gerson J. Ferreira</div><div>Prof. Dr. @ InFis - UFU </div><div>----------------------------------------------</div><div style="font-family:Arial,Helvetica,sans-serif"><font face="arial"><a href="http://gjferreira.wordpress.com/" target="_blank">gjferreira.wordpress.com</a></font><br></div><div><font size="2" face="arial">Institute of Physics</font></div><div>Federal University of Uberlândia, Brazil</div><div style="font-family:Arial,Helvetica,sans-serif"><span style="font-family:arial">----------------------------------------------</span></div></div></div></div></div></div></div></div></div>