[Pw_forum] question about constrained magnetization
Gabriele Sclauzero
sclauzer at sissa.it
Wed Dec 2 16:16:09 CET 2009
Dear Cyrille,
Cyrille Barreteau wrote:
> Dear all,
>
> I want to perform a calculation using the penalization technique.
> In an unconstrained scf calculation the input_magnetization(i) (i=1,ntyp)
> variable contains the m/n initial value of atom of type i, and this
> quantity should
> obviously belong to [-1,1] interval.
> To perform a constrained magnetization of "atomic type" I have to
> set the variable constrained_magnetization='atomic' and the magnetization
> will be the one given by input_magnetization(i).
> Therefore now input_magnetization(i) is no longer m/n but m only.
> However it seems that the range of input_magnetization has not been
> modified and is still within [-1,1] interval.
> If ever I set input_magnetization(i)>1 then the code automatically
> replace it by 1 and I cannot explore values larger than 1.
I see your problem, thanks for pointing it out. I think that as a quick fix you can try to
substitute the following line in PW/add_bfield.f90
m2(1:npol,na) = m_loc(1:npol,na) - mcons(1:npol,nt)
with
m2(1:npol,na) = m_loc(1:npol,na) - mcons(1:npol,nt)*r_loc(na)
and recompile. In the CVS version it should be line 67 of the file, just after
IF (i_cons==1) THEN
! i_cons = 1 means that the npol components of the magnetization
! are constrained, they are given in the input-file
Please let me know if it works.
Regards,
GS
>
> Is there a way to circumvent this problem?
> For clarity I have added below a simple example illustrating my problem.
> thanks in advance..
>
> cyrille
>
--
o ------------------------------------------------ o
| Gabriele Sclauzero, PhD Student |
| c/o: SISSA & CNR-INFM Democritos, |
| via Beirut 2-4, 34014 Trieste (Italy) |
| email: sclauzer at sissa.it |
| phone: +39 040 3787 511 |
| skype: gurlonotturno |
o ------------------------------------------------ o
More information about the Pw_forum
mailing list