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-elk
Commits
c475148e
Commit
c475148e
authored
Aug 03, 2016
by
Pardini, Lorenzo (lopa)
Browse files
1st version: program name metadata
parent
d422d711
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-elk/parser_elk.py
View file @
c475148e
...
...
@@ -22,39 +22,59 @@ class ElkContext(object):
self
.
initialize_values
()
# description of the input
mainFileDescription
=
SM
(
name
=
'root'
,
weak
=
True
,
startReStr
=
""
,
subMatchers
=
[
SM
(
name
=
'newRun'
,
startReStr
=
r
"\s*:LABEL[0-9]+: using WIEN2k_(?:[0-9.]+) \(Release (?:[0-9/.]+)\) in "
,
repeats
=
True
,
required
=
True
,
forwardMatch
=
True
,
sections
=
[
'section_run'
,
'section_method'
,
'section_system'
,
'section_single_configuration_calculation'
],
subMatchers
=
[
SM
(
name
=
'header'
,
startReStr
=
r
"\s*:LABEL[0-9]+: using WIEN2k_(?P<x_wien2k_version>[0-9.]+) \(Release (?P<x_wien2k_release_date>[0-9/.]+)\) in "
,
sections
=
[
"x_wien2k_header"
],
fixedStartValues
=
{
'program_name'
:
'WIEN2k'
,
'program_basis_set_type'
:
'(L)APW+lo'
}
),
SM
(
name
=
"scf iteration"
,
startReStr
=
r
"\s*:ITE(?P<x_wien2k_iteration_number>[0-9]+):\s*[0-9]*. ITERATION"
,
sections
=
[
"section_scf_iteration"
],
repeats
=
True
,
subMatchers
=
[
SM
(
r
":NATO :\s*(?P<x_wien2k_number_of_independent_atoms>[0-9]+)INDEPENDENT AND\s*(?P<x_wien2k_total_atoms>[0-9]+)\s*TOTAL ATOMS IN UNITCELL"
),
SM
(
r
"\s*SUBSTANCE: (?P<x_wien2k_system_name>.*)"
),
SM
(
r
":POT\s*:\s*POTENTIAL OPTION\s*(?P<x_wien2k_potential_option>[0-9]+)"
),
SM
(
r
":VOL\s*:\s*UNIT CELL VOLUME\s*=\s*(?P<x_wien2k_unit_cell_volume__angstrom3>[0-9.]+)"
)
]
)
]
)
mainFileDescription
=
\
SM
(
name
=
"root matcher"
,
startReStr
=
""
,
weak
=
True
,
subMatchers
=
[
SM
(
name
=
"header"
,
startReStr
=
r
"\s*\|\s*Elk\s*(?P<program_version>[-a-zA-Z0-9]+)\s*started\s*="
,
fixedStartValues
=
{
'program_name'
:
'elk'
,
'program_basis_set_type'
:
'(L)APW+lo'
},
sections
=
[
"section_run"
,
"section_method"
],
subMatchers
=
[
SM
(
name
=
'input'
,
startReStr
=
r
"\|\sStarting initialization"
,
endReStr
=
r
"\|\sEnding initialization"
,
sections
=
[
'section_system'
]
),
])
])
#mainFileDescription = SM(
# name = 'root',
# weak = True,
# startReStr = "",
# subMatchers = [
# SM(name = 'newRun',
# startReStr = r"\s*:LABEL[0-9]+: using WIEN2k_(?:[0-9.]+) \(Release (?:[0-9/.]+)\) in ",
# repeats = True,
# required = True,
# forwardMatch = True,
# sections = ['section_run', 'section_method', 'section_system', 'section_single_configuration_calculation'],
# subMatchers = [
# SM(
# name = 'header',
# startReStr = r"\s*:LABEL[0-9]+: using WIEN2k_(?P<x_wien2k_version>[0-9.]+) \(Release (?P<x_wien2k_release_date>[0-9/.]+)\) in ",
# sections=["x_wien2k_header"],
# fixedStartValues={'program_name': 'WIEN2k', 'program_basis_set_type': '(L)APW+lo' }
# ), SM(
# name = "scf iteration",
# startReStr = r"\s*:ITE(?P<x_wien2k_iteration_number>[0-9]+):\s*[0-9]*. ITERATION",
# sections=["section_scf_iteration"],
# repeats = True,
# subMatchers=[
# SM(r":NATO :\s*(?P<x_wien2k_number_of_independent_atoms>[0-9]+)INDEPENDENT AND\s*(?P<x_wien2k_total_atoms>[0-9]+)\s*TOTAL ATOMS IN UNITCELL"),
# SM(r"\s*SUBSTANCE: (?P<x_wien2k_system_name>.*)"),
# SM(r":POT\s*:\s*POTENTIAL OPTION\s*(?P<x_wien2k_potential_option>[0-9]+)"),
# SM(r":VOL\s*:\s*UNIT CELL VOLUME\s*=\s*(?P<x_wien2k_unit_cell_volume__angstrom3>[0-9.]+)")
# ]
# )
# ]
# )
# ])
# loading metadata from nomad-meta-info/meta_info/nomad_meta_info/fhi_aims.nomadmetainfo.json
parserInfo
=
{
...
...
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