Skip to content
GitLab
Menu
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
efef217a
Commit
efef217a
authored
Aug 22, 2019
by
Markus Scheidgen
Browse files
Minor fixes to parser matching.
parent
9684d5d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
nomad/cli/parse.py
View file @
efef217a
...
...
@@ -30,7 +30,7 @@ def parse(
else
:
parser_name
=
parser
.
__class__
.
__name__
assert
parser
is
not
None
,
'there is no
t
parser matching %s'
%
mainfile
assert
parser
is
not
None
,
'there is no parser matching %s'
%
mainfile
logger
=
logger
.
bind
(
parser
=
parser
.
name
)
# type: ignore
logger
.
info
(
'identified parser'
)
...
...
nomad/parsing/__init__.py
View file @
efef217a
...
...
@@ -263,13 +263,12 @@ parsers = [
LegacyParser
(
name
=
'parsers/gaussian'
,
code_name
=
'Gaussian'
,
parser_class_name
=
'gaussianparser.GaussianParser'
,
# This previous file matching string was too far down the line.
# r'\s*Cite this work as:'
# r'\s*Gaussian [0-9]+, Revision [A-Za-z0-9.]*,'
# r'\s\*\*\*\*\*\*\*\*\*\*\*\**'
# r'\s*Gaussian\s*([0-9]+):\s*([A-Za-z0-9-.]+)\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
# r'\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)')
mainfile_contents_re
=
r
'Gaussian, Inc'
),
mainfile_contents_re
=
(
r
'\s*Cite this work as:'
r
'\s*Gaussian [0-9]+, Revision [A-Za-z0-9.]*,'
r
'\s\*\*\*\*\*\*\*\*\*\*\*\**'
r
'\s*Gaussian\s*([0-9]+):\s*([A-Za-z0-9-.]+)\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
r
'\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
)),
LegacyParser
(
name
=
'parsers/quantumespresso'
,
code_name
=
'Quantum Espresso'
,
parser_class_name
=
'quantumespressoparser.QuantumEspressoParserPWSCF'
,
...
...
Write
Preview
Supports
Markdown
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