From 47683a29e2b096b689bae5d4137b811389a51d2f Mon Sep 17 00:00:00 2001 From: lopa Date: Wed, 3 Aug 2016 15:52:56 +0200 Subject: [PATCH] added brillouin zone metadata --- parser/parser-elk/parser_elk.py | 51 ++++++--------------------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/parser/parser-elk/parser_elk.py b/parser/parser-elk/parser_elk.py index 956b35f..8fbd940 100644 --- a/parser/parser-elk/parser_elk.py +++ b/parser/parser-elk/parser_elk.py @@ -1,5 +1,6 @@ from builtins import object import setup_paths +import numpy as np from nomadcore.simple_parser import mainFunction, AncillaryParser, CachingLevel from nomadcore.simple_parser import SimpleMatcher as SM from nomadcore.local_meta_info import loadJsonFile, InfoKindEl @@ -28,55 +29,21 @@ mainFileDescription = \ weak = True, subMatchers = [ SM(name = "header", - startReStr = r"\s*\|\s*Elk\s*(?P[-a-zA-Z0-9]+)\s*started\s*=", + startReStr = r"\s*\|\s*Elk version\s*(?P[-a-zA-Z0-9]+)\s*started\s*=", fixedStartValues={'program_name': 'elk', 'program_basis_set_type': '(L)APW+lo' }, sections = ["section_run", "section_method"], subMatchers = [ SM(name = 'input', - startReStr = r"\|\sStarting initialization", - endReStr = r"\|\sEnding initialization", - sections = ['section_system'] - ), + startReStr = r"\|\sGroundi\-state run starting from atomic densities\s\|\s", + endReStr = r"\|\sDensity and potential initialised from atomic data\s", + sections = ['section_system'], + subMatchers = [ + SM(r"\s*Unit cell volume\s*:\s*(?P[-0-9.]+)"), + SM(r"\s*Brillouin zone volume\s*:\s*(?P[-0-9.]+)") + ] ) ]) ]) - - -#mainFileDescription = SM( -# name = 'root', -# weak = True, -# startReStr = "", -# subMatchers = [ -# SM(name = 'newRun', -# startReStr = r"\s*:LABEL[0-9]+: using WIEN2k_(?:[0-9.]+) \(Release (?:[0-9/.]+)\) in ", -# repeats = True, -# required = True, -# forwardMatch = True, -# sections = ['section_run', 'section_method', 'section_system', 'section_single_configuration_calculation'], -# subMatchers = [ -# SM( -# name = 'header', -# startReStr = r"\s*:LABEL[0-9]+: using WIEN2k_(?P[0-9.]+) \(Release (?P[0-9/.]+)\) in ", -# sections=["x_wien2k_header"], -# fixedStartValues={'program_name': 'WIEN2k', 'program_basis_set_type': '(L)APW+lo' } -# ), SM( -# name = "scf iteration", -# startReStr = r"\s*:ITE(?P[0-9]+):\s*[0-9]*. ITERATION", -# sections=["section_scf_iteration"], -# repeats = True, -# subMatchers=[ -# SM(r":NATO :\s*(?P[0-9]+)INDEPENDENT AND\s*(?P[0-9]+)\s*TOTAL ATOMS IN UNITCELL"), -# SM(r"\s*SUBSTANCE: (?P.*)"), -# SM(r":POT\s*:\s*POTENTIAL OPTION\s*(?P[0-9]+)"), -# SM(r":VOL\s*:\s*UNIT CELL VOLUME\s*=\s*(?P[0-9.]+)") -# ] -# ) -# ] -# ) -# ]) - -# loading metadata from nomad-meta-info/meta_info/nomad_meta_info/fhi_aims.nomadmetainfo.json - parserInfo = { "name": "Elk" } -- GitLab