From 9c4975d42c97ae4d6797c4f985a12217a986ef42 Mon Sep 17 00:00:00 2001
From: Fawzi Mohamed <fawzi.mohamed@fhi-berlin.mpg.de>
Date: Tue, 29 Jan 2019 16:08:45 +0100
Subject: [PATCH] meta 2.0 changes

---
 parser/parser-turbomole/CCSDF12parser.py      |  2 +-
 parser/parser-turbomole/DSCFparser.py         |  2 +-
 parser/parser-turbomole/ESCFparser.py         | 18 +++++-----
 parser/parser-turbomole/GradientParser.py     |  5 ++-
 parser/parser-turbomole/MethodParser.py       | 16 ++++-----
 parser/parser-turbomole/RIDFTparser.py        |  2 +-
 parser/parser-turbomole/RIRPAparser.py        | 10 +++---
 parser/parser-turbomole/SystemParser.py       | 11 +++---
 parser/parser-turbomole/TurbomoleCommon.py    | 22 ++++++------
 .../TurbomoleControlInParser.py               | 34 +++++++++----------
 parser/parser-turbomole/TurbomoleParser.py    | 31 ++++-------------
 .../nomad_lab/parsers/TurbomoleParser.scala   |  2 +-
 12 files changed, 71 insertions(+), 84 deletions(-)

diff --git a/parser/parser-turbomole/CCSDF12parser.py b/parser/parser-turbomole/CCSDF12parser.py
index a72f87f..4d3dbd4 100644
--- a/parser/parser-turbomole/CCSDF12parser.py
+++ b/parser/parser-turbomole/CCSDF12parser.py
@@ -74,7 +74,7 @@ class CCSDF12parser(object):
             self.__auxiliary_indices["config"] = backend.openSection(
                 "section_single_configuration_calculation")
             self.__auxiliary_indices["method"] = backend.openSection("section_method")
-            backend.addValue("single_configuration_to_calculation_method_ref",
+            backend.addValue("single_configuration_calculation_to_method_ref",
                              self.__auxiliary_indices["method"], self.__auxiliary_indices["config"])
             backend.addValue("single_configuration_calculation_to_system_ref",
                              self.__context.index_system(), self.__auxiliary_indices["config"])
diff --git a/parser/parser-turbomole/DSCFparser.py b/parser/parser-turbomole/DSCFparser.py
index df93385..a469265 100644
--- a/parser/parser-turbomole/DSCFparser.py
+++ b/parser/parser-turbomole/DSCFparser.py
@@ -95,7 +95,7 @@ class DSCFparser(object):
                                   name="SCF E total",
                                   required=True
                                   )
-        xc_energy_matcher = SM(r"\s*Exc =\s*(?P<energy_XC_scf_iteration__hartree>"+RE_FLOAT+")"
+        xc_energy_matcher = SM(r"\s*Exc =\s*(?P<energy_xc_scf_iteration__hartree>"+RE_FLOAT+")"
                                r"\s+N =\s*("+RE_FLOAT+")",
                                name="SCF E xc"
                                )
diff --git a/parser/parser-turbomole/ESCFparser.py b/parser/parser-turbomole/ESCFparser.py
index 8a24b15..a5a0d43 100644
--- a/parser/parser-turbomole/ESCFparser.py
+++ b/parser/parser-turbomole/ESCFparser.py
@@ -101,19 +101,19 @@ class ESCFparser(object):
                   )
 
     def __build_gw_qp_states_matcher_no_spin(self):
