Skip to content
Snippets Groups Projects
Commit 660338bb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Parser optimizations.

parent edc78862
Branches
Tags
No related merge requests found
...@@ -25,8 +25,9 @@ from vaspparser.parser_vasprun import parserInfo ...@@ -25,8 +25,9 @@ from vaspparser.parser_vasprun import parserInfo
from vaspparser.parser_vasprun import VasprunContext, XmlParser, parserInfo from vaspparser.parser_vasprun import VasprunContext, XmlParser, parserInfo
from vaspparser.parser_outcar import VaspOutcarParser from vaspparser.parser_outcar import VaspOutcarParser
from nomad.parsing.legacy import CoEInterfaceParser
class VASPRunParser: class VASPRunMainParser:
""" """
The main parser class that is called for all run types. Parses the VASP The main parser class that is called for all run types. Parses the VASP
.xml output files. .xml output files.
...@@ -78,10 +79,16 @@ class VASPRunParserInterface(ParserInterface): ...@@ -78,10 +79,16 @@ class VASPRunParserInterface(ParserInterface):
dirpath = os.path.abspath(dirpath) dirpath = os.path.abspath(dirpath)
self.parser_context.file_service.setup_root_folder(dirpath) self.parser_context.file_service.setup_root_folder(dirpath)
self.parser_context.file_service.set_file_id(filename, "output") self.parser_context.file_service.set_file_id(filename, "output")
self.main_parser = VASPRunParser(self.parser_context) self.main_parser = VASPRunMainParser(self.parser_context)
def get_metainfo_filename(self): def get_metainfo_filename(self):
return "vasp.nomadmetainfo.json" return "vasp.nomadmetainfo.json"
def get_parser_info(self): def get_parser_info(self):
return parserInfo return parserInfo
class VASPRunParser(CoEInterfaceParser):
def __init__(self):
super().__init__(VASPRunParserInterface)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment