diff --git a/parser/parser-big-dft/bigdftparser/parser.py b/parser/parser-big-dft/bigdftparser/parser.py index c9ab3b9ae2132c017449e7be41d7a291eb53f72f..5efab8b340bb3f9da2b94d6a728f835f41c885bd 100644 --- a/parser/parser-big-dft/bigdftparser/parser.py +++ b/parser/parser-big-dft/bigdftparser/parser.py @@ -24,11 +24,13 @@ class BigDFTParser(ParserInterface): """ # Search for the BigDFT version specification. The correct parser is # initialized based on this information. - regex_version = re.compile(" Northwest Computational Chemistry Package \(NWChem\) (\d+\.\d+)") + regex_version = re.compile(" Version Number\s+: (\d\.\d)") version_id = None with open(self.parser_context.main_file, 'r') as outputfile: - for line in outputfile: - # Look for version + header = outputfile.read(50*80) + for line in header.split("\n"): + + # Look for version definition result_version = regex_version.match(line) if result_version: version_id = result_version.group(1).replace('.', '') @@ -64,7 +66,7 @@ class BigDFTParser(ParserInterface): parser_module = importlib.import_module(base) except ImportError: logger.warning("Could not find a parser for version '{}'. Trying to default to the base implementation for BigDFT 1.8.0".format(version_id)) - base = "bigdftparser.versions.bigdft180.mainparser" + base = "bigdftparser.versions.bigdft18.mainparser" try: parser_module = importlib.import_module(base) except ImportError: diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8.0/run_tests.py b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8.0/run_tests.py deleted file mode 100644 index 3142bcb249c5511998393cec43dc2a5ca0856093..0000000000000000000000000000000000000000 --- a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8.0/run_tests.py +++ /dev/null @@ -1,756 +0,0 @@ -""" -This is a module for unit testing the NWChem parser. The unit tests are run with -a custom backend that outputs the results directly into native python object for -easier and faster analysis. - -Each property that has an enumerable list of different possible options is -assigned a new test class, that should ideally test through all the options. - -The properties that can have non-enumerable values will be tested only for one -specific case inside a test class that is designed for a certain type of run -(MD, optimization, QM/MM, etc.) -""" -import os -import unittest -import logging -import numpy as np -from nwchemparser import NWChemParser -from nomadcore.unit_conversion.unit_conversion import convert_unit - - -#=============================================================================== -def get_results(folder, metainfo_to_keep=None): - """Get the given result from the calculation in the given folder by using - the Analyzer in the nomadtoolkit package. Tries to optimize the parsing by - giving the metainfo_to_keep argument. - - Args: - folder: The folder relative to the directory of this script where the - parsed calculation resides. - metaname: The quantity to extract. - """ - dirname = os.path.dirname(__file__) - filename = os.path.join(dirname, folder, "output.out") - parser = NWChemParser(filename, None, debug=True, log_level=logging.WARNING) - results = parser.parse() - return results - - -#=============================================================================== -def get_result(folder, metaname, optimize=True): - if optimize: - results = get_results(folder, None) - else: - results = get_results(folder) - result = results[metaname] - return result - - -#=============================================================================== -class TestDFTGaussianEnergy(unittest.TestCase): - """Tests that the parser can handle DFT energy calculations. - """ - - @classmethod - def setUpClass(cls): - cls.results = get_results("dft_gaussian/energy", "section_run") - # cls.results.print_summary() - - def test_program_name(self): - result = self.results["program_name"] - self.assertEqual(result, "NWChem") - - def test_configuration_periodic_dimensions(self): - result = self.results["configuration_periodic_dimensions"] - self.assertTrue(np.array_equal(result, np.array([False, False, False]))) - - def test_program_version(self): - result = self.results["program_version"] - self.assertEqual(result, "6.6") - - def test_xc_functional(self): - result = self.results["XC_functional"] - self.assertEqual(result, "1.0*MGGA_C_TPSS+1.0*MGGA_X_TPSS") - - def test_atom_labels(self): - atom_labels = self.results["atom_labels"] - expected_labels = np.array(["O", "H", "H"]) - self.assertTrue(np.array_equal(atom_labels, expected_labels)) - - def test_atom_positions(self): - atom_position = self.results["atom_positions"] - expected_position = convert_unit(np.array( - [ - [0.00000000, 0.00000000, -0.11817375], - [0.76924532, 0.00000000, 0.47269501], - [-0.76924532, 0.00000000, 0.47269501], - ] - ), "angstrom") - self.assertTrue(np.array_equal(atom_position, expected_position)) - - def test_number_of_atoms(self): - n_atoms = self.results["number_of_atoms"] - self.assertEqual(n_atoms, 3) - - def test_total_charge(self): - charge = self.results["total_charge"] - self.assertEqual(charge, 0) - - def test_energy_total(self): - result = self.results["energy_total"] - expected_result = convert_unit(np.array(-76.436222730188), "hartree") - self.assertTrue(np.array_equal(result, expected_result)) - - def test_energy_x(self): - result = self.results["energy_X"] - expected_result = convert_unit(np.array(-9.025345841743), "hartree") - self.assertTrue(np.array_equal(result, expected_result)) - - def test_energy_c(self): - result = self.results["energy_C"] - expected_result = convert_unit(np.array(-0.328011552453), "hartree") - self.assertTrue(np.array_equal(result, expected_result)) - - def test_energy_total_scf_iteration(self): - result = self.results["energy_total_scf_iteration"] - # Test the first and last energies - expected_result = convert_unit(np.array( - [ - [-76.3916403957], - [-76.4362227302], - ]), "hartree") - self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) - - def test_energy_change_scf_iteration(self): - result = self.results["energy_change_scf_iteration"] - expected_result = convert_unit(np.array( - [ - [-8.55E+01], - [-3.82E-07], - ]), "hartree") - self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) - - def test_scf_max_iteration(self): - result = self.results["scf_max_iteration"] - self.assertEqual(result, 50) - - def test_scf_threshold_energy_change(self): - result = self.results["scf_threshold_energy_change"] - self.assertEqual(result, convert_unit(1.00E-06, "hartree")) - - def test_electronic_structure_method(self): - result = self.results["electronic_structure_method"] - self.assertEqual(result, "DFT") - - def test_scf_dft_number_of_iterations(self): - result = self.results["number_of_scf_iterations"] - self.assertEqual(result, 6) - - def test_spin_target_multiplicity(self): - multiplicity = self.results["spin_target_multiplicity"] - self.assertEqual(multiplicity, 1) - - def test_single_configuration_to_calculation_method_ref(self): - result = self.results["single_configuration_to_calculation_method_ref"] - self.assertEqual(result, 0) - - def test_single_configuration_calculation_to_system_description_ref(self): - result = self.results["single_configuration_calculation_to_system_ref"] - self.assertEqual(result, 0) - - # def test_single_configuration_calculation_converged(self): - # result = self.results["single_configuration_calculation_converged"] - # self.assertTrue(result) - - # def test_section_method_atom_kind(self): - # kind = self.results["section_method_atom_kind"][0] - # self.assertEqual(kind["method_atom_kind_atom_number"][0], 1) - # self.assertEqual(kind["method_atom_kind_label"][0], "H") - - # def test_section_method_basis_set(self): - # kind = self.results["section_method_basis_set"][0] - # self.assertEqual(kind["method_basis_set_kind"][0], "wavefunction") - # self.assertTrue(np.array_equal(kind["mapping_section_method_basis_set_cell_associated"][0], 0)) - - # def test_number_of_spin_channels(self): - # result = self.results["number_of_spin_channels"] - # self.assertEqual(result, 1) - - # def test_simulation_cell(self): - # cell = self.results["simulation_cell"] - # n_vectors = cell.shape[0] - # n_dim = cell.shape[1] - # self.assertEqual(n_vectors, 3) - # self.assertEqual(n_dim, 3) - # expected_cell = convert_unit(np.array([[15.1178, 0, 0], [0, 15.1178, 0], [0, 0, 15.1178]]), "bohr") - # self.assertTrue(np.array_equal(cell, expected_cell)) - - # def test_basis_set_cell_dependent(self): - # kind = self.results["basis_set_cell_dependent_kind"] - # name = self.results["basis_set_cell_dependent_name"] - # cutoff = self.results["basis_set_planewave_cutoff"] - - # self.assertEqual(kind, "plane_waves") - # self.assertEqual(name, "PW_70.0") - # self.assertEqual(cutoff, convert_unit(70.00000, "rydberg")) - - -#=============================================================================== -class TestDFTGaussianForce(unittest.TestCase): - """Tests that the parser can handle DFT force calculations. - """ - @classmethod - def setUpClass(cls): - cls.results = get_results("dft_gaussian/force", "section_run") - - def test_configuration_periodic_dimensions(self): - result = self.results["configuration_periodic_dimensions"] - self.assertTrue(np.array_equal(result, np.array([False, False, False]))) - - def test_electronic_structure_method(self): - result = self.results["electronic_structure_method"] - self.assertEqual(result, "DFT") - - def test_xc_functional(self): - result = self.results["XC_functional"] - self.assertEqual(result, "1.0*MGGA_C_TPSS+1.0*MGGA_X_TPSS") - - def test_atom_forces(self): - result = self.results["atom_forces"] - expected_result = convert_unit( - -np.array([ - [0.000000, 0.000000, -0.000037], - [0.000006, 0.000000, 0.000018], - [-0.000006, 0.000000, 0.000018], - ]), - "hartree/bohr" - ) - self.assertTrue(np.array_equal(result, expected_result)) - - -#=============================================================================== -class TestDFTGaussianGeoOpt(unittest.TestCase): - """Tests that the parser can handle DFT geometry optimizations. - """ - @classmethod - def setUpClass(cls): - cls.results = get_results("dft_gaussian/geo_opt", "section_run") - - def test_configuration_periodic_dimensions(self): - result = self.results["configuration_periodic_dimensions"][0] - self.assertTrue(np.array_equal(result, np.array([False, False, False]))) - - def test_xc_functional(self): - result = self.results["XC_functional"] - self.assertEqual(result, "1.0*MGGA_C_TPSS+1.0*MGGA_X_TPSS") - - def test_electronic_structure_method(self): - result = self.results["electronic_structure_method"] - self.assertEqual(result, "DFT") - - def test_frame_sequence(self): - sequence = self.results["section_frame_sequence"][0] - - # Number of frames - n_frames = self.results["number_of_frames_in_sequence"] - self.assertEqual(n_frames, 4) - - # Potential energy - pot_ener = sequence["frame_sequence_potential_energy"] - expected_pot_ener = convert_unit( - np.array([ - -76.42941861, - -76.43609119, - -76.43622176, - -76.43622273, - ]), - "hartree" - ) - self.assertTrue(np.array_equal(pot_ener, expected_pot_ener)) - - # Test positions - positions = self.results["atom_positions"] - expected_pos = convert_unit( - np.array([ - [ - [0.00000000, 0.00000000, -0.14142136], - [0.70710678, 0.00000000, 0.56568542], - [-0.70710678, 0.00000000, 0.56568542], - ], - [ - [0.00000000, 0.00000000, -0.06392934], - [0.76924532, 0.00000000, 0.52693942], - [-0.76924532, 0.00000000, 0.52693942], - ], - ]), - "angstrom" - ) - self.assertTrue(np.array_equal(np.array([positions[0], positions[-1]]), expected_pos)) - - # Test labels - scc_indices = self.results["frame_sequence_local_frames_ref"] - sccs = self.results["section_single_configuration_calculation"] - systems = self.results["section_system"] - labels = [] - for index in scc_indices: - scc = sccs[index] - system_ref = scc["single_configuration_calculation_to_system_ref"] - system = systems[system_ref] - i_labels = system["atom_labels"] - labels.append(i_labels) - expected_labels = np.array(4*["O", "H", "H"]).reshape(4, 3) - self.assertTrue(np.array_equal(labels, expected_labels)) - - def test_sampling_method(self): - result = self.results["sampling_method"] - self.assertEqual(result, "geometry_optimization") - - def test_geometry_optimization_threshold_force(self): - result = self.results["geometry_optimization_threshold_force"] - expected_result = convert_unit(0.000450, "bohr^-1*hartree") - self.assertEqual(result, expected_result) - - def test_geometry_optimization_energy_change(self): - result = self.results["geometry_optimization_energy_change"] - expected_result = convert_unit(5.0E-06, "hartree") - self.assertEqual(result, expected_result) - - def test_geometry_optimization_geometry_change(self): - result = self.results["geometry_optimization_geometry_change"] - expected_result = convert_unit(0.001800, "bohr") - self.assertEqual(result, expected_result) - - def test_atom_forces(self): - result = self.results["atom_forces"] - expected_start = convert_unit( - -np.array([ - [0.000000, 0.000000, -0.056081], - [-0.006520, 0.000000, 0.028040], - [0.006520, 0.000000, 0.028040], - ]), - "hartree/bohr" - ) - self.assertTrue(np.array_equal(result[0, :, :], expected_start)) - expected_end = convert_unit( - -np.array([ - [0.000000, 0.000000, -0.000037], - [0.000006, 0.000000, 0.000018], - [-0.000006, 0.000000, 0.000018], - ]), - "hartree/bohr" - ) - self.assertTrue(np.array_equal(result[-1, :, :], expected_end)) - self.assertEqual(len(result), 4) - - def test_energy_total(self): - result = self.results["energy_total"] - np.set_printoptions(precision=12) - expected_start = convert_unit(-76.429418611381, "hartree") - self.assertTrue(np.array_equal(result[0], expected_start)) - - def test_frame_sequence_to_sampling_ref(self): - result = self.results["frame_sequence_to_sampling_ref"] - self.assertEqual(result, 0) - - def test_frame_sequence_local_frames_ref(self): - result = self.results["frame_sequence_local_frames_ref"] - expected_result = np.array([0, 2, 4, 6]) - self.assertTrue(np.array_equal(result, expected_result)) - - -#=============================================================================== -class TestDFTGaussianMD(unittest.TestCase): - @classmethod - def setUpClass(cls): - cls.results = get_results("dft_gaussian/md", "section_run") - cls.time = convert_unit( - np.array([ - 0.241888, - 0.483777, - 0.725665, - 0.967554, - 1.209442, - ]), - "fs" - ) - cls.kin = convert_unit( - np.array([ - 0.001588, - 0.001316, - 0.001306, - 0.000875, - 0.000360, - ]), - "hartree" - ) - cls.pot = convert_unit( - np.array([ - -76.325047, - -76.324974, - -76.324885, - -76.324800, - -76.324755, - ]), - "hartree" - ) - cls.cons = convert_unit( - np.array([ - -76.323459, - -76.323657, - -76.323578, - -76.323925, - -76.324394, - ]), - "hartree" - ) - cls.temp = convert_unit( - np.array([ - 334.35, - 277.07, - 275.04, - 184.29, - 75.89, - ]), - "K" - ) - - def get_system(self, index): - scc = self.get_scc(index) - system_ref = scc["single_configuration_calculation_to_system_ref"] - system = self.results["section_system"][system_ref] - return system - - def get_scc(self, index): - sample_refs = self.results["frame_sequence_local_frames_ref"] - sccs = self.results["section_single_configuration_calculation"] - scc = sccs[sample_refs[index]] - return scc - - def test_configuration_periodic_dimensions(self): - result = self.results["configuration_periodic_dimensions"][0] - self.assertTrue(np.array_equal(result, np.array([False, False, False]))) - - def test_single_configuration_to_calculation_method(self): - result = self.results["single_configuration_to_calculation_method_ref"] - self.assertTrue(np.array_equal(result, np.array(6*[0]))) - - def test_electronic_structure_method(self): - result = self.results["electronic_structure_method"] - self.assertEqual(result, "DFT") - - def test_xc_functional(self): - result = self.results["XC_functional"] - self.assertEqual(result, "1.0*HYB_GGA_XC_PBEH") - - def test_sampling_method(self): - result = self.results["sampling_method"] - self.assertEqual(result, "molecular_dynamics") - - def test_ensemble_type(self): - result = self.results["ensemble_type"] - self.assertEqual(result, "NVT") - - def test_frame_sequence_to_sampling_ref(self): - result = self.results["frame_sequence_to_sampling_ref"] - self.assertEqual(result, 0) - - def test_frame_sequence_local_frames_ref(self): - result = self.results["frame_sequence_local_frames_ref"] - self.assertTrue(np.array_equal(result, np.array(range(1, 6)))) - - def test_number_of_frames_in_sequence(self): - result = self.results["number_of_frames_in_sequence"] - self.assertEqual(result, 5) - - def test_frame_sequence_potential_energy(self): - result = self.results["frame_sequence_potential_energy"] - self.assertTrue(np.array_equal(result, self.pot)) - - def test_frame_sequence_kinetic_energy(self): - result = self.results["frame_sequence_kinetic_energy"] - self.assertTrue(np.array_equal(result, self.kin)) - - def test_frame_sequence_temperature(self): - result = self.results["frame_sequence_temperature"] - self.assertTrue(np.array_equal(result, self.temp)) - - def test_frame_sequence_time(self): - result = self.results["frame_sequence_time"] - self.assertTrue(np.array_equal(result, self.time)) - - def test_frame_sequence_potential_energy_stats(self): - result = self.results["frame_sequence_potential_energy_stats"] - expected_result = np.array([self.pot.mean(), self.pot.std()]) - self.assertTrue(np.allclose(result[0], expected_result[0], rtol=0, atol=0.00001e-18)) - self.assertTrue(np.allclose(result[1], expected_result[1], rtol=0, atol=0.00001e-20)) - - def test_frame_sequence_kinetic_energy_stats(self): - result = self.results["frame_sequence_kinetic_energy_stats"] - expected_result = np.array([self.kin.mean(), self.kin.std()]) - self.assertTrue(np.allclose(result[0], expected_result[0], rtol=0, atol=0.00001e-18)) - self.assertTrue(np.allclose(result[1], expected_result[1], rtol=0, atol=0.00001e-20)) - - def test_frame_sequence_temperature_stats(self): - result = self.results["frame_sequence_temperature_stats"] - expected_result = np.array([self.temp.mean(), self.temp.std()]) - self.assertTrue(np.allclose(result[0], expected_result[0], rtol=0, atol=0.001)) - self.assertTrue(np.allclose(result[1], expected_result[1], rtol=0, atol=0.0001)) - - def test_atom_positions(self): - first_system = self.get_system(0) - first_pos = first_system["atom_positions"] - last_system = self.get_system(-1) - last_pos = last_system["atom_positions"] - expected_start = convert_unit( - np.array([ - [-0.000000, -0.032407, 0.213730], - [ 0.000000, 1.547303, -0.646826], - [-0.000000, -1.283238, -1.058258], - ]), - "bohr" - ) - expected_end = convert_unit( - np.array([ - [-0.000000, -0.034144, 0.212417], - [ 0.000000, 1.583695, -0.644729], - [-0.000000, -1.292061, -1.039511], - ]), - "bohr" - ) - - self.assertTrue(np.array_equal(first_pos, expected_start)) - self.assertTrue(np.array_equal(last_pos, expected_end)) - - def test_atom_forces(self): - first_force = self.get_scc(0)["atom_forces"] - last_force = self.get_scc(-1)["atom_forces"] - expected_start = convert_unit( - -np.array([ - [ 0.000000, -0.003686, -0.024792], - [-0.000000, -0.009261, 0.007954], - [ 0.000000, 0.012947, 0.016838], - ]), - "forceAu" - ) - expected_end = convert_unit( - -np.array([ - [-0.000000, -0.023297, -0.023732], - [-0.000000, 0.008095, 0.001352], - [ 0.000000, 0.015202, 0.022380], - ]), - "forceAu" - ) - - self.assertTrue(np.array_equal(first_force, expected_start)) - self.assertTrue(np.array_equal(last_force, expected_end)) - - # def test_atom_velocities(self): - # result = self.results["atom_velocities"] - # expected_start = convert_unit( - # np.array([ - # [0.00039772295627, 0.00024115257177, 0.00026132422738], - # [-0.00039772295627, -0.00024115257177, -0.00026132422738], - # ]), - # "bohr/(hbar/hartree)" - # ) - # expected_end = convert_unit( - # np.array([ - # [0.00094644268934, 0.00023563385430, 0.00025534388718], - # [-0.00094644268934, -0.00023563385430, -0.00025534388718], - # ]), - # "bohr/(hbar/hartree)" - # ) - - # self.assertTrue(np.array_equal(result[0, :], expected_start)) - # self.assertTrue(np.array_equal(result[-1, :], expected_end)) - - -#=============================================================================== -class TestDFTGaussianXCFunctional(unittest.TestCase): - """Tests that the XC functionals can be properly parsed. - """ - def test_blyp(self): - xc = get_result("dft_gaussian/functionals/blyp", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_LYP+1.0*GGA_X_B88") - - def test_b3lyp(self): - xc = get_result("dft_gaussian/functionals/b3lyp", "XC_functional") - self.assertEqual(xc, "1.0*HYB_GGA_XC_B3LYP") - - def test_pbe(self): - xc = get_result("dft_gaussian/functionals/pbe", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_PBE+1.0*GGA_X_PBE") - - def test_pbe0(self): - xc = get_result("dft_gaussian/functionals/pbe0", "XC_functional") - self.assertEqual(xc, "1.0*HYB_GGA_XC_PBEH") - - def test_bp86(self): - xc = get_result("dft_gaussian/functionals/bp86", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_P86+1.0*GGA_X_B88") - - def test_bp91(self): - xc = get_result("dft_gaussian/functionals/bp91", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_PW91+1.0*GGA_X_B88") - - def test_pw91(self): - xc = get_result("dft_gaussian/functionals/pw91", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_PW91+1.0*GGA_X_PW91") - - def test_bechehandh(self): - xc = get_result("dft_gaussian/functionals/beckehandh", "XC_functional") - self.assertEqual(xc, "1.0*HYB_GGA_XC_BHANDH") - - def test_olyp(self): - xc = get_result("dft_gaussian/functionals/olyp", "XC_functional") - self.assertEqual(xc, "1.0*GGA_C_LYP+1.0*GGA_X_OPTX") - - def test_hcth120(self): - xc = get_result("dft_gaussian/functionals/hcth120", "XC_functional") - self.assertEqual(xc, "1.0*GGA_XC_HCTH_120") - - def test_hcth147(self): - xc = get_result("dft_gaussian/functionals/hcth147", "XC_functional") - self.assertEqual(xc, "1.0*GGA_XC_HCTH_147") - - def test_hcth407(self): - xc = get_result("dft_gaussian/functionals/hcth407", "XC_functional") - self.assertEqual(xc, "1.0*GGA_XC_HCTH_407") - - def test_tpss(self): - xc = get_result("dft_gaussian/functionals/tpss", "XC_functional") - self.assertEqual(xc, "1.0*MGGA_C_TPSS+1.0*MGGA_X_TPSS") - - -#=============================================================================== -class TestDFTPWEnergy(unittest.TestCase): - """Tests that the parser can handle plane-wave DFT energy calculations. - """ - - @classmethod - def setUpClass(cls): - cls.results = get_results("dft_pw/energy", "section_run") - # cls.results.print_summary() - - def test_program_name(self): - result = self.results["program_name"] - self.assertEqual(result, "NWChem") - - def test_configuration_periodic_dimensions(self): - result = self.results["configuration_periodic_dimensions"][0] - self.assertTrue(np.array_equal(result, np.array([True, True, True]))) - - def test_program_version(self): - result = self.results["program_version"] - self.assertEqual(result, "6.6") - - def test_total_charge(self): - charge = self.results["total_charge"][0] - self.assertEqual(charge, 0) - - def test_electronic_structure_method(self): - result = self.results["electronic_structure_method"][0] - self.assertEqual(result, "DFT") - - def test_simulation_cell(self): - result = self.results["simulation_cell"][0] - self.assertTrue(np.array_equal(result, convert_unit(np.array( - [ - [20.0, 0.0, 0.0], - [0.0, 20.0, 0.0], - [0.0, 0.0, 20.0], - ]), "angstrom") - )) - - # def test_atom_labels(self): - # atom_labels = self.results["atom_labels"] - # expected_labels = np.array(["O", "H", "H"]) - # self.assertTrue(np.array_equal(atom_labels, expected_labels)) - - # def test_atom_positions(self): - # atom_position = self.results["atom_positions"] - # expected_position = convert_unit(np.array( - # [ - # [0.00000000, 0.00000000, -0.11817375], - # [0.76924532, 0.00000000, 0.47269501], - # [-0.76924532, 0.00000000, 0.47269501], - # ] - # ), "angstrom") - # self.assertTrue(np.array_equal(atom_position, expected_position)) - - # def test_number_of_atoms(self): - # n_atoms = self.results["number_of_atoms"] - # self.assertEqual(n_atoms, 3) - - # def test_energy_total(self): - # result = self.results["energy_total"] - # expected_result = convert_unit(np.array(-76.436222730188), "hartree") - # self.assertTrue(np.array_equal(result, expected_result)) - - # def test_energy_x(self): - # result = self.results["energy_X"] - # expected_result = convert_unit(np.array(-9.025345841743), "hartree") - # self.assertTrue(np.array_equal(result, expected_result)) - - # def test_energy_c(self): - # result = self.results["energy_C"] - # expected_result = convert_unit(np.array(-0.328011552453), "hartree") - # self.assertTrue(np.array_equal(result, expected_result)) - - # def test_energy_total_scf_iteration(self): - # result = self.results["energy_total_scf_iteration"] - # # Test the first and last energies - # expected_result = convert_unit(np.array( - # [ - # [-76.3916403957], - # [-76.4362227302], - # ]), "hartree") - # self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) - - # def test_energy_change_scf_iteration(self): - # result = self.results["energy_change_scf_iteration"] - # expected_result = convert_unit(np.array( - # [ - # [-8.55E+01], - # [-3.82E-07], - # ]), "hartree") - # self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) - - # def test_scf_max_iteration(self): - # result = self.results["scf_max_iteration"] - # self.assertEqual(result, 50) - - # def test_scf_threshold_energy_change(self): - # result = self.results["scf_threshold_energy_change"] - # self.assertEqual(result, convert_unit(1.00E-06, "hartree")) - - # def test_scf_dft_number_of_iterations(self): - # result = self.results["number_of_scf_iterations"] - # self.assertEqual(result, 6) - - # def test_spin_target_multiplicity(self): - # multiplicity = self.results["spin_target_multiplicity"] - # self.assertEqual(multiplicity, 1) - - # def test_single_configuration_to_calculation_method_ref(self): - # result = self.results["single_configuration_to_calculation_method_ref"] - # self.assertEqual(result, 0) - - # def test_single_configuration_calculation_to_system_description_ref(self): - # result = self.results["single_configuration_calculation_to_system_ref"] - # self.assertEqual(result, 0) - - -#=============================================================================== -if __name__ == '__main__': - suites = [] - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGaussianEnergy)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGaussianForce)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGaussianGeoOpt)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGaussianXCFunctional)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGaussianMD)) - - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTPWEnergy)) - - alltests = unittest.TestSuite(suites) - unittest.TextTestRunner(verbosity=0).run(alltests) diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py new file mode 100644 index 0000000000000000000000000000000000000000..4e0c572c98ae848a074c7032f76275be7af0c29c --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py @@ -0,0 +1,203 @@ +""" +This is a module for unit testing the BigDFT parser. The unit tests are run with +a custom backend that outputs the results directly into native python object for +easier and faster analysis. + +Each property that has an enumerable list of different possible options is +assigned a new test class, that should ideally test through all the options. + +The properties that can have non-enumerable values will be tested only for one +specific case inside a test class that is designed for a certain type of run +(MD, optimization, QM/MM, etc.) +""" +import os +import unittest +import logging +import numpy as np +from bigdftparser import BigDFTParser +from nomadcore.unit_conversion.unit_conversion import convert_unit + + +#=============================================================================== +def get_results(folder, metainfo_to_keep=None): + """Get the given result from the calculation in the given folder by using + the Analyzer in the nomadtoolkit package. Tries to optimize the parsing by + giving the metainfo_to_keep argument. + + Args: + folder: The folder relative to the directory of this script where the + parsed calculation resides. + metaname: The quantity to extract. + """ + dirname = os.path.dirname(__file__) + filename = os.path.join(dirname, folder, "output.out") + parser = BigDFTParser(filename, None, debug=True, log_level=logging.WARNING) + results = parser.parse() + return results + + +#=============================================================================== +def get_result(folder, metaname, optimize=True): + if optimize: + results = get_results(folder, None) + else: + results = get_results(folder) + result = results[metaname] + return result + + +#=============================================================================== +class TestSinglePoint(unittest.TestCase): + """Tests that the parser can handle single point calculations. + """ + @classmethod + def setUpClass(cls): + cls.results = get_results("single_point", "section_run") + # cls.results.print_summary() + + def test_program_name(self): + result = self.results["program_name"] + self.assertEqual(result, "BigDFT") + + # def test_configuration_periodic_dimensions(self): + # result = self.results["configuration_periodic_dimensions"] + # self.assertTrue(np.array_equal(result, np.array([False, False, False]))) + + # def test_program_version(self): + # result = self.results["program_version"] + # self.assertEqual(result, "6.6") + + # def test_xc_functional(self): + # result = self.results["XC_functional"] + # self.assertEqual(result, "1.0*MGGA_C_TPSS+1.0*MGGA_X_TPSS") + + # def test_atom_labels(self): + # atom_labels = self.results["atom_labels"] + # expected_labels = np.array(["O", "H", "H"]) + # self.assertTrue(np.array_equal(atom_labels, expected_labels)) + + # def test_atom_positions(self): + # atom_position = self.results["atom_positions"] + # expected_position = convert_unit(np.array( + # [ + # [0.00000000, 0.00000000, -0.11817375], + # [0.76924532, 0.00000000, 0.47269501], + # [-0.76924532, 0.00000000, 0.47269501], + # ] + # ), "angstrom") + # self.assertTrue(np.array_equal(atom_position, expected_position)) + + # def test_number_of_atoms(self): + # n_atoms = self.results["number_of_atoms"] + # self.assertEqual(n_atoms, 3) + + # def test_total_charge(self): + # charge = self.results["total_charge"] + # self.assertEqual(charge, 0) + + # def test_energy_total(self): + # result = self.results["energy_total"] + # expected_result = convert_unit(np.array(-76.436222730188), "hartree") + # self.assertTrue(np.array_equal(result, expected_result)) + + # def test_energy_x(self): + # result = self.results["energy_X"] + # expected_result = convert_unit(np.array(-9.025345841743), "hartree") + # self.assertTrue(np.array_equal(result, expected_result)) + + # def test_energy_c(self): + # result = self.results["energy_C"] + # expected_result = convert_unit(np.array(-0.328011552453), "hartree") + # self.assertTrue(np.array_equal(result, expected_result)) + + # def test_energy_total_scf_iteration(self): + # result = self.results["energy_total_scf_iteration"] + # # Test the first and last energies + # expected_result = convert_unit(np.array( + # [ + # [-76.3916403957], + # [-76.4362227302], + # ]), "hartree") + # self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) + + # def test_energy_change_scf_iteration(self): + # result = self.results["energy_change_scf_iteration"] + # expected_result = convert_unit(np.array( + # [ + # [-8.55E+01], + # [-3.82E-07], + # ]), "hartree") + # self.assertTrue(np.array_equal(np.array([[result[0]], [result[-1]]]), expected_result)) + + # def test_scf_max_iteration(self): + # result = self.results["scf_max_iteration"] + # self.assertEqual(result, 50) + + # def test_scf_threshold_energy_change(self): + # result = self.results["scf_threshold_energy_change"] + # self.assertEqual(result, convert_unit(1.00E-06, "hartree")) + + # def test_electronic_structure_method(self): + # result = self.results["electronic_structure_method"] + # self.assertEqual(result, "DFT") + + # def test_scf_dft_number_of_iterations(self): + # result = self.results["number_of_scf_iterations"] + # self.assertEqual(result, 6) + + # def test_spin_target_multiplicity(self): + # multiplicity = self.results["spin_target_multiplicity"] + # self.assertEqual(multiplicity, 1) + + # def test_single_configuration_to_calculation_method_ref(self): + # result = self.results["single_configuration_to_calculation_method_ref"] + # self.assertEqual(result, 0) + + # def test_single_configuration_calculation_to_system_description_ref(self): + # result = self.results["single_configuration_calculation_to_system_ref"] + # self.assertEqual(result, 0) + + # def test_single_configuration_calculation_converged(self): + # result = self.results["single_configuration_calculation_converged"] + # self.assertTrue(result) + + # def test_section_method_atom_kind(self): + # kind = self.results["section_method_atom_kind"][0] + # self.assertEqual(kind["method_atom_kind_atom_number"][0], 1) + # self.assertEqual(kind["method_atom_kind_label"][0], "H") + + # def test_section_method_basis_set(self): + # kind = self.results["section_method_basis_set"][0] + # self.assertEqual(kind["method_basis_set_kind"][0], "wavefunction") + # self.assertTrue(np.array_equal(kind["mapping_section_method_basis_set_cell_associated"][0], 0)) + + # def test_number_of_spin_channels(self): + # result = self.results["number_of_spin_channels"] + # self.assertEqual(result, 1) + + # def test_simulation_cell(self): + # cell = self.results["simulation_cell"] + # n_vectors = cell.shape[0] + # n_dim = cell.shape[1] + # self.assertEqual(n_vectors, 3) + # self.assertEqual(n_dim, 3) + # expected_cell = convert_unit(np.array([[15.1178, 0, 0], [0, 15.1178, 0], [0, 0, 15.1178]]), "bohr") + # self.assertTrue(np.array_equal(cell, expected_cell)) + + # def test_basis_set_cell_dependent(self): + # kind = self.results["basis_set_cell_dependent_kind"] + # name = self.results["basis_set_cell_dependent_name"] + # cutoff = self.results["basis_set_planewave_cutoff"] + + # self.assertEqual(kind, "plane_waves") + # self.assertEqual(name, "PW_70.0") + # self.assertEqual(cutoff, convert_unit(70.00000, "rydberg")) + + +#=============================================================================== +if __name__ == '__main__': + suites = [] + suites.append(unittest.TestLoader().loadTestsFromTestCase(TestSinglePoint)) + + alltests = unittest.TestSuite(suites) + unittest.TextTestRunner(verbosity=0).run(alltests) diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/forces_posinp.xyz b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/forces_posinp.xyz new file mode 100644 index 0000000000000000000000000000000000000000..f153ad07ad4d436b235cb2ef0972f7aead52d2af --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/forces_posinp.xyz @@ -0,0 +1,7 @@ + 2 angstroemd0 -1.98834837256869790E+01 (Ha) Geometry + metaData forces + free + N 0.00000000000000000E+00 0.00000000000000000E+00 0.00000000000000000E+00 + N 0.00000000000000000E+00 0.00000000000000000E+00 1.11498999595642090E+00 + forces +N -1.69406589450860068E-21 -3.38813178901720136E-21 5.67055414067736407E-02 +N 1.69406589450860068E-21 3.38813178901720136E-21 -5.67055414067736407E-02 diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/input_minimal.yaml b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/input_minimal.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f468acac1a41b1bef200c71027b601610a130937 --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/input_minimal.yaml @@ -0,0 +1,16 @@ + #---------------------------------------------------------------------- Minimal input file + #This file indicates the minimal set of input variables which has to be given to perform + #the run. The code would produce the same output if this file is used as input. + posinp: + units: angstroem + positions: + - N: [0.0, 0.0, 0.0] + - N: [0.0, 0.0, 1.114989995956421] + properties: + format: xyz + source: posinp.xyz + psolver: + environment: + gammaS: water + alphaS: water + betaV: water diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/output.out b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/output.out new file mode 100644 index 0000000000000000000000000000000000000000..0279db2fc876fd0bfed2cb6ba3c31246b4b4521c --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/output.out @@ -0,0 +1,707 @@ +--- + Code logo: + "__________________________________ A fast and precise DFT wavelet code + | | | | | | + | | | | | | BBBB i gggggg + |_____|_____|_____|_____|_____| B B g + | | : | : | | | B B i g + | |-0+--|-0+--| | | B B i g g + |_____|__:__|__:__|_____|_____|___ BBBBB i g g + | : | | | : | | B B i g g + |--+0-| | |-0+--| | B B iiii g g + |__:__|_____|_____|__:__|_____| B B i g g + | | : | : | | | B BBBB i g g + | |-0+--|-0+--| | | B iiiii gggggg + |_____|__:__|__:__|_____|_____|__BBBBB + | | | | : | | TTTTTTTTT + | | | |--+0-| | DDDDDD FFFFF T + |_____|_____|_____|__:__|_____| D D F TTTT T + | | | | : | |D D F T T + | | | |--+0-| |D D FFFF T T + |_____|_____|_____|__:__|_____|D___ D F T T + | | | : | | |D D F TTTTT + | | |--+0-| | | D D F T T + |_____|_____|__:__|_____|_____| D F T T + | | | | | | D T T + | | | | | | DDDDDD F TTTT + |_____|_____|_____|_____|_____|______ www.bigdft.org " + + Reference Paper : The Journal of Chemical Physics 129, 014109 (2008) + Version Number : 1.8 + Timestamp of this run : 2016-11-11 13:02:23.583 + Root process Hostname : lenovo700 + Number of MPI tasks : 1 + OpenMP parallelization : Yes + Maximal OpenMP threads per MPI task : 8 + #------------------------------------------------------------------ Code compiling options + Compilation options: + Configure arguments: + " '--prefix' '/home/lauri/bigdft-suite/build/install' 'FC=mpif90' 'FCFLAGS=-O2 + -fopenmp' 'CFLAGS=-O2 -fopenmp' 'LIBS=-llapack -lblas -ldl' + 'LDFLAGS=-L/home/lauri/bigdft-suite/build/install/lib ' + 'C_INCLUDE_PATH=/home/lauri/bigdft-suite/build/install/include' + 'PKG_CONFIG_PATH=/home/lauri/bigdft-suite/build/install/lib/pkgconfig:/home/lauri/bigdft + -suite/build/install/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgcon + fig:/usr/share/pkgconfig'" + Compilers (CC, FC, CXX) : [ gcc, mpif90, g++ ] + Compiler flags: + CFLAGS : -O2 -fopenmp + FCFLAGS : -O2 -fopenmp + CXXFLAGS : -g -O2 + #------------------------------------------------------------------------ Input parameters + radical : null + outdir : ./ + logfile : No + run_from_files : Yes + psolver: + kernel: + screening : 0 # Mu screening parameter + isf_order : 16 # Order of the Interpolating Scaling Function family + stress_tensor : Yes # Triggers the calculation of the stress tensor + environment: + cavity : none # Type of the cavity + cavitation : Yes # Triggers the evaluation of the extra cavitation terms + gammaS : 72.0 # Cavitation term, surface tension of the solvent [dyn/cm] + alphaS : -22.0 # Proportionality of repulsion free energy in term of the surface integral [dyn/cm] + betaV : -0.35 # Proportionality of dispersion free energy in term of volume integral [GPa] + input_guess : Yes # Triggers the input guess procedure of gps_algorithm + fd_order : 16 # Order of the Finite-difference derivatives for the GPS solver + itermax : 50 # Maximum number of iterations of the GPS outer loop + minres : 1.e-8 # Convergence threshold of the loop + pb_method : none # Defines the method for the Poisson Boltzmann Equation + setup: + accel : none # Material Acceleration + taskgroup_size : 0 # Size of the taskgroups of the Poisson Solver + global_data : No # Charge density and Electrostatic potential are given by global arrays + verbose : Yes # Verbosity switch + output : none # Quantities to be plotted after the main solver routine + dft: + hgrids: [0.45, 0.45, 0.45] # Grid spacing in the three directions (bohr) + rmult: [5., 8.] # c(f)rmult*radii_cf(:,1(2))=coarse(fine) atom-based radius + ixc : 1 # Exchange-correlation parameter (LDA=1,PBE=11) + qcharge : 0 # Charge of the system. Can be integer or real. + elecfield: [0., 0., 0.] # Electric field (Ex,Ey,Ez) + nspin : 1 # Spin polarization treatment + mpol : 0 # Total magnetic moment + gnrm_cv : 1.e-4 # convergence criterion gradient + itermax : 50 # Max. iterations of wfn. opt. steps + itermin : 0 # Minimal iterations of wfn. optimzed steps + nrepmax : 1 # Max. number of re-diag. runs + ncong : 6 # No. of CG it. for preconditioning eq. + idsx : 6 # Wfn. diis history + dispersion : 0 # Dispersion correction potential (values 1,2,3,4,5), 0=none + inputpsiid : 0 # Input guess wavefunctions + output_wf : 0 # Output of the support functions + output_denspot : 0 # Output of the density or the potential + rbuf : 0. # Length of the tail (AU) + ncongt : 30 # No. of tail CG iterations + norbv : 0 # Davidson subspace dimension (No. virtual orbitals) + nvirt : 0 # No. of virtual orbs + nplot : 0 # No. of plotted orbs + gnrm_cv_virt : 1.e-4 # convergence criterion gradient for virtual orbitals + itermax_virt : 50 # Max. iterations of wfn. opt. steps for virtual orbitals + disablesym : No # Disable the symmetry detection + external_potential: + values : __not_a_value__ + calculate_strten : Yes # Boolean to activate the calculation of the stress tensor. Might be set to No for + # performance reasons + plot_mppot_axes: [-1, -1, -1] # Plot the potential generated by the multipoles along axes through this + # point. Negative values mean no plot. + plot_pot_axes: [-1, -1, -1] # Plot the potential along axes through this point. Negative values mean + # no plot. + occupancy_control : None # Dictionary of the atomic matrices to be applied for a given iteration number + itermax_occ_ctrl : 0 # Number of iterations of occupancy control scheme. Should be between itermin and + # itermax + output: + atomic_density_matrix : None # Dictionary of the atoms for which the atomic density matrix has to be plotted + kpt: + method : manual # K-point sampling method + kpt: # Kpt coordinates + - [0., 0., 0.] + wkpt: [1.] # Kpt weights + bands : No # For doing band structure calculation + geopt: + method : none # Geometry optimisation method + ncount_cluster_x : 1 # Maximum number of force evaluations + frac_fluct : 1. # Fraction of force fluctuations. Stop if fmax < forces_fluct*frac_fluct + forcemax : 0. # Max forces criterion when stop + randdis : 0. # Random displacement amplitude + betax : 4. # Stepsize for the geometry optimization + beta_stretchx : 5e-1 # Stepsize for steepest descent in stretching mode direction (only if in biomode) + md: + mdsteps : 0 # Number of MD steps + print_frequency : 1 # Printing frequency for energy.dat and Trajectory.xyz files + temperature : 300.d0 # Initial temperature in Kelvin + timestep : 20.d0 # Time step for integration (in a.u.) + no_translation : No # Logical input to set translational correction + thermostat : none # Activates a thermostat for MD + wavefunction_extrapolation : 0 # Activates the wavefunction extrapolation for MD + restart_nose : No # Restart Nose Hoover Chain information from md.restart + restart_pos : No # Restart nuclear position information from md.restart + restart_vel : No # Restart nuclear velocities information from md.restart + mix: + iscf : 0 # Mixing parameters + itrpmax : 1 # Maximum number of diagonalisation iterations + rpnrm_cv : 1.e-4 # Stop criterion on the residue of potential or density + norbsempty : 0 # No. of additional bands + tel : 0. # Electronic temperature + occopt : 1 # Smearing method + alphamix : 0. # Multiplying factors for the mixing + alphadiis : 2. # Multiplying factors for the electronic DIIS + sic: + sic_approach : none # SIC (self-interaction correction) method + sic_alpha : 0. # SIC downscaling parameter + tddft: + tddft_approach : none # Time-Dependent DFT method + decompose_perturbation : none # Indicate the directory of the perturbation to be decomposed in the basis of empty + # states + mode: + method : dft # Run method of BigDFT call + add_coulomb_force : No # Boolean to add coulomb force on top of any of above selected force + perf: + debug : No # Debug option + profiling_depth : -1 # maximum level of the profiling for the tracking of the routines + fftcache : 8192 # Cache size for the FFT + accel : NO # Acceleration (hardware) + ocl_platform : ~ # Chosen OCL platform + ocl_devices : ~ # Chosen OCL devices + blas : No # CUBLAS acceleration + projrad : 15. # Radius of the projector as a function of the maxrad + exctxpar : OP2P # Exact exchange parallelisation scheme + ig_diag : Yes # Input guess (T=Direct, F=Iterative) diag. of Ham. + ig_norbp : 5 # Input guess Orbitals per process for iterative diag. + ig_blocks: [300, 800] # Input guess Block sizes for orthonormalisation + ig_tol : 1.0e-4 # Input guess Tolerance criterion + methortho : 0 # Orthogonalisation + rho_commun : DEF # Density communication scheme (DBL, RSC, MIX) + unblock_comms : OFF # Overlap Communications of fields (OFF,DEN,POT) + linear : OFF # Linear Input Guess approach + tolsym : 1.0e-8 # Tolerance for symmetry detection + signaling : No # Expose calculation results on Network + signaltimeout : 0 # Time out on startup for signal connection (in seconds) + domain : ~ # Domain to add to the hostname to find the IP + inguess_geopt : 0 # Input guess to be used during the optimization + store_index : Yes # Store indices or recalculate them for linear scaling + verbosity : 2 # Verbosity of the output + psp_onfly : Yes # Calculate pseudopotential projectors on the fly + multipole_preserving : No # (EXPERIMENTAL) Preserve the multipole moment of the ionic density + mp_isf : 16 # (EXPERIMENTAL) Interpolating scaling function or lifted dual order for the multipole + # preserving + pdsyev_blocksize : -8 # SCALAPACK linear scaling blocksize + pdgemm_blocksize : -8 # SCALAPACK linear scaling blocksize + maxproc_pdsyev : 4 # SCALAPACK linear scaling max num procs + maxproc_pdgemm : 4 # SCALAPACK linear scaling max num procs + ef_interpol_det : 1.e-12 # FOE max determinant of cubic interpolation matrix + ef_interpol_chargediff : 1.0 # FOE max charge difference for interpolation + mixing_after_inputguess : 1 # Mixing step after linear input guess + iterative_orthogonalization : No # Iterative_orthogonalization for input guess orbitals + check_sumrho : 1 # Enables linear sumrho check + check_overlap : 1 # Enables linear overlap check + experimental_mode : No # Activate the experimental mode in linear scaling + write_orbitals : 0 # Linear scaling write KS orbitals for cubic restart (might take lot of disk space!) + explicit_locregcenters : No # Linear scaling explicitly specify localization centers + calculate_KS_residue : Yes # Linear scaling calculate Kohn-Sham residue + intermediate_forces : No # Linear scaling calculate intermediate forces + kappa_conv : 0.1 # Exit kappa for extended input guess (experimental mode) + evbounds_nsatur : 3 # Number of FOE cycles before the eigenvalue bounds are shrinked (linear) + evboundsshrink_nsatur : 4 # maximal number of unsuccessful eigenvalue bounds shrinkings + calculate_gap : No # linear scaling calculate the HOMO LUMO gap + loewdin_charge_analysis : No # linear scaling perform a Loewdin charge analysis at the end of the calculation + coeff_weight_analysis : No # linear scaling perform a Loewdin charge analysis of the coefficients for fragment + # calculations + check_matrix_compression : Yes # linear scaling perform a check of the matrix compression routines + correction_co_contra : Yes # linear scaling correction covariant / contravariant gradient + fscale_lowerbound : 5.e-3 # linear scaling lower bound for the error function decay length + fscale_upperbound : 5.e-2 # linear scaling upper bound for the error function decay length + FOE_restart : 0 # Restart method to be used for the FOE method + imethod_overlap : 1 # method to calculate the overlap matrices (1=old, 2=new) + enable_matrix_taskgroups : True # enable the matrix taskgroups + hamapp_radius_incr : 8 # radius enlargement for the Hamiltonian application (in grid points) + adjust_kernel_iterations : True # enable the adaptive ajustment of the number of kernel iterations + adjust_kernel_threshold : True # enable the adaptive ajustment of the kernel convergence threshold according to the + # support function convergence + wf_extent_analysis : False # perform an analysis of the extent of the support functions (and possibly KS orbitals) + foe_gap : False # Use the FOE method to calculate the HOMO-LUMO gap at the end of a calculation + lin_general: + hybrid : No # activate the hybrid mode; if activated, only the low accuracy values will be relevant + nit: [100, 100] # number of iteration with low/high accuracy + rpnrm_cv: [1.e-12, 1.e-12] # convergence criterion for low/high accuracy + conf_damping : -0.5 # how the confinement should be decreased, only relevant for hybrid mode; negative -> + # automatic + taylor_order : 0 # order of the Taylor approximation; 0 -> exact + max_inversion_error : 1.d0 # linear scaling maximal error of the Taylor approximations to calculate the inverse of + # the overlap matrix + output_wf : 0 # output basis functions; 0 no output, 1 formatted output, 2 Fortran bin, 3 ETSF + output_mat : 0 # output sparse matrices; 0 no output, 1 formatted sparse, 11 formatted dense, 21 + # formatted both + output_coeff : 0 # output KS coefficients; 0 no output, 1 formatted output + output_fragments : 0 # output support functions, kernel and coeffs; 0 fragments and full system, 1 + # fragments only, 2 full system only + kernel_restart_mode : 0 # method for restarting kernel; 0 kernel, 1 coefficients, 2 random, 3 diagonal, 4 + # support function weights + kernel_restart_noise : 0.0d0 # add random noise to kernel or coefficients when restarting + frag_num_neighbours : 0 # number of neighbours to output for each fragment + frag_neighbour_cutoff : 12.0d0 # number of neighbours to output for each fragment + cdft_lag_mult_init : 0.05d0 # CDFT initial value for Lagrange multiplier + cdft_conv_crit : 1.e-2 # CDFT convergence threshold for the constrained charge + calc_dipole : No # calculate dipole + calc_quadrupole : No # calculate quadrupole + subspace_diag : No # diagonalization at the end + extra_states : 0 # Number of extra states to include in support function and kernel optimization (dmin + # only), must be equal to norbsempty + calculate_onsite_overlap : No # calculate the onsite overlap matrix (has only an effect if the matrices are all + # written to disk) + charge_multipoles : 0 # Calculate the atom-centered multipole coefficients; 0 no, 1 old approach Loewdin, 2 + # new approach Projector + support_function_multipoles : False # Calculate the multipole moments of the support functions + plot_locreg_grids : False # plot the scaling function and wavelets grid of each localization region + calculate_FOE_eigenvalues: [0, -1] # First and last eigenvalue to be calculated using the FOE procedure + precision_FOE_eigenvalues : 5.e-3 # decay length of the error function used to extract the eigenvalues (i.e. something like + # the resolution) + lin_basis: + nit: [4, 5] # maximal number of iterations in the optimization of the + # support functions + nit_ig : 50 # maximal number of iterations to optimize the support functions in the extended input + # guess (experimental mode only) + idsx: [6, 6] # DIIS history for optimization of the support functions + # (low/high accuracy); 0 -> SD + gnrm_cv: [1.e-2, 1.e-4] # convergence criterion for the optimization of the support functions + # (low/high accuracy) + gnrm_ig : 1.e-3 # convergence criterion for the optimization of the support functions in the extended + # input guess (experimental mode only) + deltae_cv : 1.e-4 # total relative energy difference to stop the optimization ('experimental_mode' only) + gnrm_dyn : 1.e-4 # dynamic convergence criterion ('experimental_mode' only) + min_gnrm_for_dynamic : 1.e-3 # minimal gnrm to active the dynamic gnrm criterion + alpha_diis : 1.0 # multiplicator for DIIS + alpha_sd : 1.0 # initial step size for SD + nstep_prec : 5 # number of iterations in the preconditioner + fix_basis : 1.e-10 # fix the support functions if the density change is below this threshold + correction_orthoconstraint : 1 # correction for the slight non-orthonormality in the orthoconstraint + orthogonalize_ao : Yes # Orthogonalize the atomic orbitals used as input guess + lin_kernel: + nstep: [1, 1] # number of steps taken when updating the coefficients via + # direct minimization for each iteration of + # the density kernel loop + nit: [5, 5] # number of iterations in the (self-consistent) + # optimization of the density kernel + idsx_coeff: [0, 0] # DIIS history for direct mininimization + idsx: [0, 0] # mixing method; 0 -> linear mixing, >=1 -> Pulay mixing + alphamix: [0.5, 0.5] # mixing parameter (low/high accuracy) + gnrm_cv_coeff: [1.e-5, 1.e-5] # convergence criterion on the gradient for direct minimization + rpnrm_cv: [1.e-10, 1.e-10] # convergence criterion (change in density/potential) for the kernel + # optimization + linear_method : DIAG # method to optimize the density kernel + mixing_method : DEN # quantity to be mixed + alpha_sd_coeff : 0.2 # initial step size for SD for direct minimization + alpha_fit_coeff : No # Update the SD step size by fitting a quadratic polynomial + eval_range_foe: [-0.5, 0.5] # Lower and upper bound of the eigenvalue spectrum, will be adjusted + # automatically if chosen unproperly + fscale_foe : 2.e-2 # decay length of the error function + coeff_scaling_factor : 1.0 # factor to scale the gradient in direct minimization + pexsi_npoles : 40 # number of poles used by PEXSI + pexsi_mumin : -1.0 # Initial guess for the lower bound of the chemical potential used by PEXSI + pexsi_mumax : 1.0 # initial guess for the upper bound of the chemical potential used by PEXSI + pexsi_mu : 0.5 # initial guess for the chemical potential used by PEXSI + pexsi_temperature : 1.e-3 # temperature used by PEXSI + pexsi_tol_charge : 1.e-3 # charge tolerance used PEXSI + lin_basis_params: + nbasis : 4 # Number of support functions per atom + ao_confinement : 8.3e-3 # Prefactor for the input guess confining potential + confinement: [8.3e-3, 0.0] # Prefactor for the confining potential (low/high accuracy) + rloc: [7.0, 7.0] # Localization radius for the support functions + rloc_kernel : 9.0 # Localization radius for the density kernel + rloc_kernel_foe : 14.0 # cutoff radius for the FOE matrix vector multiplications + psppar.N: + Pseudopotential type : HGH-K + Atomic number : 7 + No. of Electrons : 5 + Pseudopotential XC : 1 + Local Pseudo Potential (HGH convention): + Rloc : 0.28917923 + Coefficients (c1 .. c4): [-12.23481988, 1.76640728, 0.0, 0.0] + NonLocal PSP Parameters: + - Channel (l) : 0 + Rloc : 0.25660487 + h_ij terms: [13.55224272, 0.0, 0.0, 0.0, 0.0, 0.0] + - Channel (l) : 1 + Rloc : 0.27013369 + h_ij terms: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + Source : Hard-Coded + Radii of active regions (AU): + Coarse : 1.370256482166319 + Fine : 0.25660487 + Coarse PSP : 0.50650066875 + Source : Hard-Coded + posinp: + #---------------------------------------------- Atomic positions (by default bohr units) + units : angstroem + positions: + - N: [0.0, 0.0, 0.0] + - N: [0.0, 0.0, 1.114989995956421] + properties: + format : xyz + source : posinp.xyz + #--------------------------------------------------------------------------------------- | + Data Writing directory : ./ + #-------------------------------------------------- Input Atomic System (file: posinp.xyz) + Atomic System Properties: + Number of atomic types : 1 + Number of atoms : 2 + Types of atoms : [ N ] + Boundary Conditions : Free #Code: F + Number of Symmetries : 0 + Space group : disabled + #------------------------------ Geometry optimization Input Parameters (file: input.geopt) + Geometry Optimization Parameters: + Maximum steps : 1 + Algorithm : none + Random atomic displacement : 0.0E+00 + Fluctuation in forces : 1.0E+00 + Maximum in forces : 0.0E+00 + Steepest descent step : 4.0E+00 + Material acceleration : No #iproc=0 + #------------------------------------------------------------------------ Input parameters + DFT parameters: + eXchange Correlation: + XC ID : &ixc 1 + Exchange-Correlation reference : "XC: Teter 93" + XC functional implementation : ABINIT + Spin polarization : No + Basis set definition: + Suggested Grid Spacings (a0) : [ 0.45, 0.45, 0.45 ] + Coarse and Fine Radii Multipliers : [ 5.0, 8.0 ] + Self-Consistent Cycle Parameters: + Wavefunction: + Gradient Norm Threshold : &gnrm_cv 1.0E-04 + CG Steps for Preconditioner : 6 + DIIS History length : 6 + Max. Wfn Iterations : &itermax 50 + Max. Subspace Diagonalizations : 1 + Input wavefunction policy : INPUT_PSI_LCAO # 0 + Output wavefunction policy : NONE # 0 + Output grid policy : NONE # 0 + Virtual orbitals : 0 + Number of plotted density orbitals: 0 + Density/Potential: + Max. Iterations : 1 + Post Optimization Parameters: + Finite-Size Effect estimation: + Scheduled : No + #----------------------------------------------------------------------- System Properties + Properties of atoms in the system: + - Symbol : N #Type No. 01 + No. of Electrons : 5 + No. of Atoms : 2 + Radii of active regions (AU): + Coarse : 1.37026 + Fine : 0.25660 + Coarse PSP : 0.50650 + Source : Hard-Coded + Grid Spacing threshold (AU) : 0.64 + Pseudopotential type : HGH-K + Local Pseudo Potential (HGH convention): + Rloc : 0.28918 + Coefficients (c1 .. c4) : [ -12.23482, 1.76641, 0.00000, 0.00000 ] + NonLocal PSP Parameters: + - Channel (l) : 0 + Rloc : 0.25660 + h_ij matrix: + - [ 13.55224, 0.00000, 0.00000 ] + - [ 0.00000, 0.00000, 0.00000 ] + - [ 0.00000, 0.00000, 0.00000 ] + No. of projectors : 1 + PSP XC : "XC: Teter 93" + #----------------------------------------------- Atom Positions (specified and grid units) + Atomic structure: + Units : angstroem + Positions: + - N: [ 3.571946174, 3.571946174, 3.609775538] # [ 15.00, 15.00, 15.16 ] 0001 + - N: [ 3.571946174, 3.571946174, 4.724765534] # [ 15.00, 15.00, 19.84 ] 0002 + Rigid Shift Applied (AU) : [ 6.7500, 6.7500, 6.8215 ] + #------------------------------------------------------------------------- Grid properties + Box Grid spacings : [ 0.4500, 0.4500, 0.4500 ] + Sizes of the simulation domain: + AU : [ 13.500, 13.500, 15.750 ] + Angstroem : [ 7.1439, 7.1439, 8.3345 ] + Grid Spacing Units : [ 30, 30, 35 ] + High resolution region boundaries (GU): + From : [ 11, 11, 11 ] + To : [ 19, 19, 24 ] + High Res. box is treated separately : Yes + #------------------------------------------------------------------- Kernel Initialization + Poisson Kernel Initialization: + #---------------------------------------------------------------------- Input parameters + kernel: + screening : 0 # Mu screening parameter + isf_order : 16 # Order of the Interpolating Scaling Function family + stress_tensor : Yes # Triggers the calculation of the stress tensor + environment: + cavity : none # Type of the cavity + cavitation : Yes # Triggers the evaluation of the extra cavitation terms + gammaS : 72.0 # Cavitation term, surface tension of the solvent [dyn/cm] + alphaS : -22.0 # Proportionality of repulsion free energy in term of the surface integral [dyn/cm] + betaV : -0.35 # Proportionality of dispersion free energy in term of volume integral [GPa] + input_guess : Yes # Triggers the input guess procedure of gps_algorithm + fd_order : 16 # Order of the Finite-difference derivatives for the GPS solver + itermax : 50 # Maximum number of iterations of the GPS outer loop + minres : 1.e-8 # Convergence threshold of the loop + pb_method : none # Defines the method for the Poisson Boltzmann Equation + setup: + accel : none # Material Acceleration + taskgroup_size : 0 # Size of the taskgroups of the Poisson Solver + global_data : No # Charge density and Electrostatic potential are given by global arrays + verbose : Yes # Verbosity switch + output : none # Quantities to be plotted after the main solver routine + MPI tasks : 1 + OpenMP threads per MPI task : 8 + Poisson Kernel Creation: + Boundary Conditions : Free + Memory Requirements per MPI task: + Density (MB) : 7.38 + Kernel (MB) : 7.61 + Full Grid Arrays (MB) : 6.38 + Wavefunctions Descriptors, full simulation domain: + Coarse resolution grid: + No. of segments : 876 + No. of points : 18172 + Fine resolution grid: + No. of segments : 110 + No. of points : 702 + #---------------------------------------------------------------------- Occupation Numbers + Total Number of Electrons : 10 + Spin treatment : Averaged + Orbitals Repartition: + MPI tasks 0- 0 : 5 + Total Number of Orbitals : 5 + Input Occupation Numbers: + - Occupation Numbers: {Orbitals No. 1-5: 2.0000} + Wavefunctions memory occupation for root MPI process: 0 MB 901 KB 816 B + NonLocal PSP Projectors Descriptors: + Creation strategy : On-the-fly + Total number of projectors : 2 + Total number of components : 5905 + Percent of zero components : 14 + Size of workspaces : 23636 + Maximum size of masking arrays for a projector: 951 + Cumulative size of masking arrays : 1902 + Communication checks: + Transpositions : Yes + Reverse transpositions : Yes + #-------------------------------------------------------- Estimation of Memory Consumption + Memory requirements for principal quantities (MiB.KiB): + Subspace Matrix : 0.1 # (Number of Orbitals: 5) + Single orbital : 0.181 # (Number of Components: 23086) + All (distributed) orbitals : 1.780 # (Number of Orbitals per MPI task: 5) + Wavefunction storage size : 12.338 # (DIIS/SD workspaces included) + Nonlocal Pseudopotential Arrays : 0.47 + Full Uncompressed (ISF) grid : 6.391 + Workspaces storage size : 0.477 + Accumulated memory requirements during principal run stages (MiB.KiB): + Kernel calculation : 83.719 + Density Construction : 51.909 + Poisson Solver : 79.48 + Hamiltonian application : 52.243 + Orbitals Orthonormalization : 52.243 + Estimated Memory Peak (MB) : 83 + Ion-Ion interaction energy : 1.18650663422787E+01 + #---------------------------------------------------------------- Ionic Potential Creation + Total ionic charge : -10.000000000000 + Poisson Solver: + BC : Free + Box : [ 91, 91, 101 ] + MPI tasks : 1 + Interaction energy ions multipoles : 0.0 + Interaction energy multipoles multipoles: 0.0 + #----------------------------------- Wavefunctions from PSP Atomic Orbitals Initialization + Input Hamiltonian: + Total No. of Atomic Input Orbitals : 8 + Atomic Input Orbital Generation: + - {Atom Type: N, Electronic configuration: { + s: [ 2.00], + p: [ 1.00, 1.00, 1.00]}} + Wavelet conversion succeeded : Yes + Deviation from normalization : 2.05E-05 + GPU acceleration : No + Total electronic charge : 9.999998731141 + Poisson Solver: + BC : Free + Box : [ 91, 91, 101 ] + MPI tasks : 1 + Expected kinetic energy : 13.9048146790 + Energies: {Ekin: 1.39077628900E+01, Epot: -2.18665699073E+01, Enl: 2.33310272888E+00, + EH: 2.73028082106E+01, EXC: -4.69901727500E+00, EvXC: -6.15435941415E+00} + EKS : -1.96081040175154442E+01 + Input Guess Overlap Matrices: {Calculated: Yes, Diagonalized: Yes} + #Eigenvalues and New Occupation Numbers + Orbitals: [ + {e: -1.040786533967E+00, f: 2.0000}, # 00001 + {e: -5.272089296364E-01, f: 2.0000}, # 00002 + {e: -4.411025209214E-01, f: 2.0000}, # 00003 + {e: -4.411012163712E-01, f: 2.0000}, # 00004 + {e: -3.946499923151E-01, f: 2.0000}, # 00005 + {e: -1.011703410493E-01, f: 0.0000}, # 00006 + {e: -1.011696286352E-01, f: 0.0000}, # 00007 + {e: 6.775799490560E-01, f: 0.0000}] # 00008 + IG wavefunctions defined : Yes + Accuracy estimation for this run: + Energy : 2.95E-03 + Convergence Criterion : 5.90E-04 + #------------------------------------------------------------------- Self-Consistent Cycle + Ground State Optimization: + - Hamiltonian Optimization: &itrp001 + - Subspace Optimization: &itrep001-01 + Wavefunctions Iterations: + - { #---------------------------------------------------------------------- iter: 1 + GPU acceleration: No, Total electronic charge: 9.999998907187, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.31555268971E+01, Epot: -2.15786908762E+01, Enl: 1.86116449489E+00, + EH: 2.63308588225E+01, EXC: -4.58275164847E+00, EvXC: -6.00085488206E+00}, + iter: 1, EKS: -1.96096887307935432E+01, gnrm: 3.17E-01, D: -1.58E-03, + DIIS weights: [ 1.00E+00, 1.00E+00], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 2 + GPU acceleration: No, Total electronic charge: 9.999998911635, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.44508411437E+01, Epot: -2.17197324334E+01, Enl: 1.88603924516E+00, + EH: 2.78363997504E+01, EXC: -4.81126269619E+00, EvXC: -6.30251508668E+00}, + iter: 2, EKS: -1.98629330621171434E+01, gnrm: 1.01E-01, D: -2.53E-01, + DIIS weights: [-3.44E-02, 1.03E+00, -3.69E-03], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 3 + GPU acceleration: No, Total electronic charge: 9.999998874101, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.44411869578E+01, Epot: -2.17469810499E+01, Enl: 1.75966471693E+00, + EH: 2.76796262320E+01, EXC: -4.77628572993E+00, EvXC: -6.25642597000E+00}, + iter: 3, EKS: -1.98805490248799117E+01, gnrm: 4.16E-02, D: -1.76E-02, + DIIS weights: [-4.35E-02, -3.03E-01, 1.35E+00, -1.53E-04], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 4 + GPU acceleration: No, Total electronic charge: 9.999998826002, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45294911882E+01, Epot: -2.18293843168E+01, Enl: 1.76650692353E+00, + EH: 2.76953336562E+01, EXC: -4.77679601676E+00, EvXC: -6.25714802956E+00}, + iter: 4, EKS: -1.98833015062267933E+01, gnrm: 1.08E-02, D: -2.75E-03, + DIIS weights: [ 8.60E-03, 2.87E-03, -1.93E-01, 1.18E+00, -9.40E-06], + Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 5 + GPU acceleration: No, Total electronic charge: 9.999998813322, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45429965684E+01, Epot: -2.18430956587E+01, Enl: 1.75560375950E+00, + EH: 2.76838108599E+01, EXC: -4.77502857050E+00, EvXC: -6.25481901477E+00}, + iter: 5, EKS: -1.98834494042030414E+01, gnrm: 3.62E-03, D: -1.48E-04, + DIIS weights: [-2.13E-04, 2.09E-02, -6.57E-02, -2.13E-01, 1.26E+00, -9.07E-07], + Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 6 + GPU acceleration: No, Total electronic charge: 9.999998809276, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45534057718E+01, Epot: -2.18517502440E+01, Enl: 1.75534551625E+00, + EH: 2.76854781867E+01, EXC: -4.77548415617E+00, EvXC: -6.25542157493E+00}, + iter: 6, EKS: -1.98834733816428653E+01, gnrm: 1.79E-03, D: -2.40E-05, + DIIS weights: [-6.18E-04, -8.84E-03, 3.93E-02, -1.23E-02, -5.50E-01, 1.53E+00, + -1.56E-07], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 7 + GPU acceleration: No, Total electronic charge: 9.999998808800, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45574354724E+01, Epot: -2.18545160038E+01, Enl: 1.75424344147E+00, + EH: 2.76856816500E+01, EXC: -4.77559071591E+00, EvXC: -6.25556259134E+00}, + iter: 7, EKS: -1.98834805221821824E+01, gnrm: 9.80E-04, D: -7.14E-06, + DIIS weights: [ 6.35E-04, 2.49E-04, -1.39E-02, 1.30E-01, -7.02E-01, 1.59E+00, + -4.82E-08], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 8 + GPU acceleration: No, Total electronic charge: 9.999998808955, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45585865976E+01, Epot: -2.18552611953E+01, Enl: 1.75369436303E+00, + EH: 2.76855477173E+01, EXC: -4.77561167104E+00, EvXC: -6.25559037882E+00}, + iter: 8, EKS: -1.98834829018645678E+01, gnrm: 4.87E-04, D: -2.38E-06, + DIIS weights: [-1.25E-03, -2.64E-03, 1.22E-02, 1.50E-01, -1.11E+00, 1.95E+00, + -7.65E-09], Orthogonalization Method: 0} + - { #---------------------------------------------------------------------- iter: 9 + GPU acceleration: No, Total electronic charge: 9.999998809025, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45591635735E+01, Epot: -2.18555567520E+01, Enl: 1.75332018231E+00, + EH: 2.76854604236E+01, EXC: -4.77562597888E+00, EvXC: -6.25560937964E+00}, + iter: 9, EKS: -1.98834836767451435E+01, gnrm: 1.31E-04, D: -7.75E-07, + DIIS weights: [-1.64E-03, -9.38E-03, 7.64E-02, -3.50E-02, -4.11E-01, 1.38E+00, + -6.64E-10], Orthogonalization Method: 0} + - { #--------------------------------------------------------------------- iter: 10 + GPU acceleration: No, Total electronic charge: 9.999998809003, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, Orthoconstraint: Yes, Preconditioning: Yes, + Energies: {Ekin: 1.45591939430E+01, Epot: -2.18555654633E+01, Enl: 1.75324569292E+00, + EH: 2.76854068846E+01, EXC: -4.77562353252E+00, EvXC: -6.25560617828E+00}, + iter: 10, EKS: -1.98834837239079647E+01, gnrm: 3.36E-05, D: -4.72E-08, + DIIS weights: [ 2.51E-03, -1.69E-02, 3.31E-02, 5.80E-02, -4.50E-01, 1.37E+00, + -6.80E-11], Orthogonalization Method: 0} + - &FINAL001 { #---------------------------------------------------------- iter: 11 + GPU acceleration: No, Total electronic charge: 9.999998809000, + Poisson Solver: {BC: Free, Box: [ 91, 91, 101 ], MPI tasks: 1}, + Hamiltonian Applied: Yes, + iter: 11, EKS: -1.98834837256869790E+01, gnrm: 3.36E-05, D: -1.78E-09, #FINAL + Energies: {Ekin: 1.45591701402E+01, Epot: -2.18555508038E+01, Enl: 1.75324278714E+00, + EH: 2.76853941958E+01, EXC: -4.77562153507E+00, EvXC: -6.25560353939E+00, + Eion: 1.18650663423E+01}, + } + Non-Hermiticity of Hamiltonian in the Subspace: 4.03E-31 + #Eigenvalues and New Occupation Numbers + Orbitals: [ + {e: -1.031892602676E+00, f: 2.0000}, # 00001 + {e: -4.970106443181E-01, f: 2.0000}, # 00002 + {e: -4.307276296665E-01, f: 2.0000}, # 00003 + {e: -4.307272896460E-01, f: 2.0000}, # 00004 + {e: -3.812107719151E-01, f: 2.0000}] # 00005 + Last Iteration : *FINAL001 + #---------------------------------------------------------------------- Forces Calculation + GPU acceleration : No + Total electronic charge : 9.999998809000 + Poisson Solver: + BC : Free + Box : [ 91, 91, 101 ] + MPI tasks : 1 + Multipole analysis origin : [ 6.75E+00, 6.750000E+00, 7.875000E+00 ] + Electric Dipole Moment (AU): + P vector : [ -5.2306E-04, -5.2306E-04, -5.6277E-04 ] + norm(P) : 9.294589E-04 + Electric Dipole Moment (Debye): + P vector : [ -1.3295E-03, -1.3295E-03, -1.4304E-03 ] + norm(P) : 2.362449E-03 + Quadrupole Moment (AU): + Q matrix: + - [ 1.1003E+00, 1.2565E-04, 3.0382E-04] + - [ 1.2565E-04, 1.1003E+00, 3.0382E-04] + - [ 3.0382E-04, 3.0382E-04, -2.2005E+00] + trace : -1.83E-12 + Calculate local forces : Yes + Calculate Non Local forces : Yes + #-------------------------------------------------------------------- Timing for root process + Timings for root process: + CPU time (s) : 21.41 + Elapsed time (s) : 3.27 + BigDFT infocode : 0 + Average noise forces: {x: 1.13964092E-05, y: 1.13964092E-05, z: -1.80910187E-04, + total: 1.81626683E-04} + Clean forces norm (Ha/Bohr): {maxval: 5.670554140677E-02, fnrm2: 6.431036852471E-03} + Raw forces norm (Ha/Bohr): {maxval: 5.683346444573E-02, fnrm2: 6.431070377897E-03} + #------------------------------------------------------------------------------ Atomic Forces + Atomic Forces (Ha/Bohr): + - {N: [-1.694065894509E-21, -3.388131789017E-21, 5.670554140677E-02]} # 0001 + - {N: [ 1.694065894509E-21, 3.388131789017E-21, -5.670554140677E-02]} # 0002 + Energy (Hartree) : -1.98834837256869790E+01 + Force Norm (Hartree/Bohr) : 8.01937457191684022E-02 + Memory Consumption Report: + Tot. No. of Allocations : 3048 + Tot. No. of Deallocations : 3048 + Remaining Memory (B) : 0 + Memory occupation: + Peak Value (MB) : 99.892 + for the array : wz + in the routine : input_wf + Memory Peak of process : 123.180 MB + Walltime since initialization : 00:00:03.590597331 + Max No. of dictionaries used : 4494 #( 1019 still in use) + Number of dictionary folders allocated: 1 diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/posinp.xyz b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/posinp.xyz new file mode 100644 index 0000000000000000000000000000000000000000..8d7121b05ee67690f5bc0c1b1acc2308488e51ef --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/posinp.xyz @@ -0,0 +1,4 @@ +2 angstroem +free +N 0. 0. 0. +N 0. 0. 1.11499 diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/time.yaml b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/time.yaml new file mode 100644 index 0000000000000000000000000000000000000000..288b4be2b779e715164523ba2fe90c956d1c8837 --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/time.yaml @@ -0,0 +1,442 @@ +--- + INIT: # % , Time (s) + Classes: + Flib LowLevel : [ 12.0, 7.98E-02] + Communications : [ 0.0, 2.48E-05] + BLAS-LAPACK : [ 0.8, 5.23E-03] + PS Computation : [ 36.8, 0.25] + Potential : [ 6.5, 4.32E-02] + Convolutions : [ 12.6, 8.43E-02] + Other : [ 0.1, 8.41E-04] + Initialization : [ 6.8, 4.52E-02] + Total : [ 75.6, 0.67] + Categories: #Ordered by time consumption + PSolver Kernel Creation: + Data : [ 21.1, 0.14] + Class : PS Computation + Info : ISF operations and creation of the kernel + PSolver Computation: + Data : [ 15.6, 0.10] + Class : PS Computation + Info : 3D SG_FFT and related operations + Init to Zero: + Data : [ 8.5, 5.65E-02] + Class : Flib LowLevel + Info : Memset of storage space + ApplyLocPotKin: + Data : [ 6.9, 4.61E-02] + Class : Convolutions + Info : OpenCL ported + Exchange-Correlation: + Data : [ 6.5, 4.32E-02] + Class : Potential + Info : Operations needed to construct local XC potential + wavefunction: + Data : [ 6.0, 4.03E-02] + Class : Initialization + Info : Miscellaneous + Rho_comput: + Data : [ 5.7, 3.82E-02] + Class : Convolutions + Info : OpenCL ported + Array allocations: + Data : [ 2.3, 1.51E-02] + Class : Flib LowLevel + Info : Heap storage allocation and associated profiling + Blas (d-s-c-z)GeMM: + Data : [ 0.8, 5.23E-03] + Class : BLAS-LAPACK + Info : Blas General Matrix-Matrix multiplications of any float type + Vector copy: + Data : [ 0.6, 4.20E-03] + Class : Flib LowLevel + Info : Memory copy of arrays (excluded allocations) + Routine Profiling: + Data : [ 0.6, 4.02E-03] + Class : Flib LowLevel + Info : Profiling performances for debugging + CrtLocPot: + Data : [ 0.3, 2.16E-03] + Class : Initialization + Info : Miscellaneous + CrtDescriptors: + Data : [ 0.3, 1.85E-03] + Class : Initialization + Info : RMA Pattern + Input_comput: + Data : [ 0.1, 8.84E-04] + Class : Initialization + Info : Miscellaneous + ApplyProj: + Data : [ 0.1, 6.82E-04] + Class : Other + Info : RMA pattern + ionic_energy: + Data : [ 0.0, 8.49E-05] + Class : Other + Info : Miscellaneous + calc_bounds: + Data : [ 0.0, 3.67E-05] + Class : Other + Info : Miscellaneous + Un-TransSwitch: + Data : [ 0.0, 3.05E-05] + Class : Other + Info : RMA pattern + Allreduce, Large Size: + Data : [ 0.0, 1.79E-05] + Class : Communications + Info : Allreduce operations for more than 5 elements + Pot_after_comm: + Data : [ 0.0, 7.39E-06] + Class : Other + Info : global_to_loca + Pot_commun: + Data : [ 0.0, 5.01E-06] + Class : Communications + Info : AllGathrv grid + Allreduce, Small Size: + Data : [ 0.0, 1.91E-06] + Class : Communications + Info : Allreduce operations for less than 5 elements + WFN_OPT: # % , Time (s) + Classes: + Flib LowLevel : [ 12.4, 0.28] + Communications : [ 0.0, 5.39E-05] + BLAS-LAPACK : [ 0.4, 9.48E-03] + PS Computation : [ 19.5, 0.44] + Potential : [ 17.5, 0.40] + Convolutions : [ 37.8, 0.85] + Linear Algebra : [ 0.4, 8.92E-03] + Other : [ 10.0, 0.23] + Total : [ 98.0, 2.3] + Categories: #Ordered by time consumption + PSolver Computation: + Data : [ 19.5, 0.44] + Class : PS Computation + Info : 3D SG_FFT and related operations + Exchange-Correlation: + Data : [ 17.5, 0.40] + Class : Potential + Info : Operations needed to construct local XC potential + ApplyLocPotKin: + Data : [ 14.2, 0.32] + Class : Convolutions + Info : OpenCL ported + Rho_comput: + Data : [ 12.8, 0.29] + Class : Convolutions + Info : OpenCL ported + Precondition: + Data : [ 10.8, 0.24] + Class : Convolutions + Info : OpenCL ported + ApplyProj: + Data : [ 9.0, 0.20] + Class : Other + Info : RMA pattern + Init to Zero: + Data : [ 6.2, 0.14] + Class : Flib LowLevel + Info : Memset of storage space + Array allocations: + Data : [ 2.6, 5.78E-02] + Class : Flib LowLevel + Info : Heap storage allocation and associated profiling + Routine Profiling: + Data : [ 2.1, 4.81E-02] + Class : Flib LowLevel + Info : Profiling performances for debugging + Vector copy: + Data : [ 1.5, 3.36E-02] + Class : Flib LowLevel + Info : Memory copy of arrays (excluded allocations) + Diis: + Data : [ 1.0, 2.15E-02] + Class : Other + Info : Other + Blas (d-s-c-z)GeMM: + Data : [ 0.4, 9.48E-03] + Class : BLAS-LAPACK + Info : Blas General Matrix-Matrix multiplications of any float type + Chol_comput: + Data : [ 0.4, 8.82E-03] + Class : Linear Algebra + Info : ALLReduce orbs + Un-TransSwitch: + Data : [ 0.0, 4.20E-04] + Class : Other + Info : RMA pattern + LagrM_comput: + Data : [ 0.0, 1.02E-04] + Class : Linear Algebra + Info : DGEMM + Pot_after_comm: + Data : [ 0.0, 8.58E-05] + Class : Other + Info : global_to_loca + Pot_commun: + Data : [ 0.0, 5.39E-05] + Class : Communications + Info : AllGathrv grid + LAST: # % , Time (s) + Classes: + Flib LowLevel : [ 12.9, 4.29E-02] + Communications : [ 0.0, 1.65E-05] + BLAS-LAPACK : [ 0.3, 9.79E-04] + PS Computation : [ 25.2, 8.39E-02] + Potential : [ 11.4, 3.80E-02] + Convolutions : [ 29.3, 9.75E-02] + Other : [ 7.0, 2.32E-02] + Finalization : [ 0.8, 2.72E-03] + Total : [ 87.0, 0.33] + Categories: #Ordered by time consumption + PSolver Computation: + Data : [ 25.2, 8.39E-02] + Class : PS Computation + Info : 3D SG_FFT and related operations + Rho_comput: + Data : [ 15.5, 5.17E-02] + Class : Convolutions + Info : OpenCL ported + ApplyLocPotKin: + Data : [ 13.8, 4.59E-02] + Class : Convolutions + Info : OpenCL ported + Exchange-Correlation: + Data : [ 11.4, 3.80E-02] + Class : Potential + Info : Operations needed to construct local XC potential + Init to Zero: + Data : [ 9.7, 3.22E-02] + Class : Flib LowLevel + Info : Memset of storage space + ApplyProj: + Data : [ 7.0, 2.32E-02] + Class : Other + Info : RMA pattern + Array allocations: + Data : [ 1.3, 4.20E-03] + Class : Flib LowLevel + Info : Heap storage allocation and associated profiling + Vector copy: + Data : [ 1.0, 3.38E-03] + Class : Flib LowLevel + Info : Memory copy of arrays (excluded allocations) + Routine Profiling: + Data : [ 0.9, 3.08E-03] + Class : Flib LowLevel + Info : Profiling performances for debugging + Forces: + Data : [ 0.8, 2.72E-03] + Class : Finalization + Info : Miscellaneous + Blas (d-s-c-z)GeMM: + Data : [ 0.3, 9.50E-04] + Class : BLAS-LAPACK + Info : Blas General Matrix-Matrix multiplications of any float type + Lapack (dsy-ssy-che-zhe)eev: + Data : [ 0.0, 2.93E-05] + Class : BLAS-LAPACK + Info : Lapack Eigenvalue Problem + Un-TransSwitch: + Data : [ 0.0, 1.26E-05] + Class : Other + Info : RMA pattern + Pot_after_comm: + Data : [ 0.0, 8.34E-06] + Class : Other + Info : global_to_loca + Allreduce, Small Size: + Data : [ 0.0, 5.96E-06] + Class : Communications + Info : Allreduce operations for less than 5 elements + Pot_commun: + Data : [ 0.0, 5.72E-06] + Class : Communications + Info : AllGathrv grid + Allreduce, Large Size: + Data : [ 0.0, 4.77E-06] + Class : Communications + Info : Allreduce operations for more than 5 elements + SUMMARY: # % , Time (s) + INIT : [ 20.4, 0.67] + WFN_OPT : [ 69.4, 2.3] + LAST : [ 10.2, 0.33] + Total : [ 100.0, 3.3] + Routines timing and number of calls: + - Main_program: [ 3.58, 1, ~*] + Subroutines: + - process_run (id="posinp"): [ 3.26, 1, 91.17%*] + Subroutines: + - bigdft_state: [ 3.26, 1, 100.12%*] + Subroutines: + - quantum_mechanical_state: [ 3.26, 1, 100.12%*] + Subroutines: + - cluster: [ 3.26, 1, 100.09%] + Subroutines: + - Electrostatic_Solver: [ 0.558, 11, 17.13%] + Subroutines: + - apply_kernel: [ 0.535, 11, 95.91%] + Subroutines: + - G_PoissonSolver: [ 0.455, 11, 84.96%] + - XC_potential: [ 0.450, 11, 13.80%] + Subroutines: + - xc_energy_new: [ 0.427, 11, 94.92%] + Subroutines: + - xc_getvxc: [ 0.403, 11, 94.38%] + - LocalHamiltonianApplication: [ 0.447, 11, 13.71%] + Subroutines: + - psir_to_vpsi: [ 9.405E-02, 55, 21.04%] + Subroutines: + - apply_potential_lr_bounds: [ 8.978E-02, 55, 95.46%] + - orbital_basis_associate: [ 7.953E-04, 11, 0.18%] + - input_wf: [ 0.418, 1, 12.83%] + Subroutines: + - updatePotential: [ 0.103, 1, 24.60%] + Subroutines: + - Electrostatic_Solver: [ 5.468E-02, 1, 53.09%] + Subroutines: + - apply_kernel: [ 5.267E-02, 1, 96.32%] + Subroutines: + - G_PoissonSolver: [ 3.807E-02, 1, 72.28%] + - XC_potential: [ 4.549E-02, 1, 44.17%] + Subroutines: + - xc_energy_new: [ 4.242E-02, 1, 93.25%] + Subroutines: + - xc_getvxc: [ 4.014E-02, 1, 94.63%] + - LocalHamiltonianApplication: [ 5.015E-02, 1, 12.00%] + Subroutines: + - psir_to_vpsi: [ 1.137E-02, 8, 22.66%] + Subroutines: + - apply_potential_lr_bounds: [ 1.082E-02, 8, 95.21%] + - orbital_basis_associate: [ 7.065E-05, 1, 0.14%] + - daub_to_isf: [ 2.794E-02, 8, 6.68%] + - LDiagHam: [ 6.435E-03, 1, 1.54%] + - NonLocalHamiltonianApplication: [ 1.053E-03, 1, 0.25%] + Subroutines: + - atom_projector: [ 3.907E-04, 2, 37.10%] + Subroutines: + - crtproj: [ 2.894E-04, 2, 74.06%] + - orbital_basis_associate: [ 1.072E-04, 1, 10.18%] + - check_linear_and_create_Lzd: [ 4.574E-04, 1, 0.11%] + - local_potential_dimensions: [ 1.878E-04, 3, 0.04%] + - initialize_work_arrays_sumrho: [ 1.139E-04, 1, 0.03%] + - deallocate_work_arrays_sumrho: [ 1.026E-04, 1, 0.02%] + - full_local_potential: [ 5.499E-05, 1, 0.01%] + - SynchronizeHamiltonianApplication: [ 1.723E-05, 1, 0.00%] + - preconditionall2: [ 0.332, 10, 10.17%] + Subroutines: + - precondition_preconditioner: [ 0.130, 50, 39.29%] + Subroutines: + - prec_diag: [ 0.110, 50, 84.45%] + - calculate_rmr_new: [ 2.244E-02, 300, 6.76%] + - compress_forstandard: [ 1.255E-02, 350, 3.78%] + - finalise_precond_residue: [ 1.630E-03, 50, 0.49%] + - NonLocalHamiltonianApplication: [ 0.249, 11, 7.65%] + Subroutines: + - atom_projector: [ 0.206, 22, 82.67%] + Subroutines: + - crtproj: [ 0.202, 22, 98.17%] + - orbital_basis_associate: [ 8.054E-04, 11, 0.32%] + - daub_to_isf: [ 0.194, 55, 5.95%] + - system_initialization: [ 0.172, 1, 5.27%] + Subroutines: + - pkernel_set: [ 0.151, 1, 88.06%] + Subroutines: + - mpi_environment_set: [ 2.242E-05, 1, 0.01%] + - createWavefunctionsDescriptors: [ 2.376E-03, 1, 1.38%] + Subroutines: + - fill_logrid: [ 7.696E-04, 2, 32.39%] + - segkeys: [ 1.330E-04, 2, 5.60%] + - num_segkeys: [ 9.318E-05, 2, 3.92%] + - createProjectorsArrays: [ 1.333E-03, 1, 0.78%] + Subroutines: + - localize_projectors: [ 2.997E-04, 1, 22.49%] + Subroutines: + - fill_logrid: [ 1.107E-04, 4, 36.95%] + - num_segkeys: [ 7.907E-05, 4, 26.38%] + - set_wfd_to_wfd: [ 1.624E-04, 2, 12.18%] + Subroutines: + - init_tolr: [ 9.017E-05, 2, 55.52%] + - fill_logrid: [ 1.071E-04, 4, 8.03%] + - segkeys: [ 9.435E-05, 4, 7.08%] + - transform_keyglob_to_keygloc: [ 8.347E-05, 4, 6.26%] + - allocate_arrays: [ 8.193E-05, 1, 6.15%] + - gaussian_basis_from_psp: [ 3.976E-05, 1, 2.98%] + - nullify_structure: [ 1.586E-05, 1, 1.19%] + - orbital_basis_associate: [ 6.494E-05, 1, 0.04%] + - mpi_environment_set: [ 2.481E-05, 1, 0.01%] + - kswfn_post_treatments: [ 0.116, 1, 3.56%] + Subroutines: + - Electrostatic_Solver: [ 4.715E-02, 1, 40.64%] + Subroutines: + - apply_kernel: [ 4.552E-02, 1, 96.55%] + Subroutines: + - G_PoissonSolver: [ 4.300E-02, 1, 94.47%] + - calculate_dipole_moment: [ 3.459E-02, 1, 29.82%] + - daub_to_isf: [ 1.472E-02, 5, 12.69%] + - calculate_forces: [ 3.505E-03, 1, 3.02%] + Subroutines: + - nonlocal_forces: [ 1.854E-03, 1, 52.88%] + Subroutines: + - atom_projector: [ 1.328E-03, 8, 71.65%] + Subroutines: + - crtproj: [ 1.035E-03, 8, 77.96%] + - local_forces: [ 1.516E-03, 1, 43.26%] + - rhocore_forces: [ 1.599E-05, 1, 0.46%] + - deallocate_work_arrays_sumrho: [ 1.125E-04, 1, 0.10%] + - orbital_basis_associate: [ 8.024E-05, 1, 0.07%] + - initialize_work_arrays_sumrho: [ 7.995E-05, 1, 0.07%] + - createEffectiveIonicPotential: [ 7.497E-02, 1, 2.30%] + Subroutines: + - createIonicPotential: [ 7.493E-02, 1, 99.95%] + Subroutines: + - Electrostatic_Solver: [ 6.942E-02, 1, 92.65%] + Subroutines: + - apply_kernel: [ 6.783E-02, 1, 97.72%] + Subroutines: + - G_PoissonSolver: [ 6.332E-02, 1, 93.35%] + - initialize_work_arrays_sumrho: [ 2.100E-03, 11, 0.06%] + - timing_dump_results: [ 1.678E-03, 2, 0.05%] + - deallocate_work_arrays_sumrho: [ 1.196E-03, 11, 0.04%] + - full_local_potential: [ 8.754E-04, 11, 0.03%] + - IonicEnergyandForces: [ 5.848E-04, 1, 0.02%] + Subroutines: + - vdwcorrection_calculate_energy: [ 2.333E-05, 1, 3.99%] + - vdwcorrection_calculate_forces: [ 1.490E-05, 1, 2.55%] + - SynchronizeHamiltonianApplication: [ 2.837E-04, 11, 0.01%] + - interaction_multipoles_ions: [ 1.270E-04, 1, 0.00%] + - ionic_energy_of_external_charges: [ 6.251E-05, 1, 0.00%] + - potential_from_charge_multipoles: [ 1.677E-05, 1, 0.00%] + - timing_dump_results: [ 7.465E-04, 1, 0.02%] + - bigdft_init: [ 0.267, 1, 7.47%] + Subroutines: + - mpi_environment_set: [ 2.551E-05, 1, 0.01%] + - run_objects_init: [ 4.769E-02, 1, 1.33%] + Subroutines: + - set_run_objects: [ 2.943E-02, 1, 61.72%] + Subroutines: + - inputs_from_dict: [ 2.937E-02, 1, 99.79%] + Subroutines: + - input_keys_dump: [ 1.510E-02, 1, 51.40%] + - input_keys_fill_all: [ 8.871E-03, 1, 30.20%] + Subroutines: + - input_keys_init: [ 4.788E-03, 1, 53.97%] + - PS_input_dict: [ 8.553E-04, 1, 9.64%] + - astruct_set_from_dict: [ 3.152E-03, 1, 10.73%] + - psp_dict_analyse: [ 2.099E-04, 1, 0.71%] + - psp_dict_fill_all: [ 2.004E-04, 1, 0.68%] + - allocateBasicArraysInputLin: [ 7.579E-05, 1, 0.26%] + - atomic_data_set_from_dict: [ 7.271E-05, 1, 0.25%] + - kpt_input_analyse: [ 4.459E-05, 1, 0.15%] + - atomic_gamma_from_dict: [ 2.605E-05, 1, 0.09%] + - occupation_set_from_dict: [ 2.500E-05, 1, 0.09%] + - input_analyze: [ 1.720E-05, 1, 0.06%] + - read_n_orbitals: [ 1.447E-05, 1, 0.05%] + - astruct_file_merge_to_dict: [ 1.775E-02, 1, 37.22%] + - read_input_dict_from_files: [ 3.546E-05, 1, 0.07%] + CPU parallelism: + MPI tasks : 1 + OMP threads : 8 + Report timestamp : 2016-11-11 13:02:26.902 diff --git a/parser/parser-big-dft/bigdftparser/versions/bigdft180/__init__.py b/parser/parser-big-dft/bigdftparser/versions/bigdft18/__init__.py similarity index 100% rename from parser/parser-big-dft/bigdftparser/versions/bigdft180/__init__.py rename to parser/parser-big-dft/bigdftparser/versions/bigdft18/__init__.py diff --git a/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py b/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py new file mode 100644 index 0000000000000000000000000000000000000000..f2b0161fa8558c1b38f2f64237b8d3a34f54e06a --- /dev/null +++ b/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py @@ -0,0 +1,41 @@ +import re +import logging +import numpy as np +from yaml import load +try: + from yaml import CLoader as Loader, CDumper as Dumper +except ImportError: + from yaml import Loader, Dumper +from nomadcore.baseclasses import BasicParser +LOGGER = logging.getLogger("nomad") + + +#=============================================================================== +class BigDFTMainParser(BasicParser): + """The main parser class that is called for all run types. Parses the NWChem + output file. + """ + def __init__(self, file_path, parser_context): + """ + """ + super(BigDFTMainParser, self).__init__(file_path, parser_context) + + def parse(self): + """The output file of a BigDFT run is a YAML document. Here we directly + parse this document with an existing YAML library, and push its + contents into the backend. Currently this function will read the whole + document into memory. If this leads to memory issues with large files, + this function will need to be changed to a token base version. + """ + with open(self.file_path, "r") as fin: + data = load(fin, Loader=Loader) + + # Parse SCF information + scf_data = data["Ground State Optimization"] + self.scf(scf_data) + + def scf(self, scf): + """Parse the SCF loop information. + """ + print("Moi") + return diff --git a/parser/parser-big-dft/bigdftparser/versions/bigdft180/mainparser.py b/parser/parser-big-dft/bigdftparser/versions/bigdft180/mainparser.py deleted file mode 100644 index b678d6e59f9313ef4374b3956178f0c1a11c4695..0000000000000000000000000000000000000000 --- a/parser/parser-big-dft/bigdftparser/versions/bigdft180/mainparser.py +++ /dev/null @@ -1,120 +0,0 @@ -from __future__ import absolute_import -from nomadcore.simple_parser import SimpleMatcher as SM -from nomadcore.caching_backend import CachingLevel -from nomadcore.baseclasses import MainHierarchicalParser, CacheService -import re -import logging -import numpy as np -LOGGER = logging.getLogger("nomad") - - -#=============================================================================== -class BigDFTMainParser(MainHierarchicalParser): - """The main parser class that is called for all run types. Parses the NWChem - output file. - """ - def __init__(self, file_path, parser_context): - """ - """ - super(BigDFTMainParser, self).__init__(file_path, parser_context) - - # Cache for storing current method settings - # self.method_cache = CacheService(self.parser_context) - # self.method_cache.add("single_configuration_to_calculation_method_ref", single=False, update=False) - - #======================================================================= - # Cache levels - # self.caching_levels.update({ - # 'x_nwchem_section_geo_opt_module': CachingLevel.Cache, - # 'x_nwchem_section_geo_opt_step': CachingLevel.Cache, - # 'x_nwchem_section_xc_functional': CachingLevel.Cache, - # 'x_nwchem_section_qmd_module': CachingLevel.ForwardAndCache, - # 'x_nwchem_section_qmd_step': CachingLevel.ForwardAndCache, - # 'x_nwchem_section_xc_part': CachingLevel.ForwardAndCache, - # }) - - #======================================================================= - # Main Structure - self.root_matcher = SM("", - forwardMatch=True, - sections=['section_run'], - subMatchers=[ - self.input(), - self.header(), - self.system(), - - # This repeating submatcher supports multiple different tasks - # within one run - SM("(?:\s+NWChem DFT Module)|(?:\s+NWChem Geometry Optimization)|(?:\s+NWChem QMD Module)|(?:\s+\* NWPW PSPW Calculation \*)", - repeats=True, - forwardMatch=True, - subFlags=SM.SubFlags.Unordered, - subMatchers=[ - self.energy_force_gaussian_task(), - self.energy_force_pw_task(), - self.geo_opt_module(), - self.dft_gaussian_md_task(), - ] - ), - ] - ) - - #======================================================================= - # onClose triggers - def onClose_section_run(self, backend, gIndex, section): - backend.addValue("program_name", "NWChem") - backend.addValue("program_basis_set_type", "gaussians+plane_waves") - - #======================================================================= - # onOpen triggers - def onOpen_section_method(self, backend, gIndex, section): - self.method_cache["single_configuration_to_calculation_method_ref"] = gIndex - - #======================================================================= - # adHoc - def adHoc_forces(self, save_positions=False): - def wrapper(parser): - match = True - forces = [] - positions = [] - - while match: - line = parser.fIn.readline() - if line == "" or line.isspace(): - match = False - break - components = line.split() - position = np.array([float(x) for x in components[-6:-3]]) - force = np.array([float(x) for x in components[-3:]]) - forces.append(force) - positions.append(position) - - forces = -np.array(forces) - positions = np.array(positions) - - # If anything found, push the results to the correct section - if forces.size != 0: - self.scc_cache["atom_forces"] = forces - if save_positions: - if positions.size != 0: - self.system_cache["atom_positions"] = positions - return wrapper - - #======================================================================= - # SimpleMatcher specific onClose - def save_geo_opt_sampling_id(self, backend, gIndex, section): - backend.addValue("frame_sequence_to_sampling_ref", gIndex) - - #======================================================================= - # Start match transforms - def transform_dipole(self, backend, groups): - dipole = groups[0] - components = np.array([float(x) for x in dipole.split()]) - backend.addArrayValues("x_nwchem_qmd_step_dipole", components) - - #======================================================================= - # Misc - def debug_end(self): - def wrapper(): - print("DEBUG") - return wrapper