[Pw_forum] question about constrained magnetization

Cyrille Barreteau cyrille.barreteau at cea.fr
Thu Dec 3 11:28:27 CET 2009


Gabriele Sclauzero wrote:

>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.
>>    
>>
>
>  
>
Dear Gabriele,

With your quick fix now the input_magnetization is no longer the 
magnetization m but m/n
as it is when there is no penalization.  Therefore we avoid the problem 
due to the [-1,1] interval
however this makes things a litlle "crooked" since the charge n is not 
precisely now (the charge
inside the sphere does not integrate to the total charge per atom..).
However with a little of mental gymnastic we can manage to obtain what 
we want:-)

thanks
  cyrille

-- 
==================================================================
Cyrille Barreteau  | phone : +33 (0)1 69 08 29 51
CEA Saclay         | fax   : +33 (0)1 69 08 84 46
DSM/IRAMIS/SPCSI   | email cyrille.barreteau at cea.fr
Batiment 462       |
91191 Gif sur Yvette Cedex  FRANCE
          ~~~~~~~~~~~~~~~~~~~~~~~~
http://iramis.cea.fr/Images/Pisp/cbarreteau/cbarreteau_fr.html
================================================================== 

>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
>>
>>    
>>
>
>  
>





More information about the users mailing list