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
nomad-FAIR
Commits
7788c0d0
Commit
7788c0d0
authored
Feb 14, 2019
by
Markus Scheidgen
Browse files
Added band parser.
parent
6b8340b7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
nomad-meta-info
@
8957235e
Compare
716f3495
...
8957235e
Subproject commit
716f3495427527446b693e62bfdf8bd30290d1d0
Subproject commit
8957235e5ca6bbb3278790e2587a30323169610f
nomad/parsing/__init__.py
View file @
7788c0d0
...
...
@@ -231,6 +231,11 @@ parsers = [
name
=
'parsers/wien2k'
,
parser_class_name
=
'wien2kparser.Wien2kParser'
,
mainfile_contents_re
=
r
':LABEL\d+: using WIEN2k_\d+\.\d+'
),
LegacyParser
(
name
=
'parsers/band'
,
parser_class_name
=
'bandparser.parser_band.BANDParser'
,
mainfile_contents_re
=
r
' +\* +Amsterdam Density Functional +\(ADF\)'
)
]
...
...
nomad/parsing/parser.py
View file @
7788c0d0
...
...
@@ -97,7 +97,7 @@ class LegacyParser(Parser):
return
LocalBackend
(
meta_info
,
debug
=
False
,
logger
=
logger
)
module_name
=
self
.
parser_class_name
.
split
(
'.'
)[:
-
1
]
parser_class
=
self
.
parser_class_name
.
split
(
'.'
)[
1
]
parser_class
=
self
.
parser_class_name
.
split
(
'.'
)[
-
1
]
module
=
importlib
.
import_module
(
'.'
.
join
(
module_name
))
Parser
=
getattr
(
module
,
parser_class
)
...
...
tests/data/parsers/band_adf.out
0 → 100644
View file @
7788c0d0
This diff is collapsed.
Click to expand it.
tests/test_parsing.py
View file @
7788c0d0
...
...
@@ -39,13 +39,14 @@ parser_examples = [
(
'parsers/nwchem'
,
'tests/data/parsers/nwchem/single_point/output.out'
),
(
'parsers/bigdft'
,
'tests/data/parsers/bigdft/n2_output.out'
),
(
'parsers/wien2k'
,
'tests/data/parsers/wien2k/AlN/AlN_ZB.scf'
),
(
'parsers/band'
,
'tests/data/parsers/band_adf.out'
)
]
faulty_unknown_one_d_matid_example
=
[
(
'parsers/template'
,
'tests/data/normalizers/no_sim_cell_boolean_positions.json'
)
]
correct_num_output_files
=
1
6
correct_num_output_files
=
1
7
class
TestLocalBackend
(
object
):
...
...
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