Commit be32d304 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

fixing vasprun parser

parent f00ab2d4
......@@ -6,12 +6,12 @@ from __future__ import absolute_import
import sys
import setup_paths
from nomadcore.parser_backend import JsonParseEventsWriterBackend
from vaspparser import VaspParser
from vaspparser import VASPParser
if __name__ == "__main__":
# Initialise the parser with the main filename and a JSON backend
main_file = sys.argv[1]
parser = VaspParser(backend=JsonParseEventsWriterBackend)
parser = VASPParser(backend=JsonParseEventsWriterBackend)
parser.parse(main_file)
......@@ -7,7 +7,7 @@ import os.path
baseDir = os.path.dirname(os.path.abspath(__file__))
commonDir = os.path.normpath(os.path.join(baseDir, "../../../../../python-common/common/python"))
parserDir = os.path.normpath(os.path.join(baseDir, "../../parser-vasp"))
parserDir = os.path.normpath(os.path.join(baseDir, ".."))
# Using sys.path.insert(1, ...) instead of sys.path.insert(0, ...) based on
# this discusssion:
......
......@@ -77,14 +77,15 @@ object VaspRunParser extends SimpleExternalParserGenerator(
?\s*<i name="program" type="string">\s*vasp\s*</i>
?""".r,
cmd = Seq(DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/vasp/parser/parser-vasp/vaspparser/scalainterface.py",
"${mainFileUri}", "${mainFilePath}"),
"${mainFilePath}", "${mainFileUri}"),
cmdCwd = "${mainFilePath}/..",
resList = Seq(
"parser-vasp/vaspparser/__init__.py",
"parser-vasp/vaspparser/parser.py",
"parser-vasp/vaspparser/vaspmainparser.py",
"parser-vasp/vaspparser/parser_vasprun.py",
"parser-vasp/vaspparser/scalainterface.py",
"parser-vasp/vaspparser/setup_paths.py",
"parser-vasp/vaspparser/vaspmainparser.py",
"nomad_meta_info/public.nomadmetainfo.json",
"nomad_meta_info/common.nomadmetainfo.json",
"nomad_meta_info/meta_types.nomadmetainfo.json",
......
......@@ -37,10 +37,10 @@ object VaspRunParserSpec extends Specification {
"VaspRunParserTest" >> {
"test with Al.out" >> {
"test with json-events" >> {
ParserRun.parse(VaspParser, "test/examples/oqmd/relaxation/vasprun.xml", "json-events") must_== ParseResult.ParseSuccess
ParserRun.parse(VaspRunParser, "test/examples/oqmd/relaxation/vasprun.xml", "json-events") must_== ParseResult.ParseSuccess
}
"test with json" >> {
ParserRun.parse(VaspParser, "test/examples/oqmd/relaxation/vasprun.xml", "json") must_== ParseResult.ParseSuccess
ParserRun.parse(VaspRunParser, "test/examples/oqmd/relaxation/vasprun.xml", "json") must_== ParseResult.ParseSuccess
}
}
}
......
Supports Markdown
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