Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-exciting
Commits
8d6b2d16
Commit
8d6b2d16
authored
Jun 29, 2017
by
Pardini, Lorenzo (lopa)
Browse files
GW boron version fixed
parent
3f5d9afe
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser/parser-exciting/exciting_parser_gw.py
View file @
8d6b2d16
...
...
@@ -34,7 +34,13 @@ class GWContext(object):
def
onClose_x_exciting_section_GW_method
(
self
,
backend
,
gIndex
,
section
):
dirPath
=
os
.
path
.
dirname
(
self
.
parser
.
fIn
.
name
)
eigvalGWFile
=
os
.
path
.
join
(
dirPath
,
"EVALQP.DAT"
)
if
os
.
access
(
os
.
path
.
join
(
dirPath
,
"EVALQP.DAT"
),
os
.
F_OK
):
eigvalGWFile
=
os
.
path
.
join
(
dirPath
,
"EVALQP.DAT"
)
elif
os
.
access
(
os
.
path
.
join
(
dirPath
,
"EVALQP.TXT"
),
os
.
F_OK
):
eigvalGWFile
=
os
.
path
.
join
(
dirPath
,
"EVALQP.TXT"
)
else
:
pass
# eigvalGWFile = os.path.join(dirPath, "EVALQP.DAT")
dosGWFile
=
os
.
path
.
join
(
dirPath
,
"TDOS-QP.OUT"
)
bandCarbGWFile
=
os
.
path
.
join
(
dirPath
,
"bandstructure-qp.dat"
)
bandBorGWFile
=
os
.
path
.
join
(
dirPath
,
"BAND-QP.OUT"
)
...
...
@@ -82,6 +88,7 @@ class GWContext(object):
if
os
.
path
.
exists
(
eigvalGWFile
):
eigvalGWGIndex
=
backend
.
openSection
(
"x_exciting_section_GW_qp_eigenvalues"
)
with
open
(
eigvalGWFile
)
as
g
:
# print("ggggggggggg=",g)
qpGWKpoint
=
[]
Sx
=
[[],[]]
Sc
=
[[],[]]
...
...
@@ -252,6 +259,8 @@ class GWContext(object):
# print("bandGWBE=",bandGWBE)
for
i
in
range
(
0
,
len
(
Kindex
)
-
1
):
# print("i=",i)
# print("len(bandGWBE[i])=",len(bandGWBE[i][0]))
bandGWSegmGIndex
=
backend
.
openSection
(
"x_exciting_section_GW_k_band_segment"
)
backend
.
addValue
(
"x_exciting_GW_band_energies"
,
bandGWBE
[
i
])
backend
.
closeSection
(
"x_exciting_section_GW_k_band_segment"
,
bandGWSegmGIndex
)
...
...
@@ -260,6 +269,7 @@ class GWContext(object):
# backend.closeSection("x_exciting_section_GW_k_band_segment",bandGWSegmGIndex)
if
os
.
path
.
exists
(
bandBorGWFile
)
and
not
os
.
path
.
exists
(
bandCarbGWFile
):
# print("QUI???")
bandGWGIndex
=
backend
.
openSection
(
"x_exciting_section_GW_k_band"
)
# bandGWSegmGIndex = backend.openSection("x_exciting_section_GW_k_band_segment")
fromH
=
unit_conversion
.
convert_unit_function
(
"hartree"
,
"J"
)
...
...
@@ -285,7 +295,7 @@ class GWContext(object):
bandEnergies
[
i
].
append
([])
kappa
[
i
].
append
([])
dist1
.
append
([])
# print("
dist1",dist1
)
# print("
bandEnergies[0]=",bandEnergies[0]
)
# if not dist1:
# elif s[0] == "#":
# for i in range(0,2):
...
...
parser/parser-exciting/parser_exciting.py
View file @
8d6b2d16
...
...
@@ -58,7 +58,15 @@ class ExcitingParserContext(object):
mainFile
=
self
.
parser
.
fIn
.
fIn
.
name
dirPath
=
os
.
path
.
dirname
(
self
.
parser
.
fIn
.
name
)
gwFile
=
os
.
path
.
join
(
dirPath
,
"GW_INFO.OUT"
)
# gwFile = os.path.join(dirPath, "GW_INFO.OUT")
###
if
os
.
access
(
os
.
path
.
join
(
dirPath
,
"GW_INFO.OUT"
),
os
.
F_OK
):
gwFile
=
os
.
path
.
join
(
dirPath
,
"GW_INFO.OUT"
)
elif
os
.
access
(
os
.
path
.
join
(
dirPath
,
"GWINFO.OUT"
),
os
.
F_OK
):
gwFile
=
os
.
path
.
join
(
dirPath
,
"GWINFO.OUT"
)
else
:
pass
###
if
os
.
path
.
exists
(
gwFile
):
subSuperContext
=
exciting_parser_gw
.
GWContext
()
subParser
=
AncillaryParser
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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