Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fleur
fleur
Commits
f6aaa0ed
Commit
f6aaa0ed
authored
Aug 11, 2017
by
Gregor Michalicek
Browse files
Fixed newly introduced bug in inp to inp.xml conversion
parent
ac77ff17
Changes
3
Hide whitespace changes
Inline
Side-by-side
io/r_inpXML.F90
View file @
f6aaa0ed
...
...
@@ -98,7 +98,7 @@ SUBROUTINE r_inpXML(&
INTEGER
::
idum
CHARACTER
(
len
=
1
)
::
check
CHARACTER
(
len
=
20
)
::
tempNumberString
,
speciesName
CHARACTER
(
len
=
20
)
::
tempNumberString
CHARACTER
(
len
=
150
)
::
format
CHARACTER
(
len
=
20
)
::
mixingScheme
CHARACTER
(
len
=
10
)
::
loType
...
...
@@ -142,7 +142,6 @@ SUBROUTINE r_inpXML(&
INTEGER
,
ALLOCATABLE
::
lNumbers
(:),
nNumbers
(:),
speciesLLO
(:)
INTEGER
,
ALLOCATABLE
::
loOrderList
(:)
CHARACTER
(
LEN
=
50
),
ALLOCATABLE
::
speciesNames
(:)
INTEGER
,
ALLOCATABLE
::
speciesNLO
(:)
INTEGER
,
ALLOCATABLE
::
multtab
(:,:),
invOps
(:),
optype
(:)
INTEGER
,
ALLOCATABLE
::
lmx1
(:),
nq1
(:),
nlhtp1
(:)
...
...
@@ -1220,7 +1219,7 @@ SUBROUTINE r_inpXML(&
!!! Start of species section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ALLOCATE
(
speciesNames
(
numSpecies
),
speciesNLO
(
numSpecies
))
ALLOCATE
(
speciesNLO
(
numSpecies
))
ALLOCATE
(
atoms
%
speciesName
(
numSpecies
))
atoms
%
numStatesProvided
=
0
...
...
@@ -1233,8 +1232,7 @@ SUBROUTINE r_inpXML(&
DO
iSpecies
=
1
,
numSpecies
! Attributes of species
WRITE
(
xPathA
,
*
)
'/fleurInput/atomSpecies/species['
,
iSpecies
,
']'
speciesNames
(
iSpecies
)
=
TRIM
(
ADJUSTL
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
))//
'/@name'
)))
atoms
%
speciesName
(
iSpecies
)
=
TRIM
(
ADJUSTL
(
speciesNames
(
iSpecies
)))
atoms
%
speciesName
(
iSpecies
)
=
TRIM
(
ADJUSTL
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
))//
'/@name'
)))
atomicNumber
=
evaluateFirstIntOnly
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
))//
'/@atomicNumber'
))
coreStates
=
evaluateFirstIntOnly
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
))//
'/@coreStates'
))
magMom
=
evaluateFirstOnly
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
))//
'/@magMom'
))
...
...
@@ -1288,7 +1286,7 @@ SUBROUTINE r_inpXML(&
DO
iType
=
1
,
atoms
%
ntype
WRITE
(
xPathA
,
*
)
'/fleurInput/atomGroups/atomGroup['
,
iType
,
']/@species'
valueString
=
TRIM
(
ADJUSTL
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
)))))
IF
(
TRIM
(
ADJUSTL
(
speciesName
s
(
iSpecies
)))
.EQ.
TRIM
(
ADJUSTL
(
valueString
)))
THEN
IF
(
TRIM
(
ADJUSTL
(
atoms
%
speciesName
(
iSpecies
)))
.EQ.
TRIM
(
ADJUSTL
(
valueString
)))
THEN
atoms
%
nz
(
iType
)
=
atomicNumber
IF
(
atoms
%
nz
(
iType
)
.EQ.
0
)
THEN
WRITE
(
*
,
*
)
'Note: Replacing atomic number 0 by 1.0e-10 on atom type '
,
iType
...
...
@@ -1508,7 +1506,7 @@ SUBROUTINE r_inpXML(&
DO
iType
=
1
,
atoms
%
ntype
WRITE
(
xPathA
,
*
)
'/fleurInput/atomGroups/atomGroup['
,
iType
,
']/@species'
valueString
=
TRIM
(
ADJUSTL
(
xmlGetAttributeValue
(
TRIM
(
ADJUSTL
(
xPathA
)))))
IF
(
TRIM
(
ADJUSTL
(
speciesName
s
(
iSpecies
)))
.EQ.
TRIM
(
ADJUSTL
(
valueString
)))
THEN
IF
(
TRIM
(
ADJUSTL
(
atoms
%
speciesName
(
iSpecies
)))
.EQ.
TRIM
(
ADJUSTL
(
valueString
)))
THEN
atoms
%
numStatesProvided
(
iType
)
=
providedStates
IF
(
coreConfigPresent
)
THEN
IF
(
providedCoreStates
.NE.
atoms
%
ncst
(
iType
))
THEN
...
...
@@ -1815,7 +1813,7 @@ SUBROUTINE r_inpXML(&
!WRITE(*,*) 'Reading of inp.xml file finished'
DEALLOCATE
(
speciesNames
,
speciesNLO
)
DEALLOCATE
(
speciesNLO
)
END
SUBROUTINE
r_inpXML
...
...
io/w_inpXML.f90
View file @
f6aaa0ed
...
...
@@ -105,7 +105,7 @@ SUBROUTINE w_inpXML(&
INTEGER
::
idum
CHARACTER
(
len
=
1
)
::
check
CHARACTER
(
len
=
20
)
::
tempNumberString
,
speciesName
CHARACTER
(
len
=
20
)
::
speciesName
CHARACTER
(
len
=
150
)
::
format
CHARACTER
(
len
=
20
)
::
mixingScheme
CHARACTER
(
len
=
10
)
::
loType
...
...
@@ -421,9 +421,6 @@ SUBROUTINE w_inpXML(&
END
IF
! <species name="Si-1" element="Si" atomicNumber="14" coreStates="4" magMom="0.0" flipSpin="F">
300
FORMAT
(
' <species name="'
,
a
,
'" element="'
,
a
,
'" atomicNumber="'
,
i0
,
'" coreStates="'
,
i0
,
'" magMom="'
,
f0.8
,
'" flipSpin="'
,
l1
,
'">'
)
tempNumberString
=
''
WRITE
(
tempNumberString
,
'(i0)'
)
iSpecies
! speciesName = TRIM(ADJUSTL(noel(iAtomType))) // '-' // TRIM(ADJUSTL(tempNumberString))
speciesName
=
TRIM
(
ADJUSTL
(
atoms
%
speciesName
(
iSpecies
)))
WRITE
(
fileNum
,
300
)
TRIM
(
ADJUSTL
(
speciesName
)),
TRIM
(
ADJUSTL
(
noel
(
iAtomType
))),
atoms
%
nz
(
iAtomType
),
atoms
%
ncst
(
iAtomType
),
atoms
%
bmu
(
iAtomType
),
atoms
%
nflip
(
iAtomType
)
...
...
@@ -537,9 +534,6 @@ SUBROUTINE w_inpXML(&
iSpecies
=
atomTypeSpecies
(
iAtomType
)
! <atomGroup species="Si-1">
330
FORMAT
(
' <atomGroup species="'
,
a
,
'">'
)
tempNumberString
=
''
WRITE
(
tempNumberString
,
'(i0)'
)
iSpecies
! speciesName = TRIM(ADJUSTL(noel(iAtomType))) // '-' // TRIM(ADJUSTL(tempNumberString))
speciesName
=
TRIM
(
ADJUSTL
(
atoms
%
speciesName
(
iSpecies
)))
WRITE
(
fileNum
,
330
)
TRIM
(
ADJUSTL
(
speciesName
))
...
...
main/fleur_init.F90
View file @
f6aaa0ed
...
...
@@ -73,7 +73,7 @@
INTEGER
::
i
,
n
,
l
,
m1
,
m2
,
isym
,
iisym
,
numSpecies
COMPLEX
::
cdum
CHARACTER
(
len
=
4
)
::
namex
CHARACTER
(
len
=
12
)
::
relcor
CHARACTER
(
len
=
12
)
::
relcor
,
tempNumberString
CHARACTER
(
LEN
=
20
)
::
filename
REAL
::
a1
(
3
),
a2
(
3
),
a3
(
3
)
REAL
::
scale
,
dtild
...
...
@@ -361,6 +361,13 @@
speciesRepAtomType
(
i
)
=
i
END
DO
numSpecies
=
SIZE
(
speciesRepAtomType
)
ALLOCATE
(
atoms
%
speciesName
(
numSpecies
))
atoms
%
speciesName
=
''
DO
i
=
1
,
numSpecies
tempNumberString
=
''
WRITE
(
tempNumberString
,
'(i0)'
)
i
atoms
%
speciesName
(
i
)
=
TRIM
(
ADJUSTL
(
noel
(
speciesRepAtomType
(
i
))))
//
'-'
//
TRIM
(
ADJUSTL
(
tempNumberString
))
END
DO
a1
(:)
=
a1
(:)
/
scale
a2
(:)
=
a2
(:)
/
scale
a3
(:)
=
a3
(:)
/
scale
...
...
@@ -373,6 +380,7 @@
xmlElectronStates
,
xmlPrintCoreStates
,
xmlCoreOccs
,&
atomTypeSpecies
,
speciesRepAtomType
,
.FALSE.
,
filename
,&
.TRUE.
,
numSpecies
,
enpara
)
DEALLOCATE
(
atoms
%
speciesName
)
DEALLOCATE
(
noel
,
atomTypeSpecies
,
speciesRepAtomType
)
DEALLOCATE
(
xmlElectronStates
,
xmlPrintCoreStates
,
xmlCoreOccs
)
CALL
juDFT_end
(
"Fleur inp to XML input conversion completed."
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment