diff --git a/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py b/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py index efbca21761b432d955501314d3b0d7ad1fd13494..07a97678f61463338fccc19bc7070d8923892038 100644 --- a/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py +++ b/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py @@ -166,7 +166,7 @@ def generate_input_metainfos(filepath): "type": "nomad_meta_info_1_0", "description": "Metainfo for the values parsed from a CPMD input file.", "dependencies": [ { - "relativePath": "cpmd.general.nomadmetainfo.json" + "relativePath": "cpmd_general.nomadmetainfo.json" }], } diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py index 58238cd17eb0e352c16cd4ecb68d34959007059d..0d69f16f96552db504ee61e0a3035bd219504b37 100644 --- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py +++ b/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py @@ -49,7 +49,7 @@ class CPMDCommonParser(CommonParser): self.cache_service.add("configuration_periodic_dimensions", single=False, update=False) self.cache_service.add("single_configuration_calculation_to_system_ref", single=False, update=True) - self.cache_service.add("single_configuration_to_calculation_method_ref", single=False, update=False) + self.cache_service.add("single_configuration_calculation_to_method_ref", single=False, update=False) #=========================================================================== # Common SimpleMatchers @@ -177,13 +177,13 @@ class CPMDCommonParser(CommonParser): SM( " LATTICE CONSTANT\(a\.u\.\):\s+(?P<x_cpmd_cell_lattice_constant>{})".format(self.regexs.float)), SM( " CELL DIMENSION:\s+(?P<x_cpmd_cell_dimension>{})".format(self.regexs.eol)), SM( " VOLUME\(OMEGA IN BOHR\^3\):\s+(?P<x_cpmd_cell_volume>{})".format(self.regexs.float)), - SM( " LATTICE VECTOR A1\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A1>{})".format(self.regexs.eol)), - SM( " LATTICE VECTOR A2\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A2>{})".format(self.regexs.eol)), - SM( " LATTICE VECTOR A3\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A3>{})".format(self.regexs.eol)), - SM( " RECIP\. LAT\. VEC\. B1\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B1>{})".format(self.regexs.eol)), - SM( " RECIP\. LAT\. VEC\. B2\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B2>{})".format(self.regexs.eol)), - SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B3>{})".format(self.regexs.eol)), - SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B3>{})".format(self.regexs.eol)), + SM( " LATTICE VECTOR A1\(BOHR\):\s+(?P<x_cpmd_lattice_vector_a1>{})".format(self.regexs.eol)), + SM( " LATTICE VECTOR A2\(BOHR\):\s+(?P<x_cpmd_lattice_vector_a2>{})".format(self.regexs.eol)), + SM( " LATTICE VECTOR A3\(BOHR\):\s+(?P<x_cpmd_lattice_vector_a3>{})".format(self.regexs.eol)), + SM( " RECIP\. LAT\. VEC\. B1\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_b1>{})".format(self.regexs.eol)), + SM( " RECIP\. LAT\. VEC\. B2\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_b2>{})".format(self.regexs.eol)), + SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_b3>{})".format(self.regexs.eol)), + SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_b3>{})".format(self.regexs.eol)), SM( " REAL SPACE MESH:\s+(?P<x_cpmd_real_space_mesh>{})".format(self.regexs.eol)), SM( " WAVEFUNCTION CUTOFF\(RYDBERG\):\s+(?P<x_cpmd_wave_function_cutoff>{})".format(self.regexs.float)), SM( " DENSITY CUTOFF\(RYDBERG\): \(DUAL= 4\.00\)\s+(?P<x_cpmd_density_cutoff>{})".format(self.regexs.float)), @@ -228,7 +228,7 @@ class CPMDCommonParser(CommonParser): #=========================================================================== # onOpen triggers def onOpen_section_method(self, backend, gIndex, section): - self.cache_service["single_configuration_to_calculation_method_ref"] = gIndex + self.cache_service["single_configuration_calculation_to_method_ref"] = gIndex def onOpen_section_system(self, backend, gIndex, section): self.cache_service["single_configuration_calculation_to_system_ref"] = gIndex @@ -241,7 +241,7 @@ class CPMDCommonParser(CommonParser): def onClose_section_single_configuration_calculation(self, backend, gIndex, section): self.cache_service.addValue("single_configuration_calculation_to_system_ref") - self.cache_service.addValue("single_configuration_to_calculation_method_ref") + self.cache_service.addValue("single_configuration_calculation_to_method_ref") def onClose_section_system(self, backend, gIndex, section): self.cache_service.addArrayValues("configuration_periodic_dimensions") @@ -285,9 +285,9 @@ class CPMDCommonParser(CommonParser): def onClose_x_cpmd_section_supercell(self, backend, gIndex, section): # Simulation cell - A1 = section.get_latest_value("x_cpmd_lattice_vector_A1") - A2 = section.get_latest_value("x_cpmd_lattice_vector_A2") - A3 = section.get_latest_value("x_cpmd_lattice_vector_A3") + A1 = section.get_latest_value("x_cpmd_lattice_vector_a1") + A2 = section.get_latest_value("x_cpmd_lattice_vector_a2") + A3 = section.get_latest_value("x_cpmd_lattice_vector_a3") A1_array = self.vector_from_string(A1) A2_array = self.vector_from_string(A2) A3_array = self.vector_from_string(A3) diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py index 31143b44b7cf909f9a6443e704d5ea53e347b1b4..49d53552308e8cbef112947f9773b978191e3eae 100644 --- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py +++ b/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py @@ -34,7 +34,6 @@ class CPMDGeoOptParser(MainHierarchicalParser): self.n_frames = 0 self.sampling_method_gid = None self.frame_refs = [] - self.energies = [] #======================================================================= # Cache levels @@ -113,9 +112,11 @@ class CPMDGeoOptParser(MainHierarchicalParser): total_energy = section.get_latest_value("x_cpmd_geo_opt_step_etot") if total_energy: backend.addValue("energy_total", total_energy) - self.energies.append(total_energy) + backend.addValue("potential_energy", total_energy) forces = section.get_latest_value("x_cpmd_geo_opt_step_forces") + fId = backend.openSection("section_atom_forces") backend.addArrayValues("atom_forces", forces) + backend.closeSection("section_atom_forces", fId) positions = section.get_latest_value("x_cpmd_geo_opt_step_positions") backend.addArrayValues("atom_positions", positions) self.n_frames += 1 @@ -126,11 +127,9 @@ class CPMDGeoOptParser(MainHierarchicalParser): def onClose_section_frame_sequence(self, backend, gIndex, section): backend.addValue("number_of_frames_in_sequence", self.n_frames) if self.sampling_method_gid is not None: - backend.addValue("frame_sequence_to_sampling_ref", self.sampling_method_gid) + backend.addValue("frame_sequence_to_sampling_method_ref", self.sampling_method_gid) if self.frame_refs: - backend.addArrayValues("frame_sequence_local_frames_ref", np.array(self.frame_refs)) - if self.energies: - backend.addArrayValues("frame_sequence_potential_energy", np.array(self.energies)) + backend.addArrayValues("frame_sequence_to_frames_ref", np.array(self.frame_refs)) def onClose_section_sampling_method(self, backend, gIndex, section): # For single point calculations there is only one method and system. diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py index 0bce7365ae1eb4ace133fada3a44956be476415b..c04e545cde30cf1b9dc5075f452ff6a8236c909a 100644 --- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py +++ b/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py @@ -21,6 +21,10 @@ from cpmdparser.generic.inputparsing import metainfo_data_prefix, metainfo_secti logger = logging.getLogger("nomad") +def metaN(metaName): + """Retrurns a normalized meta name""" + return metaName.replace(".", "_").lower() + class CPMDInputParser(AbstractBaseParser): """Parses the CPMD input file. """ @@ -267,12 +271,12 @@ class CPMDInputParser(AbstractBaseParser): # backend and construct the summary string for i, functional in enumerate(xc_list): - gId = self.backend.openSection("section_XC_functionals") - self.backend.addValue("XC_functional_name", functional.name) - self.backend.addValue("XC_functional_weight", functional.weight) + gId = self.backend.openSection("section_xc_functionals") + self.backend.addValue("xc_functional_name", functional.name) + self.backend.addValue("xc_functional_weight", functional.weight) if functional.parameters is not None: pass - self.backend.closeSection("section_XC_functionals", gId) + self.backend.closeSection("section_xc_functionals", gId) if i != 0: xc_summary += "+" @@ -282,7 +286,7 @@ class CPMDInputParser(AbstractBaseParser): # Stream summary if xc_summary is not "": - self.backend.addValue("XC_functional", xc_summary) + self.backend.addValue("xc_functional", xc_summary) def fill_metadata(self): """Goes through the input data and pushes everything to the @@ -299,40 +303,40 @@ class CPMDInputParser(AbstractBaseParser): section_name = metainfo_section_prefix + "{}".format(section.name) else: section_name = metainfo_section_prefix[:-1] - gid = self.backend.openSection(section_name) + gid = self.backend.openSection(metaN(section_name)) # Keywords for keyword_list in section.keywords.values(): for keyword in keyword_list: if keyword.accessed: # Open keyword section - keyword_name = metainfo_section_prefix + "{}.{}".format(section.name, keyword.unique_name.replace(" ", "_")) - key_id = self.backend.openSection(keyword_name) + keyword_name = metainfo_section_prefix + "{}_{}".format(section.name, keyword.unique_name.replace(" ", "_")) + key_id = self.backend.openSection(metaN(keyword_name)) # Add options if keyword.options: - option_name = metainfo_data_prefix + "{}.{}_options".format(section.name, keyword.unique_name.replace(" ", "_")) - self.backend.addValue(option_name, keyword.options) + option_name = metainfo_data_prefix + "{}_{}_options".format(section.name, keyword.unique_name.replace(" ", "_")) + self.backend.addValue(metaN(option_name), keyword.options) # Add parameters if keyword.parameters: - parameter_name = metainfo_data_prefix + "{}.{}_parameters".format(section.name, keyword.unique_name.replace(" ", "_")) - self.backend.addValue(parameter_name, keyword.parameters) + parameter_name = metainfo_data_prefix + "{}_{}_parameters".format(section.name, keyword.unique_name.replace(" ", "_")) + self.backend.addValue(metaN(parameter_name), keyword.parameters) # Close keyword section - self.backend.closeSection(keyword_name, key_id) + self.backend.closeSection(metaN(keyword_name), key_id) # # Default keyword default_keyword = section.default_keyword if default_keyword is not None: name = metainfo_data_prefix + "{}_default_keyword".format(section.name) - self.backend.addValue(name, default_keyword) + self.backend.addValue(metaN(name), default_keyword) # Subsections for subsection in section.subsections.values(): fill_metadata_recursively(subsection) - self.backend.closeSection(section_name, gid) + self.backend.closeSection(metaN(section_name), gid) fill_metadata_recursively(self.input_tree) diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py index b029247a4ae78afe5e7b6ae4dd3a39c887572363..c574398329110f35f48fea25136412093230777b 100644 --- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py +++ b/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py @@ -208,7 +208,9 @@ class CPMDMDParser(MainHierarchicalParser): self.backend.addArrayValues("atom_velocities", velocities, unit="bohr/(hbar/hartree)") forces = values[:, 7:10] + fId = self.backend.openSection("section_atom_forces") self.backend.addArrayValues("atom_forces", forces, unit="forceAu") + self.backend.closeSection("section_atom_forces", fId) if trajec_file_iterator is None: pos = values[:, 1:4] @@ -245,36 +247,13 @@ class CPMDMDParser(MainHierarchicalParser): # msd = values[6] # i_step = values[0] tcpu = values[7] - conserved_quantities.append(conserved_quantity) - potential_energies.append(potential_energy) - kinetic_energies.append(kinetic_energy) - temperatures.append(temperature) + self.backend.addRealValue("conserved_quantity", conserved_quantity, unit="hartree") + self.backend.addRealValue("potential_energy", potential_energy, unit="hartree") + self.backend.addRealValue("kinetic_energy", kinetic_energy, unit="hartree") + self.backend.addRealValue("instant_temperature", temperature, unit="K") self.backend.addRealValue("energy_total", potential_energy, unit="hartree") self.backend.addValue("time_calculation", tcpu) # Close sections self.backend.closeSection("section_single_configuration_calculation", scc_id) self.backend.closeSection("section_system", sys_id) - - # Push the summaries - if potential_energies: - potential_energies = np.array(potential_energies) - self.backend.addArrayValues("frame_sequence_potential_energy", potential_energies, unit="hartree") - if kinetic_energies: - kinetic_energies = np.array(kinetic_energies) - self.backend.addArrayValues("frame_sequence_kinetic_energy", kinetic_energies, unit="hartree") - - # Push the statistics. CPMD prints some statistics at the end, but the - # mean and std of kinetic energy are missing - kin_mean = kinetic_energies.mean() - kin_temp = (kinetic_energies - kin_mean) - kin_std = np.sqrt(np.dot(kin_temp, kin_temp)/kinetic_energies.size) - kin_temp = None - self.backend.addArrayValues("frame_sequence_kinetic_energy_stats", np.array([kin_mean, kin_std]), unit="hartree") - - if conserved_quantities: - conserved_quantities = np.array(conserved_quantities) - self.backend.addArrayValues("frame_sequence_conserved_quantity", conserved_quantities, unit="hartree") - if temperatures: - temperatures = np.array(temperatures) - self.backend.addArrayValues("frame_sequence_temperature", temperatures, unit="K") diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py index ec8b73b5c74acb6d7a9d4b3e05b1a0fae82c9372..cb2f45ac15e2c07628a3dea9d39c31b91b7b6b69 100644 --- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py +++ b/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py @@ -67,7 +67,7 @@ class CPMDSinglePointParser(MainHierarchicalParser): ), SM( " \(K\+E1\+L\+N\+X\) TOTAL ENERGY =\s+(?P<energy_total__hartree>{}) A\.U\.".format(self.regexs.float)), SM( " \(E1=A-S\+R\) ELECTROSTATIC ENERGY =\s+(?P<energy_electrostatic__hartree>{}) A\.U\.".format(self.regexs.float)), - SM( " \(X\) EXCHANGE-CORRELATION ENERGY =\s+(?P<energy_XC_potential__hartree>{}) A\.U\.".format(self.regexs.float)), + SM( " \(X\) EXCHANGE-CORRELATION ENERGY =\s+(?P<energy_xc_potential__hartree>{}) A\.U\.".format(self.regexs.float)), ] ), self.cm.footer(), @@ -124,7 +124,9 @@ class CPMDSinglePointParser(MainHierarchicalParser): # If anything found, push the results to the correct section if len(forces) != 0: + fId = parser.backend.openSection('section_atom_forces') parser.backend.addArrayValues("atom_forces", forces, unit="hartree/bohr") + parser.backend.closeSection('section_atom_forces', fId) return wrapper diff --git a/regtests/regtests.py b/regtests/regtests.py index 34c2067876a1d04794104872256c41b2d4a36fd3..3ab154f58f275cf7ca7269211a984ebb319676ee 100644 --- a/regtests/regtests.py +++ b/regtests/regtests.py @@ -61,23 +61,23 @@ class TestInputParser(unittest.TestCase): # cls.results.print_summary() def test_x_cpmd_input_functional(self): - result = self.results["x_cpmd_input_DFT.FUNCTIONAL_options"] + result = self.results["x_cpmd_input_dft_functional_options"] self.assertEqual(result, "LDA") def test_x_cpmd_input_cutoff(self): - result = self.results["x_cpmd_input_SYSTEM.CUTOFF_parameters"] + result = self.results["x_cpmd_input_system_cutoff_parameters"] self.assertEqual(result, "70.0") def test_x_cpmd_input_info(self): - result = self.results["x_cpmd_input_INFO_default_keyword"] + result = self.results["x_cpmd_input_info_default_keyword"] self.assertEqual(result, "isolated hydrogen molecule.\nsingle point calculation.") def test_x_cpmd_input_atoms(self): - result = self.results["x_cpmd_input_ATOMS_default_keyword"] + result = self.results["x_cpmd_input_atoms_default_keyword"] self.assertEqual(result, "*H_MT_LDA.psp\nLMAX=S\n2\n4.371 4.000 4.000\n3.629 4.000 4.000") def test_x_cpmd_input_optimize_wavefunction(self): - self.results["x_cpmd_section_input_CPMD.OPTIMIZE_WAVEFUNCTION"] + self.results["x_cpmd_section_input_cpmd_optimize_wavefunction"] class TestSinglePoint(unittest.TestCase): @@ -171,7 +171,7 @@ class TestSinglePoint(unittest.TestCase): self.assertTrue(np.array_equal(result, expected_result)) def test_energy_XC_potential(self): - result = self.results["energy_XC_potential"] + result = self.results["energy_xc_potential"] expected_result = convert_unit(np.array(-0.65031699), "hartree") self.assertTrue(np.array_equal(result, expected_result)) @@ -221,7 +221,7 @@ class TestSinglePoint(unittest.TestCase): self.assertTrue(np.array_equal(kind["mapping_section_method_basis_set_cell_associated"], 0)) def test_single_configuration_to_calculation_method_ref(self): - result = self.results["single_configuration_to_calculation_method_ref"] + result = self.results["single_configuration_calculation_to_method_ref"] self.assertEqual(result, 0) def test_single_configuration_calculation_to_system_description_ref(self): @@ -267,7 +267,7 @@ class TestGeoOpt(unittest.TestCase): def test_single_configuration_calculation_to_system_ref(self): result = self.results["section_single_configuration_calculation"] for i_scc, scc in enumerate(result): - self.assertEqual(scc["single_configuration_to_calculation_method_ref"], 0) + self.assertEqual(scc["single_configuration_calculation_to_method_ref"], 0) self.assertEqual(scc["single_configuration_calculation_to_system_ref"], i_scc) def test_geometry_optimization_threshold_force(self): @@ -329,16 +329,16 @@ class TestGeoOpt(unittest.TestCase): self.assertTrue(np.array_equal(result[-1], expected_end)) def test_frame_sequence_to_sampling_ref(self): - result = self.results["frame_sequence_to_sampling_ref"] + result = self.results["frame_sequence_to_sampling_method_ref"] self.assertEqual(result, 0) def test_frame_sequence_local_frames_ref(self): - result = self.results["frame_sequence_local_frames_ref"] + result = self.results["frame_sequence_to_frames_ref"] expected_result = np.array([0, 1, 2, 3, 4]) self.assertTrue(np.array_equal(result, expected_result)) def test_frame_sequence_potential_energy(self): - result = self.results["frame_sequence_potential_energy"] + result = self.results["potential_energy"] self.assertEqual(len(result), 5) expected_result = convert_unit( np.array([ @@ -488,25 +488,25 @@ class TestMD(unittest.TestCase): self.assertTrue(np.array_equal(result[-1, :], expected_end)) def test_frame_sequence_potential_energy(self): - result = self.results["frame_sequence_potential_energy"] + result = self.results["potential_energy"] self.assertTrue(np.array_equal(result, self.pot)) def test_frame_sequence_kinetic_energy(self): - result = self.results["frame_sequence_kinetic_energy"] + result = self.results["kinetic_energy"] self.assertTrue(np.array_equal(result, self.kin)) def test_frame_sequence_conserved_quantity(self): - result = self.results["frame_sequence_conserved_quantity"] + result = self.results["conserved_quantity"] self.assertTrue(np.array_equal(result, self.cons)) def test_frame_sequence_temperature(self): - result = self.results["frame_sequence_temperature"] + result = self.results["instant_temperature"] self.assertTrue(np.array_equal(result, self.temp)) def test_single_configuration_calculation_to_system_ref(self): result = self.results["section_single_configuration_calculation"] for i_scc, scc in enumerate(result): - self.assertEqual(scc["single_configuration_to_calculation_method_ref"], 0) + self.assertEqual(scc["single_configuration_calculation_to_method_ref"], 0) self.assertEqual(scc["single_configuration_calculation_to_system_ref"], i_scc) def test_frame_sequence_time(self): @@ -715,63 +715,63 @@ class TestXCFunctional(unittest.TestCase): """Tests that the XC functionals can be properly parsed. """ def test_lda(self): - xc = get_result("xc_functional/lda", "XC_functional") + xc = get_result("xc_functional/lda", "xc_functional") self.assertEqual(xc, "1*LDA_XC_TETER93") def test_blyp(self): - xc = get_result("xc_functional/blyp", "XC_functional") + xc = get_result("xc_functional/blyp", "xc_functional") self.assertEqual(xc, "1*GGA_C_LYP+1*GGA_X_B88") def test_b3lyp(self): - xc = get_result("xc_functional/b3lyp", "XC_functional") + xc = get_result("xc_functional/b3lyp", "xc_functional") self.assertEqual(xc, "1*HYB_GGA_XC_B3LYP") def test_pbe(self): - xc = get_result("xc_functional/pbe", "XC_functional") + xc = get_result("xc_functional/pbe", "xc_functional") self.assertEqual(xc, "1*GGA_C_PBE+1*GGA_X_PBE") def test_olyp(self): - xc = get_result("xc_functional/olyp", "XC_functional") + xc = get_result("xc_functional/olyp", "xc_functional") self.assertEqual(xc, "1*GGA_C_LYP+1*GGA_X_OPTX") def test_hcth(self): - xc = get_result("xc_functional/hcth", "XC_functional") + xc = get_result("xc_functional/hcth", "xc_functional") self.assertEqual(xc, "1*GGA_XC_HCTH_120") def test_pbe0(self): - xc = get_result("xc_functional/pbe0", "XC_functional") + xc = get_result("xc_functional/pbe0", "xc_functional") self.assertEqual(xc, "1*HYB_GGA_XC_PBEH") def test_bp(self): - xc = get_result("xc_functional/bp", "XC_functional") + xc = get_result("xc_functional/bp", "xc_functional") self.assertEqual(xc, "1*GGA_C_P86+1*GGA_X_B88") def test_xlyp(self): - xc = get_result("xc_functional/xlyp", "XC_functional") + xc = get_result("xc_functional/xlyp", "xc_functional") self.assertEqual(xc, "1*GGA_XC_XLYP") def test_pbes(self): - xc = get_result("xc_functional/pbes", "XC_functional") + xc = get_result("xc_functional/pbes", "xc_functional") self.assertEqual(xc, "1*GGA_C_PBE_SOL+1*GGA_X_PBE_SOL") def test_revpbe(self): - xc = get_result("xc_functional/revpbe", "XC_functional") + xc = get_result("xc_functional/revpbe", "xc_functional") self.assertEqual(xc, "1*GGA_C_PBE+1*GGA_X_PBE_R") def test_tpss(self): - xc = get_result("xc_functional/tpss", "XC_functional") + xc = get_result("xc_functional/tpss", "xc_functional") self.assertEqual(xc, "1*MGGA_C_TPSS+1*MGGA_X_TPSS") def test_b1lyp(self): - xc = get_result("xc_functional/b1lyp", "XC_functional") + xc = get_result("xc_functional/b1lyp", "xc_functional") self.assertEqual(xc, "1*HYB_GGA_XC_B1LYP") def test_x3lyp(self): - xc = get_result("xc_functional/x3lyp", "XC_functional") + xc = get_result("xc_functional/x3lyp", "xc_functional") self.assertEqual(xc, "1*HYB_GGA_XC_X3LYP") def test_hse06(self): - xc = get_result("xc_functional/hse06", "XC_functional") + xc = get_result("xc_functional/hse06", "xc_functional") self.assertEqual(xc, "1*HYB_GGA_XC_HSE06") @@ -951,7 +951,7 @@ class TestXCFunctional(unittest.TestCase): # ensemble = results["ensemble_type"] # self.assertEqual(ensemble, "NPT") - # pressure = results["frame_sequence_pressure"] + # pressure = results["instant_pressure"] # self.assertTrue(np.array_equal(pressure, self.pressure)) # pressure_stats = results["frame_sequence_pressure_stats"] diff --git a/src/main/scala/eu/nomad_lab/parsers/CpmdParser.scala b/src/main/scala/eu/nomad_lab/parsers/CpmdParser.scala index 2779dbe69175c4ddaa4bf3e0dc85132bb275cb38..36b16a825d6105a84357234cb9aa8820369f585d 100644 --- a/src/main/scala/eu/nomad_lab/parsers/CpmdParser.scala +++ b/src/main/scala/eu/nomad_lab/parsers/CpmdParser.scala @@ -66,8 +66,8 @@ object CpmdParser extends SimpleExternalParserGenerator( "parser-cpmd/cpmdparser/generic/inputparsing.py", "nomad_meta_info/public.nomadmetainfo.json", "nomad_meta_info/common.nomadmetainfo.json", - "nomad_meta_info/meta_types.nomadmetainfo.json", - "nomad_meta_info/cpmd.general.nomadmetainfo.json", + "nomad_meta_info/meta.nomadmetainfo.json", + "nomad_meta_info/cpmd_general.nomadmetainfo.json", "nomad_meta_info/cpmd.nomadmetainfo.json" ) ++ DefaultPythonInterpreter.commonFiles(), dirMap = Map(