Skip to content
Snippets Groups Projects
Commit eee2aad6 authored by Rudolf Zeller's avatar Rudolf Zeller
Browse files

Format of atomic potentials is changed by writing always a one to mark the end

parent 4228e442
No related branches found
No related tags found
No related merge requests found
!--------------------------------------------------------------------------------
! Copyright (c) 2018 Forschungszentrum Juelich GmbH, Juelich, Germany
! This file is part of KKRnano and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
module PotentialConverter_mod
!-------------------------------------------------------------------------------
!> Summary: Converts unformatted potential file to the KKRhost formatted potential file format
......@@ -52,10 +47,10 @@ module PotentialConverter_mod
call associateBasisAtomMesh(atomdata, mesh)
! show data on stdout
call represent(mesh, str)
write(*, '(A)') str
call represent(atomdata%potential, str)
write(*, '(A)') str
! call represent(mesh, str)
! write(*, '(A)') str
! call represent(atomdata%potential, str)
! write(*, '(A)') str
call writeFormattedPotential(Efermi, ALAT, VBC, KXC, atomdata)
......@@ -190,7 +185,7 @@ module PotentialConverter_mod
double precision :: rv, sm
integer :: ic, ir, irmin, is, lm, lmnr, lmpot, nr
integer, parameter :: isave = 1, inew = 1
integer, parameter :: isave = 1, inew = 2
double precision, parameter :: qbound = 1.d-10
character(len=24), parameter :: txc(0:3) = [' Morruzi,Janak,Williams', ' von Barth,Hedin ', ' Vosko,Wilk,Nusair ', ' GGA PW91 ']
character(len=*), parameter :: F9000 = "(7a4,6x,' exc:',a24,3x,a10)", &
......@@ -236,7 +231,8 @@ module PotentialConverter_mod
enddo ! lm
!---> write a one to mark the end
if (lmnr < lmpot) write(ifile, fmt=F9060) isave
! if (lmnr < lmpot) write(ifile, fmt=F9060) isave
write(ifile, fmt=F9060) isave
endif
enddo ! is
......
......@@ -179,7 +179,7 @@ module read_formatted_mod
blocks%vins = 0.d0
lm1 = 2
do lm = 2, sb%lmpot
do lm = 2, sb%lmpot + 1
if (lm1 /= 1) then
if (sb%isave == 1) then
......@@ -192,7 +192,7 @@ module read_formatted_mod
if (lm1 > 1) then
if (lm1 < 1) die_here("potential file is not formatted correctly, lm ="+lm1+"out of range! Atom#"-atom_id)
if (lm1 > sb%lmpot) die_here("potential file is not formatted correctly, lm ="+lm1-", but lmpot ="+sb%lmpot+" for Atom#"-atom_id)
! if (lm1 > sb%lmpot) die_here("potential file is not formatted correctly, lm ="+lm1-", but lmpot ="+sb%lmpot+" for Atom#"-atom_id)
read(unit, fmt="(1p,4d20.13)", iostat=ios) blocks%vins(irmin:sb%irt1p,lm1)
if (ios /= 0) die_here("failed to read non-spherical potential array vins(:,"-lm1-")! Atom#"-atom_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment