[Pw_forum] question about constrained magnetization

Cyrille Barreteau cyrille.barreteau at cea.fr
Tue Dec 8 09:24:53 CET 2009


Dear Gabriele

The last solution that you provided seems to be the most adapted to my 
problem.
The choice of the initial moment is maybe not the most adapted but this 
not a
very big problem.. thanks for this very quick fix:-)

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



Gabriele Sclauzero wrote:

>Cyrille Barreteau wrote:
>  
>
>>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:-)
>>    
>>
>
>You are right, perhaps it is more practical to fix the magnetization (i.e. local magnetic 
>moment) rather than the "atomic spin polarization".
>I think that the problem arises from the fact that the starting_magnetization keyword is 
>used for two different things, which maybe should be called starting_spin_polarization for 
>the unconstrained calculations and target_magnetization for constrained ones (of "atomic" 
>type).
>Another quick fix that should meet your needs could be the following: let the 
>PW/add_bfield.f90 subroutine as the original and in PW/input.f90 move the check on 
>starting_magnetization
>   DO nt = 1, ntyp
>      !
>      IF ( starting_magnetization(nt) == sm_not_set ) THEN
>         starting_magnetization(nt) = 0.0_dp
>      ELSE IF ( starting_magnetization(nt) > 1.0_dp ) THEN
>         starting_magnetization(nt) = 1.0_dp
>      ELSE IF ( starting_magnetization(nt) <-1.0_dp ) THEN
>         starting_magnetization(nt) =-1.0_dp
>      END IF
>      !
>   END DO
>
>AFTER the block of initialization of the magnetic contraints:
>
>   SELECT CASE( TRIM( constrained_magnetization ) )
>   CASE( 'none' )
>      !
>      i_cons = 0
>      !
>   CASE( 'total' )
>      !
>   ...
>   END SELECT
>
>Probably, the choice of the initial atomic spin polarization will not be the optimal one 
>for a better convergence to the target magnetization.
>You can use this temporary solution until a more satisfactory implementation will be 
>conceived and carried out.
>
>
>Thanks,
>
>
>Gabriele
>
>
>
>  
>
>>thanks
>>  cyrille
>>
>>    
>>
>
>  
>




More information about the Pw_forum mailing list