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-band
Compare Revisions
b68bce7db5c02ac56b1cf892ae20458fffb23b65...71f7a2ad0d77d376e30d3c1a8ae55920fc7d7e5c
Commits (2)
dos-fix
· c2752caa
Luy, Jan-Niclas (jluy)
authored
Feb 22, 2019
c2752caa
Merge branch 'master' of gitlab.mpcdf.mpg.de:nomad-lab/parser-band
· 71f7a2ad
Luy, Jan-Niclas (jluy)
authored
Feb 22, 2019
71f7a2ad
Expand all
Hide whitespace changes
Inline
Side-by-side
bandparser/parser_band.py
View file @
71f7a2ad
# Copyright 2019
-2018
Jan-Niclas Luy
# Copyright 2019 Jan-Niclas Luy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -65,7 +65,7 @@ class MainParser(MainHierarchicalParser):
self
.
meta_GGA_functional_name
=
[]
self
.
dos_values
=
[]
self
.
dos_energies
=
[]
self
.
system_idex
=
None
#
self.system_i
n
dex = None
self
.
root_matcher
=
SimpleMatcher
(
name
=
'root'
,
...
...
@@ -152,8 +152,18 @@ class MainParser(MainHierarchicalParser):
sections
=
[
'section_dos'
],
startReStr
=
r
' TOTALDOS.*'
,
subMatchers
=
[
SimpleMatcher
(
startReStr
=
r
'\s*([+-]?\d+\.\d+E[+-]?\d+)\s*([+-]?\d+\.\d+E[+-]?\d+)\s*([+-]?\d+\.\d+E[+-]?\d+).*'
,
repeats
=
True
,
startReAction
=
self
.
save_dos
)
SimpleMatcher
(
startReStr
=
r
' NSPIN,NE= 2.*'
,
subMatchers
=
[
SimpleMatcher
(
startReStr
=
r
'\s*([+-]?\d+\.\d+E[+-]?\d+)\s*([+-]?\d+\.\d+E[+-]?\d+)\s*([+-]?\d+\.\d+E[+-]?\d+).*'
,
repeats
=
True
,
startReAction
=
self
.
save_dos_2
)
]
),
SimpleMatcher
(
startReStr
=
r
' NSPIN,NE= 1.*'
,
subMatchers
=
[
SimpleMatcher
(
startReStr
=
r
'\s*([+-]?\d+\.\d+E[+-]?\d+)\s*([+-]?\d+\.\d+E[+-]?\d+).*'
,
repeats
=
True
,
startReAction
=
self
.
save_dos_1
)
]
)
],
endReStr
=
r
' ENDINPUT.*'
,
)
...
...
@@ -164,11 +174,23 @@ class MainParser(MainHierarchicalParser):
#def hallo(*args):
# print("hallo")
<<<<<<<
HEAD
def
save_dos_2
(
self
,
_
,
groups
):
self
.
dos_values
.
append
([
float
(
groups
[
1
]),
float
(
groups
[
2
])])
self
.
dos_energies
.
append
(
float
(
groups
[
0
]))
def
save_dos_1
(
self
,
_
,
groups
):
self
.
dos_values
.
append
([
float
(
groups
[
1
])])
self
.
dos_energies
.
append
(
float
(
groups
[
0
]))
=======
def
save_dos
(
self
,
_
,
groups
):
self
.
dos_values
.
append
([
float
(
groups
[
1
]),
float
(
groups
[
2
])])
self
.
dos_energies
.
append
(
float
(
groups
[
0
]))
>>>>>>>
b68bce7db5c02ac56b1cf892ae20458fffb23b65
def
save_atoms
(
self
,
_
,
groups
):
self
.
atom_positions
.
append
([
float
(
groups
[
1
]),
float
(
groups
[
2
]),
float
(
groups
[
3
])])
self
.
atom_labels
.
append
(
groups
[
0
])
...
...
test/new-18.105/NiO-dos-restricted.out
0 → 100644
View file @
71f7a2ad
This diff is collapsed.
Click to expand it.