Skip to content
Snippets Groups Projects
Commit a9a95ab1 authored by Daria Tomecka's avatar Daria Tomecka
Browse files

wien2k: errata - section_XC

parent 268e1923
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ class Wien2kContext(object): ...@@ -38,6 +38,7 @@ class Wien2kContext(object):
section["x_wien2k_release_date"][0]) section["x_wien2k_release_date"][0])
def onOpen_section_system(self, backend, gIndex, section): def onOpen_section_system(self, backend, gIndex, section):
self.secSystemIndex = gIndex
mainFile = self.parser.fIn.fIn.name mainFile = self.parser.fIn.fIn.name
fName = mainFile[:-4] + ".struct" fName = mainFile[:-4] + ".struct"
if os.path.exists(fName): if os.path.exists(fName):
...@@ -131,11 +132,6 @@ class Wien2kContext(object): ...@@ -131,11 +132,6 @@ class Wien2kContext(object):
backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex) backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex)
def onOpen_section_system(self, backend, gIndex, section):
#if self.secSystemIndex is None:
self.secSystemIndex = gIndex
# self.secSystemIndex["single_configuration_calculation_to_system_ref"] = gIndex
def onClose_section_system(self, backend, gIndex, section): def onClose_section_system(self, backend, gIndex, section):
#backend.addValue("smearing_kind", x_fleur_smearing_kind) #backend.addValue("smearing_kind", x_fleur_smearing_kind)
......
...@@ -3,7 +3,7 @@ import setup_paths ...@@ -3,7 +3,7 @@ import setup_paths
from nomadcore.simple_parser import mainFunction, CachingLevel from nomadcore.simple_parser import mainFunction, CachingLevel
from nomadcore.simple_parser import SimpleMatcher as SM from nomadcore.simple_parser import SimpleMatcher as SM
from nomadcore.local_meta_info import loadJsonFile, InfoKindEl from nomadcore.local_meta_info import loadJsonFile, InfoKindEl
import os, sys, json import os, sys, json, logging
...@@ -30,9 +30,9 @@ class Wien2kIn0Context(object): ...@@ -30,9 +30,9 @@ class Wien2kIn0Context(object):
def onClose_x_wien2k_section_XC(self, backend, gIndex, section): def onClose_x_wien2k_section_XC(self, backend, gIndex, section):
xc_index = section["x_wien2k_indxc"] #[0] xc_index = section["x_wien2k_indxc"] #[0]
# logging.error("winsectxc: %s -> %s", section, xc_index)
if not xc_index: if not xc_index:
functional = "XC_PBE" xc_index = ["XC_PBE"]
if functional:
xc_map_legend = { xc_map_legend = {
'5': ['LDA_C_PW_RPA'], '5': ['LDA_C_PW_RPA'],
...@@ -102,9 +102,9 @@ class Wien2kIn0Context(object): ...@@ -102,9 +102,9 @@ class Wien2kIn0Context(object):
} }
# Push the functional string into the backend # Push the functional string into the backend
xc_map_legend = xc_map_legend.get(functional) xc_map_legend = xc_map_legend.get(xc_index[0])
if not xc_map_legend: if not xc_map_legend:
raise Exception("Unhandled xc functional %s found" % functional) raise Exception("Unhandled xc functional %s found" % xc_index)
for xc_name in xc_map_legend: for xc_name in xc_map_legend:
...@@ -119,7 +119,7 @@ def buildIn0Matchers(): ...@@ -119,7 +119,7 @@ def buildIn0Matchers():
name = 'root', name = 'root',
weak = True, weak = True,
startReStr = "", startReStr = "",
sections = ["section_run", "section_method", "section_XC_functionals"], sections = ["section_run", "section_method"],
subMatchers = [ subMatchers = [
# SM(name = 'systemName', # SM(name = 'systemName',
# startReStr = r"(?P<x_wien2k_system_nameIn>.*)"), # startReStr = r"(?P<x_wien2k_system_nameIn>.*)"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment