Dear Professor:<br> I have been confused about the segment of SUBROUTINE OUTSYM(O,nb1,nb2) showed below in WIEN2K/SRC_Optic/outmat.f. <br><br> do 772 l=1,iord <br> do ii=1,3
<br> o1(ii)=0.0 <br> end do <br> do i=1,3 <br> do ii=1,3 <br> o1(i)=o1(i)+opIMAT(ii,i,l)*O(ii)
<br> end do <br> end do <br> o2(1)=o2(1)+o1(1)*conjg(o1(1)) <br> o2(2)=o2(2)+o1(2)*conjg(o1(2)) <br> o2(3)=o2(3)+o1(3)*conjg(o1(3))
<br> if (det(l).LT.0) then <br> o2(4)=o2(4)+conjg(o1(2))*o1(1) <br> o2(5)=o2(5)+conjg(o1(3))*o1(1) <br> o2(6)=o2(6)+conjg(o1(3))*o1(2) <br> else
<br> o2(4)=o2(4)+o1(2)*conjg(o1(1)) <br> o2(5)=o2(5)+o1(3)*conjg(o1(1)) <br> o2(6)=o2(6)+o1(3)*conjg(o1(2)) <br> end if <br>772 continue
<br><br><br> My First quyestion is that<br> do i=1,3 <br> do ii=1,3 <br> o1(i)=o1(i)+opIMAT(ii,i,l)*O(ii) <br> end do
<br> end do <br>is obviously a projecting operation.Why is it necessary?<br><br> The second question is, if the first answer is Yes,then Why the cycling <br>body denoted by "do 722" must include the below part:
<br><br> o2(1)=o2(1)+o1(1)*conjg(o1(1)) <br> o2(2)=o2(2)+o1(2)*conjg(o1(2)) <br> o2(3)=o2(3)+o1(3)*conjg(o1(3)) <br> if (det(l).LT.0) then <br> o2(4)=o2(4)+conjg(o1(2))*o1(1)
<br> o2(5)=o2(5)+conjg(o1(3))*o1(1) <br> o2(6)=o2(6)+conjg(o1(3))*o1(2) <br> else <br> o2(4)=o2(4)+o1(2)*conjg(o1(1)) <br> o2(5)=o2(5)+o1(3)*conjg(o1(1))
<br> o2(6)=o2(6)+o1(3)*conjg(o1(2)) <br> end if <br><br> Thank you very much!Best regards!<br> Sincerely Jun<br>