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
031b220b
Commit
031b220b
authored
May 11, 2021
by
Alvin Noe Ladines
Browse files
Implemented basic tinker parser
parent
8eeeff89
Changes
3
Hide whitespace changes
Inline
Side-by-side
tinker
@
ba8dd1a8
Compare
eae5d873
...
ba8dd1a8
Subproject commit
eae5d87390863b72875087b1e69cfe15a516a5b9
Subproject commit
ba8dd1a8f5b4a976e84c31fd9a69bbcaf309d0f1
nomad/parsing/file_parser/basic_parser.py
View file @
031b220b
...
...
@@ -62,6 +62,8 @@ class BasicParser(FairdiParser):
self
.
mainfile_parser
.
logger
=
self
.
logger
auxilliary_files
=
self
.
mainfile_parser
.
get
(
'auxilliary_files'
,
os
.
listdir
(
self
.
maindir
))
# remove duplicates, maintain order
auxilliary_files
=
[
f
for
n
,
f
in
enumerate
(
auxilliary_files
)
if
f
not
in
auxilliary_files
[:
n
]]
self
.
auxilliary_parsers
=
[]
for
filename
in
auxilliary_files
:
filename
=
os
.
path
.
basename
(
filename
)
...
...
@@ -133,11 +135,10 @@ class BasicParser(FairdiParser):
for
key
,
values
in
self
.
mainfile_parser
.
items
():
if
values
is
None
:
# get if from auxiliary files
values
=
[]
for
parser
in
self
.
auxilliary_parsers
:
values
=
parser
.
get
(
key
)
if
values
is
not
None
:
break
if
values
is
None
:
values
.
extend
(
parser
.
get
(
key
,
[]))
if
values
is
None
or
len
(
values
)
==
0
:
continue
# set header quantities
set_value
(
sec_run
,
key
,
values
[
0
])
...
...
nomad/parsing/parsers.py
View file @
031b220b
...
...
@@ -66,6 +66,7 @@ from mopacparser import MopacParser
from
namdparser
import
NAMDParser
from
onetepparser
import
OnetepParser
from
siestaparser
import
SiestaParser
from
tinkerparser
import
TinkerParser
try
:
# these packages are not available without parsing extra, which is ok, if the
...
...
@@ -214,11 +215,7 @@ parsers = [
parser_class_name
=
'openkimparser.OpenKIMParser'
,
mainfile_contents_re
=
r
'OPENKIM'
),
LegacyParser
(
name
=
'parsers/tinker'
,
code_name
=
'TINKER'
,
domain
=
'dft'
,
parser_class_name
=
'tinkerparser.TinkerParser'
,
mainfile_contents_re
=
r
'TINKER --- Software Tools for Molecular Design'
),
TinkerParser
(),
LammpsParser
(),
AmberParser
(),
GromacsParser
(),
...
...
Write
Preview
Markdown
is supported
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