Commit cb78a387 authored by Gregor Michalicek's avatar Gregor Michalicek

Introduced comment variable to input type

I use this variable to write out the comment from the
input file to out.xml.
parent f2a54026
...@@ -587,6 +587,7 @@ ...@@ -587,6 +587,7 @@
REAL :: elup REAL :: elup
REAL :: rkmax REAL :: rkmax
REAL :: zelec REAL :: zelec
CHARACTER(LEN=8) :: comment(10)
TYPE(t_efield)::efield TYPE(t_efield)::efield
END TYPE END TYPE
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
INTEGER jri0(atoms%ntype),lmax0(atoms%ntype),nlo0(atoms%ntype),llo0(atoms%nlod,atoms%ntype) INTEGER jri0(atoms%ntype),lmax0(atoms%ntype),nlo0(atoms%ntype),llo0(atoms%nlod,atoms%ntype)
CHARACTER(len=1) :: ch_rw CHARACTER(len=1) :: ch_rw
CHARACTER(len=4) :: namex CHARACTER(len=4) :: namex
CHARACTER(len=8) :: name(10)
CHARACTER(len=3) :: noel(atoms%ntype) CHARACTER(len=3) :: noel(atoms%ntype)
CHARACTER(len=12) :: relcor CHARACTER(len=12) :: relcor
CHARACTER(len=3) :: latnamTemp CHARACTER(len=3) :: latnamTemp
...@@ -187,7 +186,7 @@ ...@@ -187,7 +186,7 @@
input%delgau = input%tkb ; atoms%ntypd = atoms%ntype ; atoms%natd = atoms%nat input%delgau = input%tkb ; atoms%ntypd = atoms%ntype ; atoms%natd = atoms%nat
DO i = 1, 10 DO i = 1, 10
j = (i-1) * 8 + 1 j = (i-1) * 8 + 1
name(i) = title(j:j+7) input%comment(i) = title(j:j+7)
ENDDO ENDDO
IF (noco%l_noco) input%jspins = 2 IF (noco%l_noco) input%jspins = 2
...@@ -420,7 +419,7 @@ ...@@ -420,7 +419,7 @@
CALL w_inpXML(& CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name,& & noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.FALSE.,numSpecies,& & atomTypeSpecies,speciesRepAtomType,.FALSE.,numSpecies,&
& enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1)) & enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1))
...@@ -447,7 +446,7 @@ ...@@ -447,7 +446,7 @@
CALL rw_inp(& CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name) & noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment)
iofile = 6 iofile = 6
OPEN (iofile,file='inp',form='formatted',status='old',position='append') OPEN (iofile,file='inp',form='formatted',status='old',position='append')
...@@ -481,7 +480,7 @@ ...@@ -481,7 +480,7 @@
CALL rw_inp(& CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name) & noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment)
IF ( ALL(div /= 0) ) nkpt3 = div IF ( ALL(div /= 0) ) nkpt3 = div
WRITE (iofile,FMT=9999) product(nkpt3),nkpt3,l_gamma WRITE (iofile,FMT=9999) product(nkpt3),nkpt3,l_gamma
......
...@@ -292,7 +292,22 @@ SUBROUTINE r_inpXML(& ...@@ -292,7 +292,22 @@ SUBROUTINE r_inpXML(&
CALL ASSIGN_var(valueString,tempReal) CALL ASSIGN_var(valueString,tempReal)
END DO END DO
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Comment section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
input%comment = ' '
xPathA = '/fleurInput/comment'
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA)))))
DO i = 1, LEN(TRIM(ADJUSTL(valueString)))
IF (valueString(i:i).EQ.achar(10)) valueString(i:i) = ' ' !remove line breaks
END DO
valueString = TRIM(ADJUSTL(valueString))
DO i = 1, 10
j = (i-1) * 8 + 1
input%comment(i) = valueString(j:j+7)
END DO
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of calculationSetup section !!! Start of calculationSetup section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
ALLOCATE(xmlCoreOccs(1,1,1)) ALLOCATE(xmlCoreOccs(1,1,1))
namex = ' ' namex = ' '
relcor = ' ' relcor = ' '
comment = ' '
a1 = 0.0 a1 = 0.0
a2 = 0.0 a2 = 0.0
a3 = 0.0 a3 = 0.0
...@@ -130,7 +129,7 @@ ...@@ -130,7 +129,7 @@
CALL w_inpXML(& CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,(/1,1,1/),kpts%l_gamma,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,(/1,1,1/),kpts%l_gamma,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,comment,&!comment is 'name'. Still has to be read in! & noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&!comment is 'name'. Still has to be read in!
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.TRUE.,numSpecies,& & atomTypeSpecies,speciesRepAtomType,.TRUE.,numSpecies,&
& enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1)) & enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1))
......
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