Commit ff3cfdfc authored by Robin Hilgers's avatar Robin Hilgers

Fully Fully seems to be fully functional with hdf.

parent 86c569ea
......@@ -132,7 +132,7 @@ MODULE m_cdn_io
END SUBROUTINE printDensityFileInfo
SUBROUTINE readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
SUBROUTINE readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
relCdnIndex,fermiEnergy,l_qfix,den,inFilename)
TYPE(t_stars),INTENT(IN) :: stars
......@@ -142,6 +142,7 @@ MODULE m_cdn_io
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_potden),INTENT(INOUT) :: den
......@@ -230,12 +231,12 @@ MODULE m_cdn_io
currentStepfunctionIndex,readDensityIndex,lastDensityIndex,inFilename)
CALL readDensityHDF(fileID, input, stars, sphhar, atoms, vacuum, oneD, archiveName, densityType,&
fermiEnergy,l_qfix,l_DimChange,den)
fermiEnergy,l_qfix,l_DimChange,den,noco%l_mtNocoPot)
CALL closeCDNPOT_HDF(fileID)
IF(l_DimChange) THEN
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
1,-1.0,fermiEnergy,l_qfix,den)
END IF
ELSE
......@@ -363,9 +364,10 @@ MODULE m_cdn_io
END SUBROUTINE readDensity
SUBROUTINE writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
SUBROUTINE writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
relCdnIndex,distance,fermiEnergy,l_qfix,den,inFilename)
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_atoms),INTENT(IN) :: atoms
......@@ -384,6 +386,7 @@ MODULE m_cdn_io
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: inFilename
TYPE(t_stars) :: starsTemp
TYPE(t_vacuum) :: vacuumTemp
TYPE(t_atoms) :: atomsTemp
......@@ -497,7 +500,7 @@ MODULE m_cdn_io
CALL writeDensityHDF(input, fileID, archiveName, densityType, previousDensityIndex,&
currentStarsIndex, currentLatharmsIndex, currentStructureIndex,&
currentStepfunctionIndex,date,time,distance,fermiEnergy,l_qfix,&
den%iter+relCdnIndex,den)
den%iter+relCdnIndex,den,noco%l_mtNocoPot)
IF(l_storeIndices) THEN
CALL writeCDNHeaderData(fileID,currentStarsIndex,currentLatharmsIndex,currentStructureIndex,&
......@@ -984,7 +987,7 @@ MODULE m_cdn_io
archiveType = MERGE(CDN_ARCHIVE_TYPE_NOCO_const,CDN_ARCHIVE_TYPE_CDN1_const,noco%l_noco)
!read the current density
CALL den%init(stars,atoms,sphhar,vacuum,noco,input%jspins,POTDEN_TYPE_DEN)
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,fermiEnergy,l_qfix,den)
ENDIF
!Now fix the density
......@@ -1002,7 +1005,7 @@ MODULE m_cdn_io
CALL judft_error("Wrong choice of qfix in input")
END SELECT
!Now write the density to file
IF (mpi%irank==0) CALL writedensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
IF (mpi%irank==0) CALL writedensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,fermiEnergy,l_qfix,den)
#endif
......
......@@ -1539,7 +1539,7 @@ MODULE m_cdnpot_io_hdf
SUBROUTINE writeDensityHDF(input, fileID, archiveName, densityType, previousDensityIndex,&
starsIndex, latharmsIndex, structureIndex, stepfunctionIndex,&
date,time,distance,fermiEnergy,l_qfix,iter,den)
date,time,distance,fermiEnergy,l_qfix,iter,den,l_mtNoco)
TYPE(t_input), INTENT(IN) :: input
TYPE(t_potden), INTENT(IN) :: den
......@@ -1552,6 +1552,7 @@ MODULE m_cdnpot_io_hdf
INTEGER, INTENT (IN) :: date, time, iter
REAL, INTENT (IN) :: fermiEnergy, distance
LOGICAL, INTENT (IN) :: l_qfix
LOGICAL, INTENT (IN) :: l_mtNoco
INTEGER :: i, iVac
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
......@@ -1751,15 +1752,25 @@ MODULE m_cdnpot_io_hdf
CALL io_write_attreal0(groupID,'fermiEnergy',fermiEnergy)
CALL io_write_attlog0(groupID,'l_qfix',l_qfix)
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:input%jspins))
CALL h5dclose_f(frSetID, hdfError)
IF (.NOT.l_mtNoco) THEN
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:input%jspins))
CALL h5dclose_f(frSetID, hdfError)
ELSE
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins+2/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:4))
CALL h5dclose_f(frSetID, hdfError)
END IF
dims(:3)=(/2,ng3,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(3,dims(:3),fpwSpaceID,hdfError)
......@@ -1856,13 +1867,23 @@ MODULE m_cdnpot_io_hdf
CALL io_write_attreal0(groupID,'fermiEnergy',fermiEnergy)
CALL io_write_attlog0(groupID,'l_qfix',l_qfix)
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:input%jspins))
CALL h5dclose_f(frSetID, hdfError)
IF(.NOT.l_mtNoco) THEN
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:input%jspins))
CALL h5dclose_f(frSetID, hdfError)
ELSE
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins+2/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),den%mt(:,:,:,:4))
CALL h5dclose_f(frSetID, hdfError)
END IF
dims(:3)=(/2,ng3,input%jspins/)
dimsInt = dims
......@@ -1946,7 +1967,7 @@ MODULE m_cdnpot_io_hdf
SUBROUTINE writePotentialHDF(input, fileID, archiveName, potentialType,&
starsIndex, latharmsIndex, structureIndex,stepfunctionIndex,&
iter,pot,fpw)
iter,pot,fpw,l_mtNoco)
TYPE(t_input), INTENT(IN) :: input
TYPE(t_potden), INTENT(IN) :: pot
......@@ -1959,7 +1980,7 @@ MODULE m_cdnpot_io_hdf
INTEGER, INTENT (IN) :: iter
COMPLEX, INTENT (IN) :: fpw(:,:)
LOGICAL, INTENT (IN) :: l_mtNoco
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
INTEGER :: nmz, nvac, od_nq2, nmzxy
INTEGER :: hdfError
......@@ -2092,6 +2113,8 @@ MODULE m_cdnpot_io_hdf
ELSE
CALL h5gcreate_f(fileID, TRIM(ADJUSTL(groupName)), groupID, hdfError)
IF (.NOT.l_mtNoco)THEN
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
......@@ -2099,6 +2122,15 @@ MODULE m_cdnpot_io_hdf
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),pot%mt)
CALL h5dclose_f(frSetID, hdfError)
ELSE
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins+2/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),pot%mt)
CALL h5dclose_f(frSetID, hdfError)
END IF
dims(:3)=(/2,ng3,input%jspins/)
dimsInt = dims
......@@ -2141,14 +2173,25 @@ MODULE m_cdnpot_io_hdf
CALL io_write_attint0(archiveID,'iter',iter)
CALL h5gcreate_f(fileID, TRIM(ADJUSTL(groupName)), groupID, hdfError)
IF (.NOT.l_mtNoco)THEN
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),pot%mt)
CALL h5dclose_f(frSetID, hdfError)
ELSE
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins+2/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),pot%mt)
CALL h5dclose_f(frSetID, hdfError)
END IF
dims(:4)=(/jmtd,nlhd+1,ntype,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(4,dims(:4),frSpaceID,hdfError)
CALL h5dcreate_f(groupID, "fr", H5T_NATIVE_DOUBLE, frSpaceID, frSetID, hdfError)
CALL h5sclose_f(frSpaceID,hdfError)
CALL io_write_real4(frSetID,(/1,1,1,1/),dimsInt(:4),pot%mt)
CALL h5dclose_f(frSetID, hdfError)
dims(:3)=(/2,ng3,input%jspins/)
dimsInt = dims
......@@ -2184,7 +2227,7 @@ MODULE m_cdnpot_io_hdf
END SUBROUTINE writePotentialHDF
SUBROUTINE readDensityHDF(fileID, input, stars, latharms, atoms, vacuum, oneD,&
archiveName, densityType,fermiEnergy,l_qfix,l_DimChange,den)
archiveName, densityType,fermiEnergy,l_qfix,l_DimChange,den,l_mtNoco)
TYPE(t_input),INTENT(IN) :: input
TYPE(t_stars),INTENT(IN) :: stars
......@@ -2200,7 +2243,7 @@ MODULE m_cdnpot_io_hdf
REAL, INTENT (OUT) :: fermiEnergy
LOGICAL, INTENT (OUT) :: l_qfix, l_DimChange
LOGICAL, INTENT (IN) :: l_mtNoco
INTEGER :: starsIndex, latharmsIndex, structureIndex, stepfunctionIndex
INTEGER :: previousDensityIndex, jspins
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
......@@ -2413,14 +2456,25 @@ MODULE m_cdnpot_io_hdf
END IF
den%mt = 0.0
ALLOCATE(frTemp(jmtd,1:nlhd+1,ntype,jspins))
dimsInt(:4)=(/jmtd,nlhd+1,ntype,jspins/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),frTemp)
CALL h5dclose_f(frSetID, hdfError)
den%mt(1:jmtdOut,0:nlhdOut,1:ntypeOut,1:jspinsOut) =&
frTemp(1:jmtdOut,1:nlhdOut+1,1:ntypeOut,1:jspinsOut)
DEALLOCATE(frTemp)
IF (.NOT.l_mtNoco) THEN
ALLOCATE(frTemp(jmtd,1:nlhd+1,ntype,jspins))
dimsInt(:4)=(/jmtd,nlhd+1,ntype,jspins/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),frTemp)
CALL h5dclose_f(frSetID, hdfError)
den%mt(1:jmtdOut,0:nlhdOut,1:ntypeOut,1:jspinsOut) =&
frTemp(1:jmtdOut,1:nlhdOut+1,1:ntypeOut,1:jspinsOut)
DEALLOCATE(frTemp)
ELSE
ALLOCATE(frTemp(jmtd,1:nlhd+1,ntype,4))
dimsInt(:4)=(/jmtd,nlhd+1,ntype,4/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),frTemp)
CALL h5dclose_f(frSetID, hdfError)
den%mt(1:jmtdOut,0:nlhdOut,1:ntypeOut,1:4) =&
frTemp(1:jmtdOut,1:nlhdOut+1,1:ntypeOut,1:4)
DEALLOCATE(frTemp)
END IF
den%pw = CMPLX(0.0,0.0)
ALLOCATE(fpwTemp(ng3,jspins))
......@@ -2517,11 +2571,12 @@ MODULE m_cdnpot_io_hdf
END SUBROUTINE readDensityHDF
SUBROUTINE readPotentialHDF(fileID, archiveName, potentialType,&
iter,fr,fpw,fz,fzxy)
iter,fr,fpw,fz,fzxy,l_mtnoco)
INTEGER(HID_T), INTENT(IN) :: fileID
INTEGER, INTENT(IN) :: potentialType
CHARACTER(LEN=*), INTENT(IN) :: archiveName
LOGICAL , INTENT(IN) :: l_mtNoco
INTEGER, INTENT (OUT) :: iter
......@@ -2611,10 +2666,18 @@ MODULE m_cdnpot_io_hdf
CALL io_read_attint0(groupBID,'ng2',ng2)
CALL h5gclose_f(groupBID, hdfError)
IF (.NOT.l_mtNoco) THEN
dimsInt(:4)=(/jmtd,nlhd+1,ntype,jspins/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),fr)
CALL h5dclose_f(frSetID, hdfError)
ELSE
dimsInt(:4)=(/jmtd,nlhd+1,ntype,jspins+2/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),fr)
CALL h5dclose_f(frSetID, hdfError)
END IF
dimsInt(:3)=(/2,ng3,jspins/)
CALL h5dopen_f(groupID, 'fpw', fpwSetID, hdfError)
......
......@@ -40,10 +40,11 @@ MODULE m_pot_io
CONTAINS
SUBROUTINE readPotential(stars,vacuum,atoms,sphhar,input,sym,archiveType,&
SUBROUTINE readPotential(stars,noco,vacuum,atoms,sphhar,input,sym,archiveType,&
iter,fr,fpw,fz,fzxy)
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sphhar),INTENT(IN) :: sphhar
......@@ -103,7 +104,7 @@ MODULE m_pot_io
currentStructureIndex,currentStepfunctionIndex)
CALL readPotentialHDF(fileID, archiveName, potentialType,&
iter,fr,fpw,fz,fzxy)
iter,fr,fpw,fz,fzxy,noco%l_mtNocoPot)
CALL closeCDNPOT_HDF(fileID)
ELSE
......@@ -159,7 +160,7 @@ MODULE m_pot_io
END SUBROUTINE readPotential
SUBROUTINE writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
SUBROUTINE writePotential(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
iter,pot,fpw)
TYPE(t_stars),INTENT(IN) :: stars
......@@ -169,6 +170,7 @@ MODULE m_pot_io
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_potden), INTENT(INOUT) :: pot
......@@ -225,7 +227,7 @@ MODULE m_pot_io
END IF
CALL writePotentialHDF(input, fileID, archiveName, potentialType,&
currentStarsIndex, currentLatharmsIndex, currentStructureIndex,&
currentStepfunctionIndex,iter,pot,fpw)
currentStepfunctionIndex,iter,pot,fpw,noco%l_mtNocoPot)
IF(l_storeIndices) THEN
CALL writePOTHeaderData(fileID,currentStarsIndex,currentLatharmsIndex,&
......
......@@ -136,9 +136,9 @@ SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,DI
!-------------------------write potential--------------------
IF(input%gw==1) THEN
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_TOT_const,vTot%iter,vTot,vTot%pw_w)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_COUL_const,vCoul%iter,vCoul,vCoul%pw_w)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_X_const,vx%iter,vx,vx%pw_w)
CALL writePotential(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_TOT_const,vTot%iter,vTot,vTot%pw_w)
CALL writePotential(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_COUL_const,vCoul%iter,vCoul,vCoul%pw_w)
CALL writePotential(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_X_const,vx%iter,vx,vx%pw_w)
END IF
......
......@@ -158,7 +158,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
IF (sliceplot%slice) THEN
IF (mpi%irank == 0) THEN
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
0,-1.0,0.0,.FALSE.,outDen,'cdn_slice')
END IF
CALL juDFT_end("slice OK",mpi%irank)
......
......@@ -147,12 +147,12 @@ CONTAINS
archiveType = CDN_ARCHIVE_TYPE_CDN1_const
IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const
IF(mpi%irank.EQ.0) THEN
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,results%ef,l_qfix,inDen)
CALL timestart("Qfix")
CALL qfix(mpi,stars,atoms,sym,vacuum, sphhar,input,cell,oneD,inDen,noco%l_noco,.FALSE.,.false.,fix)
CALL timestop("Qfix")
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,results%ef,.FALSE.,inDen)
END IF
......
......@@ -168,13 +168,13 @@ contains
!write out mixed density
IF (mpi%irank==0) CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
IF (mpi%irank==0) CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
1,results%last_distance,results%ef,.TRUE.,inDen)
#ifdef CPP_HDF
IF (mpi%irank==0.and.judft_was_argument("-last_extra")) THEN
CALL system("rm cdn_last.hdf")
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
1,results%last_distance,results%ef,.TRUE.,inDen,'cdn_last')
END IF
......
......@@ -132,7 +132,7 @@ CONTAINS
!archiveType = CDN_ARCHIVE_TYPE_CDN1_const
!IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_CDN_const
!CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
!CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
! CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,den)
......
......@@ -47,7 +47,7 @@ contains
archiveType = CDN_ARCHIVE_TYPE_CDN1_const
END IF
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,den)
IF ( typmag < atoms%ntype ) THEN
......
......@@ -58,7 +58,7 @@
input%jspins=1
CALL readCoreDensity(input,atoms,dimension,rhoc,tec,qintc)
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,den)
input%jspins=2
......@@ -106,7 +106,7 @@
ENDDO
ENDIF
! ----> write the spin-polarized density
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CDN_INPUT_DEN_const,0,-1.0,0.0,.FALSE.,den)
!
! -----> This part is only used for testing th e magnetic moment in
......
......@@ -69,7 +69,7 @@ SUBROUTINE flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell)
END IF
! read the charge density
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,den)
! flip cdn for each atom with rotation angles given
......@@ -172,7 +172,7 @@ END DO
END IF
! write the spin-polarized density
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,0.0,.FALSE.,den)
! read enpara and flip lines
......
......@@ -208,7 +208,7 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
! Write superposed density onto density file
den%iter = 0
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,CDN_INPUT_DEN_const,&
1,-1.0,0.0,.TRUE.,den)
! Check continuity
......
......@@ -307,7 +307,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
filename = ''
WRITE(filename,'(a,i1.1,a,i4.4,a,i5.5)') 'cdn-', jsp, '-', ikpt, '-', iBand
IF (mpi%irank.EQ.0) THEN
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
CALL writeDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
0,-1.0,0.0,.FALSE.,singleStateDen,TRIM(ADJUSTL(filename)))
END IF
#ifdef CPP_MPI
......@@ -416,7 +416,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
filename = ''
WRITE(filename,'(a,i1.1,a,i4.4,a,i5.5)') 'cdn-', jsp, '-', ikpt, '-', iBand
IF (mpi%irank.EQ.0) THEN
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,&
CALL readDensity(stars,noco,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,singleStateDen,TRIM(ADJUSTL(filename)))
CALL singleStateDen%sum_both_spin()!workden)
END IF
......
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