Commit fb3df010 authored by Gregor Michalicek's avatar Gregor Michalicek

Eliminate potden%cdomvz

parent fa58d844
......@@ -22,7 +22,7 @@ CONTAINS
! matrix. This subroutine generates this density matrix in the
! vacuum region. The diagonal elements of this matrix (n_11 & n_22)
! are store in den%vacz and den%vacxy, while the real and imaginary part
! of the off-diagonal element are store in den%cdomvz and den%vacxy(:,:,:,3).
! of the off-diagonal element are stored in den%vacz(:,:,3:4) and den%vacxy(:,:,:,3).
!
! Philipp Kurz 99/07
!***********************************************************************
......@@ -37,8 +37,8 @@ CONTAINS
! diagonal elements n_11 and n_22
! den%vacxy: warping part of the vacuum density matrix,
! diagonal elements n_11 and n_22
! den%cdomvz: non-warping part of the vacuum density matrix,
! off-diagonal elements n_21
! den%vacz(:,:,3:4): non-warping part of the vacuum density matrix,
! off-diagonal elements n_21 (real part in (:,:,3), imaginary part in (:,:,4))
! den%vacxy(:,:,:,3): warping part of the vacuum density matrix,
! off-diagonal elements n_21
!***********************************************************************
......@@ -89,7 +89,7 @@ CONTAINS
INTEGER mapg2k(DIMENSION%nv2d)
! .. Local Scalars ..
COMPLEX aa,ab,av,ba,bb,bv,t1,aae,bbe,abe,bae,aaee,bbee,abee,baee,&
& factorx,factory,c_1,aa_1,ab_1,ba_1,bb_1,ic,av_1,bv_1,d
& factorx,factory,c_1,aa_1,ab_1,ba_1,bb_1,ic,av_1,bv_1,d,tempCmplx
REAL arg,const,ddui,dduj,dduei,dduej,eps,ev,evacp,phs,phsp,qout,&
& scale,sign,uei,uej,ui,uj,wronk,zks,RESULT(1),ui2,uei2,&
......@@ -1026,7 +1026,9 @@ CONTAINS
uj = u_1(jz,l1,m1,2)
uei = ue_1(jz,l,m,1)
uej = ue_1(jz,l1,m1,2)
den%cdomvz(jz,ivac) = den%cdomvz(jz,ivac) + aa*ui*uj+bb*uei*uej+ba*ui*uej+ab*uei*uj
tempCmplx = aa*ui*uj+bb*uei*uej+ba*ui*uej+ab*uei*uj
den%vacz(jz,ivac,3) = den%vacz(jz,ivac,3) + REAL(tempCmplx)
den%vacz(jz,ivac,4) = den%vacz(jz,ivac,4) + AIMAG(tempCmplx)
END DO xys3
ELSE ! the warped part (ind1 > 1)
aa = CMPLX(0.,0.)
......@@ -1083,7 +1085,9 @@ CONTAINS
ui2 = u(jz,l1,2)
uei = ue(jz,l,1)
uei2 = ue(jz,l1,2)
den%cdomvz(jz,ivac) = den%cdomvz(jz,ivac) + aa*ui2*ui + bb*uei2*uei + ab*ui2*uei + ba*uei2*ui
tempCmplx = aa*ui2*ui + bb*uei2*uei + ab*ui2*uei + ba*uei2*ui
den%vacz(jz,ivac,3) = den%vacz(jz,ivac,3) + REAL(tempCmplx)
den%vacz(jz,ivac,4) = den%vacz(jz,ivac,4) + AIMAG(tempCmplx)
ENDDO
ELSE
!---> warping part
......
......@@ -166,6 +166,8 @@ MODULE m_cdn_io
CHARACTER(LEN=30) :: archiveName
TYPE(t_cell) :: cellTemp
COMPLEX, ALLOCATABLE :: cdomvz(:,:)
fermiEnergy = 0.0
l_qfix = .FALSE.
......@@ -281,7 +283,15 @@ MODULE m_cdn_io
READ (iUnit,iostat=datend) (den%cdom(k),k=1,stars%ng3)
IF (datend == 0) THEN
IF (input%film) THEN
READ (iUnit) ((den%cdomvz(i,iVac),i=1,vacuum%nmz),iVac=1,vacuum%nvac)
ALLOCATE(cdomvz(vacuum%nmz,vacuum%nvac))
READ (iUnit) ((cdomvz(i,iVac),i=1,vacuum%nmz),iVac=1,vacuum%nvac)
DO iVac = 1, vacuum%nvac
DO i = 1, vacuum%nmz
den%vacz(i,iVac,3) = REAL(cdomvz(i,iVac))
den%vacz(i,iVac,4) = AIMAG(cdomvz(i,iVac))
END DO
END DO
DEALLOCATE(cdomvz)
READ (iUnit) (((den%vacxy(i,j-1,iVac,3),i=1,vacuum%nmzxy),j=2,oneD%odi%nq2), iVac=1,vacuum%nvac)
END IF
ELSE
......@@ -293,14 +303,14 @@ MODULE m_cdn_io
END IF
den%cdom = CMPLX(0.0,0.0)
IF (input%film) THEN
den%cdomvz = CMPLX(0.0,0.0)
den%vacz(:,:,3:4) = 0.0
den%vacxy(:,:,:,3) = CMPLX(0.0,0.0)
END IF
END IF
ELSE IF (archiveType.EQ.CDN_ARCHIVE_TYPE_NOCO_const) THEN
den%cdom = CMPLX(0.0,0.0)
IF (input%film) THEN
den%cdomvz = CMPLX(0.0,0.0)
den%vacz(:,:,3:4) = 0.0
den%vacxy(:,:,:,3) = CMPLX(0.0,0.0)
END IF
END IF
......@@ -386,6 +396,8 @@ MODULE m_cdn_io
CHARACTER(LEN=10) :: timeString
CHARACTER(LEN=10) :: zone
COMPLEX, ALLOCATABLE :: cdomvz(:,:)
CALL getIOMode(mode)
CALL DATE_AND_TIME(dateString,timeString,zone)
READ(dateString,'(i8)') date
......@@ -597,8 +609,15 @@ MODULE m_cdn_io
IF (archiveType.EQ.CDN_ARCHIVE_TYPE_NOCO_const) THEN
WRITE (iUnit) (den%cdom(k),k=1,stars%ng3)
IF (input%film) THEN
WRITE (iUnit) ((den%cdomvz(i,iVac),i=1,vacuum%nmz),iVac=1,vacuum%nvac)
ALLOCATE(cdomvz(vacuum%nmz,vacuum%nvac))
DO iVac = 1, vacuum%nvac
DO i = 1, vacuum%nmz
cdomvz(i,iVac) = CMPLX(den%vacz(i,iVac,3),den%vacz(i,iVac,4))
END DO
END DO
WRITE (iUnit) ((cdomvz(i,iVac),i=1,vacuum%nmz),iVac=1,vacuum%nvac)
WRITE (iUnit) (((den%vacxy(i,j-1,iVac,3),i=1,vacuum%nmzxy),j=2,oneD%odi%nq2), iVac=1,vacuum%nvac)
DEALLOCATE(cdomvz)
END IF
END IF
......
......@@ -1543,6 +1543,7 @@ MODULE m_cdnpot_io_hdf
REAL, INTENT (IN) :: fermiEnergy, distance
LOGICAL, INTENT (IN) :: l_qfix
INTEGER :: i, iVac
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
INTEGER :: nmz,nvac,od_nq2,nmzxy,n_u
INTEGER :: hdfError, fileFormatVersion
......@@ -1564,6 +1565,8 @@ MODULE m_cdnpot_io_hdf
INTEGER(HID_T) :: cdomvxySpaceID, cdomvxySetID
INTEGER(HID_T) :: mmpMatSpaceID, mmpMatSetID
COMPLEX, ALLOCATABLE :: cdomvz(:,:)
CALL h5gopen_f(fileID, '/general', generalGroupID, hdfError)
! read in file format version from the header '/general'
......@@ -1706,10 +1709,17 @@ MODULE m_cdnpot_io_hdf
CALL h5dclose_f(cdomSetID, hdfError)
IF (l_film) THEN
ALLOCATE(cdomvz(nmz,nvac))
DO iVac = 1, nvac
DO i = 1, nmz
cdomvz(i,iVac) = CMPLX(den%vacz(i,iVac,3),den%vacz(i,iVac,4))
END DO
END DO
dimsInt(:3)=(/2,nmz,nvac/)
CALL h5dopen_f(groupID, 'cdomvz', cdomvzSetID, hdfError)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),den%cdomvz)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvz)
CALL h5dclose_f(cdomvzSetID, hdfError)
DEALLOCATE(cdomvz)
dimsInt(:4)=(/2,nmzxy,od_nq2-1,nvac/)
CALL h5dopen_f(groupID, 'cdomvxy', cdomvxySetID, hdfError)
......@@ -1778,13 +1788,20 @@ MODULE m_cdnpot_io_hdf
CALL h5dclose_f(cdomSetID, hdfError)
IF (l_film) THEN
ALLOCATE(cdomvz(nmz,nvac))
DO iVac = 1, nvac
DO i = 1, nmz
cdomvz(i,iVac) = CMPLX(den%vacz(i,iVac,3),den%vacz(i,iVac,4))
END DO
END DO
dims(:3)=(/2,nmz,nvac/)
dimsInt = dims
CALL h5screate_simple_f(3,dims(:3),cdomvzSpaceID,hdfError)
CALL h5dcreate_f(groupID, "cdomvz", H5T_NATIVE_DOUBLE, cdomvzSpaceID, cdomvzSetID, hdfError)
CALL h5sclose_f(cdomvzSpaceID,hdfError)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),den%cdomvz)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvz)
CALL h5dclose_f(cdomvzSetID, hdfError)
DEALLOCATE(cdomvz)
dims(:4)=(/2,nmzxy,od_nq2-1,nvac/)
dimsInt = dims
......@@ -1875,13 +1892,20 @@ MODULE m_cdnpot_io_hdf
CALL h5dclose_f(cdomSetID, hdfError)
IF (l_film) THEN
ALLOCATE(cdomvz(nmz,nvac))
DO iVac = 1, nvac
DO i = 1, nmz
cdomvz(i,iVac) = CMPLX(den%vacz(i,iVac,3),den%vacz(i,iVac,4))
END DO
END DO
dims(:3)=(/2,nmz,nvac/)
dimsInt = dims
CALL h5screate_simple_f(3,dims(:3),cdomvzSpaceID,hdfError)
CALL h5dcreate_f(groupID, "cdomvz", H5T_NATIVE_DOUBLE, cdomvzSpaceID, cdomvzSetID, hdfError)
CALL h5sclose_f(cdomvzSpaceID,hdfError)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),den%cdomvz)
CALL io_write_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvz)
CALL h5dclose_f(cdomvzSetID, hdfError)
DEALLOCATE(cdomvz)
dims(:4)=(/2,nmzxy,od_nq2-1,nvac/)
dimsInt = dims
......@@ -2433,13 +2457,14 @@ MODULE m_cdnpot_io_hdf
DEALLOCATE(cdomTemp)
IF (l_film) THEN
den%cdomvz = CMPLX(0.0,0.0)
den%vacz(:,:,3:4) = 0.0
ALLOCATE(cdomvzTemp(nmz,nvac))
dimsInt(:3)=(/2,nmz,nvac/)
CALL h5dopen_f(groupID, 'cdomvz', cdomvzSetID, hdfError)
CALL io_read_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvzTemp)
CALL h5dclose_f(cdomvzSetID, hdfError)
den%cdomvz(1:nmzOut,1:nvacOut) = cdomvzTemp(1:nmzOut,1:nvacOut)
den%vacz(1:nmzOut,1:nvacOut,3) = REAL(cdomvzTemp(1:nmzOut,1:nvacOut))
den%vacz(1:nmzOut,1:nvacOut,4) = AIMAG(cdomvzTemp(1:nmzOut,1:nvacOut))
DEALLOCATE(cdomvzTemp)
den%vacxy(:,:,:,3) = CMPLX(0.0,0.0)
......
......@@ -92,7 +92,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
!pk non-collinear (start)
REAL rhoint,momint,alphdiff(atoms%ntype)
INTEGER igq2_fft(0:stars%kq1_fft*stars%kq2_fft-1)
COMPLEX,ALLOCATABLE :: qa21(:)
COMPLEX,ALLOCATABLE :: qa21(:), cdomvz(:,:)
!pk non-collinear (end)
iter = inIter
......@@ -306,7 +306,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
!fix also the off-diagonal part of the density matrix
outDen%cdom(:stars%ng3) = fix*outDen%cdom(:stars%ng3)
IF (input%film) THEN
outDen%cdomvz(:,:) = fix*outDen%cdomvz(:,:)
outDen%vacz(:,:,3:4) = fix*outDen%vacz(:,:,3:4)
outDen%vacxy(:,:,:,3) = fix*outDen%vacxy(:,:,:,3)
END IF
END IF
......@@ -451,8 +451,15 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
IF (noco%l_noco) THEN
WRITE (20) (outDen%cdom(k),k=1,stars%ng3)
IF (input%film) THEN
WRITE (20) ((outDen%cdomvz(j,ivac),j=1,vacuum%nmz),ivac=1,vacuum%nvac)
ALLOCATE(cdomvz(vacuum%nmz,vacuum%nvac))
DO ivac = 1, vacuum%nvac
DO j = 1, vacuum%nmz
cdomvz(j,ivac) = CMPLX(outDen%vacz(j,ivac,3),outDen%vacz(j,ivac,4))
END DO
END DO
WRITE (20) ((cdomvz(j,ivac),j=1,vacuum%nmz),ivac=1,vacuum%nvac)
WRITE (20) (((outDen%vacxy(j,k-1,ivac,3),j=1,vacuum%nmzxy),k=2,oneD%odi%nq2) ,ivac=1,vacuum%nvac)
DEALLOCATE(cdomvz)
END IF
END IF
CLOSE(20)
......
......@@ -105,7 +105,7 @@ CONTAINS
DO k = 1,vacuum%nmz
mapvac2 = mapvac2 + 1
j = j + 1
sout(j) = REAL(den%cdomvz(k,iv))
sout(j) = den%vacz(k,iv,3)
END DO
DO k = 1,oneD%odi%nq2-1
DO i = 1,vacuum%nmzxy
......@@ -119,7 +119,7 @@ CONTAINS
DO k = 1,vacuum%nmz
mapvac2 = mapvac2 + 1
j = j + 1
sout(j) = AIMAG(den%cdomvz(k,iv))
sout(j) = den%vacz(k,iv,4)
END DO
DO k = 1,oneD%odi%nq2-1
DO i = 1,vacuum%nmzxy
......
......@@ -30,7 +30,6 @@ CONTAINS
den%vacz = 0.0
den%vacxy = CMPLX(0.0,0.0)
den%cdom = CMPLX(0.0,0.0)
den%cdomvz = 0.0
j=0
DO js = 1,input%jspins
......@@ -94,7 +93,7 @@ CONTAINS
DO iv = 1,vacuum%nvac
DO k = 1,vacuum%nmz
j = j + 1
den%cdomvz(k,iv) = CMPLX(s_in(j),0.0)
den%vacz(k,iv,3) = s_in(j)
END DO
DO k = 1,oneD%odi%nq2-1
DO i = 1,vacuum%nmzxy
......@@ -106,7 +105,7 @@ CONTAINS
DO iv = 1,vacuum%nvac
DO k = 1,vacuum%nmz
j = j + 1
den%cdomvz(k,iv) = den%cdomvz(k,iv) + CMPLX(0.0,s_in(j))
den%vacz(k,iv,4) = s_in(j)
END DO
DO k = 1,oneD%odi%nq2-1
DO i = 1,vacuum%nmzxy
......
......@@ -42,10 +42,8 @@ CONTAINS
IF((mpi%irank.NE.0).AND.l_nocoAlloc) THEN
IF (noco%l_noco) THEN
IF(.NOT.ALLOCATED(potden%cdom)) ALLOCATE (potden%cdom(stars%ng3))
IF(.NOT.ALLOCATED(potden%cdomvz)) ALLOCATE (potden%cdomvz(vacuum%nmzd,2))
ELSE
IF(.NOT.ALLOCATED(potden%cdom)) ALLOCATE (potden%cdom(1))
IF(.NOT.ALLOCATED(potden%cdomvz)) ALLOCATE (potden%cdomvz(1,1))
END IF
END IF
IF((mpi%irank.NE.0).AND.l_denMatAlloc) THEN
......@@ -71,9 +69,6 @@ CONTAINS
IF (l_nocoAlloc) THEN
n = SIZE(potden%cdom,1)
CALL MPI_BCAST(potden%cdom,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
n = SIZE(potden%cdomvz,1) * SIZE(potden%cdomvz,2)
CALL MPI_BCAST(potden%cdomvz,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
END IF
IF (l_denMatAlloc) THEN
......
......@@ -366,13 +366,13 @@ CONTAINS
ENDIF
DEALLOCATE (c_b)
!
n = vacuum%nmzd*2
ALLOCATE(c_b(n))
CALL MPI_REDUCE(den%cdomvz,c_b,n,CPP_MPI_COMPLEX,MPI_SUM,0, MPI_COMM_WORLD,ierr)
n = vacuum%nmzd*2*2
ALLOCATE(r_b(n))
CALL MPI_REDUCE(den%vacz(:,:,3:4),r_b,n,CPP_MPI_REAL,MPI_SUM,0, MPI_COMM_WORLD,ierr)
IF (mpi%irank.EQ.0) THEN
CALL CPP_BLAS_ccopy(n, c_b, 1, den%cdomvz, 1)
CALL CPP_BLAS_ccopy(n, r_b, 1, den%vacz(:,:,3:4), 1)
ENDIF
DEALLOCATE (c_b)
DEALLOCATE (r_b)
ENDIF ! input%film
......
......@@ -311,7 +311,8 @@ SUBROUTINE pldngen(sym,stars,atoms,sphhar,vacuum,&
den%vacxy(1:,1:,1:,1:1) = rhtxy(1:,1:,1:,1:1)
IF(noco%l_noco) THEN
den%cdom = cdom
den%cdomvz = cdomvz
den%vacz(:,:,3) = REAL(cdomvz(:,:))
den%vacz(:,:,4) = AIMAG(cdomvz(:,:))
den%vacxy(:,:,:,3) = cdomvxy
END IF
......
......@@ -15,7 +15,6 @@ MODULE m_types_potden
COMPLEX,ALLOCATABLE :: vacxy(:,:,:,:)
! For density only (noco case)
COMPLEX, ALLOCATABLE :: cdom(:)
COMPLEX, ALLOCATABLE :: cdomvz(:,:)
!For angles of density/potential in noco case
REAL,ALLOCATABLE :: theta_pw(:)
REAL,ALLOCATABLE :: phi_pw(:)
......@@ -77,7 +76,6 @@ CONTAINS
IF(ALLOCATED(pd%vacz)) DEALLOCATE (pd%vacz)
IF(ALLOCATED(pd%vacxy)) DEALLOCATE (pd%vacxy)
IF(ALLOCATED(pd%cdom)) DEALLOCATE (pd%cdom)
IF(ALLOCATED(pd%cdomvz)) DEALLOCATE (pd%cdomvz)
IF(ALLOCATED(pd%mmpMat)) DEALLOCATE (pd%mmpMat)
ALLOCATE (pd%pw(ng3,MERGE(3,jspins,nocoExtraDim)),stat=err(1))
ALLOCATE (pd%mt(jmtd,0:nlhd,ntype,jspins),stat=err(2))
......@@ -85,10 +83,8 @@ CONTAINS
ALLOCATE (pd%vacxy(nmzxyd,n2d-1,2,MERGE(3,jspins,nocoExtraDim)),stat=err(4))
IF (l_noco) THEN
ALLOCATE (pd%cdom(ng3))
ALLOCATE (pd%cdomvz(nmzd,2))
ELSE
ALLOCATE (pd%cdom(1))
ALLOCATE (pd%cdomvz(1,1))
END IF
ALLOCATE (pd%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,n_u),jspins))
......@@ -99,7 +95,6 @@ CONTAINS
pd%vacz=0.0
pd%vacxy=CMPLX(0.0,0.0)
pd%cdom = CMPLX(0.0,0.0)
pd%cdomvz = CMPLX(0.0,0.0)
pd%mmpMat = CMPLX(0.0,0.0)
END SUBROUTINE init_potden_simple
......@@ -114,7 +109,6 @@ CONTAINS
pd%vacz=0.0
pd%vacxy=CMPLX(0.0,0.0)
pd%cdom = CMPLX(0.0,0.0)
pd%cdomvz = CMPLX(0.0,0.0)
pd%mmpMat = CMPLX(0.0,0.0)
END SUBROUTINE resetPotDen
END MODULE m_types_potden
......@@ -194,8 +194,8 @@ CONTAINS
DO ivac = 1,vacuum%nvac
DO imz = 1,vacuum%nmzxyd
rziw = 0.0
vz_r = REAL(den%cdomvz(imz,ivac))
vz_i = AIMAG(den%cdomvz(imz,ivac))
vz_r = den%vacz(imz,ivac,3)
vz_i = den%vacz(imz,ivac,4)
IF (oneD%odi%d1) THEN
CALL judft_error("oneD not implemented",calledby="rhodirgen")
!CALL fft2d(oneD%k3,odi%M,odi%n2d,&
......@@ -262,8 +262,8 @@ CONTAINS
DO imz = vacuum%nmzxyd+1,vacuum%nmzd
rho_11 = den%vacz(imz,ivac,1)
rho_22 = den%vacz(imz,ivac,2)
rho_21r = REAL(den%cdomvz(imz,ivac))
rho_21i = AIMAG(den%cdomvz(imz,ivac))
rho_21r = den%vacz(imz,ivac,3)
rho_21i = den%vacz(imz,ivac,4)
mx = 2*rho_21r
my = -2*rho_21i
mz = (rho_11-rho_22)
......
......@@ -85,7 +85,7 @@ CONTAINS
CALL fft2d(&
& stars,&
& mx,my, &
& REAL(den%cdomvz(ip,ivac)),AIMAG(den%cdomvz(ip,ivac)),&
& den%vacz(ip,ivac,3),den%vacz(ip,ivac,4),&
& den%vacxy(ip,1,ivac,3),&
& vacuum%nmzxyd,1)
DO i=0,9*stars%mx1*stars%mx2-1
......@@ -162,8 +162,8 @@ CONTAINS
IF (noco%l_noco) THEN
mx(0)= REAL(den%cdomvz(vacuum%nmzxy+k,ivac))
my(0)= AIMAG(den%cdomvz(vacuum%nmzxy+k,ivac))
mx(0)= den%vacz(vacuum%nmzxy+k,ivac,3)
my(0)= den%vacz(vacuum%nmzxy+k,ivac,4)
chdens= (af2(k-1,1)+af2(k-1,2))/2.
magmom= mx(0)**2 + my(0)**2 +&
& ((af2(k-1,1)-af2(k-1,2))/2.)**2
......
......@@ -139,7 +139,7 @@ CONTAINS
CALL fft2d(&
& stars,&
& mx,my,&
& REAL(den%cdomvz(ip,ivac)),AIMAG(den%cdomvz(ip,ivac)),&
& den%vacz(ip,ivac,3),den%vacz(ip,ivac,4),&
& den%vacxy(ip,1,ivac,3),&
& vacuum%nmzxy,+1)
......@@ -554,8 +554,8 @@ CONTAINS
ELSE
af2(0,1) = den%vacz(ip,ivac,1)
af2(0,2) = den%vacz(ip,ivac,2)
mx(0)= REAL(den%cdomvz(ip,ivac))
my(0)= AIMAG(den%cdomvz(ip,ivac))
mx(0) = den%vacz(ip,ivac,3)
my(0) = den%vacz(ip,ivac,4)
chdens= (af2(0,1)+af2(0,2))/2.
magmom(0,1)= mx(0)**2 + my(0)**2 +&
& ((af2(0,1)-af2(0,2))/2.)**2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment