Skip to content
Snippets Groups Projects
Commit 04656a61 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

meta 2.0 changes

parent 9392341f
No related branches found
No related merge requests found
...@@ -80,7 +80,7 @@ def parse(filename): ...@@ -80,7 +80,7 @@ def parse(filename):
with o(p, 'section_single_configuration_calculation'): with o(p, 'section_single_configuration_calculation'):
p.addValue('single_configuration_calculation_to_system_ref', p.addValue('single_configuration_calculation_to_system_ref',
system_gid) system_gid)
p.addValue('single_configuration_to_calculation_method_ref', p.addValue('single_configuration_calculation_to_method_ref',
method_gid) method_gid)
p.addRealValue('energy_total', c(r.energy_total, 'eV')) p.addRealValue('energy_total', c(r.energy_total, 'eV'))
if 'x_mopac_fhof' in r: if 'x_mopac_fhof' in r:
...@@ -89,13 +89,15 @@ def parse(filename): ...@@ -89,13 +89,15 @@ def parse(filename):
p.addRealValue('electronic_kinetic_energy', p.addRealValue('electronic_kinetic_energy',
c(r.electronic_kinetic_energy, 'eV')) c(r.electronic_kinetic_energy, 'eV'))
if 'atom_forces' in r: if 'atom_forces' in r:
fId = p.openSection('section_atom_forces')
p.addArrayValues('atom_forces', p.addArrayValues('atom_forces',
c(r.atom_forces, 'eV/angstrom')) c(r.atom_forces, 'eV/angstrom'))
p.closeSection('section_atom_forces', fId)
if 'energy_reference_highest_occupied' in r: if 'energy_reference_highest_occupied' in r:
p.addArrayValues('energy_reference_highest_occupied', p.addArrayValues('energy_reference_highest_occupied',
c(r.energy_reference_highest_occupied, 'eV')) c(r.energy_reference_highest_occupied, 'eV'))
if 'spin_S2' in r: if 'spin_s2' in r:
p.addRealValue('spin_S2', r.spin_S2) p.addRealValue('spin_s2', r.spin_s2)
if 'time_calculation' in r: if 'time_calculation' in r:
p.addRealValue('time_calculation', r.time_calculation) p.addRealValue('time_calculation', r.time_calculation)
... ...
......
...@@ -62,8 +62,8 @@ class Reader: ...@@ -62,8 +62,8 @@ class Reader:
re.compile(r"NO.\s*OF\s*ALPHA\s*ELECTRONS\s*=\s*(?P<n_alpha>[0-9]+)"), re.compile(r"NO.\s*OF\s*ALPHA\s*ELECTRONS\s*=\s*(?P<n_alpha>[0-9]+)"),
'n_beta': 'n_beta':
re.compile(r"NO.\s*OF\s*BETA\s*ELECTRONS\s*=\s*(?P<n_beta>[0-9]+)"), re.compile(r"NO.\s*OF\s*BETA\s*ELECTRONS\s*=\s*(?P<n_beta>[0-9]+)"),
'spin_S2': 'spin_s2':
re.compile(r"\(S\*\*2\)\s*=\s*(?P<spin_S2>[0-9.]+)"), re.compile(r"\(S\*\*2\)\s*=\s*(?P<spin_s2>[0-9.]+)"),
'time_calculation': 'time_calculation':
re.compile(r"TOTAL\s*JOB\s*TIME:\s*(?P<time_calculation>[0-9.]+)\s*"), re.compile(r"TOTAL\s*JOB\s*TIME:\s*(?P<time_calculation>[0-9.]+)\s*"),
'total_charge': 'total_charge':
...@@ -200,10 +200,10 @@ class Reader: ...@@ -200,10 +200,10 @@ class Reader:
float)).reshape(1, 1, -1) float)).reshape(1, 1, -1)
self.data['eigenvalues_values'] = eigs self.data['eigenvalues_values'] = eigs
if self.data.get('spin_S2') is None: if self.data.get('spin_s2') is None:
m = re.search(self.restrs['spin_S2'], line) m = re.search(self.restrs['spin_s2'], line)
if m: if m:
self.data['spin_S2'] = float(m.group('spin_S2')) self.data['spin_s2'] = float(m.group('spin_s2'))
if self.data.get('time_calculation') is None: if self.data.get('time_calculation') is None:
m = re.search(self.restrs['time_calculation'], line) m = re.search(self.restrs['time_calculation'], line)
... ...
......
...@@ -49,7 +49,7 @@ object MopacParser extends SimpleExternalParserGenerator( ...@@ -49,7 +49,7 @@ object MopacParser extends SimpleExternalParserGenerator(
"parser-mopac/setup_paths.py", "parser-mopac/setup_paths.py",
"nomad_meta_info/public.nomadmetainfo.json", "nomad_meta_info/public.nomadmetainfo.json",
"nomad_meta_info/common.nomadmetainfo.json", "nomad_meta_info/common.nomadmetainfo.json",
"nomad_meta_info/meta_types.nomadmetainfo.json", "nomad_meta_info/meta.nomadmetainfo.json",
"nomad_meta_info/mopac.nomadmetainfo.json" "nomad_meta_info/mopac.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(), ) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map( dirMap = Map(
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment