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
nomad-lab
parser-exciting
Commits
4bda169e
Commit
4bda169e
authored
Sep 22, 2017
by
Pardini, Lorenzo (lopa)
Browse files
updated GW parser
parent
a65c9a08
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-exciting/exciting_parser_gw.py
View file @
4bda169e
...
...
@@ -55,23 +55,69 @@ class GWContext(object):
actype
=
'pade'
npol
=
0
scrtype
=
"rpa"
snempty
=
0
coreflag
=
"all"
fgrid
=
"gaule2"
k1
=
0
k2
=
0
# f1 = 0
# f2 = 0
s1
=
0
s2
=
0
# m1 = 0
# m2 = 0
# bc1 = 0
# bc2 = 0
# sc1 = 0
# sc2 = 0
with
open
(
inputFile
)
as
g
:
i
=
0
while
1
:
s
=
g
.
readline
()
i
+=
1
if
not
s
:
break
s
=
s
.
strip
()
s
=
s
.
split
(
'='
)
if
s
[
0
]
==
"singularity"
:
if
s
[
0
]
==
"<gw"
:
k1
=
i
if
s
[
0
]
==
"</gw>"
:
k2
=
i
# if s[0] == "<freqgrid": f1 = i
# if s[0] == "</freqgrid>": f2 = i
if
s
[
0
]
==
"<selfenergy"
:
s1
=
i
if
s
[
0
]
==
"</selfenergy>"
:
s2
=
i
# if s[0] == "<mixbasis": m1 = i
# if s[0] == "</mixbasis>": m2 = i
# if s[0] == "<barecoul": bc1 = i
# if s[0] == "</barecoul>": bc2 = i
# if s[0] == "<scrcoul": sc1 = i
# if s[0] == "</scrcoul>": sc2 = i
with
open
(
inputFile
)
as
g
:
i
=
0
while
1
:
s
=
g
.
readline
()
i
+=
1
if
not
s
:
break
s
=
s
.
strip
()
s
=
s
.
split
(
'='
)
if
(
s
[
0
]
==
"coreflag"
)
and
(
i
>=
k1
):
coreflag
=
s
[
1
][
1
:
-
1
]
if
(
s
[
0
]
==
"singularity"
)
and
(
i
>=
k1
):
freq_conv
=
s
[
1
][
1
:
-
1
]
if
s
[
0
]
==
"actype"
:
if
(
s
[
0
]
==
"actype"
)
and
(
i
>=
k1
)
:
actype
=
s
[
1
][
1
:
-
1
]
if
s
[
0
]
==
"npol"
:
if
(
s
[
0
]
==
"npol"
)
and
(
i
>=
k1
)
:
npol
=
s
[
1
][
1
:
-
1
]
if
s
[
0
]
==
"scrtype"
:
if
(
s
[
0
]
==
"scrtype"
)
and
(
i
>=
k1
)
:
scrtype
=
s
[
1
][
1
:
-
1
]
if
(
s
[
0
]
==
"nempty"
)
and
(
i
>=
s1
)
and
(
i
<=
s2
):
snempty
=
s
[
1
][
1
:
-
1
]
if
(
s
[
0
]
==
"fgrid"
)
and
(
i
>=
k1
):
fgrid
=
s
[
1
][
1
:
-
1
]
backend
.
addValue
(
"x_exciting_GW_frequency_grid_type"
,
fgrid
)
backend
.
addValue
(
"x_exciting_GW_self_energy_c_empty_states"
,
int
(
snempty
))
backend
.
addValue
(
"x_exciting_GW_core_treatment"
,
coreflag
)
backend
.
addValue
(
"x_exciting_GW_self_energy_singularity_treatment"
,
singularity
)
backend
.
addValue
(
"x_exciting_GW_self_energy_c_analytical_continuation"
,
actype
)
backend
.
addValue
(
"x_exciting_GW_self_energy_c_number_of_poles"
,
npol
)
backend
.
addValue
(
"x_exciting_GW_self_energy_c_number_of_poles"
,
int
(
npol
)
)
backend
.
addValue
(
"x_exciting_GW_screened_Coulomb"
,
scrtype
)
backend
.
closeSection
(
"x_exciting_section_GW_settings"
,
selfGWSetGIndex
)
...
...
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