<div dir="ltr">Dear Cyrille,<div><br></div><div>I just made an alteration to add_bfield.f90 only including constraint energy contributions from the magnetic ions. This I expect is an indirect way of setting the lambdas for other atoms to zero albeit not very general.<br>
</div><div><br></div><div>It's a Fe3+ system which in the high-spin state should have 5 unpaired electrons. While I don't expect to achieve that ideal value (actually I don't when doing a regular unconstrained calculation biased towards the high-spin state) I am only testing the constraint optimisation. </div>
<div><br></div><div>Thanks,</div><div>Vardha.</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 9, 2014 at 2:24 AM, BARRETEAU Cyrille <span dir="ltr"><<a href="mailto:cyrille.barreteau@cea.fr" target="_blank">cyrille.barreteau@cea.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Times New Roman">
Dear Vardha<br>
<br>
For the moment in the actual version of pw there is only one lambda which applies to all types of atoms.<br>
I have no idea of the type of systems you are looking at but a target moment of 5 for Fe is just "crazy".<br>
So this is not surprising that you need such large values of lambda to converge towards this solution.<br>
I am even surprised that you managed to get a solution!<div class=""><br>
<br>
Cyrille<br>
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><font face="Times New Roman"><font face="Times New Roman">-----------------------------------------------------------------------------------------------------------</font></font><br>
<div style="font-family:Tahoma;font-size:13px"><span style="font-family:Times New Roman"><font color="black"><span dir="ltr" style="font-size:10pt"><font><span style="font-size:16px"><font face="Times New Roman"></font></span></font></span></font></span><font face="Times New Roman" size="3"><b>Cyrille
Barreteau</b><br>
CEA Saclay<span style></span></font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font size="3"><font face="Times New Roman" size="3"></font></font></font></font><font size="3"><font face="Times New Roman">,
</font></font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">IRAMIS,</font> SPCSI, Bat. 462</font>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"></font><font face="Times New Roman" size="3"><span style><br>
</span></font>91191 Gif sur Yvette Cedex<span style></span>, FRANCE
<br>
<font size="3">~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font><br>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">phone: +33 (0)1 69 08 29 51
<font size="3">/ </font></font><font face="Times New Roman" size="3"><font size="3"><font face="Times New Roman" size="3">+33 (0)6 47 53 66 52</font></font></font></font>
<br>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">fax : +33 (0)1 69 08 84 46<br>
</font></font></font><font face="Times New Roman" size="3">email: <a href="mailto:cyrille.barreteau@cea.fr" target="_blank">
cyrille.barreteau@cea.fr </a></font><font face="Times New Roman" size="3"><span style></span></font><font size="3"><font face="Times New Roman"><br>
<font size="3">Web: <a href="http://iramis.cea.fr/Pisp/cyrille.barreteau/" target="_blank">
http://iramis.cea.fr/Pisp/cyrille.barreteau/</a> </font><br>
</font></font><font face="Times New Roman">-----------------------------------------------------------------------------------------------------------</font><br>
<span style="font-family:Times New Roman"><font color="black"><span dir="ltr" style="font-size:10pt"><font><span style="font-size:16px"><font size="3"></font></span></font></span></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>De :</b> <a href="mailto:pw_forum-bounces@pwscf.org" target="_blank">pw_forum-bounces@pwscf.org</a> [<a href="mailto:pw_forum-bounces@pwscf.org" target="_blank">pw_forum-bounces@pwscf.org</a>] de la part de Varadharajan Srinivasan [<a href="mailto:varadharajan.srinivasan@gmail.com" target="_blank">varadharajan.srinivasan@gmail.com</a>]<br>
<b>Envoyé :</b> samedi 8 mars 2014 20:02<div><div class="h5"><br>
<b>À :</b> PWSCF Forum<br>
<b>Objet :</b> Re: [Pw_forum] Constrained magnetic calculation<br>
</div></div></font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Dear Cyrille,
<div><br>
</div>
<div>This is what we ended up doing setting all lambdas except the two magnetic ions to zero. However, the constrained moments still seem to converge rather slowly with lambda. I attach the plot below. We are also testing this on a Fe-Cr system. We set the
target moments to 5 for Fe and -3 for Cr (antiferromagnetic arrangement). Is there any physical reason why this would happen? </div>
<div><br>
</div>
<div>Best,</div>
<div>Vardha</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Mar 6, 2014 at 3:31 PM, BARRETEAU Cyrille <span dir="ltr">
<<a href="mailto:cyrille.barreteau@cea.fr" target="_blank">cyrille.barreteau@cea.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF">
<div style="direction:ltr;font-size:10pt;font-family:Times New Roman">In fact it can be very useful to constrain just some atoms and not all of them. We used that option a few years ago when studying the magnetic properties of Cr atoms in a Fe matrix. At
that time we did it by hacking ad_bfield.f90. An alternative solution would be to define a different lambda(i) for each type of atom and set lambda(i)=0 for the atom which do not need to be constrained.<br>
<br>
regards<br>
Cyrille<br>
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><font face="Times New Roman"><font face="Times New Roman">-----------------------------------------------------------------------------------------------------------</font></font><br>
<div style="font-family:Tahoma;font-size:13px"><span style="font-family:Times New Roman"><font color="black"><span dir="ltr" style="font-size:10pt"><font><span style="font-size:16px"><font face="Times New Roman"></font></span></font></span></font></span><font face="Times New Roman" size="3"><b>Cyrille
Barreteau</b><br>
CEA Saclay<span></span></font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font size="3"><font face="Times New Roman" size="3"></font></font></font></font><font size="3"><font face="Times New Roman">,
</font></font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">IRAMIS,</font> SPCSI, Bat. 462</font>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"></font><font face="Times New Roman" size="3"><span><br>
</span></font>91191 Gif sur Yvette Cedex<span></span>, FRANCE <br>
<font size="3">~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font><br>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">phone: +33 (0)1 69 08 29 51
<font size="3">/ </font></font><font face="Times New Roman" size="3"><font size="3"><font face="Times New Roman" size="3">+33 (0)6 47 53 66 52</font></font></font></font>
<br>
</font><font face="Times New Roman" size="3"><font face="Times New Roman" size="3"><font face="Times New Roman" size="3">fax : +33 (0)1 69 08 84 46<br>
</font></font></font><font face="Times New Roman" size="3">email: <a href="mailto:cyrille.barreteau@cea.fr" target="_blank">
cyrille.barreteau@cea.fr </a></font><font face="Times New Roman" size="3"><span></span></font><font size="3"><font face="Times New Roman"><br>
<font size="3">Web: <a href="http://iramis.cea.fr/Pisp/cyrille.barreteau/" target="_blank">
http://iramis.cea.fr/Pisp/cyrille.barreteau/</a> </font><br>
</font></font><font face="Times New Roman">-----------------------------------------------------------------------------------------------------------</font><br>
<span style="font-family:Times New Roman"><font color="black"><span dir="ltr" style="font-size:10pt"><font><span style="font-size:16px"><font size="3"></font></span></font></span></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>De :</b> <a href="mailto:pw_forum-bounces@pwscf.org" target="_blank">
pw_forum-bounces@pwscf.org</a> [<a href="mailto:pw_forum-bounces@pwscf.org" target="_blank">pw_forum-bounces@pwscf.org</a>] de la part de Gabriele Sclauzero [<a href="mailto:gabriele.sclauzero@mat.ethz.ch" target="_blank">gabriele.sclauzero@mat.ethz.ch</a>]<br>
<b>Envoyé :</b> mercredi 5 mars 2014 10:38<br>
<b>À :</b> PWSCF Forum<br>
<b>Objet :</b> Re: [Pw_forum] Constrained magnetic calculation<br>
</font><br>
</div>
<div>
<div>
<div></div>
<div>
<div>Dear Varadharajan,<br>
<br>
I do not know if it make sense or not in general, anyway this possibility is not available at the moment. All atoms of atomic type i will be constrained to have local magnetization equal to starting_magnetization(i). However, you can try to edit the magnetic
constraint subroutine in PW/src/add_bfield.f90 to suit your needs.<br>
<br>
Regards<br>
<br>
<br>
GS<br>
Materials Theory, ETH Zurich<br>
<br>
<br>
On 03/05/2014 05:25 AM, Varadharajan Srinivasan wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Dear Gabriele,
<div><br>
</div>
<div>To add to Paresh's question is it possible (and does it make sense) to constrain the magnetisation of only a few atoms and not the others? While the target here seems to be atoms 3 and 4 the other atoms are being made to pay the price so to speak. </div>
<div><br>
</div>
<div>One option, in the present framework, is to constrain the values of magnetisation of all other atoms to their respective lambda=0 values. Could this speed up the convergence with lambda? </div>
<div><br>
</div>
<div>Thanks,</div>
<div>Vardha.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Mar 4, 2014 at 7:18 PM, Gabriele Sclauzero <span dir="ltr">
<<a href="mailto:gabriele.sclauzero@mat.ethz.ch" target="_blank">gabriele.sclauzero@mat.ethz.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF">
<div><br>
What about the evolution of the constrained magnetization?<br>
(Please also make sure that the values specified in starting_magnetization make sense, as suggested by L. Paulatto Sir).<br>
<br>
My suggestion was to vary lambda in small steps (say 0.5). I'm surprised that you managed to converge the calculation with such high lambda values.<br>
<br>
Anyway, the constrain energy looks way too large, your system is probably still far from the target.<br>
<br>
<br>
GS
<div>
<div><br>
<br>
On 03/04/2014 01:57 PM, paresh rout wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>Respected Sclauzero sir,<br>
</div>
Thanks for your reply. According to your suggestion, I varied my Lambda value from 0,5,.......150 ry. Although calculated constrained energy are decreasing but upto 150 ry the constrained energy and the estimated scf accuracy are not the same order. Here
I am providing my constrained energy with various lambda value.<br>
<br>
</div>
Lambda Constraint_Energy<br>
0 0.00000000<br>
5 36.93411685<br>
10 69.54815816 <br>
15 6.65653915 estimated scf accuracy < 7.6E-13 Ry<br>
20 7.88546052<br>
25 8.88385707<br>
30 9.71513061 <br>
35 10.42697250<br>
40 11.05006563<br>
45 11.60072229<br>
50 12.08887057<br>
70 13.54966033<br>
80 14.05546257<br>
90 14.45159513<br>
100 14.75974550<br>
110 14.99680383<br>
120 15.17624003<br>
130 15.30876396 <br>
140 15.40310437 estimated scf accuracy < 9.9E-13 Ry
<br>
150 15.46632278 estimated scf accuracy < 9.9E-13 Ry<br>
<br>
<div>
<div>
<div>
<div>
<div>
<table cellpadding="0">
<tbody>
<tr>
<td>
<table cellpadding="0">
<tbody>
<tr>
<td>
<div>
<div>
<table cellpadding="0">
<tbody>
<tr>
<td>
<table cellpadding="0">
<tbody>
<tr>
<td><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Mar 4, 2014 at 3:06 PM, Sclauzero Gabriele <span dir="ltr">
<<a href="mailto:gabriele.sclauzero@mat.ethz.ch" target="_blank">gabriele.sclauzero@mat.ethz.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Paresh,<br>
<br>
in my understanding you should start with a very small lambda value (e.g. 0.1), make sure the calculation has converged (not always trivial), then restart with a larger value.<br>
It is important to tune the steps by which you increase lambda. Increasing it by steps of 5 seems too much to me, I would suggest you to try much smaller steps, say between 0.1 and 0.5.<br>
<br>
There are two reasons why the energy increases: the first is because you are constraining your system out of its ground state, but that's exactly what one would expect. The other is the contribution from the penalty energy (E_constrain, it should be printed
after each scf step), which is used to impose the constraint.<br>
An important thing is that this energy term is not physical and becomes negligible once your system reaches the target state.Therefore one should monitor this constraint energy, together with the constrained quantity, and make sure it goes to zero at some point.<br>
<br>
Once lambda is large enough and you reached the targeted state, E_constrain should be negligible w.r.t. the total energy and of the same order of the estimated scf accuracy. From that point on, the energy should not change if you further increase lambda, because
your system fulfills (almost) exactly the constraint, so that E_constrain should stay to a very low value.<br>
<br>
HTH<br>
<br>
<br>
GS<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br></blockquote></div><br></div>