[Pw_forum] non-collinear calculations with constrained magnetization

N H Joshi niharikaj at students.iiserpune.ac.in
Wed Nov 7 11:56:44 CET 2012


Hello,

I am trying out a non-collinear calculations with constrained
magnetization.

I did some test calculations with oxygen molecule. Below is the input file
for the same.

 &control
    calculation = 'scf',
    prefix='O2',
    tprnfor = .true.,
    pseudo_dir='.',
    outdir='.'
    wf_collect=.true.
 /
 &system
    ibrav=  1,
    celldm(1) =10.0,
    nat=2,
    ntyp= 2,
    ecutwfc =45,
    ecutrho =500,
    noncolin=.true.
    angle1(1)=0.0
    angle2(1)=0.0
    angle1(2)=180.0
    angle2(2)=0.0
    starting_magnetization(1)=0.5,
    starting_magnetization(2)=0.5
    constrained_magnetization='atomic direction'
    lambda=1.0
 /
 &electrons
    mixing_beta = 0.5,
    conv_thr =  1.0d-8
 /
ATOMIC_SPECIES
Ou  16.0   O.pbe-rrkjus.UPF
Od  16.0   O.pbe-rrkjus.UPF
ATOMIC_POSITIONS BOHR
Ou       -1.156  0.000000000   0.000000000
Od        1.156   0.000000000   0.000000000
K_POINTS {automatic}
1 1 1 0 0 0


Firstly, I am unable to constrain the angle theta. The theta (the
orientation of the magnetic moment wrt z-axis) in the
output file keeps on changing and finally ends with the orientation which
is different from that in the input.

Secondly, if I run the above input file with different number of
processors, I get a different final
orientations (and hence different final energies). I have tested this by
running with 1 to 6 number of
processors.

Following is the end part of the output with 4 number processors:

*==============================================================================

     atom number    1 relative position :   -0.1156   0.0000   0.0000
     charge :     2.953189
     magnetization :          0.000000    0.000000   -0.577004
     magnetization/charge:    0.000000    0.000000   -0.195383
     polar coord.: r, theta, phi [deg] :     0.577004  180.000000
360.000000
     constrained theta [deg] :     0.000000

 ==============================================================================

 ==============================================================================
     atom number    2 relative position :    0.1156   0.0000   0.0000
     charge :     2.953141
     magnetization :          0.000000    0.000000   -0.577037
     magnetization/charge:    0.000000    0.000000   -0.195398
     polar coord.: r, theta, phi [deg] :     0.577037  180.000000
360.000000
     constrained theta [deg] :   180.000000

 ==============================================================================

     total cpu time spent up to now is       54.5 secs

     End of self-consistent calculation

          k = 0.0000 0.0000 0.0000 (  5041 PWs)   bands (ev):

   -31.5716 -30.2895 -19.3049 -17.4284 -12.2028 -12.1841 -12.1841 -11.3230
   -10.1968 -10.1968  -5.7132  -5.7132

!    total energy              =     -63.51475398 Ry
     Harris-Foulkes estimate   =     -63.51475398 Ry
     estimated scf accuracy    <          2.3E-09 Ry

     The total energy is the sum of the following terms:

     one-electron contribution =     -86.65880366 Ry
     hartree contribution      =      45.62121693 Ry
     xc contribution           =     -13.63278019 Ry
     ewald contribution        =      -8.84438707 Ry

     total magnetization       =     0.00     0.00    -2.00 Bohr mag/cell
     absolute magnetization    =     2.05 Bohr mag/cell
     lambda                    =       1.00 Ry
*

This is final part of the output with 3 number processors:

*
==============================================================================
     atom number    1 relative position :   -0.1156   0.0000   0.0000
     charge :     2.951683
     magnetization :          0.000000    0.000000   -0.000057
     magnetization/charge:    0.000000    0.000000   -0.000019
     polar coord.: r, theta, phi [deg] :     0.000057  180.000000
360.000000
     constrained theta [deg] :     0.000000

 ==============================================================================

 ==============================================================================
     atom number    2 relative position :    0.1156   0.0000   0.0000
     charge :     2.951669
     magnetization :          0.000000    0.000000    0.000053
     magnetization/charge:    0.000000    0.000000    0.000018
     polar coord.: r, theta, phi [deg] :     0.000053    0.000000
360.000000
     constrained theta [deg] :   180.000000

 ==============================================================================

     total cpu time spent up to now is       67.7 secs

     End of self-consistent calculation

          k = 0.0000 0.0000 0.0000 (  5041 PWs)   bands (ev):

   -30.9599 -30.9598 -18.4039 -18.4039 -11.9339 -11.9339 -11.7797 -11.7797
   -10.5192 -10.5192  -5.3900  -5.3900

!    total energy              =     -63.48793165 Ry
     Harris-Foulkes estimate   =     -63.48793164 Ry
     estimated scf accuracy    <          8.9E-09 Ry

     The total energy is the sum of the following terms:

     one-electron contribution =     -86.64104879 Ry
     hartree contribution      =      45.59849347 Ry
     xc contribution           =     -13.60098925 Ry
     ewald contribution        =      -8.84438707 Ry

     total magnetization       =     0.00     0.00     0.00 Bohr mag/cell
     absolute magnetization    =     1.39 Bohr mag/cell
     lambda                    =       1.00 Ry*


I have also looked into the subroutine 'PW/src/get_locals.f90'.
In this an array auxrholoc(:,:) is computed on line 45 as follows:

auxrholoc(pointlist(i),1:nspin) = auxrholoc(pointlist(i),1:nspin) + &
                                           rho(i,1:nspin) * factlist(i)

As I understand, it is this variable which is used to compute the charge
and magnetization values that is printed in the output.

So, I tried printing auxrholoc(:,:), rho(:,1:nspin) and factlist(:) arrays
with 3 and 4 number of processors.

All these arrays take different values when run by 3 and 4 processors.

Which output is correct? Why the results are different with different
number of processors?

I am using QE version 5.0.1. configured with mpif90 and intel compilers for
C and fortran.
I have 64-bit machine with ubuntu-11.04. For running parallel jobs I'm
using openmpi-1.4.3.

-- 
Niharika Joshi
Project student,
IISER,Pune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20121107/66f353e4/attachment.html>


More information about the users mailing list