Commit 6036a817 authored by giannozz's avatar giannozz

1) Makefile wasn't working from inside upftools/

2) cleanup: '' replaced by " in formats
3) PRINT => WRITE(* when advance="no" is present


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11775 c92efa57-630b-4861-b058-cf58834340f0
parent 42197065
......@@ -65,7 +65,7 @@ interpolate.x : interpolate.o $(OBJS) $(QEMODS) $(LIBOBJS)
tldeps:
if test -n "$(TLDEPS)" ; then \
( cd ../.. ; $(MAKE) $(TLDEPS) || exit 1 ) ; fi
( cd ../ ; $(MAKE) $(TLDEPS) || exit 1 ) ; fi
clean :
- /bin/rm -f *.x *.o *~ *.F90 *.mod *.d *.i *.L
......
......@@ -379,10 +379,10 @@ SUBROUTINE convert_cpmd(upf)
lloc = -3
rcloc=0.0
ELSE
PRINT '("max L to use ( <= ",I1," ) > "), advance="NO"', lmax
WRITE(*,'("max L to use ( <= ",I1," ) > ")', advance="NO") lmax
READ (5,*) my_lmax
IF ((my_lmax <= lmax) .and. (my_lmax >= 0)) lmax = my_lmax
PRINT '("local L ( <= ",I1," ), Rc for local pot (au) > "), advance="NO"', lmax
WRITE(*,'("local L ( <= ",I1," ), Rc for local pot (au) > ")', advance="NO") lmax
READ (5,*) lloc, rcloc
ENDIF
!
......@@ -436,7 +436,7 @@ SUBROUTINE convert_cpmd(upf)
ELSEIF (ixc==55) THEN
upf%dft='HCTH'
ELSE
PRINT '("Unknown DFT ixc=",i4,". Please provide a DFT name > "), advance="NO"', ixc
WRITE(*,'("Unknown DFT ixc=",i4,". Please provide a DFT name > ")', advance="NO") ixc
READ *, upf%dft
ENDIF
PRINT '("Assuming DFT: ",A," . Please check this is what you want")', &
......@@ -464,7 +464,7 @@ SUBROUTINE convert_cpmd(upf)
ALLOCATE( upf%rcutus_chi(upf%nwfc) )
DO i=1, upf%nwfc
10 PRINT '("Wavefunction # ",i1,": label (e.g. 4s), occupancy > "), advance="NO"', i
10 WRITE(*,'("Wavefunction # ",i1,": label (e.g. 4s), occupancy > ")', advance="NO") i
READ (5,*) label, upf%oc(i)
READ (label(1:1),*, err=10) l
upf%els(i) = label
......
......@@ -238,7 +238,7 @@ SUBROUTINE convert_fhi (upf)
upf%psd = atom_name(nint(Zatom))
IF (nint(Zatom) < 18) upf%rel = 'no' ! just guessing
ELSE
PRINT '("Atom name > "), advance="NO"'
WRITE(*,'("Atom name > ")', advance="NO")
READ (5,'(a)') upf%psd
ENDIF
upf%typ = 'SL'
......@@ -255,7 +255,7 @@ SUBROUTINE convert_fhi (upf)
IF (pspxc > 0) THEN
PRINT '("DFT read from abinit file: ",i1)', pspxc
ENDIF
PRINT '("DFT > "), advance="NO"'
WRITE(*,'("DFT > ")', advance="NO")
READ (5,'(a)') upf%dft
ENDIF
!
......@@ -268,7 +268,7 @@ SUBROUTINE convert_fhi (upf)
! Use lloc (from fhi module) here, otherwise the user input has not effect on the vloc assignment below.
! In case of a .cpi file (i.e. direct output from Martin Fuchs's FHI98PP code), which does not include information about lloc,
! a proper conversion could actually never have been achieved in the past.
PRINT '("Confirm or modify l max, l loc (read:",2i3,") > "), advance="NO"', lmax, lloc
WRITE(*,'("Confirm or modify l max, l loc (read:",2i3,") > ")', advance="NO") lmax, lloc
READ (5,*) lmax, lloc
!
IF ( lmax == lloc) THEN
......@@ -293,7 +293,7 @@ SUBROUTINE convert_fhi (upf)
PRINT '("If unknown: list valence wfcts and occupancies for the atomic ground state ", &
&"in increasing l order: s,p,d,f")'
DO i=1, upf%nwfc
10 PRINT '("Wavefunction # ",i1,": label (e.g. 4s), occupancy > "), advance="NO"', i
10 WRITE(*,'("Wavefunction # ",i1,": label (e.g. 4s), occupancy > ")', advance="NO") i
READ (5,*) label, upf%oc(i)
READ (label(1:1),*, err=10) l
upf%els(i) = label
......
......@@ -71,30 +71,30 @@ PROGRAM interpolate
INTEGER :: is, ios, iunps = 4
real (8) :: xmin, dx
CHARACTER (len=256) :: filein(2), fileout
PRINT '('' '')'
PRINT '('' Interpolate an UPF pseudopotential to a different radial mesh'')'
PRINT '('' '')'
PRINT '(" ")'
PRINT '(" Interpolate an UPF pseudopotential to a different radial mesh")'
PRINT '(" ")'
!
is=2
PRINT '('' Read the pseudo to be converted '')'
PRINT '('' Input PP file in UPF format > ''), advance="NO"'
PRINT '(" Read the pseudo to be converted ")'
WRITE(*,'(" Input PP file in UPF format > ")', advance="NO")
READ (5, '(a)', end = 20, err = 20) filein(is)
OPEN(unit=iunps,file=filein(is),status='old',form='formatted',iostat=ios)
IF (ios/=0) STOP
WRITE (*,*) " IOS= ", ios, is, iunps
CALL read_pseudo(is, iunps)
CLOSE (unit=iunps)
PRINT '('' '')'
PRINT '(" ")'
!
10 CONTINUE
PRINT '('' radial mesh : r(i) = exp ( xmin + (i-1) *dx )/ Z_ion '')'
WRITE(*,'(a), advance="NO"') " xmin, dx [typical values -7.0, 0.0125 ] > "
PRINT '(" radial mesh : r(i) = exp ( xmin + (i-1) *dx )/ Z_ion ")'
WRITE(*,'(" xmin, dx [typical values -7.0, 0.0125 ] > ")', advance="NO")
READ (*,*) xmin, dx
CALL interpolate_ps(filein,xmin,dx)
fileout='NewPseudo.UPF'
PRINT '(''Output PP file in UPF format : '',a)', fileout
PRINT '("Output PP file in UPF format : ",a)', fileout
OPEN(unit=2,file=fileout,status='unknown',form='formatted')
CALL write_upf_v1(2)
......
......@@ -28,7 +28,7 @@ PROGRAM oldcp2upf
CALL convert_oldcp
fileout=trim(filein)//'.UPF'
PRINT '(''Output PP file in UPF format : '',a)', fileout
PRINT '("Output PP file in UPF format : ",a)', fileout
OPEN(unit=2,file=fileout,status='unknown',form='formatted')
CALL write_upf_v1(2)
......@@ -132,7 +132,7 @@ SUBROUTINE convert_oldcp
ALLOCATE(lchi(nwfs), nns(nwfs) )
ALLOCATE(rcut (nwfs), rcutus (nwfs))
DO i=1, nwfs
PRINT '("Wavefunction # ",i1,": label, occupancy > "), advance="NO"', i
WRITE(*,'("Wavefunction # ",i1,": label, occupancy > ")', advance="NO") i
READ (5,*) els(i), oc(i)
nns (i) = 0
lchi(i) = i-1
......
......@@ -71,7 +71,7 @@ PROGRAM read_ps
CHARACTER (len=256) :: filein
!
is = 0
10 PRINT '('' Input PP file # '',i2,'' in UPF format > ''),advance="NO"', is+1
10 WRITE(*,'(" Input PP file # ",i2," in UPF format > ")',advance="NO") is+1
READ (5, '(a)', end = 20, err = 20) filein
OPEN(unit=iunps,file=filein,status='old',form='formatted',iostat=ios)
IF (ios/=0) STOP
......
......@@ -83,31 +83,31 @@ PROGRAM virtual
INTEGER :: is, ios, iunps = 4
real (8) :: x
CHARACTER (len=256) :: filein(2), fileout
PRINT '('' '')'
PRINT '('' Generate the UPF pseudopotential for a virtual atom '')'
PRINT '('' combining two pseudopootentials in UPF format '')'
PRINT '('' '')'
PRINT '(" ")'
PRINT '(" Generate the UPF pseudopotential for a virtual atom ")'
PRINT '(" combining two pseudopootentials in UPF format ")'
PRINT '(" ")'
!
DO is=1,2
PRINT '('' Input PP file # '',i2,'' in UPF format > ''), advance="NO"', is
WRITE(*,'(" Input PP file # ",i2," in UPF format > ")', advance="NO") is
READ (5, '(a)', end = 20, err = 20) filein(is)
OPEN(unit=iunps,file=filein(is),status='old',form='formatted',iostat=ios)
IF (ios/=0) STOP
WRITE (*,*) " IOS= ", ios, is, iunps
CALL read_pseudo(is, iunps)
CLOSE (unit=iunps)
PRINT '('' '')'
PRINT '(" ")'
ENDDO
PRINT '('' New Pseudo = x '',a,'' + (1-x) '',a)', (trim(filein(is)), is=1,2)
PRINT '(" New Pseudo = x ",a," + (1-x) ",a)', (trim(filein(is)), is=1,2)
10 CONTINUE
PRINT '('' mixing parameter x [0<x<1] = ''), advance="NO"'
WRITE(*,'(" mixing parameter x [0<x<1] = ")', advance="NO")
READ (5,*) x
IF (x<0.d0 .or. x>1) GOTO 10
CALL compute_virtual(x,filein)
fileout='NewPseudo.UPF'
PRINT '(''Output PP file in UPF format : '',a)', fileout
PRINT '("Output PP file in UPF format : ",a)', fileout
OPEN(unit=2,file=fileout,status='unknown',form='formatted')
CALL write_upf_v1(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