Commit 031b220b authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Implemented basic tinker parser

parent 8eeeff89
Subproject commit eae5d87390863b72875087b1e69cfe15a516a5b9
Subproject commit ba8dd1a8f5b4a976e84c31fd9a69bbcaf309d0f1
......@@ -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])
......
......@@ -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(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment