<br><div class="gmail_quote"><div class="gmail_quote">Hello,<br><br>I am trying out a non-collinear calculations with constrained magnetization. <br><br>I did some test calculations with oxygen molecule. Below is the input file for the same.<br>
<br> &control<br>
calculation = 'scf',<br>
prefix='O2',<br> tprnfor = .true.,<br> pseudo_dir='.',<br> outdir='.'<br> wf_collect=.true.<br> /<br> &system<br> ibrav= 1,<br> celldm(1) =10.0,<br> nat=2,<br> ntyp= 2,<br>
ecutwfc =45,<br> ecutrho =500,<br> noncolin=.true.<br> angle1(1)=0.0<br> angle2(1)=0.0<br> angle1(2)=180.0<br> angle2(2)=0.0<br> starting_magnetization(1)=0.5,<br> starting_magnetization(2)=0.5<br>
constrained_magnetization='atomic direction'<br> lambda=1.0<br> /<br> &electrons<br> mixing_beta = 0.5,<br> conv_thr = 1.0d-8<br> /<br>ATOMIC_SPECIES<br>Ou 16.0 O.pbe-rrkjus.UPF<br>Od 16.0 O.pbe-rrkjus.UPF<br>
ATOMIC_POSITIONS BOHR<br>Ou -1.156 0.000000000 0.000000000<br>Od 1.156 0.000000000 0.000000000<br>K_POINTS {automatic}<br>1 1 1 0 0 0<br><br><br>Firstly, I am unable to constrain the angle theta. The theta (the orientation of the magnetic moment wrt z-axis) in the<br>
output file keeps on changing and finally ends with the orientation which is different from that in the input.<br><br>Secondly, if I run the above input file with different number of processors, I get a different final <br>
orientations (and hence different final energies). I have tested this by running with 1 to 6 number of<br>processors. <br clear="all"><br>Following is the end part of the output with 4 number processors:<br><br><b>============================================================================== <br>
atom number 1 relative position : -0.1156 0.0000 0.0000<br> charge : 2.953189<br> magnetization : 0.000000 0.000000 -0.577004<br> magnetization/charge: 0.000000 0.000000 -0.195383<br>
polar coord.: r, theta, phi [deg] : 0.577004 180.000000 360.000000<br> constrained theta [deg] : 0.000000<br><br> ==============================================================================<br><br> ==============================================================================<br>
atom number 2 relative position : 0.1156 0.0000 0.0000<br> charge : 2.953141<br> magnetization : 0.000000 0.000000 -0.577037<br> magnetization/charge: 0.000000 0.000000 -0.195398<br>
polar coord.: r, theta, phi [deg] : 0.577037 180.000000 360.000000<br> constrained theta [deg] : 180.000000<br><br> ==============================================================================<br><br> total cpu time spent up to now is 54.5 secs<br>
<br> End of self-consistent calculation<br><br> k = 0.0000 0.0000 0.0000 ( 5041 PWs) bands (ev):<br><br> -31.5716 -30.2895 -19.3049 -17.4284 -12.2028 -12.1841 -12.1841 -11.3230<br> -10.1968 -10.1968 -5.7132 -5.7132<br>
<br>! total energy = -63.51475398 Ry<br> Harris-Foulkes estimate = -63.51475398 Ry<br> estimated scf accuracy < 2.3E-09 Ry<br><br> The total energy is the sum of the following terms:<br>
<br> one-electron contribution = -86.65880366 Ry<br> hartree contribution = 45.62121693 Ry<br> xc contribution = -13.63278019 Ry<br> ewald contribution = -8.84438707 Ry<br>
<br> total magnetization = 0.00 0.00 -2.00 Bohr mag/cell<br> absolute magnetization = 2.05 Bohr mag/cell<br> lambda = 1.00 Ry<br></b><br><br>This is final part of the output with 3 number processors:<br>
<br><b>==============================================================================<br> atom number 1 relative position : -0.1156 0.0000 0.0000<br> charge : 2.951683<br> magnetization : 0.000000 0.000000 -0.000057<br>
magnetization/charge: 0.000000 0.000000 -0.000019<br> polar coord.: r, theta, phi [deg] : 0.000057 180.000000 360.000000<br> constrained theta [deg] : 0.000000<br><br> ==============================================================================<br>
<br> ==============================================================================<br> atom number 2 relative position : 0.1156 0.0000 0.0000<br> charge : 2.951669<br> magnetization : 0.000000 0.000000 0.000053<br>
magnetization/charge: 0.000000 0.000000 0.000018<br> polar coord.: r, theta, phi [deg] : 0.000053 0.000000 360.000000<br> constrained theta [deg] : 180.000000<br><br> ==============================================================================<br>
<br> total cpu time spent up to now is 67.7 secs<br><br> End of self-consistent calculation<br><br> k = 0.0000 0.0000 0.0000 ( 5041 PWs) bands (ev):<br><br> -30.9599 -30.9598 -18.4039 -18.4039 -11.9339 -11.9339 -11.7797 -11.7797<br>
-10.5192 -10.5192 -5.3900 -5.3900<br><br>! total energy = -63.48793165 Ry<br> Harris-Foulkes estimate = -63.48793164 Ry<br> estimated scf accuracy < 8.9E-09 Ry<br><br>
The total energy is the sum of the following terms:<br><br> one-electron contribution = -86.64104879 Ry<br> hartree contribution = 45.59849347 Ry<br> xc contribution = -13.60098925 Ry<br>
ewald contribution = -8.84438707 Ry<br><br> total magnetization = 0.00 0.00 0.00 Bohr mag/cell<br> absolute magnetization = 1.39 Bohr mag/cell<br> lambda = 1.00 Ry</b><br>
<br><br>I have also looked into the subroutine 'PW/src/get_locals.f90'.<br>In this an array auxrholoc(:,:) is computed on line 45 as follows:<br> <br>auxrholoc(pointlist(i),1:nspin) = auxrholoc(pointlist(i),1:nspin) + &<br>
rho(i,1:nspin) * factlist(i)<br><br>As I understand, it is this variable which is used to compute the charge and magnetization values that is printed in the output.<br><br>So, I tried printing auxrholoc(:,:), rho(:,1:nspin) and factlist(:) arrays with 3 and 4 number of processors.<br>
<br>All these arrays take different values when run by 3 and 4 processors.<br><br>Which output is correct? Why the results are different with different number of processors?<br><br>I am using QE version 5.0.1. configured with mpif90 and intel compilers for C and fortran.<br>
I have 64-bit machine with ubuntu-11.04. For running parallel jobs I'm using openmpi-1.4.3.<span class="HOEnZb"><font color="#888888"><br> </font></span><br></div></div>-- <br>Niharika Joshi<br><span style="color:rgb(192,192,192)">Project student, </span><br style="color:rgb(192,192,192)">
<span style="color:rgb(192,192,192)">IISER,</span><span style="color:rgb(192,192,192)">Pune</span><br><br>