...
 
Commits (1101)
docs/mkdocs/site
init/compileinfo.h init/compileinfo.h
io/xml/inputSchema.h io/xml/inputSchema.h
Testing/*
*~ *~
\#* \#*
build build
build.* build.*
*.o *.o
*.mod
*.x *.x
*.swp *.swp
tags tags
.DS_Store
.vscode
stages: stages:
- build - build
- test - test
- coverage - html
- deploy - deploy
- build-pgi
- test-pgi
- build-intel
- test-intel
build-gfortran-hdf5: build-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: build stage: build
cache: artifacts:
paths: paths:
- build - build
expire_in: 1h
script: script:
- cd /builds/fleur/fleur; ./configure.sh GITLAB; cd build; make - cd /builds/fleur/fleur; ./configure.sh GITLAB; cd build; make -j 4
# only: # only:
# - schedules # - schedules
# - triggers # - triggers
...@@ -25,9 +22,6 @@ build-gfortran-hdf5: ...@@ -25,9 +22,6 @@ build-gfortran-hdf5:
test-gfortran-hdf5: test-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: test stage: test
cache:
paths:
- build
script: script:
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";export OMP_NUM_THREADS=4;cd /builds/fleur/fleur/build;ctest - ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";export OMP_NUM_THREADS=4;cd /builds/fleur/fleur/build;ctest
artifacts: artifacts:
...@@ -39,68 +33,103 @@ test-gfortran-hdf5: ...@@ -39,68 +33,103 @@ test-gfortran-hdf5:
# - schedules # - schedules
# - triggers # - triggers
# - web # - web
pages: pages:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: deploy stage: deploy
cache: script:
paths: - echo "HTML should be ready from cache..."
- build - mv /builds/fleur/fleur/docs/Docu_main.html /builds/fleur/fleur/public/index.html
- public environment:
name: HTML-Pages
url: https://fleur.iffgit.fz-juelich.de/fleur
artifacts:
paths:
- public
only:
- web
doxygen:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: html
script: script:
- cd /builds/fleur/fleur/build ; make doc - cd /builds/fleur/fleur/build ; make doc
- mv docs/html/ ../public/ - mkdir ../public
- mv /builds/fleur/fleur/docs/Docu_main.html ../public/index.html - mv docs/html/ ../public/doxygen
environment:
name: Doxygen
url: https://fleur.iffgit.fz-juelich.de/fleur
artifacts: artifacts:
paths: paths:
- public - public
- build/fleur - build/fleur
- build/fleur_MPI - build/fleur_MPI
- build/inpgen - build/inpgen
only:
- web
build-pgi:
image: iffregistry.fz-juelich.de/fleur/fleur:pgi
stage: build
artifacts:
paths:
- build.pgi
expire_in: 1h
script:
- cd /builds/fleur/fleur; ./configure.sh -l pgi ; cd build.pgi; make
allow_failure: true
only: only:
- schedules - schedules
- triggers - triggers
- web - web
#build-pgi:
# image: iffregistry.fz-juelich.de/fleur/fleur:pgi
# stage: build-pgi
# cache:
# paths:
# - build.debug
# script:
# - cd /builds/fleur/fleur; ./configure.sh -d AUTO ; cd build.debug; make
# only:
# - schedules
# - triggers
# - web
#test-pgi: test-pgi:
# image: iffregistry.fz-juelich.de/fleur/fleur:pgi image: iffregistry.fz-juelich.de/fleur/fleur:pgi
# stage: test-pgi stage: test
# cache: dependencies:
# paths: - build-pgi
# - build.debug script:
# script: - cd /builds/fleur/fleur/build.pgi;ctest
# - cd /builds/fleur/fleur/build.debug;ctest allow_failure: true
# only: only:
# - schedules - schedules
# - web - web
# - triggers - triggers
build-intel-static:
image: iffregistry.fz-juelich.de/fleur/fleur:intel-static
stage: build
artifacts:
paths:
- build.intel-static
expire_in: 1h
script:
- set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited
- cd /builds/fleur/fleur; ./configure.sh -l intel-static INTEL_DOCKER_STATIC ; cd build.intel-static; make -j 4
artifacts:
when: on_success
paths:
- build.intel-static/fleur
- build.intel-static/fleur_MPI
- build.intel-static/inpgen
allow_failure: true
only:
- schedules
- triggers
- web
build-intel: build-intel:
image: iffregistry.fz-juelich.de/docker-images/centos7-intel-compilers/extended image: iffregistry.fz-juelich.de/fleur/fleur:intel-static
stage: build-intel stage: build
cache: artifacts:
paths: paths:
- build.intel - build.intel.debug
expire_in: 1h
script: script:
- set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited - set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited
- cd /builds/fleur/fleur; FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -t -l intel INTEL_MPI ; cd build.intel; make - cd /builds/fleur/fleur; CC=gcc FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -t -d -l intel INTEL_MPI ; cd build.intel.debug; make -j 4
allow_failure: true
only: only:
- schedules - schedules
- triggers - triggers
...@@ -108,19 +137,19 @@ build-intel: ...@@ -108,19 +137,19 @@ build-intel:
test-intel: test-intel:
image: iffregistry.fz-juelich.de/docker-images/centos7-intel-compilers/extended image: iffregistry.fz-juelich.de/fleur/fleur:intel-static
stage: test-intel stage: test
cache: dependencies:
paths: - build-intel
- build.intel
script: script:
- set +e && source compilervars.sh intel64 && set -e; ulimit -s unlimited - set +e && source compilervars.sh intel64 && set -e; ulimit -s unlimited
- cd /builds/fleur/fleur/build.intel;ctest - cd /builds/fleur/fleur/build.intel.debug;ctest
allow_failure: true
artifacts: artifacts:
when: on_failure when: on_failure
paths: paths:
- build/Testing/failed - build.intel.debug/Testing/failed
- build/Testing/test.oldlogs - build.intel.debug/Testing/test.oldlogs
only: only:
- schedules - schedules
- web - web
...@@ -128,18 +157,16 @@ test-intel: ...@@ -128,18 +157,16 @@ test-intel:
gfortran-coverage: gfortran-coverage:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: coverage stage: html
cache:
paths:
- build
script: script:
- cd /builds/fleur/fleur; ./configure.sh -l coverage -flags --coverage GITLAB; cd build.coverage; make - cd /builds/fleur/fleur; ./configure.sh -l coverage -flags --coverage GITLAB; cd build.coverage; make -j 4
- lcov --capture --initial -d CMakeFiles -o baseline.info - lcov --capture --initial -d CMakeFiles -o baseline.info
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";ctest - ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";ctest
- lcov --capture -d CMakeFiles -o after.info - lcov --capture -d CMakeFiles -o after.info
- lcov --add-tracefile baseline.info --add-tracefile after.info -o combined.info - lcov --add-tracefile baseline.info --add-tracefile after.info -o combined.info
- genhtml combined.info --output-directory html_out - genhtml combined.info --output-directory html_out
- mkdir ../public;mv html_out ../public/coverage_html - mkdir ../public;mv html_out ../public/coverage_html
allow_failure: true
artifacts: artifacts:
paths: paths:
- public - public
...@@ -148,4 +175,4 @@ gfortran-coverage: ...@@ -148,4 +175,4 @@ gfortran-coverage:
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only: only:
- web - web
- schedules
\ No newline at end of file
# Summary
<!-- Summarize the bug encountered concisely. -->
## Input and output file:
<!--Please provide at least the inp.xml and the out files produced. -->
## Compute environment
<!-- Please shortly describe the machine&compiler you use. -->
## This is BUG because:
<!-- Please indicate the correct behaviour you expect. -->
## The problem only occurs if:
<!-- Please indicate if you checked if the bug only occurs if, e.g. you run on a specific machine,
in MPI mode, with several OpenMP task, you use LOs or SOC or ... -->
## Console output and other logs
<!-- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise. -->
## Ideas for fixes
<!-- If you can, give hints that that might help fixing the problem. -->
<!-- Please choose an appropriate label like: ~Bug ~"Critial Bug" . -->
/label ~Bug
# Summary
<!-- Summarize the problem encountered concisely. -->
## Machine
<!-- Please describe the machine you use. -->
## Compiler
<!-- Please describe the compiler you use. -->
## Libraries
<!-- Please describe any specific libraries you use. -->
## Version you try to compile
<!-- Best is to use 'git describe' on the source code and paste the output here. -->
## Command line
<!-- Please give the command line of the configure script you use and of any corresponding environment variables you set -->
## Console output and other logs
<!-- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise. -->
## Further comments
\label ~"Compilation related"
\ No newline at end of file
# Summary
<!-- Summarize the feature concisely. -->
## Why is this feature needed?
<!-- Please describe the usecase. -->
## Implementation ideas
<!-- If yoy have ideas how the feature should be realized share them. -->
\label ~"Feature Request"
\ No newline at end of file
[submodule "external/hdf5-git"]
path = external/hdf5-git
url = https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git
[submodule "external/libxc-git"]
path = external/libxc-git
url = https://gitlab.com/libxc/libxc.git
[submodule "docs/katacoda-tutorials"]
path = docs/katacoda-tutorials
url = gitlab@iffgit.fz-juelich.de:fleur/katacoda-tutorials.git
[submodule "external/wannier90"]
path = external/wannier90
url = https://github.com/wannier-developers/wannier90.git
...@@ -10,12 +10,17 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${tmp}") ...@@ -10,12 +10,17 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${tmp}")
include("cmake/CompilerConfig.txt") include("cmake/CompilerConfig.txt")
include("cmake/ReportConfig.txt")
include("cmake/Generate_Schema.cmake") include("cmake/Generate_Schema.cmake")
include("cmake/Files_and_Targets.txt") include("cmake/Files_and_Targets.txt")
include("cmake/filespecific.cmake") include("cmake/filespecific.cmake")
include("cmake/ReportConfig.txt")
#install(TARGETS fleur inpgen DESTINATION bin) #install(TARGETS fleur inpgen DESTINATION bin)
install(PROGRAMS ${CMAKE_BINARY_DIR}/fleur install(PROGRAMS ${CMAKE_BINARY_DIR}/fleur
CONFIGURATIONS Debug CONFIGURATIONS Debug
......
This diff is collapsed.
...@@ -88,14 +88,14 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -88,14 +88,14 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
#endif #endif
! Local Scalars ! Local Scalars
INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp INTEGER :: ikpt,ikpt_i,jsp_start,jsp_end,ispin,jsp
INTEGER :: iErr,nbands,noccbd,iType INTEGER :: iErr,nbands,noccbd,iType
INTEGER :: skip_t,skip_tt,nStart,nEnd,nbasfcn INTEGER :: skip_t,skip_tt,nbasfcn
LOGICAL :: l_orbcomprot, l_real, l_dosNdir, l_corespec LOGICAL :: l_orbcomprot, l_real, l_dosNdir, l_corespec
! Local Arrays ! Local Arrays
REAL, ALLOCATABLE :: we(:) REAL,ALLOCATABLE :: we(:),eig(:)
REAL, ALLOCATABLE :: eig(:) INTEGER,ALLOCATABLE :: ev_list(:)
REAL, ALLOCATABLE :: f(:,:,:,:),g(:,:,:,:),flo(:,:,:,:) ! radial functions REAL, ALLOCATABLE :: f(:,:,:,:),g(:,:,:,:),flo(:,:,:,:) ! radial functions
TYPE (t_lapw) :: lapw TYPE (t_lapw) :: lapw
...@@ -134,7 +134,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -134,7 +134,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
CALL denCoeffs%init(atoms,sphhar,jsp_start,jsp_end) CALL denCoeffs%init(atoms,sphhar,jsp_start,jsp_end)
! The last entry in denCoeffsOffdiag%init is l_fmpl. It is meant as a switch to a plot of the full magnet. ! The last entry in denCoeffsOffdiag%init is l_fmpl. It is meant as a switch to a plot of the full magnet.
! density without the atomic sphere approximation for the magnet. density. It is not completely implemented (lo's missing). ! density without the atomic sphere approximation for the magnet. density. It is not completely implemented (lo's missing).
CALL denCoeffsOffdiag%init(atoms,noco,sphhar,.FALSE.) CALL denCoeffsOffdiag%init(atoms,noco,sphhar,noco%l_mtnocopot)
CALL force%init1(input,atoms) CALL force%init1(input,atoms)
CALL orb%init(atoms,noco,jsp_start,jsp_end) CALL orb%init(atoms,noco,jsp_start,jsp_end)
...@@ -154,7 +154,6 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -154,7 +154,6 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (mpi%irank==0) THEN IF (mpi%irank==0) THEN
WRITE (6,FMT=8000) jspin WRITE (6,FMT=8000) jspin
WRITE (16,FMT=8000) jspin
CALL openXMLElementPoly('mtCharges',(/'spin'/),(/jspin/)) CALL openXMLElementPoly('mtCharges',(/'spin'/),(/jspin/))
END IF END IF
8000 FORMAT (/,/,10x,'valence density: spin=',i2) 8000 FORMAT (/,/,10x,'valence density: spin=',i2)
...@@ -172,36 +171,28 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -172,36 +171,28 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype)) skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype))
IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt
ALLOCATE (we(MAXVAL(cdnvalJob%noccbd(:))))
ALLOCATE (eig(MAXVAL(cdnvalJob%noccbd(:))))
jsp = MERGE(1,jspin,noco%l_noco)
DO ikpt = cdnvalJob%ikptStart, cdnvalJob%nkptExtended, cdnvalJob%ikptIncrement jsp = MERGE(1,jspin,noco%l_noco)
IF (ikpt.GT.kpts%nkpt) THEN DO ikpt_i = 1,size(cdnvalJob%k_list)
#ifdef CPP_MPI ikpt=cdnvalJob%k_list(ikpt_i)
CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations
#endif
EXIT
END IF
CALL lapw%init(input,noco, kpts,atoms,sym,ikpt,cell,.false., mpi) CALL lapw%init(input,noco, kpts,atoms,sym,ikpt,cell,.false., mpi)
skip_t = skip_tt skip_t = skip_tt
noccbd = cdnvalJob%noccbd(ikpt) ev_list=cdnvaljob%compact_ev_list(ikpt_i,banddos%dos)
nStart = cdnvalJob%nStart(ikpt) noccbd = SIZE(ev_list)
nEnd = cdnvalJob%nEnd(ikpt) we = cdnvalJob%weights(ev_list,ikpt)
we(1:noccbd) = cdnvalJob%weights(1:noccbd,ikpt) eig = results%eig(ev_list,ikpt,jsp)
eig(1:noccbd) = results%eig(nStart:nEnd,ikpt,jsp)
IF (cdnvalJob%l_evp) THEN IF (cdnvalJob%l_evp) THEN
IF (nStart > skip_tt) skip_t = 0 IF (minval(ev_list) > skip_tt) skip_t = 0
IF (nEnd <= skip_tt) skip_t = noccbd IF (maxval(ev_list) <= skip_tt) skip_t = noccbd
IF ((nStart <= skip_tt).AND.(nEnd > skip_tt)) skip_t = mod(skip_tt,noccbd) IF ((minval(ev_list) <= skip_tt).AND.(maxval(ev_list) > skip_tt)) skip_t = mod(skip_tt,noccbd)
END IF END IF
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco) nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
CALL zMat%init(l_real,nbasfcn,noccbd) CALL zMat%init(l_real,nbasfcn,noccbd)
CALL read_eig(eig_id,ikpt,jsp,n_start=nStart,n_end=nEnd,neig=nbands,zmat=zMat) CALL read_eig(eig_id,ikpt,jsp,list=ev_list,neig=nbands,zmat=zMat)
#ifdef CPP_MPI #ifdef CPP_MPI
CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations
#endif #endif
...@@ -245,12 +236,11 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -245,12 +236,11 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (l_dosNdir) THEN IF (l_dosNdir) THEN
IF (PRESENT(slab)) CALL q_mt_sl(ispin,atoms,noccbd,ikpt,noccbd,skip_t,noccbd,eigVecCoeffs,usdus,slab) IF (PRESENT(slab)) CALL q_mt_sl(ispin,atoms,noccbd,ikpt,noccbd,skip_t,noccbd,eigVecCoeffs,usdus,slab)
INQUIRE (file='orbcomprot',exist=l_orbcomprot) IF (banddos%l_orb.AND.ANY((/banddos%alpha,banddos%beta,banddos%gamma/).NE.0.0)) THEN
IF (l_orbcomprot) CALL abcrot2(atoms,noccbd,eigVecCoeffs,ispin) ! rotate ab-coeffs CALL abcrot2(atoms,banddos,noccbd,eigVecCoeffs,ispin) ! rotate ab-coeffs
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,atoms,noccbd,usdus,eigVecCoeffs,orbcomp)
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,atoms,noccbd,usdus,eigVecCoeffs,orbcomp) END IF
END IF ENDIF
CALL calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs) CALL calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
IF (noco%l_soc) CALL orbmom(atoms,noccbd,we,ispin,eigVecCoeffs,orb) IF (noco%l_soc) CALL orbmom(atoms,noccbd,we,ispin,eigVecCoeffs,orb)
...@@ -274,9 +264,9 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st ...@@ -274,9 +264,9 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
END DO END DO
#endif #endif
IF (mpi%irank==0) THEN CALL cdnmt(mpi,input%jspins,atoms,sphhar,noco,jsp_start,jsp_end,&
CALL cdnmt(input%jspins,atoms,sphhar,noco,jsp_start,jsp_end,&
enpara,vTot%mt(:,0,:,:),denCoeffs,usdus,orb,denCoeffsOffdiag,moments,den%mt) enpara,vTot%mt(:,0,:,:),denCoeffs,usdus,orb,denCoeffsOffdiag,moments,den%mt)
IF (mpi%irank==0) THEN
IF (l_coreSpec) CALL corespec_ddscs(jspin,input%jspins) IF (l_coreSpec) CALL corespec_ddscs(jspin,input%jspins)
DO ispin = jsp_start,jsp_end DO ispin = jsp_start,jsp_end
IF (input%cdinf) THEN IF (input%cdinf) THEN
......
...@@ -34,7 +34,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new) ...@@ -34,7 +34,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
alphdiff = 2.0*pi_const*(noco%qss(1)*atoms%taual(1,iAtom) + & alphdiff = 2.0*pi_const*(noco%qss(1)*atoms%taual(1,iAtom) + &
noco%qss(2)*atoms%taual(2,iAtom) + & noco%qss(2)*atoms%taual(2,iAtom) + &
noco%qss(3)*atoms%taual(3,iAtom) ) noco%qss(3)*atoms%taual(3,iAtom) )
noco_new%alph(iType) = noco%alph(iType) - alphdiff noco_new%alph(iType) = noco_new%alph(iType) - alphdiff
DO WHILE (noco_new%alph(iType) > +pi_const) DO WHILE (noco_new%alph(iType) > +pi_const)
noco_new%alph(iType)= noco_new%alph(iType) - 2.0*pi_const noco_new%alph(iType)= noco_new%alph(iType) - 2.0*pi_const
END DO END DO
...@@ -42,12 +42,12 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new) ...@@ -42,12 +42,12 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
noco_new%alph(iType)= noco_new%alph(iType) + 2.0*pi_const noco_new%alph(iType)= noco_new%alph(iType) + 2.0*pi_const
END DO END DO
ELSE ELSE
noco_new%alph(iType) = noco%alph(iType) noco_new%alph(iType) = noco_new%alph(iType)
END IF END IF
iatom= iatom + atoms%neq(iType) iatom= iatom + atoms%neq(iType)
END DO END DO
OPEN (24,file='nocoinp',form='formatted', status='old') OPEN (24,file='nocoinp',form='formatted', status='unknown')
REWIND (24) REWIND (24)
CALL rw_noco_write(atoms,noco_new, input) CALL rw_noco_write(atoms,noco_new, input)
CLOSE (24) CLOSE (24)
......
...@@ -57,11 +57,9 @@ CONTAINS ...@@ -57,11 +57,9 @@ CONTAINS
my = 2*AIMAG(qa21(itype)) my = 2*AIMAG(qa21(itype))
mz = chmom(itype,1) - chmom(itype,2) mz = chmom(itype,1) - chmom(itype,2)
WRITE (6,8025) mx,my WRITE (6,8025) mx,my
WRITE (16,8025) mx,my
!---> determine the polar angles of the moment vector in the local frame !---> determine the polar angles of the moment vector in the local frame
CALL pol_angle(mx,my,mz,betah,alphh) CALL pol_angle(mx,my,mz,betah,alphh)
WRITE (6,8026) betah,alphh WRITE (6,8026) betah,alphh
WRITE (16,8026) betah,alphh
8025 FORMAT(2x,'--> local frame: ','mx=',f9.5,' my=',f9.5) 8025 FORMAT(2x,'--> local frame: ','mx=',f9.5,' my=',f9.5)
8026 FORMAT(2x,'-->',10x,' delta beta=',f9.5,& 8026 FORMAT(2x,'-->',10x,' delta beta=',f9.5,&
& ' delta alpha=',f9.5) & ' delta alpha=',f9.5)
...@@ -79,9 +77,7 @@ CONTAINS ...@@ -79,9 +77,7 @@ CONTAINS
mz = rho11 - rho22 mz = rho11 - rho22
CALL pol_angle(mx,my,mz,betah,alphh) CALL pol_angle(mx,my,mz,betah,alphh)
WRITE (6,8027) noco%beta(itype),noco%alph(itype)-alphdiff WRITE (6,8027) noco%beta(itype),noco%alph(itype)-alphdiff
WRITE (16,8027) noco%beta(itype),noco%alph(itype)-alphdiff
WRITE (6,8028) betah,alphh-alphdiff WRITE (6,8028) betah,alphh-alphdiff
WRITE (16,8028) betah,alphh-alphdiff
8027 FORMAT(2x,'-->',10x,' input noco%beta=',f9.5, ' input noco%alpha=',f9.5) 8027 FORMAT(2x,'-->',10x,' input noco%beta=',f9.5, ' input noco%alpha=',f9.5)
8028 FORMAT(2x,'-->',10x,'output noco%beta=',f9.5, ' output noco%alpha=',f9.5) 8028 FORMAT(2x,'-->',10x,'output noco%beta=',f9.5, ' output noco%alpha=',f9.5)
...@@ -96,7 +92,6 @@ CONTAINS ...@@ -96,7 +92,6 @@ CONTAINS
my_mix = 2*AIMAG(rho21) my_mix = 2*AIMAG(rho21)
mz_mix = rho11 - rho22 mz_mix = rho11 - rho22
WRITE (6,8031) mx_mix,my_mix WRITE (6,8031) mx_mix,my_mix
WRITE (16,8031) mx_mix,my_mix
8031 FORMAT(2x,'--> global frame: ','mixed mx=',f9.5,' mixed my=',f9.5) 8031 FORMAT(2x,'--> global frame: ','mixed mx=',f9.5,' mixed my=',f9.5)
! if magnetic moment (in local frame!) is negative, direction of quantization ! if magnetic moment (in local frame!) is negative, direction of quantization
! has to be antiparallel! ! has to be antiparallel!
...@@ -109,7 +104,6 @@ CONTAINS ...@@ -109,7 +104,6 @@ CONTAINS
! calculate angles alpha and beta in global frame ! calculate angles alpha and beta in global frame
CALL pol_angle(mx_mix,my_mix,mz_mix,betah,alphh) CALL pol_angle(mx_mix,my_mix,mz_mix,betah,alphh)
WRITE (6,8029) betah,alphh-alphdiff WRITE (6,8029) betah,alphh-alphdiff
WRITE (16,8029) betah,alphh-alphdiff
8029 FORMAT(2x,'-->',10x,' new noco%beta =',f9.5, ' new noco%alpha =',f9.5) 8029 FORMAT(2x,'-->',10x,' new noco%beta =',f9.5, ' new noco%alpha =',f9.5)
noco%alph(itype) = alphh noco%alph(itype) = alphh
noco%beta(itype) = betah noco%beta(itype) = betah
...@@ -129,9 +123,7 @@ CONTAINS ...@@ -129,9 +123,7 @@ CONTAINS
b_con_outy = scale*my b_con_outy = scale*my
!---> mix input and output constraint fields !---> mix input and output constraint fields
WRITE (6,8100) noco%b_con(1,itype),noco%b_con(2,itype) WRITE (6,8100) noco%b_con(1,itype),noco%b_con(2,itype)
WRITE (16,8100) noco%b_con(1,itype),noco%b_con(2,itype)
WRITE (6,8200) b_con_outx,b_con_outy WRITE (6,8200) b_con_outx,b_con_outy
WRITE (16,8200) b_con_outx,b_con_outy
noco%b_con(1,itype) = noco%b_con(1,itype) + noco%mix_b*b_con_outx noco%b_con(1,itype) = noco%b_con(1,itype) + noco%mix_b*b_con_outx
noco%b_con(2,itype) = noco%b_con(2,itype) + noco%mix_b*b_con_outy noco%b_con(2,itype) = noco%b_con(2,itype) + noco%mix_b*b_con_outy
ENDIF ENDIF
......
...@@ -677,7 +677,6 @@ CONTAINS ...@@ -677,7 +677,6 @@ CONTAINS
ENDDO ENDDO
ENDIF ENDIF
WRITE ( 6,'(''bad quality of charge density'',2f13.8)')q0, REAL( cwk(1) ) WRITE ( 6,'(''bad quality of charge density'',2f13.8)')q0, REAL( cwk(1) )
WRITE (16,'(''bad quality of charge density'',2f13.8)')q0, REAL( cwk(1) )
CALL juDFT_warn('pwden: bad quality of charge') CALL juDFT_warn('pwden: bad quality of charge')
ENDIF ENDIF
ENDIF ENDIF
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
END SUBROUTINE pwint END SUBROUTINE pwint
SUBROUTINE pwint_all(& SUBROUTINE pwint_all(&
& stars,atoms,sym,oneD,& & stars,atoms,sym,oneD,&
& cell,& & cell,x_start,x_end,&
& x) & x)
USE m_spgrot USE m_spgrot
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_oneD),INTENT(IN) :: oneD TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
INTEGER, INTENT (IN) :: x_start,x_end
COMPLEX, INTENT (OUT):: x(:) COMPLEX, INTENT (OUT):: x(:)
! .. ! ..
!-odim !-odim
...@@ -159,7 +160,7 @@ ...@@ -159,7 +160,7 @@
!$OMP PARALLEL DO default(shared) & !$OMP PARALLEL DO default(shared) &
!$OMP PRIVATE(ng,ig3d,g,gr,fj,ig2d,s,na,kr,ph,n)& !$OMP PRIVATE(ng,ig3d,g,gr,fj,ig2d,s,na,kr,ph,n)&
!$OMP PRIVATE(srmt,nn,sfs,arg,s1,ii) !$OMP PRIVATE(srmt,nn,sfs,arg,s1,ii)
starloop:DO ng=1,size(x) starloop:DO ng=x_start,x_end
ig3d = stars%ig(stars%kv3(1,ng),stars%kv3(2,ng),stars%kv3(3,ng)) ig3d = stars%ig(stars%kv3(1,ng),stars%kv3(2,ng),stars%kv3(3,ng))
IF (ig3d.EQ.0) THEN IF (ig3d.EQ.0) THEN
x(ng) = (0.,0.) x(ng) = (0.,0.)
......
...@@ -41,7 +41,7 @@ CONTAINS ...@@ -41,7 +41,7 @@ CONTAINS
! .. Intrinsic Functions .. ! .. Intrinsic Functions ..
INTRINSIC conjg INTRINSIC conjg
qal21=0.0
!---> l-decomposed density for each occupied state !---> l-decomposed density for each occupied state
states : DO i = 1, noccbd states : DO i = 1, noccbd
nt1 = 1 nt1 = 1
......
...@@ -133,6 +133,8 @@ CONTAINS ...@@ -133,6 +133,8 @@ CONTAINS
n1 = 1 n1 = 1
DO in = 1 , nrm DO in = 1 , nrm
n2 = mr(in) n2 = mr(in)
bsl_r = 0.0
bsl_i = 0.0
DO j = 1,atoms%jri(n1) DO j = 1,atoms%jri(n1)
cprr2 = cp*atoms%rmsh(j,n1)*atoms%rmsh(j,n1) cprr2 = cp*atoms%rmsh(j,n1)*atoms%rmsh(j,n1)
gr = stars%sk3(k)*atoms%rmsh(j,n1) gr = stars%sk3(k)*atoms%rmsh(j,n1)
......
...@@ -15,6 +15,7 @@ c This subroutine rotates the direction of the magnetization of the ...@@ -15,6 +15,7 @@ c This subroutine rotates the direction of the magnetization of the
c density matrix by multiplying with the unitary 2x2 spin rotation c density matrix by multiplying with the unitary 2x2 spin rotation
c matrix. --> U*rho*U^dagger c matrix. --> U*rho*U^dagger
c Philipp Kurz 2000-02-03 c Philipp Kurz 2000-02-03
c new method for improved stability (l_new=t) gb'19
c*********************************************************************** c***********************************************************************
use m_constants use m_constants
...@@ -28,11 +29,29 @@ C .. Scalar Arguments .. ...@@ -28,11 +29,29 @@ C .. Scalar Arguments ..
C .. C ..
C .. Local Scalars .. C .. Local Scalars ..
INTEGER ispin INTEGER ispin
REAL eps REAL eps,r11n,r22n
COMPLEX r21n
LOGICAL l_new
C .. C ..
C .. Local Arrays .. C .. Local Arrays ..
COMPLEX u2(2,2),rho(2,2),rhoh(2,2) COMPLEX u2(2,2),rho(2,2),rhoh(2,2)
C .. C ..
l_new = .true.
IF (l_new) THEN
r11n = 0.5*(1.0+cos(beta))*rho11 - sin(beta)*real(rho21) +
+ 0.5*(1.0-cos(beta))*rho22
r22n = 0.5*(1.0-cos(beta))*rho11 + sin(beta)*real(rho21) +
+ 0.5*(1.0+cos(beta))*rho22
r21n = CMPLX(cos(alph),-sin(alph))*(sin(beta)*(rho11-rho22) +
+ 2.0*(cos(beta)*real(rho21)-cmplx(0.0,aimag(rho21))))*0.5
rho11 = r11n
rho22 = r22n
rho21 = r21n
ELSE
eps = 1.0e-10 eps = 1.0e-10
...@@ -66,21 +85,21 @@ c---> check wether the diagonal elements of the rotated density ...@@ -66,21 +85,21 @@ c---> check wether the diagonal elements of the rotated density
c---> are real. c---> are real.
DO ispin = 1,2 DO ispin = 1,2
IF (aimag(rho(ispin,ispin)).GT.eps) THEN IF (aimag(rho(ispin,ispin)).GT.eps) THEN
WRITE(16,8000)
WRITE( 6,8000)
CALL juDFT_error("rotation of mag. failed",calledby CALL juDFT_error("rotation of mag. failed",calledby
+ ="rot_den_mat") + ="rot_den_mat",hint=
+ 'After the rotation of the density matrix in the '//
+ 'muffin-tin sphere one diagonal element of the '//
+ '(hermitian) density matrix is not real. That means '//
+ 'that the density matrix was probably damaged.')
ENDIF ENDIF
ENDDO ENDDO
8000 FORMAT('After the rotation of the density matrix in the'/
+ 'muffin-tin sphere one diagonal element of the'/
+ '(hermitian) density matrix is not real. That means'/
+ 'that the density matrix was probably damaged.')
rho11 = real(rho(1,1)) rho11 = real(rho(1,1))
rho22 = real(rho(2,2)) rho22 = real(rho(2,2))
rho21 = rho(2,1) rho21 = rho(2,1)
ENDIF
END SUBROUTINE rot_den_mat END SUBROUTINE rot_den_mat
END MODULE m_rotdenmat END MODULE m_rotdenmat
...@@ -164,8 +164,7 @@ CONTAINS ...@@ -164,8 +164,7 @@ CONTAINS
eps=0.01 eps=0.01
ic = CMPLX(0.,1.) ic = CMPLX(0.,1.)
! ------------------ ! ------------------
! WRITE (16,'(a,i2)') 'nstars=',nstars
! -----> set up mapping arrays ! -----> set up mapping arrays
IF (noco%l_ss) THEN IF (noco%l_ss) THEN
jsp_start = 1 jsp_start = 1
...@@ -508,7 +507,7 @@ CONTAINS ...@@ -508,7 +507,7 @@ CONTAINS
END IF END IF
990 FORMAT(2(f8.4,1x),i3,1x,i3) 990 FORMAT(2(f8.4,1x),i3,1x,i3)
1000 FORMAT(e10.4) 1000 FORMAT(e12.4)
1010 FORMAT(2(2e20.8,1x)) 1010 FORMAT(2(2e20.8,1x))
! !
! ------------------------------------------------------------ ! ------------------------------------------------------------
......
...@@ -8,7 +8,7 @@ cdn_mt/abclocdn_pulay.F90 ...@@ -8,7 +8,7 @@ cdn_mt/abclocdn_pulay.F90
cdn_mt/abcof.F90 cdn_mt/abcof.F90
cdn_mt/abcof3.F90 cdn_mt/abcof3.F90
cdn_mt/abcrot2.f90 cdn_mt/abcrot2.f90
cdn_mt/cdnmt.f90 cdn_mt/cdnmt.F90
cdn_mt/cdncore.F90 cdn_mt/cdncore.F90
cdn_mt/magMoms.f90 cdn_mt/magMoms.f90
cdn_mt/orbMagMoms.f90 cdn_mt/orbMagMoms.f90
......
...@@ -144,11 +144,11 @@ CONTAINS ...@@ -144,11 +144,11 @@ CONTAINS
ENDIF ENDIF
IF (noco%l_noco) THEN IF (noco%l_noco) THEN
!---> generate the complex conjgates of the spinors (chi) !---> generate the spinors (chi)
ccchi(1,1) = CONJG( EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)) ccchi(1,1) = EXP(ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)
ccchi(1,2) = CONJG(-EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)) ccchi(1,2) = -EXP(ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)
ccchi(2,1) = CONJG( EXP( ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)) ccchi(2,1) = EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)
ccchi(2,2) = CONJG( EXP( ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)) ccchi(2,2) = EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)
IF (noco%l_ss) THEN IF (noco%l_ss) THEN
!---> the coefficients of the spin-down basis functions are !---> the coefficients of the spin-down basis functions are
!---> stored in the second half of the eigenvector !---> stored in the second half of the eigenvector
...@@ -188,7 +188,7 @@ CONTAINS ...@@ -188,7 +188,7 @@ CONTAINS
wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin) - usdus%us(l,n,jspin)*usdus%duds(l,n,jspin) wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin) - usdus%us(l,n,jspin)*usdus%duds(l,n,jspin)
IF (apw(l,n)) THEN IF (apw(l,n)) THEN
fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin) fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin)
dfj(l) = 0.0d0 dfj(l) = 0.0
ELSE ELSE
dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk
fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk
......
...@@ -107,7 +107,7 @@ CONTAINS ...@@ -107,7 +107,7 @@ CONTAINS
wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin)-usdus%us(l,n,jspin)*usdus%duds(l,n,jspin) !Wronski determinante wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin)-usdus%us(l,n,jspin)*usdus%duds(l,n,jspin) !Wronski determinante
IF (apw(l,n)) THEN IF (apw(l,n)) THEN
fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin) fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin)
dfj(l) = 0.0d0 dfj(l) = 0.0
ELSE ELSE
dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk
fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk
......
...@@ -8,12 +8,13 @@ MODULE m_abcrot2 ...@@ -8,12 +8,13 @@ MODULE m_abcrot2
PRIVATE PRIVATE
PUBLIC :: abcrot2 PUBLIC :: abcrot2
CONTAINS CONTAINS
SUBROUTINE abcrot2(atoms,neig,eigVecCoeffs,jsp) SUBROUTINE abcrot2(atoms,banddos,neig,eigVecCoeffs,jsp)
USE m_dwigner USE m_dwigner
USE m_types USE m_types
IMPLICIT NONE IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_eigVecCoeffs),INTENT(INOUT) :: eigVecCoeffs TYPE(t_eigVecCoeffs),INTENT(INOUT) :: eigVecCoeffs
! .. ! ..
! .. Scalar Arguments .. ! .. Scalar Arguments ..
...@@ -21,17 +22,11 @@ CONTAINS ...@@ -21,17 +22,11 @@ CONTAINS
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
INTEGER itype,ineq,iatom,iop,ilo,i,l ,lm,lmp,ifac INTEGER itype,ineq,iatom,iop,ilo,i,l ,lm,lmp,ifac
REAL beta,alpha,gamma
REAL amx(3,3,1),imx(3,3) REAL amx(3,3,1),imx(3,3)
COMPLEX d_wgn(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,1:atoms%lmaxd,1) COMPLEX d_wgn(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,1:atoms%lmaxd,1)
OPEN (333,file='orbcomprot')
READ (333,*) alpha CALL euler(banddos%alpha,banddos%beta,banddos%gamma, amx)
READ (333,*) beta
READ (333,*) gamma
CLOSE (333)
CALL euler(alpha,beta,gamma, amx)
imx(:,:) = 0. ; imx(1,1) = 1. ; imx(2,2) = 1. ; imx(3,3) = 1. imx(:,:) = 0. ; imx(1,1) = 1. ; imx(2,2) = 1. ; imx(3,3) = 1.
......
...@@ -9,9 +9,10 @@ MODULE m_cdncore ...@@ -9,9 +9,10 @@ MODULE m_cdncore
CONTAINS CONTAINS
SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,& SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,vTot,outDen,moments,results) stars,cell,sphhar,atoms,vTot,outDen,moments,results, EnergyDen)
USE m_constants USE m_constants
USE m_judft
USE m_cdn_io USE m_cdn_io
USE m_cdnovlp USE m_cdnovlp
USE m_cored USE m_cored
...@@ -27,21 +28,22 @@ SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,& ...@@ -27,21 +28,22 @@ SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,&
IMPLICIT NONE IMPLICIT NONE