-        state = SM(r"\s*[0-9]+\s+(?P<x_turbomole_eigenvalue_ks_GroundState__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_eigenvalue_quasiParticle_energy__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_eigenvalue_ExchangeCorrelation_perturbativeGW__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_eigenvalue_ExactExchange_perturbativeGW__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_eigenvalue_correlation_perturbativeGW__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_eigenvalue_ks_ExchangeCorrelation__eV>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_Z_factor>[-+0-9.eEdD]+)\s+"
-                   r"(?P<x_turbomole_ExchangeCorrelation_perturbativeGW_derivation>[-+0-9.eEdD]+)",
+        state = SM(r"\s*[0-9]+\s+(?P<x_turbomole_eigenvalue_ks_groundstate__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_eigenvalue_quasiparticle_energy__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_eigenvalue_exchangecorrelation_perturbativegw__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_eigenvalue_exactexchange_perturbativegw__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_eigenvalue_correlation_perturbativegw__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_eigenvalue_ks_exchangecorrelation__eV>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_z_factor>[-+0-9.eEdD]+)\s+"
+                   r"(?P<x_turbomole_exchangecorrelation_perturbativegw_derivation>[-+0-9.eEdD]+)",
                    name="GW QP state",
                    repeats=True)
         return SM(r"\s*orb\s+eps\s+QP-eps\s+Sigma\s+Sigma_x\s+Sigma_c\s+Vxc\s+Z\s+dS\/de",
                   name="GW QP statelist",
-                  sections=["x_turbomole_section_eigenvalues_GW"],
+                  sections=["x_turbomole_section_eigenvalues_gw"],
                   subMatchers=[
                       SM(r"\s*in\s*eV", required=True, name="GW output unit"),
                       SM(r"\s*----*", name="<format>", coverageIgnore=True),
diff --git a/parser/parser-turbomole/GradientParser.py b/parser/parser-turbomole/GradientParser.py
index 2118f87..5e7ddf2 100644
--- a/parser/parser-turbomole/GradientParser.py
+++ b/parser/parser-turbomole/GradientParser.py
@@ -77,8 +77,11 @@ class GradientParser(object):
             forces[:, :] = 0.0
             for i, atom in enumerate(sorted(self.__forces)):
                 forces[i, 0:3] = atom.x, atom.y, atom.z
-            self.__backend.addArrayValues("atom_forces_raw", forces, gIndex=index_config,
+            fId = self.__backend.openSection('section_atom_forces')
+            self.__backend.addValue("atom_forces_constraints", 'raw')
+            self.__backend.addArrayValues("atom_forces", forces, gIndex=index_config,
                                           unit="forceAu")
+            self.__backend.closeSection('section_atom_forces', fId)
 
     def build_gradient_matcher(self):
 
diff --git a/parser/parser-turbomole/MethodParser.py b/parser/parser-turbomole/MethodParser.py
index 6c665af..11a59bc 100644
--- a/parser/parser-turbomole/MethodParser.py
+++ b/parser/parser-turbomole/MethodParser.py
@@ -94,9 +94,9 @@ class MethodParser(object):
             self.__method = "DFT"
             self.__backend.addValue("electronic_structure_method", "DFT", index_method)
             self.__backend.addValue("calculation_method_kind", "absolute", index_method)
-            index_xc = self.__backend.openSection("section_XC_functionals")
-            self.__backend.addValue('XC_functional_name', "HF_X", index_xc)
-            self.__backend.closeSection("section_XC_functionals", index_xc)
+            index_xc = self.__backend.openSection("section_xc_functionals")
+            self.__backend.addValue('xc_functional_name', "HF_X", index_xc)
+            self.__backend.closeSection("section_xc_functionals", index_xc)
 
     def build_uhf_matcher(self):
 
@@ -138,9 +138,9 @@ class MethodParser(object):
             backend.addValue("electronic_structure_method", "DFT", index_method)
             backend.addValue("calculation_method_kind", "absolute", index_method)
             for component in self.__functional:
-                index_xc = backend.openSection("section_XC_functionals")
-                backend.addValue('XC_functional_name', component, index_xc)
-                backend.closeSection("section_XC_functionals", index_xc)
+                index_xc = backend.openSection("section_xc_functionals")
+                backend.addValue('xc_functional_name', component, index_xc)
+                backend.closeSection("section_xc_functionals", index_xc)
 
         return SM(r"\s*density functional\s*$",
                   name="DFT functional",
@@ -206,12 +206,12 @@ class MethodParser(object):
     def build_dftd3_vdw_matcher(self):
 
         def store_energy(backend, groups):
-            backend.addRealValue("energy_van_der_Waals", float(groups[0]),
+            backend.addRealValue("energy_van_der_waals", float(groups[0]),
                                  self.__context.index_configuration(), unit="hartree")
 
         def store_version(backend, groups):
             backend.addValue("x_turbomole_dft_d3_version", groups[0], self.__context.index_method())
-            backend.addValue("van_der_Waals_method", "DFT-D3", self.__context.index_method())
+            backend.addValue("van_der_waals_method", "DFT-D3", self.__context.index_method())
 
         energy_matcher = SM(r"\s*Edisp\s+/kcal,\s*au\s*:\s*"+RE_FLOAT+"\s+("+RE_FLOAT+")\s*$",
                             name="vdW energy",
diff --git a/parser/parser-turbomole/RIDFTparser.py b/parser/parser-turbomole/RIDFTparser.py
index 1e6012b..12f7190 100644
--- a/parser/parser-turbomole/RIDFTparser.py
+++ b/parser/parser-turbomole/RIDFTparser.py
@@ -99,7 +99,7 @@ class RIDFTparser(object):
                           required=True
                           )
 
-        xc_energy = SM(r"\s*Exc =\s*(?P<energy_XC_scf_iteration__hartree>"+RE_FLOAT+")"
+        xc_energy = SM(r"\s*Exc =\s*(?P<energy_xc_scf_iteration__hartree>"+RE_FLOAT+")"
                        r"\s+Coul =\s*(?P<energy_electrostatic_scf_iteration__hartree>"+RE_FLOAT+")",
                        name="SCF E xc+coul",
                        )
diff --git a/parser/parser-turbomole/RIRPAparser.py b/parser/parser-turbomole/RIRPAparser.py
index b77203b..03d138d 100644
--- a/parser/parser-turbomole/RIRPAparser.py
+++ b/parser/parser-turbomole/RIRPAparser.py
@@ -96,16 +96,16 @@ class RIRPAparser(object):
             index_config = backend.openSection("section_single_configuration_calculation")
             index_method = backend.openSection("section_method")
             references = {"section_method": index_method}
-            backend.addValue("single_configuration_to_calculation_method_ref",
+            backend.addValue("single_configuration_calculation_to_method_ref",
                              index_method, index_config)
             backend.addValue("single_configuration_calculation_to_system_ref",
                              self.__context.index_system(), index_config)
             backend.addValue("electronic_structure_method", "DFT", index_method)
             backend.addValue("calculation_method_kind", "absolute", index_method)
-            index_xc = backend.openSection("section_XC_functionals")
-            backend.setSectionInfo("section_XC_functionals", index_xc, references)
-            backend.addValue('XC_functional_name', "HF_X", index_xc)
-            backend.closeSection("section_XC_functionals", index_xc)
+            index_xc = backend.openSection("section_xc_functionals")
+            backend.setSectionInfo("section_xc_functionals", index_xc, references)
+            backend.addValue('xc_functional_name', "HF_X", index_xc)
+            backend.closeSection("section_xc_functionals", index_xc)
             backend.addRealValue("energy_total", e_hf, index_method, unit="hartree")
 
             index_link = backend.openSection("section_calculation_to_calculation_refs")
diff --git a/parser/parser-turbomole/SystemParser.py b/parser/parser-turbomole/SystemParser.py
index df7d9e5..239d9d1 100644
--- a/parser/parser-turbomole/SystemParser.py
+++ b/parser/parser-turbomole/SystemParser.py
@@ -135,15 +135,16 @@ class SystemParser(object):
         index = self.__backend.openSection("section_method_basis_set")
         self.__backend.setSectionInfo("section_method_basis_set", index, references)
         self.__backend.addValue("number_of_basis_sets_atom_centered", len(self.__atom_kinds), index)
-        refs = np.ndarray(shape=(len(self.__atom_kinds),2), dtype=int)
-        refs[:, :] = -1
+        kindsRefs = np.full(shape=len(self.__atom_kinds), fill_value=-1, dtype=int)
+        basisRefs = np.full(shape=len(self.__atom_kinds), fill_value=-1, dtype=int)
         for i, elem in enumerate(sorted(self.__atom_kinds)):
             kind = self.__atom_kinds[elem]
-            refs[i, 0] = kind.index
-            refs[i, 1] = basis_sets[kind.elem].index
+            kindsRefs[i] = kind.index
+            basisRefs[i] = basis_sets[kind.elem].index
         self.__backend.addValue("method_basis_set_kind",
                                 "density" if is_auxiliary else "wavefunction", index)
-        self.__backend.addArrayValues("mapping_section_method_basis_set_atom_centered", refs, index)
+        self.__backend.addArrayValues("method_basis_set_to_atom_kind_ref", kindsRefs, index)
+        self.__backend.addArrayValues("method_basis_set_to_atom_centered_ref", basisRefs, index)
         self.__backend.closeSection("section_method_basis_set", index)
 
     def build_qm_geometry_matcher(self):
diff --git a/parser/parser-turbomole/TurbomoleCommon.py b/parser/parser-turbomole/TurbomoleCommon.py
index 0ad3d77..6a1a1dd 100644
--- a/parser/parser-turbomole/TurbomoleCommon.py
+++ b/parser/parser-turbomole/TurbomoleCommon.py
@@ -88,19 +88,19 @@ def build_controlinout_matcher():
                            SM (r"\s*total number of SCF-basis functions\s*:\s*(?P<x_turbomole_controlInOut_tot_scf_basis_func>[0-9]+)",sections = ['section_basis_set'], repeats = True),
                            SM (r"\s*density functional"), # XC functional matching follows for turbomole_section_functionals
                            SM (r"\s*\+------------------\+\s*"),
-                           SM (r"\s*(?P<x_turbomole_XC_functional_type>[a-zA-Z-a-zA-Z0-9]+)\s*(?: functional)"),
-                           SM (r"\s*(?P<x_turbomole_XC_functional_type>[a-zA-Z-a-zA-Z0-9]+)\s*(?: meta-GGA functional\s)"),
-                           SM (r"(?:[a-zA-Z-a-zA-Z0-9\s]+)\s*functional\:\s*(?P<x_turbomole_XC_functional_type>[a-zA-Z-a-zA-Z0-9]+)"),
+                           SM (r"\s*(?P<x_turbomole_xc_functional_type>[a-zA-Z-a-zA-Z0-9]+)\s*(?: functional)"),
+                           SM (r"\s*(?P<x_turbomole_xc_functional_type>[a-zA-Z-a-zA-Z0-9]+)\s*(?: meta-GGA functional\s)"),
+                           SM (r"(?:[a-zA-Z-a-zA-Z0-9\s]+)\s*functional\:\s*(?P<x_turbomole_xc_functional_type>[a-zA-Z-a-zA-Z0-9]+)"),
                            SM (r"\s*exchange:\s*(?P<x_turbomole_controlInOut_functional_type_exchange>[a-zA-Z-+a-zA-Z0-9\(\)\s.\*]+)"),
                            SM (r"\s*correlation:\s*(?P<x_turbomole_controlInOut_functional_type_correlation>[a-zA-Z-+a-zA-Z0-9\(\)\s.\*]+)"),
-                           SM (r"\s*spherical integration\s*:\s*(?P<x_turbomole_controlInOut_grid_integration>[a-zA-Z\'\s]+)"),
-                           SM (r"\s*spherical gridsize\s*:\s*(?P<x_turbomole_controlInOut_grid_size>[0-9]+)"),
-                           SM (r"\s*i\.e\. gridpoints\s*:\s*(?P<x_turbomole_controlInOut_grid_points_number>[0-9]+)"),
-                           SM (r"\s*radial integration\s*:\s*(?P<x_turbomole_controlInOut_grid_radial_integration>[a-zA-Z0-9\(\)\s]+)"),
-                           SM (r"\s*radial gridsize\s*:\s*(?P<x_turbomole_controlInOut_grid_radial_grid_size>[0-9]+)"),
-                           SM (r"\s*integration cells\s*:\s*(?P<x_turbomole_controlInOut_grid_integration_cells>[0-9]+)"),
-                           SM (r"\s*partition function\s*:\s*(?P<x_turbomole_controlInOut_grid_partition_func>[a-zA-Z]+)"),
-                           SM (r"\s*partition sharpness\s*:\s*(?P<x_turbomole_controlInOut_grid_partition_sharpness>[0-9]+)"),
+                           SM (r"\s*spherical integration\s*:\s*(?P<x_turbomole_controlinout_grid_integration>[a-zA-Z\'\s]+)"),
+                           SM (r"\s*spherical gridsize\s*:\s*(?P<x_turbomole_controlinout_grid_size>[0-9]+)"),
+                           SM (r"\s*i\.e\. gridpoints\s*:\s*(?P<x_turbomole_controlinout_grid_points_number>[0-9]+)"),
+                           SM (r"\s*radial integration\s*:\s*(?P<x_turbomole_controlinout_grid_radial_integration>[a-zA-Z0-9\(\)\s]+)"),
+                           SM (r"\s*radial gridsize\s*:\s*(?P<x_turbomole_controlinout_grid_radial_grid_size>[0-9]+)"),
+                           SM (r"\s*integration cells\s*:\s*(?P<x_turbomole_controlinout_grid_integration_cells>[0-9]+)"),
+                           SM (r"\s*partition function\s*:\s*(?P<x_turbomole_controlinout_grid_partition_func>[a-zA-Z]+)"),
+                           SM (r"\s*partition sharpness\s*:\s*(?P<x_turbomole_controlinout_grid_partition_sharpness>[0-9]+)"),
                        ]), # END ControlInOutLines
                    SM (name = 'post-HF',
                        startReStr = r"\s*(?:[a-zA-Z-a-zA-Z0-9\s]+)\s*shell calculation for the wavefunction models",
diff --git a/parser/parser-turbomole/TurbomoleControlInParser.py b/parser/parser-turbomole/TurbomoleControlInParser.py
index 1a343ed..9f36258 100644
--- a/parser/parser-turbomole/TurbomoleControlInParser.py
+++ b/parser/parser-turbomole/TurbomoleControlInParser.py
@@ -78,37 +78,37 @@ def build_TurbomoleControlInKeywordsSimpleMatchers():
     # List the matchers in alphabetical order according to keyword name.
     #
     return [
-        SM (r"\s*\$operating system\s+(?P<x_turbomole_controlIn_operating_system>[a-zA-Z\s]+)", repeats = True),
-        SM (r"\s*\$symmetry\s+(?P<x_turbomole_controlIn_symmetry>[a-zA-Z0-9])", repeats = True),
+        SM (r"\s*\$operating system\s+(?P<x_turbomole_controlin_operating_system>[a-zA-Z\s]+)", repeats = True),
+        SM (r"\s*\$symmetry\s+(?P<x_turbomole_controlin_symmetry>[a-zA-Z0-9])", repeats = True),
         SM (startReStr = r"\s*\$atoms\s+",
             forwardMatch = True,
             #repeats = True,
             subMatchers = [
-            SM (r"\s*(?P<x_turbomole_controlIn_atom_label>[a-zA-Z]+)\s+(?P<x_turbomole_controlIn_atom_number>[0-9]+)\s*(?: \\)", repeats = True)#,
-            #SM (r"\s*(?P<x_turbomole_controlIn_atom_label>[a-zA-Z]+)\s+(?P<x_turbomole_controlIn_atom_number>[-0-9]+)\s*(?: \\)", repeats = True)
+            SM (r"\s*(?P<x_turbomole_controlin_atom_label>[a-zA-Z]+)\s+(?P<x_turbomole_controlin_atom_number>[0-9]+)\s*(?: \\)", repeats = True)#,
+            #SM (r"\s*(?P<x_turbomole_controlin_atom_label>[a-zA-Z]+)\s+(?P<x_turbomole_controlin_atom_number>[-0-9]+)\s*(?: \\)", repeats = True)
             ]),
-        SM (r"\s*\$pople\s+(?P<x_turbomole_controlIn_pople_kind>[a-zA-Z]+)", repeats = True),
+        SM (r"\s*\$pople\s+(?P<x_turbomole_controlin_pople_kind>[a-zA-Z]+)", repeats = True),
         SM (r"\s*\$uhfmo_alpha\s*file\=alpha"),
         SM (r"\s*\$uhfmo_beta\s*file\=beta"),
-        SM (r"\s*\$scfiterlimit\s+(?P<x_turbomole_controlIn_scf_iter_limit>[0-9]+)"),
-        SM (r"\s*\$scfconv\s+(?P<x_turbomole_controlIn_scf_conv>[0-9]+)"),
-        #SM (r"\s*\$thize\s+(?P<x_turbomole_controlIn_number_of_integral_stored>[.0-9.eEdD]+)"),
-        SM (r"\s*\$thime\s+(?P<x_turbomole_controlIn_time_for_integral_calc>[0-9]+)"),
-        SM (r"\s*\$scfdamp\s+start\=(?P<x_turbomole_controlIn_damping_parameter_start>[.0-9]+)\s*step\=\s*(?P<x_turbomole_controlIn_damping_parameter_step>[.0-9]+)\s*min\=\s*(?P<x_turbomole_controlIn_damping_parameter_min>[.0-9]+)"),
+        SM (r"\s*\$scfiterlimit\s+(?P<x_turbomole_controlin_scf_iter_limit>[0-9]+)"),
+        SM (r"\s*\$scfconv\s+(?P<x_turbomole_controlin_scf_conv>[0-9]+)"),
+        #SM (r"\s*\$thize\s+(?P<x_turbomole_controlin_number_of_integral_stored>[.0-9.eEdD]+)"),
+        SM (r"\s*\$thime\s+(?P<x_turbomole_controlin_time_for_integral_calc>[0-9]+)"),
+        SM (r"\s*\$scfdamp\s+start\=(?P<x_turbomole_controlin_damping_parameter_start>[.0-9]+)\s*step\=\s*(?P<x_turbomole_controlin_damping_parameter_step>[.0-9]+)\s*min\=\s*(?P<x_turbomole_controlin_damping_parameter_min>[.0-9]+)"),
         SM (startReStr = r"\s*\$scfintunit",                                      
             forwardMatch = True,                                                
             subMatchers = [                                                     
-            SM (r"\s*unit\=(?P<x_turbomole_controlIn_scfintunit_unit>[0-9]+)\s*size\=\s*(?P<x_turbomole_controlIn_scfintunit_size>[0-9]+)\s*file\=\s*(?P<x_turbomole_controlIn_scfintunit_file>[a-zA-Z]+)")#,
+            SM (r"\s*unit\=(?P<x_turbomole_controlin_scfintunit_unit>[0-9]+)\s*size\=\s*(?P<x_turbomole_controlin_scfintunit_size>[0-9]+)\s*file\=\s*(?P<x_turbomole_controlin_scfintunit_file>[a-zA-Z]+)")#,
             ]),
         SM (startReStr = r"\s*\$drvopt",                                   
             forwardMatch = True,                                                
             subMatchers = [  
-            SM (r"\s*(?:cartesian)\s+(?P<x_turbomole_controlIn_cartesian_status>[a-zA-Z]+)"),
-            SM (r"\s*(?:basis)\s+(?P<x_turbomole_controlIn_basis_status>[a-z-A-Z]+)"),
-            SM (r"\s*(?:global)\s+(?P<x_turbomole_controlIn_global_status>[a-zA-Z]+)"),
-            SM (r"\s*(?:hessian)\s+(?P<x_turbomole_controlIn_hessian_status>[a-z-A-Z]+)"),
-            SM (r"\s*(?:dipole)\s+(?P<x_turbomole_controlIn_dipole_status>[a-zA-Z]+)"),
-            SM (r"\s*(?:\$interconversion)\s+(?P<x_turbomole_controlIn_interconversion_status>[a-zA-Z]+)")
+            SM (r"\s*(?:cartesian)\s+(?P<x_turbomole_controlin_cartesian_status>[a-zA-Z]+)"),
+            SM (r"\s*(?:basis)\s+(?P<x_turbomole_controlin_basis_status>[a-z-A-Z]+)"),
+            SM (r"\s*(?:global)\s+(?P<x_turbomole_controlin_global_status>[a-zA-Z]+)"),
+            SM (r"\s*(?:hessian)\s+(?P<x_turbomole_controlin_hessian_status>[a-z-A-Z]+)"),
+            SM (r"\s*(?:dipole)\s+(?P<x_turbomole_controlin_dipole_status>[a-zA-Z]+)"),
+            SM (r"\s*(?:\$interconversion)\s+(?P<x_turbomole_controlin_interconversion_status>[a-zA-Z]+)")
             ])
         ]
 
diff --git a/parser/parser-turbomole/TurbomoleParser.py b/parser/parser-turbomole/TurbomoleParser.py
index 4024026..062459e 100644
--- a/parser/parser-turbomole/TurbomoleParser.py
+++ b/parser/parser-turbomole/TurbomoleParser.py
@@ -135,9 +135,11 @@ class TurbomoleParserContext(object):
 
         def close_section_method(backend, gIndex, section):
             self["geo"].write_basis_set_mapping(self.index_configuration(), gIndex)
-            self.__invocations[-1].kinetic_energy = self["method"].get_energy_kinetic()
-            self.__invocations[-1].potential_energy = self["method"].get_energy_potential()
-            backend.addValue("single_configuration_to_calculation_method_ref", gIndex,
+            if self["method"].get_energy_kinetic() is not None:
+                backend.addRealValue('kinetic_energy', float(self["method"].get_energy_kinetic()), unit="hartree")
+            if self["method"].get_energy_potential() is not None:
+                backend.addRealValue('potential_energy', float(self["method"].get_energy_potential()), unit="hartree")
+            backend.addValue("single_configuration_calculation_to_method_ref", gIndex,
                              self.index_configuration())
 
         def close_section_system(backend, gIndex, section):
@@ -279,31 +281,12 @@ class TurbomoleParserContext(object):
 
         if self.__sampling_mode_section is not None:
             index = backend.openSection("section_frame_sequence")
-            backend.addValue("frame_sequence_to_sampling_ref", self.__sampling_mode_section, index)
+            backend.addValue("frame_sequence_to_sampling_method_ref", self.__sampling_mode_section, index)
             if self.__geometry_converged:
                 backend.addValue("geometry_optimization_converged", self.__geometry_converged,
                                  index)
             frames_all = np.asarray([x.index_config for x in self.__invocations], dtype=int)
-            frames_kinetic = np.asarray([x.index_config for x in self.__invocations
-                                         if x.kinetic_energy], dtype=int)
-            frames_potential = np.asarray([x.index_config for x in self.__invocations
-                                         if x.potential_energy], dtype=int)
-            energies_kinetic = np.asarray([x.kinetic_energy for x in self.__invocations
-                                if x.kinetic_energy], dtype=float)
-            energies_potential = np.asarray([x.potential_energy for x in self.__invocations
-                                             if x.potential_energy], dtype=float)
-            backend.addValue("number_of_frames_in_sequence", len(self.__invocations), index)
-            backend.addValue("number_of_kinetic_energies_in_sequence", len(energies_kinetic), index)
-            backend.addValue("number_of_potential_energies_in_sequence",
-                             len(energies_potential), index)
-            backend.addArrayValues("frame_sequence_local_frames_ref", frames_all, index)
-            backend.addArrayValues("frame_sequence_kinetic_energy_frames", frames_kinetic, index)
-            backend.addArrayValues("frame_sequence_potential_energy_frames", frames_potential,
-                                   index)
-            backend.addArrayValues("frame_sequence_kinetic_energy", energies_kinetic, index,
-                                   unit="hartree")
-            backend.addArrayValues("frame_sequence_potential_energy", energies_potential, index,
-                                   unit="hartree")
+            backend.addArrayValues("frame_sequence_to_frames_ref", frames_all, index)
             backend.closeSection("section_frame_sequence", index)
 
 
diff --git a/src/main/scala/eu/nomad_lab/parsers/TurbomoleParser.scala b/src/main/scala/eu/nomad_lab/parsers/TurbomoleParser.scala
index 50dc994..e1a6a62 100644
--- a/src/main/scala/eu/nomad_lab/parsers/TurbomoleParser.scala
+++ b/src/main/scala/eu/nomad_lab/parsers/TurbomoleParser.scala
@@ -63,7 +63,7 @@ object TurbomoleParser extends SimpleExternalParserGenerator(
     "parser-turbomole/setup_paths.py",
     "nomad_meta_info/public.nomadmetainfo.json",
     "nomad_meta_info/common.nomadmetainfo.json",
-    "nomad_meta_info/meta_types.nomadmetainfo.json",
+    "nomad_meta_info/meta.nomadmetainfo.json",
     "nomad_meta_info/turbomole.nomadmetainfo.json"
   ) ++ DefaultPythonInterpreter.commonFiles(),
   dirMap = Map(
-- 
GitLab