Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
59dbed39
Commit
59dbed39
authored
Jan 14, 2019
by
Andrea Hanke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop
parents
dc8b472e
4e17db7e
Changes
105
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
105 changed files
with
6660 additions
and
5578 deletions
+6660
-5578
.gitignore
.gitignore
+1
-0
.gitlab-ci.yml
.gitlab-ci.yml
+3
-3
cdn/cdnval.F90
cdn/cdnval.F90
+1
-1
cdn/genNewNocoInp.f90
cdn/genNewNocoInp.f90
+3
-3
cdn/qal_21.f90
cdn/qal_21.f90
+1
-1
cdn_mt/cdnmt.f90
cdn_mt/cdnmt.f90
+0
-1
cdn_mt/rhomt21.f90
cdn_mt/rhomt21.f90
+4
-4
cmake/Files_and_Targets.txt
cmake/Files_and_Targets.txt
+3
-3
cmake/compilerflags.cmake
cmake/compilerflags.cmake
+5
-5
cmake/store_environment.sh
cmake/store_environment.sh
+5
-5
core/cored.F90
core/cored.F90
+218
-218
diagonalization/CMakeLists.txt
diagonalization/CMakeLists.txt
+6
-6
diagonalization/chase_diag.F90
diagonalization/chase_diag.F90
+3
-1
diagonalization/eigen_diag.F90
diagonalization/eigen_diag.F90
+2
-0
diagonalization/elpa.F90
diagonalization/elpa.F90
+13
-10
diagonalization/elpa_20180525.F90
diagonalization/elpa_20180525.F90
+1
-0
diagonalization/elpa_20180525_onenode.F90
diagonalization/elpa_20180525_onenode.F90
+17
-1
eigen/eigen_hssetup.F90
eigen/eigen_hssetup.F90
+2
-0
eigen/hsvac.F90
eigen/hsvac.F90
+1
-1
eigen/tlmplm.F90
eigen/tlmplm.F90
+15
-8
eigen/tlmplm_cholesky.F90
eigen/tlmplm_cholesky.F90
+22
-23
eigen/vacfun.f90
eigen/vacfun.f90
+4
-19
global/CMakeLists.txt
global/CMakeLists.txt
+1
-1
global/savewigner.f90
global/savewigner.f90
+0
-0
hybrid/HF_init.F90
hybrid/HF_init.F90
+1
-6
hybrid/checkolap.F90
hybrid/checkolap.F90
+1
-6
hybrid/exchange_core.F90
hybrid/exchange_core.F90
+4
-9
hybrid/exchange_val_hf.F90
hybrid/exchange_val_hf.F90
+2
-2
hybrid/gen_wavf.F90
hybrid/gen_wavf.F90
+2
-6
hybrid/hf_setup.F90
hybrid/hf_setup.F90
+7
-7
hybrid/hsfock.F90
hybrid/hsfock.F90
+10
-20
hybrid/hybrid.F90
hybrid/hybrid.F90
+3
-4
hybrid/symm_hf.F90
hybrid/symm_hf.F90
+16
-36
init/efield.f90
init/efield.f90
+4
-4
init/postprocessInput.F90
init/postprocessInput.F90
+3
-1
inpgen/inpgen_arguments.F90
inpgen/inpgen_arguments.F90
+2
-1
inpgen/inpgen_help.f90
inpgen/inpgen_help.f90
+1
-0
inpgen/spg_gen.f
inpgen/spg_gen.f
+2
-2
io/loddop.f90
io/loddop.f90
+74
-68
io/r_inpXML.F90
io/r_inpXML.F90
+45
-1
io/w_inpXML.f90
io/w_inpXML.f90
+1
-1
io/writeBasis.F90
io/writeBasis.F90
+3
-11
io/wrtdop.f90
io/wrtdop.f90
+30
-23
io/xmlOutput.F90
io/xmlOutput.F90
+2
-0
juDFT/CMakeLists.txt
juDFT/CMakeLists.txt
+1
-0
juDFT/string.f90
juDFT/string.f90
+24
-0
juDFT/time.F90
juDFT/time.F90
+1
-1
juDFT/usage_data.F90
juDFT/usage_data.F90
+232
-82
main/cdngen.F90
main/cdngen.F90
+21
-2
main/fleur.F90
main/fleur.F90
+7
-3
main/fleur_arguments.F90
main/fleur_arguments.F90
+2
-1
main/fleur_help.F90
main/fleur_help.F90
+2
-0
main/fleur_init.F90
main/fleur_init.F90
+14
-3
math/CMakeLists.txt
math/CMakeLists.txt
+1
-1
math/rfft.F
math/rfft.F
+0
-1913
math/rfft.f90
math/rfft.f90
+1899
-0
mix/brysh1.f90
mix/brysh1.f90
+1
-0
mix/potdis.f90
mix/potdis.f90
+1
-1
mpi/mpi_dist_forcetheorem.F90
mpi/mpi_dist_forcetheorem.F90
+19
-1
mpi/setupMPI.F90
mpi/setupMPI.F90
+2
-0
optional/atom2.f90
optional/atom2.f90
+164
-166
types/types_potden.f90
types/types_potden.f90
+1
-1
types/types_xcpot.F90
types/types_xcpot.F90
+6
-0
types/types_xcpot_inbuild.F90
types/types_xcpot_inbuild.F90
+7
-0
vgen/rotate_mt_den_tofrom_local.f90
vgen/rotate_mt_den_tofrom_local.f90
+12
-4
vgen/vmts.F90
vgen/vmts.F90
+8
-6
xc-pot/CMakeLists.txt
xc-pot/CMakeLists.txt
+46
-52
xc-pot/corg91.f90
xc-pot/corg91.f90
+49
-49
xc-pot/corl91.f
xc-pot/corl91.f
+0
-80
xc-pot/corl91.f90
xc-pot/corl91.f90
+80
-0
xc-pot/corpbe.f90
xc-pot/corpbe.f90
+162
-0
xc-pot/easypbe.f90
xc-pot/easypbe.f90
+172
-0
xc-pot/excepbe.f
xc-pot/excepbe.f
+0
-105
xc-pot/excepbe.f90
xc-pot/excepbe.f90
+104
-0
xc-pot/exchpbe.f90
xc-pot/exchpbe.f90
+62
-63
xc-pot/excl91.f
xc-pot/excl91.f
+0
-204
xc-pot/excl91.f90
xc-pot/excl91.f90
+199
-0
xc-pot/excpw91.f
xc-pot/excpw91.f
+0
-204
xc-pot/excpw91.f90
xc-pot/excpw91.f90
+199
-0
xc-pot/excwb91.f
xc-pot/excwb91.f
+0
-201
xc-pot/excwb91.f90
xc-pot/excwb91.f90
+196
-0
xc-pot/gaunt.f90
xc-pot/gaunt.f90
+139
-0
xc-pot/grdchlh.f
xc-pot/grdchlh.f
+0
-389
xc-pot/grdchlh.f90
xc-pot/grdchlh.f90
+370
-0
xc-pot/mkgl0.f
xc-pot/mkgl0.f
+0
-79
xc-pot/mkgl0.f90
xc-pot/mkgl0.f90
+76
-0
xc-pot/pbecor2.f90
xc-pot/pbecor2.f90
+12
-12
xc-pot/potl0.f90
xc-pot/potl0.f90
+11
-10
xc-pot/relcor.f90
xc-pot/relcor.f90
+79
-0
xc-pot/vxcepbe.f
xc-pot/vxcepbe.f
+0
-140
xc-pot/vxcepbe.f90
xc-pot/vxcepbe.f90
+138
-0
xc-pot/vxcl91.f
xc-pot/vxcl91.f
+0
-226
xc-pot/vxcl91.f90
xc-pot/vxcl91.f90
+220
-0
xc-pot/vxcpw91.f
xc-pot/vxcpw91.f
+0
-229
xc-pot/vxcpw91.f90
xc-pot/vxcpw91.f90
+221
-0
xc-pot/vxcwb91.f
xc-pot/vxcwb91.f
+0
-230
xc-pot/vxcwb91.f90
xc-pot/vxcwb91.f90
+224
-0
xc-pot/xcall.f
xc-pot/xcall.f
+0
-205
xc-pot/xcallg.f
xc-pot/xcallg.f
+0
-235
xc-pot/xcbh.f90
xc-pot/xcbh.f90
+258
-0
xc-pot/xch91.f90
xc-pot/xch91.f90
+28
-28
xc-pot/xcpz.f90
xc-pot/xcpz.f90
+259
-0
xc-pot/xcvwn.f90
xc-pot/xcvwn.f90
+262
-0
xc-pot/xcwgn.f90
xc-pot/xcwgn.f90
+57
-59
xc-pot/xcxal.f90
xc-pot/xcxal.f90
+68
-71
No files found.
.gitignore
View file @
59dbed39
init/compileinfo.h
io/xml/inputSchema.h
Testing/*
*~
\#*
build
...
...
.gitlab-ci.yml
View file @
59dbed39
...
...
@@ -16,7 +16,7 @@ build-gfortran-hdf5:
paths
:
-
build
script
:
-
cd /builds/fleur/fleur; ./configure.sh GITLAB; cd build; make
-
cd /builds/fleur/fleur; ./configure.sh GITLAB; cd build; make
-j
4
# only:
# - schedules
# - triggers
...
...
@@ -100,7 +100,7 @@ build-intel:
-
build.intel
script
:
-
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; FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -t -l intel INTEL_MPI ; cd build.intel; make
-j
4
only
:
-
schedules
-
triggers
...
...
@@ -133,7 +133,7 @@ gfortran-coverage:
paths
:
-
build
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
-
ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";ctest
-
lcov --capture -d CMakeFiles -o after.info
...
...
cdn/cdnval.F90
View file @
59dbed39
...
...
@@ -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
)
! 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).
CALL
denCoeffsOffdiag
%
init
(
atoms
,
noco
,
sphhar
,
.FALSE.
)
CALL
denCoeffsOffdiag
%
init
(
atoms
,
noco
,
sphhar
,
noco
%
l_mtnocopot
)
CALL
force
%
init1
(
input
,
atoms
)
CALL
orb
%
init
(
atoms
,
noco
,
jsp_start
,
jsp_end
)
...
...
cdn/genNewNocoInp.f90
View file @
59dbed39
...
...
@@ -34,7 +34,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
alphdiff
=
2.0
*
pi_const
*
(
noco
%
qss
(
1
)
*
atoms
%
taual
(
1
,
iAtom
)
+
&
noco
%
qss
(
2
)
*
atoms
%
taual
(
2
,
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
)
noco_new
%
alph
(
iType
)
=
noco_new
%
alph
(
iType
)
-
2.0
*
pi_const
END
DO
...
...
@@ -42,12 +42,12 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
noco_new
%
alph
(
iType
)
=
noco_new
%
alph
(
iType
)
+
2.0
*
pi_const
END
DO
ELSE
noco_new
%
alph
(
iType
)
=
noco
%
alph
(
iType
)
noco_new
%
alph
(
iType
)
=
noco
_new
%
alph
(
iType
)
END
IF
iatom
=
iatom
+
atoms
%
neq
(
iType
)
END
DO
OPEN
(
24
,
file
=
'nocoinp'
,
form
=
'formatted'
,
status
=
'
old
'
)
OPEN
(
24
,
file
=
'nocoinp'
,
form
=
'formatted'
,
status
=
'
unknown
'
)
REWIND
(
24
)
CALL
rw_noco_write
(
atoms
,
noco_new
,
input
)
CLOSE
(
24
)
...
...
cdn/qal_21.f90
View file @
59dbed39
...
...
@@ -41,7 +41,7 @@ CONTAINS
! .. Intrinsic Functions ..
INTRINSIC
conjg
qal21
=
0.0
!---> l-decomposed density for each occupied state
states
:
DO
i
=
1
,
noccbd
nt1
=
1
...
...
cdn_mt/cdnmt.f90
View file @
59dbed39
...
...
@@ -62,7 +62,6 @@ CONTAINS
ENDIF
!$OMP PARALLEL DEFAULT(none) &
!$OMP SHARED(usdus,rho,moments,qmtl) &
!$OMP SHARED(atoms,jsp_start,jsp_end,enpara,vr,denCoeffs,sphhar)&
!$OMP SHARED(orb,noco,denCoeffsOffdiag,jspd)&
...
...
cdn_mt/rhomt21.f90
View file @
59dbed39
...
...
@@ -22,10 +22,10 @@ CONTAINS
! .. Array Arguments ..
REAL
,
INTENT
(
IN
)
::
we
(:)
!(nobd)
COMPLEX
,
INTENT
(
INOUT
)
::
uu21
(
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
ud21
(
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
du21
(
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
dd21
(
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
uu21
(
0
:
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
ud21
(
0
:
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
du21
(
0
:
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
dd21
(
0
:
atoms
%
lmaxd
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
uulo21
(
atoms
%
nlod
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
dulo21
(
atoms
%
nlod
,
atoms
%
ntype
)
COMPLEX
,
INTENT
(
INOUT
)
::
ulou21
(
atoms
%
nlod
,
atoms
%
ntype
)
...
...
cmake/Files_and_Targets.txt
View file @
59dbed39
...
...
@@ -55,17 +55,17 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
kpoints/kptgen_hybrid.f kpoints/od_kptsgen.f kpoints/bravais.f kpoints/divi.f kpoints/brzone.f
kpoints/kptmop.f kpoints/kpttet.f init/bandstr1.F kpoints/ordstar.f kpoints/fulstar.f kpoints/kprep.f
kpoints/tetcon.f kpoints/kvecon.f init/boxdim.f global/radsra.f math/intgr.F global/differ.f math/inwint.f
math/outint.f
xc-pot/gaunt.f
math/grule.f
math/outint.f math/grule.f
)
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/orthoglo.F90 juDFT/usage_data.F90 math/ylm4.F90
global/sort.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90
inpgen/closure.f90 inpgen/inpgen_arguments.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 kpoints/julia.f90 global/utility.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90
juDFT/string.f90
io/w_inpXML.f90 kpoints/julia.f90 global/utility.F90
init/compile_descr.F90 kpoints/kpoints.f90 io/xmlOutput.F90 kpoints/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90 force/force_a21.F90 force/force_a21_lo.f90 force/force_a21_U.f90 force/force_a12.f90
eigen/tlmplm_store.F90 kpoints/unfoldBandKPTS.f90)
eigen/tlmplm_store.F90
xc-pot/gaunt.f90
kpoints/unfoldBandKPTS.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77})
...
...
cmake/compilerflags.cmake
View file @
59dbed39
...
...
@@ -12,7 +12,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-mkl -r8 -qopenmp -assume byterecl"
)
endif
()
set
(
CMAKE_Fortran_FLAGS_RELEASE
"
${
CMAKE_Fortran_FLAGS_RELEASE
}
-xHost -O2 -g"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-C -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB "
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-C -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB
-DCPP_DEBUG
"
)
elseif
(
${
CMAKE_Fortran_COMPILER_ID
}
MATCHES
"PGI"
)
message
(
"PGI Fortran detected"
)
set
(
CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS
""
)
#fix problem in cmake
...
...
@@ -24,12 +24,12 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:cuda9.0,cc70 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
#set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fast -O3")
set
(
CMAKE_Fortran_FLAGS_RELEASE
"-O1 "
)
# to prevent cmake from putting -fast which auses problems with PGI18.4
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-C -traceback -O0 -g -Mchkstk -Mchkptr -Ktrap=fp"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-C -traceback -O0 -g -Mchkstk -Mchkptr -Ktrap=fp
-DCPP_DEBUG
"
)
elseif
(
${
CMAKE_Fortran_COMPILER_ID
}
MATCHES
"XL"
)
message
(
"IBM/BG Fortran detected"
)
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-qsmp=omp -qnosave -qarch=qp -qtune=qp -qrealsize=8 -qfixed -qsuppress=1520-022 -qessl"
)
set
(
CMAKE_Fortran_FLAGS_RELEASE
"
${
CMAKE_Fortran_FLAGS_RELEASE
}
-O4 -qsuppress=1500-036"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-O0 -g"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-O0 -g
-DCPP_DEBUG
"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-I/bgsys/local/libxml2/include/libxml2"
)
set
(
FLEUR_DEFINITIONS
${
FLEUR_DEFINITIONS
}
"CPP_AIX"
)
set
(
FLEUR_MPI_DEFINITIONS
${
FLEUR_MPI_DEFINITIONS
}
"CPP_AIX"
)
...
...
@@ -39,6 +39,6 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message
(
FATAL_ERROR
"Only modern versions of gfortran >6.3 will be able to compile FLEUR
\n
You need to specify a different compiler.
\n
See the docs at www.flapw.de.
\n
"
)
endif
()
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-ffree-line-length-none -fopenmp -fdefault-real-8 "
)
set
(
CMAKE_Fortran_FLAGS_RELEASE
"
${
CMAKE_Fortran_FLAGS_RELEASE
}
-O
1
"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-fdump-core -Wall -Wextra -Warray-temporaries -fbacktrace -fcheck=all -finit-real=nan -O0 -g"
)
set
(
CMAKE_Fortran_FLAGS_RELEASE
"
${
CMAKE_Fortran_FLAGS_RELEASE
}
-O
2
"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-fdump-core -Wall -Wextra -Warray-temporaries -fbacktrace -fcheck=all -finit-real=nan -O0 -g
-DCPP_DEBUG
"
)
endif
()
cmake/store_environment.sh
View file @
59dbed39
...
...
@@ -3,11 +3,11 @@
echo
"set(compile_user
$USER
)"
>
config.cmake
#Some freqeuntly used Environment variables
if
[
-n
"
$HDF5_ROOT
"
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_ROOT
/lib"
;
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_ROOT
/include"
;
fi
if
[
-n
"
$HDF5_DIR
"
}
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_DIR
/lib"
;
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_DIR
/include"
;
fi
if
[
-n
"
$HDF5_LIB
"
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_LIB
"
;
fi
if
[
-n
"
$HDF5_INCLUDE
"
]
;
then
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_INCLUDE
"
;
fi
if
[
-n
"
$HDF5_MODULES
"
]
;
then
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_MODULES
"
;
fi
if
[
!
-z
${
HDF5_ROOT
+x
}
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_ROOT
/lib"
;
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_ROOT
/include"
;
fi
if
[
!
-z
${
HDF5_DIR
+x
}
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_DIR
/lib"
;
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_DIR
/include"
;
fi
if
[
!
-z
${
HDF5_LIB
+x
}
]
;
then
FLEUR_LIBDIR
=
"
$FLEUR_LIBDIR
$HDF5_LIB
"
;
fi
if
[
!
-z
${
HDF5_INCLUDE
+x
}
]
;
then
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_INCLUDE
"
;
fi
if
[
!
-z
${
HDF5_MODULES
+x
}
]
;
then
FLEUR_INCLUDEDIR
=
"
$FLEUR_INCLUDEDIR
$HDF5_MODULES
"
;
fi
...
...
core/cored.F90
View file @
59dbed39
MODULE
m_cored
CONTAINS
SUBROUTINE
cored
(&
&
input
,
jspin
,
atoms
,&
&
rho
,
DIMENSION
,&
&
sphhar
,&
&
vr
,&
&
qint
,
rhc
,
tec
,
seig
)
SUBROUTINE
cored
(&
&
input
,
jspin
,
atoms
,&
&
rho
,
DIMENSION
,&
&
sphhar
,&
&
vr
,&
&
qint
,
rhc
,
tec
,
seig
)
! *******************************************************
! ***** set up the core densities for compounds. *****
! ***** d.d.koelling *****
! *******************************************************
USE
m_juDFT
USE
m_intgr
,
ONLY
:
intgr3
,
intgr0
,
intgr1
USE
m_constants
,
ONLY
:
c_light
,
sfp_const
USE
m_setcor
USE
m_differ
USE
m_types
USE
m_xmlOutput
IMPLICIT
NONE
TYPE
(
t_dimension
),
INTENT
(
IN
)
::
DIMENSION
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
TYPE
(
t_sphhar
),
INTENT
(
IN
)
::
sphhar
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
!
! .. Scalar Arguments ..
INTEGER
,
INTENT
(
IN
)
::
jspin
REAL
,
INTENT
(
OUT
)
::
seig
! ..
! .. Array Arguments ..
REAL
,
INTENT
(
IN
)
::
vr
(
atoms
%
jmtd
,
atoms
%
ntype
)
REAL
,
INTENT
(
INOUT
)
::
rho
(
atoms
%
jmtd
,
0
:
sphhar
%
nlhd
,
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
rhc
(
DIMENSION
%
msh
,
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
qint
(
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
tec
(
atoms
%
ntype
,
input
%
jspins
)
! ..
! .. Local Scalars ..
REAL
e
,
fj
,
fl
,
fn
,
q
,
rad
,
rhos
,
rhs
,
sea
,
sume
,
t2
REAL
d
,
dxx
,
rn
,
rnot
,
z
,
t1
,
rr
,
r
,
lambd
,
c
,
bmu
,
weight
INTEGER
i
,
j
,
jatom
,
korb
,
n
,
ncmsh
,
nm
,
nm1
,
nst
,
l
,
ierr
! ..
! .. Local Arrays ..
REAL
rhcs
(
DIMENSION
%
msh
),
rhoc
(
DIMENSION
%
msh
),
rhoss
(
DIMENSION
%
msh
),
vrd
(
DIMENSION
%
msh
),
f
(
0
:
3
)
REAL
occ
(
DIMENSION
%
nstd
),
a
(
DIMENSION
%
msh
),
b
(
DIMENSION
%
msh
),
ain
(
DIMENSION
%
msh
),
ahelp
(
DIMENSION
%
msh
)
REAL
occ_h
(
DIMENSION
%
nstd
,
2
)
INTEGER
kappa
(
DIMENSION
%
nstd
),
nprnc
(
DIMENSION
%
nstd
)
CHARACTER
(
LEN
=
20
)
::
attributes
(
6
)
REAL
stateEnergies
(
29
)
! ..
c
=
c_light
(
1.0
)
seig
=
0.
!
IF
(
input
%
frcor
)
THEN
DO
n
=
1
,
atoms
%
ntype
rnot
=
atoms
%
rmsh
(
1
,
n
)
;
dxx
=
atoms
%
dx
(
n
)
ncmsh
=
NINT
(
LOG
(
(
atoms
%
rmt
(
n
)
+10.0
)/
rnot
)
/
dxx
+
1
)
ncmsh
=
MIN
(
ncmsh
,
DIMENSION
%
msh
)
! ---> update spherical charge density
DO
i
=
1
,
atoms
%
jri
(
n
)
rhoc
(
i
)
=
rhc
(
i
,
n
,
jspin
)
rho
(
i
,
0
,
n
,
jspin
)
=
rho
(
i
,
0
,
n
,
jspin
)
+
rhoc
(
i
)/
sfp_const
ENDDO
! ---> for total energy calculations, determine the sum of the
! ---> eigenvalues by requiring that the core kinetic energy
! ---> remains constant.
DO
i
=
1
,
atoms
%
jri
(
n
)
rhoc
(
i
)
=
rhoc
(
i
)
*
vr
(
i
,
n
)/
atoms
%
rmsh
(
i
,
n
)
ENDDO
nm
=
atoms
%
jri
(
n
)
CALL
intgr3
(
rhoc
,
atoms
%
rmsh
(
1
,
n
),
atoms
%
dx
(
n
),
nm
,
rhos
)
sea
=
tec
(
n
,
jspin
)
+
rhos
WRITE
(
16
,
FMT
=
8030
)
n
,
jspin
,
tec
(
n
,
jspin
),
sea
WRITE
(
6
,
FMT
=
8030
)
n
,
jspin
,
tec
(
n
,
jspin
),
sea
seig
=
seig
+
atoms
%
neq
(
n
)
*
sea
ENDDO
RETURN
END
IF
! *******************************************************
! ***** set up the core densities for compounds. *****
! ***** d.d.koelling *****
! *******************************************************
USE
m_juDFT
USE
m_intgr
,
ONLY
:
intgr3
,
intgr0
,
intgr1
USE
m_constants
,
ONLY
:
c_light
,
sfp_const
USE
m_setcor
USE
m_differ
USE
m_types
USE
m_xmlOutput
IMPLICIT
NONE
TYPE
(
t_dimension
),
INTENT
(
IN
)
::
DIMENSION
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
TYPE
(
t_sphhar
),
INTENT
(
IN
)
::
sphhar
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
!
! .. Scalar Arguments ..
INTEGER
,
INTENT
(
IN
)
::
jspin
REAL
,
INTENT
(
OUT
)
::
seig
! ..
! .. Array Arguments ..
REAL
,
INTENT
(
IN
)
::
vr
(
atoms
%
jmtd
,
atoms
%
ntype
)
REAL
,
INTENT
(
INOUT
)
::
rho
(
atoms
%
jmtd
,
0
:
sphhar
%
nlhd
,
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
rhc
(
DIMENSION
%
msh
,
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
qint
(
atoms
%
ntype
,
input
%
jspins
)
REAL
,
INTENT
(
INOUT
)
::
tec
(
atoms
%
ntype
,
input
%
jspins
)
! ..
! .. Local Scalars ..
REAL
e
,
fj
,
fl
,
fn
,
q
,
rad
,
rhos
,
rhs
,
sea
,
sume
,
t2
REAL
d
,
dxx
,
rn
,
rnot
,
z
,
t1
,
rr
,
r
,
lambd
,
c
,
bmu
,
weight
INTEGER
i
,
j
,
jatom
,
korb
,
n
,
ncmsh
,
nm
,
nm1
,
nst
,
l
,
ierr
! ..
! .. Local Arrays ..
! ---> set up densities
DO
jatom
=
1
,
atoms
%
ntype
sume
=
0.
z
=
atoms
%
zatom
(
jatom
)
! rn = rmt(jatom)
dxx
=
atoms
%
dx
(
jatom
)
bmu
=
0.0
CALL
setcor
(
jatom
,
input
%
jspins
,
atoms
,
input
,
bmu
,
nst
,
kappa
,
nprnc
,
occ_h
)
IF
((
bmu
>
99.
))
THEN
occ
(
1
:
nst
)
=
input
%
jspins
*
occ_h
(
1
:
nst
,
jspin
)
ELSE
occ
(
1
:
nst
)
=
occ_h
(
1
:
nst
,
1
)
ENDIF
rnot
=
atoms
%
rmsh
(
1
,
jatom
)
d
=
EXP
(
atoms
%
dx
(
jatom
))
ncmsh
=
NINT
(
LOG
(
(
atoms
%
rmt
(
jatom
)
+10.0
)/
rnot
)
/
dxx
+
1
)
ncmsh
=
MIN
(
ncmsh
,
DIMENSION
%
msh
)
rn
=
rnot
*
(
d
**
(
ncmsh
-1
))
WRITE
(
6
,
FMT
=
8000
)
z
,
rnot
,
dxx
,
atoms
%
jri
(
jatom
)
WRITE
(
16
,
FMT
=
8000
)
z
,
rnot
,
dxx
,
atoms
%
jri
(
jatom
)
DO
j
=
1
,
atoms
%
jri
(
jatom
)
rhoss
(
j
)
=
0.
vrd
(
j
)
=
vr
(
j
,
jatom
)
ENDDO
!
IF
(
input
%
l_core_confpot
)
THEN
!---> linear extension of the potential with slope t1 / a.u.
t1
=
0.125
t1
=
MAX
(
(
vrd
(
atoms
%
jri
(
jatom
))
-
vrd
(
atoms
%
jri
(
jatom
)
-1
)
*
d
)
*
&
d
/
(
atoms
%
rmt
(
jatom
)
**
2
*
(
d
-1
)
)
,
t1
)
t2
=
vrd
(
atoms
%
jri
(
jatom
))/
atoms
%
rmt
(
jatom
)
-
atoms
%
rmt
(
jatom
)
*
t1
rr
=
atoms
%
rmt
(
jatom
)
ELSE
t2
=
vrd
(
atoms
%
jri
(
jatom
))
/
(
atoms
%
jri
(
jatom
)
-
ncmsh
)
ENDIF
IF
(
atoms
%
jri
(
jatom
)
<
ncmsh
)
THEN
DO
i
=
atoms
%
jri
(
jatom
)
+
1
,
ncmsh
rhoss
(
i
)
=
0.
IF
(
input
%
l_core_confpot
)
THEN
rr
=
d
*
rr
vrd
(
i
)
=
rr
*
(
t2
+
rr
*
t1
)
! vrd(i) = 2*vrd(jri(jatom)) - rr*( t2 + rr*t1 )
ELSE
vrd
(
i
)
=
vrd
(
atoms
%
jri
(
jatom
))
+
t2
*
(
i
-
atoms
%
jri
(
jatom
))
ENDIF
!
ENDDO
END
IF
REAL
rhcs
(
DIMENSION
%
msh
),
rhoc
(
DIMENSION
%
msh
),
rhoss
(
DIMENSION
%
msh
),
vrd
(
DIMENSION
%
msh
),
f
(
0
:
3
)
REAL
occ
(
DIMENSION
%
nstd
),
a
(
DIMENSION
%
msh
),
b
(
DIMENSION
%
msh
),
ain
(
DIMENSION
%
msh
),
ahelp
(
DIMENSION
%
msh
)
REAL
occ_h
(
DIMENSION
%
nstd
,
2
)
INTEGER
kappa
(
DIMENSION
%
nstd
),
nprnc
(
DIMENSION
%
nstd
)
CHARACTER
(
LEN
=
20
)
::
attributes
(
6
)
REAL
stateEnergies
(
29
)
! ..
c
=
c_light
(
1.0
)
seig
=
0.
!
IF
(
input
%
frcor
)
THEN
DO
n
=
1
,
atoms
%
ntype
rnot
=
atoms
%
rmsh
(
1
,
n
)
;
dxx
=
atoms
%
dx
(
n
)
ncmsh
=
NINT
(
LOG
(
(
atoms
%
rmt
(
n
)
+10.0
)/
rnot
)
/
dxx
+
1
)
ncmsh
=
MIN
(
ncmsh
,
DIMENSION
%
msh
)
! ---> update spherical charge density
DO
i
=
1
,
atoms
%
jri
(
n
)
rhoc
(
i
)
=
rhc
(
i
,
n
,
jspin
)
rho
(
i
,
0
,
n
,
jspin
)
=
rho
(
i
,
0
,
n
,
jspin
)
+
rhoc
(
i
)/
sfp_const
ENDDO
! ---> for total energy calculations, determine the sum of the
! ---> eigenvalues by requiring that the core kinetic energy
! ---> remains constant.
DO
i
=
1
,
atoms
%
jri
(
n
)
rhoc
(
i
)
=
rhoc
(
i
)
*
vr
(
i
,
n
)/
atoms
%
rmsh
(
i
,
n
)
ENDDO
nm
=
atoms
%
jri
(
n
)
CALL
intgr3
(
rhoc
,
atoms
%
rmsh
(
1
,
n
),
atoms
%
dx
(
n
),
nm
,
rhos
)
sea
=
tec
(
n
,
jspin
)
+
rhos
WRITE
(
16
,
FMT
=
8030
)
n
,
jspin
,
tec
(
n
,
jspin
),
sea
WRITE
(
6
,
FMT
=
8030
)
n
,
jspin
,
tec
(
n
,
jspin
),
sea
seig
=
seig
+
atoms
%
neq
(
n
)
*
sea
ENDDO
RETURN
END
IF
nst
=
atoms
%
ncst
(
jatom
)
! for lda+U
! ---> set up densities
DO
jatom
=
1
,
atoms
%
ntype
sume
=
0.
z
=
atoms
%
zatom
(
jatom
)
! rn = rmt(jatom)
dxx
=
atoms
%
dx
(
jatom
)
bmu
=
0.0
CALL
setcor
(
jatom
,
input
%
jspins
,
atoms
,
input
,
bmu
,
nst
,
kappa
,
nprnc
,
occ_h
)
IF
((
bmu
>
99.
))
THEN
occ
(
1
:
nst
)
=
input
%
jspins
*
occ_h
(
1
:
nst
,
jspin
)
ELSE
occ
(
1
:
nst
)
=
occ_h
(
1
:
nst
,
1
)
ENDIF
rnot
=
atoms
%
rmsh
(
1
,
jatom
)
d
=
EXP
(
atoms
%
dx
(
jatom
))
ncmsh
=
NINT
(
LOG
(
(
atoms
%
rmt
(
jatom
)
+10.0
)/
rnot
)
/
dxx
+
1
)
ncmsh
=
MIN
(
ncmsh
,
DIMENSION
%
msh
)
rn
=
rnot
*
(
d
**
(
ncmsh
-1
))
WRITE
(
6
,
FMT
=
8000
)
z
,
rnot
,
dxx
,
atoms
%
jri
(
jatom
)
WRITE
(
16
,
FMT
=
8000
)
z
,
rnot
,
dxx
,
atoms
%
jri
(
jatom
)
DO
j
=
1
,
atoms
%
jri
(
jatom
)
rhoss
(
j
)
=
0.
vrd
(
j
)
=
vr
(
j
,
jatom
)
ENDDO
!
IF
(
input
%
l_core_confpot
)
THEN
!---> linear extension of the potential with slope t1 / a.u.
t1
=
0.125
t1
=
MAX
(
(
vrd
(
atoms
%
jri
(
jatom
))
-
vrd
(
atoms
%
jri
(
jatom
)
-1
)
*
d
)
*
&
d
/
(
atoms
%
rmt
(
jatom
)
**
2
*
(
d
-1
)
)
,
t1
)
t2
=
vrd
(
atoms
%
jri
(
jatom
))/
atoms
%
rmt
(
jatom
)
-
atoms
%
rmt
(
jatom
)
*
t1
rr
=
atoms
%
rmt
(
jatom
)
ELSE
t2
=
vrd
(
atoms
%
jri
(
jatom
))
/
(
atoms
%
jri
(
jatom
)
-
ncmsh
)
ENDIF
IF
(
atoms
%
jri
(
jatom
)
<
ncmsh
)
THEN
DO
i
=
atoms
%
jri
(
jatom
)
+
1
,
ncmsh
rhoss
(
i
)
=
0.
IF
(
input
%
l_core_confpot
)
THEN
rr
=
d
*
rr
vrd
(
i
)
=
rr
*
(
t2
+
rr
*
t1
)
! vrd(i) = 2*vrd(jri(jatom)) - rr*( t2 + rr*t1 )
ELSE
vrd
(
i
)
=
vrd
(
atoms
%
jri
(
jatom
))
+
t2
*
(
i
-
atoms
%
jri
(
jatom
))
ENDIF
!
ENDDO
END
IF
IF
(
input
%
gw
==
1
.OR.
input
%
gw
==
3
)&
&
WRITE
(
15
)
nst
,
atoms
%
rmsh
(
1
:
atoms
%
jri
(
jatom
),
jatom
)
nst
=
atoms
%
ncst
(
jatom
)
! for lda+U
stateEnergies
=
0.0
DO
korb
=
1
,
nst
IF
(
occ
(
korb
)
/
=
0.0
)
THEN
fn
=
nprnc
(
korb
)
fj
=
iabs
(
kappa
(
korb
))
-
.5e0
weight
=
2
*
fj
+
1.e0
IF
(
bmu
>
99.
)
weight
=
occ
(
korb
)
fl
=
fj
+
(
.5e0
)
*
isign
(
1
,
kappa
(
korb
))
e
=
-2
*
(
z
/
(
fn
+
fl
))
**
2
CALL
differ
(
fn
,
fl
,
fj
,
c
,
z
,
dxx
,
rnot
,
rn
,
d
,
ncmsh
,
vrd
,
e
,
a
,
b
,
ierr
)
stateEnergies
(
korb
)
=
e
WRITE
(
6
,
FMT
=
8010
)
fn
,
fl
,
fj
,
e
,
weight
WRITE
(
16
,
FMT
=
8010
)
fn
,
fl
,
fj
,
e
,
weight
IF
(
ierr
/
=
0
)
CALL
juDFT_error
(
"error in core-level routine"
,
calledby
=
"cored"
)
IF
(
input
%
gw
==
1
.OR.
input
%
gw
==
3
)
WRITE
(
15
)
NINT
(
fl
),
weight
,
e
,&
a
(
1
:
atoms
%
jri
(
jatom
)),
b
(
1
:
atoms
%
jri
(
jatom
))
IF
(
input
%
gw
==
1
.OR.
input
%
gw
==
3
)&
&
WRITE
(
15
)
nst
,
atoms
%
rmsh
(
1
:
atoms
%
jri
(
jatom
),
jatom
)
sume
=
sume
+
weight
*
e
/
input
%
jspins
DO
j
=
1
,
ncmsh
rhcs
(
j
)
=
weight
*
(
a
(
j
)
**
2
+
b
(
j
)
**
2
)
rhoss
(
j
)
=
rhoss
(
j
)
+
rhcs
(
j
)
ENDDO
ENDIF
ENDDO
stateEnergies
=
0.0
DO
korb
=
1
,
nst
IF
(
occ
(
korb
)
/
=
0.0
)
THEN
fn
=
nprnc
(
korb
)
fj
=
iabs
(
kappa
(
korb
))
-
.5e0
weight
=
2
*
fj
+
1.e0
IF
(
bmu
>
99.
)
weight
=
occ
(
korb
)
fl
=
fj
+
(
.5e0
)
*
isign
(
1
,
kappa
(
korb
))
e
=
-2
*
(
z
/
(
fn
+
fl
))
**
2
CALL
differ
(
fn
,
fl
,
fj
,
c
,
z
,
dxx
,
rnot
,
rn
,
d
,
ncmsh
,
vrd
,
e
,
a
,
b
,
ierr
)
stateEnergies
(
korb
)
=
e
WRITE
(
6
,
FMT
=
8010
)
fn
,
fl
,
fj
,
e
,
weight
WRITE
(
16
,
FMT
=
8010
)
fn
,
fl
,
fj
,
e
,
weight
IF
(
ierr
/
=
0
)
CALL
juDFT_error
(
"error in core-level routine"
,
calledby
=
"cored"
)
IF
(
input
%
gw
==
1
.OR.
input
%
gw
==
3
)
WRITE
(
15
)
NINT
(
fl
),
weight
,
e
,&
a
(
1
:
atoms
%
jri
(
jatom
)),
b
(
1
:
atoms
%
jri
(
jatom
))
sume
=
sume
+
weight
*
e
/
input
%
jspins
DO
j
=
1
,
ncmsh
rhcs
(
j
)
=
weight
*
(
a
(
j
)
**
2
+
b
(
j
)
**
2
)
rhoss
(
j
)
=
rhoss
(
j
)
+
rhcs
(
j
)
ENDDO
ENDIF
ENDDO
! ---->update spherical charge density rho with the core density.
! ---->for spin-polarized (jspins=2), take only half the density
nm
=
atoms
%
jri
(
jatom
)
DO
j
=
1
,
nm
rhoc
(
j
)
=
rhoss
(
j
)/
input
%
jspins
rho
(
j
,
0
,
jatom
,
jspin
)
=
rho
(
j
,
0
,
jatom
,
jspin
)
+
rhoc
(
j
)/
sfp_const
ENDDO
! ---->update spherical charge density rho with the core density.
! ---->for spin-polarized (jspins=2), take only half the density
nm
=
atoms
%
jri
(
jatom
)
DO
j
=
1
,
nm
rhoc
(
j
)
=
rhoss
(
j
)/
input
%
jspins
rho
(
j
,
0
,
jatom
,
jspin
)
=
rho
(
j
,
0
,
jatom
,
jspin
)
+
rhoc
(
j
)/
sfp_const
ENDDO
rhc
(
1
:
ncmsh
,
jatom
,
jspin
)
=
rhoss
(
1
:
ncmsh
)
/
input
%
jspins
rhc
(
ncmsh
+1
:
DIMENSION
%
msh
,
jatom
,
jspin
)
=
0.0
rhc
(
1
:
ncmsh
,
jatom
,
jspin
)
=
rhoss
(
1
:
ncmsh
)
/
input
%
jspins
rhc
(
ncmsh
+1
:
DIMENSION
%
msh
,
jatom
,
jspin
)
=
0.0
seig
=
seig
+
atoms
%
neq
(
jatom
)
*
sume
DO
i
=
1
,
nm
rhoc
(
i
)
=
rhoc
(
i
)
*
vr
(
i
,
jatom
)/
atoms
%
rmsh
(
i
,
jatom
)
ENDDO
CALL
intgr3
(
rhoc
,
atoms
%
rmsh
(
1
,
jatom
),
atoms
%
dx
(
jatom
),
nm
,
rhs
)
tec
(
jatom
,
jspin
)
=
sume
-
rhs
WRITE
(
6
,
FMT
=
8030
)
jatom
,
jspin
,
tec
(
jatom
,
jspin
),
sume
WRITE
(
16
,
FMT
=
8030
)
jatom
,
jspin
,
tec
(
jatom
,
jspin
),
sume
seig
=
seig
+
atoms
%
neq
(
jatom
)
*
sume
DO
i
=
1
,
nm
rhoc
(
i
)
=
rhoc
(
i
)
*
vr
(
i
,
jatom
)/
atoms
%
rmsh
(
i
,
jatom
)
ENDDO
CALL
intgr3
(
rhoc
,
atoms
%
rmsh
(
1
,
jatom
),
atoms
%
dx
(
jatom
),
nm
,
rhs
)
tec
(
jatom
,
jspin
)
=
sume
-
rhs
WRITE
(
6
,
FMT
=
8030
)
jatom
,
jspin
,
tec
(
jatom
,
jspin
),
sume
WRITE
(
16
,
FMT
=
8030
)
jatom
,
jspin
,
tec
(
jatom
,
jspin
),
sume
! ---> simpson integration
rad
=
atoms
%
rmt
(
jatom
)
q
=
rad
*
rhoss
(
nm
)/
2.
DO
nm1
=
nm
+
1
,
ncmsh
-
1
,
2
rad
=
d
*
rad
q
=
q
+
2
*
rad
*
rhoss
(
nm1
)
rad
=
d
*
rad
q
=
q
+
rad
*
rhoss
(
nm1
+1
)
ENDDO
q
=
2
*
q
*
dxx
/
3
!+sb
WRITE
(
6
,
FMT
=
8020
)
q
/
input
%
jspins
WRITE
(
16
,
FMT
=
8020
)
q
/
input
%
jspins
!-sb
qint
(
jatom
,
jspin
)
=
q
*
atoms
%
neq
(
jatom
)
attributes
=
''
WRITE
(
attributes
(
1
),
'(i0)'
)
jatom
WRITE
(
attributes
(
2
),
'(i0)'
)
NINT
(
z
)
WRITE
(
attributes
(
3
),
'(i0)'
)
jspin
WRITE
(
attributes
(
4
),
'(f18.10)'
)
tec
(
jatom
,
jspin
)
WRITE
(
attributes
(
5
),
'(f18.10)'
)
sume
WRITE
(
attributes
(
6
),
'(f9.6)'
)
q
/
input
%
jspins
CALL
openXMLElementForm
(
'coreStates'
,(/
'atomType '
,
'atomicNumber '
,
'spin '
,
'kinEnergy '
,&
'eigValSum '
,
'lostElectrons'
/),&
attributes
,
RESHAPE
((/
8
,
12
,
4
,
9
,
9
,
13
,
6
,
3
,
1
,
18
,
18
,
9
/),(/
6
,
2
/)))
DO
korb
=
1
,
atoms
%
ncst
(
jatom
)
fj
=
iabs
(
kappa
(
korb
))
-
.5e0
weight
=
2
*
fj
+
1.e0
IF
(
bmu
>
99.
)
weight
=
occ
(
korb
)