meta 2.0 changes

parent 31d5efec
......@@ -72,10 +72,10 @@ def section_method2metadata(method, methods, metainfo=None):
# Collect all information starting from reference method
if not metainfo:
metainfo = {}
xc_funcs = method.get('section_XC_functionals', [])
xc_funcs = method.get('section_xc_functionals', [])
if xc_funcs:
xc_info = ','.join([
xc_func['XC_functional_name'] for xc_func in xc_funcs])
xc_func['xc_functional_name'] for xc_func in xc_funcs])
if 'nomad_XC_functionals' in metainfo:
metainfo['nomad_XC_functionals'] = metainfo['nomad_XC_functionals'] + ',' + xc_info
else:
......@@ -107,8 +107,8 @@ def add_nomad_metainfo(d, run, calc, system=[]):
info['nomad_program_name'] = run['program_name']
if 'program_version' in run:
info['nomad_program_version'] = ' '.join(run['program_version'].split())
if 'energy_total_T0' in calc:
info['potential_energy'] = calc['energy_total_T0'] * units.J
if 'energy_total_t0' in calc:
info['potential_energy'] = calc['energy_total_t0'] * units.J
if 'energy_total' in calc:
info['nomad_total_energy'] = calc['energy_total'] * units.J
info['energy'] = calc['energy_total'] * units.J
......@@ -118,7 +118,7 @@ def add_nomad_metainfo(d, run, calc, system=[]):
info['nomad_converged'] = calc['single_configuration_calculation_converged']
# Checking the reference section_method for this calc,
# section_single_configuration_calculation
ref_method = calc.get('single_configuration_to_calculation_method_ref')
ref_method = calc.get('single_configuration_calculation_to_method_ref')
methods = run.get('section_method', [])
if methods:
if ref_method is not None:
......
......@@ -384,7 +384,7 @@ class MainHierarchicalParser(AbstractBaseParser):
Example:
self.caching_levels = {
'section_XC_functionals': CachingLevel.ForwardAndCache,
'section_xc_functionals': CachingLevel.ForwardAndCache,
}
caching_levels: Dictionary that stores the caching levels for
individual metanames.
......
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