<div dir="ltr"><div>Dear Matteo Coccocioni, I am working with a molecule of point group symmetry D_4d, the TbPc2. Unfortunately the symmetry operations implemented so far in Quantum Espresso can not handle screw rotations and glide reflections as in a standard Quantum Chemistry package. So I am trying to impose such occupations as an approximation to the real symmetry of the system. Hereafter I will try also your "<span style="font-family:arial,sans-serif;font-size:12.8000001907349px">dirty trick" suggesting a </span><span style="font-size:12.8000001907349px;font-family:arial,sans-serif">starting_ns_eigenvalue </span><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">bigger than one. Using the </span><font face="arial, sans-serif"><span style="font-size:12.8000001907349px">mixing_fixed_ns > electron_maxstep I obtained big differences in the occupations imposed and obtained, </span>interestingly although I did not end in the predetermined states  the system fell always in the same strange occupation. The convergence was quite nice (tens of iterations) up to 10^-6 Ry. Perhaps, as you pointed out I</font><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"> have a different symmetry than the code finds </span><font face="arial, sans-serif"><span style="font-size:12.8000001907349px">for my system. Unfortunately, </span>although<span style="font-size:12.8000001907349px"> I would like to try to develop some new parts codes, I do not feel enough trained and comfortable with the timetable of my current project. Thanks a lot for your suggestion !</span></font><span style="font-size:12.8000001907349px;font-family:arial,sans-serif">  </span></div><div><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">S</span></div><div><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">Dear Simone</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">I try to answer your questions below.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">On Fri, Nov 7, 2014 at 3:32 PM, simone marocchi <</span><a href="mailto:simone.roz@gmail.com" style="font-family:arial,sans-serif;font-size:12.8000001907349px" target="_blank">simone.roz@gmail.com</a><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">></span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">wrote:</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> Dear all, I am simulating compounds with rare earths within a collinear</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> calculation. I tried to suggest some occupations of the f orbitals for the</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> Tb atom, using the starting_ns_eigenvalue(m,</span><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">ispin,I).</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">></span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">why do you need to do that? if you want to force different values of</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">occupation on states that are equivalent by symmetry you will not be</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">successful. If this is the case you have to do something that makes the</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">system loose that symmetry operation connecting the two states.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> Unfortunately also with a small value of electronic mixing and big values</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> of U, the imposed occupations was lost during the iterative cycle.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">></span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">this can happen. a dirty trick I learned recently is to suggest a</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">starting_ns_eigenvalue(m,</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">ispin,I) bigger than one in input (1.2 or 1.3 maybe). This does not make</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">any physical sense of course. However the Hubbard potential becomes more</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">attractive for the specific eigenvector of the occupation matrix you want</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">to fill completely and the code takes more time to "come back" to a</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">physical value. If that is a state it likes (at least a local minimum of</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">the energy) it might fall into it. Of course you have to check at the end</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">that the occupation has gone back to a value <= 1.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> So I used also mixing_fixed_ns > electron_maxstep. Also in this case after</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> I obtain the total energy convergence the density matrix of the last</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> iteration is different to the one imposed in the input_file.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">></span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">this is (possibly) strange. How different is it? How well are you</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">converging?</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">The fact that it is different is not surprising: the routine that prints</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">the ns, always prints the ones that are computed from the KS states just</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">obtained from the new diagonalization. These can be different from the ones</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">e.g. used in contructing the Hubbard potential.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">However if your calculation is well converged this difference should not be</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">big: both KS wfcs and their occupations should be converged reasonably well.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">If this does not happen and you still see a significant difference maybe it</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">means that the values you are trying to impose is not consistent with what</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">the system wants to do (e.g., you have less symmetry than the code finds</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">for your crystal)</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> Can someone of you kindly explain me how the mixing_fixed_ns works ? Do it</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> uses a sort of Lagrange multipliers to force the occupations or is more</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> like a penalty function ? Finally, is it possible to work around the</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">> problem, converging to a determined occupation ?</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">></span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">no with the current version of the code. you could implement some (e.g.,</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">quadratic) constraint and try. I think I once tried (long time ago) and</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">seem to remember problems in convergence.</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">Best,</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">Matteo</span><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br style="font-family:arial,sans-serif;font-size:12.8000001907349px"><div><br></div>-- <br><div><div dir="ltr"><font color="#888888">Simone Marocchi</font><br style="color:rgb(136,136,136)"><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">S3 Center, Istituto Nanoscienze, CNR</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">via Campi 213/A, 41125, Modena, Italy</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Tel: </span><a value="+390592055300" style="color:rgb(17,85,204)">+39 </a><u><a href="tel:0592055585" value="+390592055585" target="_blank">0592055585</a></u><span style="color:rgb(136,136,136)">;  Skype: jacobi84</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">URL: </span><a href="http://www.nano.cnr.it/" style="color:rgb(17,85,204)" target="_blank">http://www.nano.cnr.it</a><br style="color:rgb(136,136,136)"></div></div>
</div></div>