Commit 8fae0d40 authored by Daniel Speckhard's avatar Daniel Speckhard
Browse files

Added QMEspresso working for benchmark.out

parent 6fd747c9
......@@ -46,3 +46,6 @@
path = dependencies/parsers/gaussian
url = https://gitlab.mpcdf.mpg.de/nomad-lab/parser-gaussian
[submodule "dependencies/parsers/quantum-espresso"]
path = dependencies/parsers/quantum-espresso
url = https://gitlab.mpcdf.mpg.de/nomad-lab/parser-quantum-espresso
......@@ -137,6 +137,17 @@
"-sv", "tests/test_normalizing.py::test_normalizer[parsers/vasp-tests/data/parsers/vasp/vasp.xml]"
]
},
{
"name": "Python: Quantum Espresso",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/.pyenv/bin/pytest",
"args": [
"-sv", "tests/test_parsing.py::test_parser[parsers/quantumespresso-tests/data/parsers/quantum-espresso/W.out]"
]
},
{
"name": "Python: Current File",
"type": "python",
......
Subproject commit f07c719036248b4d74bff67c118187cfda167f01
......@@ -13,7 +13,6 @@
# limitations under the License.
import re
import json
from nomad.parsing import BadContextURI
......@@ -62,7 +61,9 @@ class RepositoryNormalizer(Normalizer):
def normalize(self, logger=None) -> None:
super().normalize(logger)
b = self._backend
# Don't check this in!
with open("test_file_quantum_espresso.json", "wt") as file:
b.write_json(file)
repository_info_context = '/section_repository_info/0'
try:
b.openContext(repository_info_context)
......
......@@ -203,14 +203,9 @@ parsers = [
),
LegacyParser(
name='parsers/quantumespresso',
parser_class_name='gaussianparser.GaussianParser',
main_file_re=r'^.*\.out$',
main_contents_re=(
r'\s*Cite this work as:'
r'\s*Gaussian [0-9]+, Revision [A-Za-z0-9.]*,'
r'\s\*\*\*\*\*\*\*\*\*\*\*\**'
r'\s*Gaussian\s*(?P<program_version>[0-9]+):\s*(?P<x_gaussian_program_implementation>[A-Za-z0-9-.]+)\s*(?P<x_gaussian_program_release_date>[0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
r'\s*(?P<x_gaussian_program_execution_date>[0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)')
parser_class_name='quantumespressoparser.QuantumEspressoParserPWSCF',
main_file_re=r'^.*\.out$', # It's not clear what type of extensions we should handler (.log?), either *star or .log,
main_contents_re=r"^PWSCF$"
)
]
......
......@@ -121,9 +121,15 @@ class LegacyParser(Parser):
kwargs = {key: value for key, value in kwargs.items() if key in init_signature.args}
with utils.legacy_logger(logger):
print('keyword arguments')
print(kwargs)
print("parser name")
print(str(Parser))
self.parser = Parser(**kwargs)
with patch.object(sys, 'argv', []):
print("mainfile is:")
print(mainfile)
backend = self.parser.parse(mainfile)
if backend is None or not hasattr(backend, 'status'):
......
{
"section_run": {
"_name": "section_run",
"_gIndex": 0,
"calculation_file_uri": "file://tests/data/parsers/quantum-espresso/benchmark.out",
"program_version": "5.2.1 (svn rev. 11920)",
"time_run_date_start": 1451140249,
"x_qe_program_name": "PWSCF",
"program_basis_set_type": "plane waves",
"program_name": "Quantum Espresso",
"x_qe_input_filename": "dft1.in",
"time_run_date_end": 1451140249,
"run_clean_end": true,
"x_qe_profile_function": [
"init_run",
"electrons",
"wfcinit",
"potinit",
"c_bands",
"sum_band",
"v_of_rho",
"mix_rho",
"init_us_2",
"cegterg",
"h_psi",
"g_psi",
"cdiaghg",
"add_vuspsi",
"calbec",
"fft",
"fftw",
"davcio",
"PWSCF"
],
"x_qe_profile_cputime": [
0.04,
0.12,
0.01,
0.01,
0.05,
0.02,
0.05,
0.0,
0.0,
0.05,
0.04,
0.0,
0.01,
0.0,
0.01,
0.0,
0.03,
0.0,
0.19
],
"x_qe_profile_walltime": [
0.03,
0.03,
0.0,
0.0,
0.01,
0.0,
0.01,
0.0,
0.0,
0.01,
0.01,
0.0,
0.0,
0.0,
0.0,
0.0,
0.01,
0.0,
0.09
],
"x_qe_profile_ncalls": [
1.0,
1.0,
1.0,
1.0,
6.0,
6.0,
6.0,
6.0,
26.0,
12.0,
36.0,
22.0,
32.0,
36.0,
36.0,
67.0,
328.0,
2.0,
NaN
],
"x_qe_profile_category": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"General",
"General",
"General",
"General",
"General"
],
"x_qe_profile_caller": [
"",
"",
"init_run",
"init_run",
"electrons",
"electrons",
"electrons",
"electrons",
"c_bands",
"c_bands",
"*egterg",
"*egterg",
"*egterg",
"h_psi",
"",
"",
"",
"",
""
],
"section_method": {
"_name": "section_method",
"_gIndex": 0,
"x_qe_sticks_sum_G_PW": 283,
"x_qe_sticks_sum_G_dense": 1459,
"x_qe_sticks_sum_G_smooth": 1459,
"x_qe_sticks_sum_PW": 55,
"x_qe_sticks_sum_dense": 163,
"x_qe_sticks_sum_smooth": 163,
"scf_threshold_energy_change": 2.179872170368037e-24,
"x_qe_potential_mixing_beta": 0.7,
"x_qe_potential_mixing_iterations": 8,
"x_qe_potential_mixing_scheme": "plain",
"x_qe_xc_functional_num": " 1 4 2 2 0 0",
"x_qe_xc_functional_shortname": "PW91",
"x_qe_starting_potential": "superposition of free atoms",
"x_qe_starting_charge": 7.99901,
"x_qe_starting_charge_renormalized": 8.0,
"x_qe_starting_wfc": "are 8 randomized atomic wfcs",
"x_qe_time_setup_cpu1_end": 0.0,
"x_qe_per_process_mem": 13421772.8,
"x_qe_xc_functional_user_enforced": true,
"x_qe_xc_icorr": 4,
"x_qe_xc_icorr_comment": "Perdew-Wang",
"x_qe_xc_icorr_name": "pw",
"x_qe_xc_iexch": 1,
"x_qe_xc_iexch_comment": "Slater (alpha=2/3)",
"x_qe_xc_iexch_name": "sla",
"x_qe_xc_igcc": 2,
"x_qe_xc_igcc_comment": "Perdew-Wang 91 corr.",
"x_qe_xc_igcc_name": "ggc",
"x_qe_xc_igcx": 2,
"x_qe_xc_igcx_comment": "Perdew-Wang 91",
"x_qe_xc_igcx_name": "ggx",
"electronic_structure_method": "DFT",
"x_qe_allocated_array_name": [
"Kohn-Sham Wavefunctions",
"NL pseudopotentials",
"Each V/rho on FFT grid",
"Each G-vector array",
"G-vector shells"
],
"x_qe_allocated_array_size": [
83886.08,
167772.16,
419430.4,
83886.08,
0.0
],
"x_qe_allocated_array_dimensions": [
"186, 4",
"186, 8",
"3375",
"1459",
"43"
],
"x_qe_temporary_array_name": [
"Auxiliary wavefunctions",
"Each subspace H/S matrix",
"Each <psi_i|beta_j> matrix",
"Arrays for rho mixing"
],
"x_qe_temporary_array_size": [
419430.4,
0.0,
0.0,
3439329.28
],
"x_qe_temporary_array_dimensions": [
"186, 16",
"16, 16",
"8, 4",
"3375, 8"
],
"section_method_basis_set": [
{
"_name": "section_method_basis_set",
"_gIndex": 0,
"mapping_section_method_basis_set_cell_associated": 0,
"method_basis_set_kind": "wavefunction"
},
{
"_name": "section_method_basis_set",
"_gIndex": 1,
"mapping_section_method_basis_set_cell_associated": 1,
"method_basis_set_kind": "density"
}
],
"section_method_atom_kind": {
"_name": "section_method_atom_kind",
"_gIndex": 0,
"method_atom_kind_explicit_electrons": 4.0,
"method_atom_kind_label": "Si",
"x_qe_kind_mass": 28.086,
"x_qe_pp_label": "Si",
"x_qe_pp_weight": 1.0,
"x_qe_pp_comment": "Generated by new atomic code, or converted to UPF format",
"x_qe_pp_filename": "/home/fs395/scratch/QE/espresso/pseudo/Si.pz-vbc.UPF",
"x_qe_pp_idx": 1,
"x_qe_pp_l": 1,
"x_qe_pp_l_idx": 2,
"x_qe_pp_md5sum": "6dfa03ddd5817404712e03e4d12deb78",
"x_qe_pp_nbeta": 2,
"x_qe_pp_ndmx": 431,
"x_qe_pp_type": "Norm-conserving",
"x_qe_pp_valence": 4.0,
"method_atom_kind_pseudopotential_name": "Si.pz-vbc.UPF"
},
"section_XC_functionals": [
{
"_name": "section_XC_functionals",
"_gIndex": 0,
"XC_functional_name": "GGA_C_PW91"
},
{
"_name": "section_XC_functionals",
"_gIndex": 1,
"XC_functional_name": "GGA_X_PW91"
}
]
},
"section_system": {
"_name": "section_system",
"_gIndex": 0,
"x_qe_ibrav": 2,
"x_qe_alat": 5.397607548834e-10,
"x_qe_cell_volume": 3.931370027105755e-29,
"number_of_atoms": 2,
"x_qe_number_of_species": 1,
"x_qe_number_of_states": 4,
"x_qe_nsymm": 24,
"x_qe_symm_inversion": false,
"x_qe_nsymm_ignored": 24,
"x_qe_nk": 2,
"x_qe_dense_g_vectors": 1459,
"configuration_raw_gid": "sQxzp_3munLdEJC8j23t5fMsZ1xHJ",
"atom_species": [
14,
14
],
"chemical_composition": "SiSi",
"chemical_composition_reduced": "Si2",
"chemical_composition_bulk_reduced": "Si2",
"system_type": "Bulk",
"simulation_cell": [
[
-2.698803774417e-10,
0.0,
2.698803774417e-10
],
[
0.0,
2.698803774417e-10,
2.698803774417e-10
],
[
-2.698803774417e-10,
2.698803774417e-10,
0.0
]
],
"x_qe_reciprocal_cell": [
[
-11640685711.833366,
-11640685711.833366,
11640685711.833366
],
[
11640685711.833366,
11640685711.833366,
11640685711.833366
],
[
-11640685711.833366,
11640685711.833366,
-11640685711.833366
]
],
"atom_positions": [
[
0.0,
0.0,
0.0
],
[
1.3494018872085e-10,
1.3494018872085e-10,
1.3494018872085e-10
]
],
"atom_labels": [
"Si",
"Si"
],
"x_qe_atom_idx": [
1,
2
],
"x_qe_celldm": [
5.397607548834e-10,
0.0,
0.0,
0.0,
0.0,
0.0
],
"x_qe_k_info_vec": [
[
2910171427.9583416,
2910171427.9583416,
2910171427.9583416
],
[
2910171427.9583416,
2910171427.9583416,
8730514283.875025
]
],
"x_qe_k_info_ik": [
1,
2
],
"x_qe_k_info_wk": [
0.5,
1.5
],
"x_qe_dense_FFT_grid": [
[
15,
15,
15
]
],
"number_of_electrons": [
8.0
],
"configuration_periodic_dimensions": [
true,
true,
true
],
"section_symmetry": {
"_name": "section_symmetry",
"_gIndex": 0,
"symmetry_method": "Matid (spg)",
"space_group_number": 227,
"hall_number": 525,
"hall_symbol": "F 4d 2 3 -1d",
"international_short_symbol": "Fd-3m",
"point_group": "m-3m",
"crystal_system": "cubic",
"bravais_lattice": "cF",
"origin_shift": [
0.0,
0.0,
0.0
],
"transformation_matrix": [
[
-0.5,
0.0,
-0.5
],
[
0.0,
0.5,
0.5
],
[
0.5,
0.5,
0.0
]
],
"section_std_system": {
"_name": "section_std_system",
"_gIndex": 0,
"lattice_vectors_std": [
[
5.397607548833999,
0.0,
0.0
],
[
0.0,
5.397607548833999,
0.0
],
[
0.0,
0.0,
5.397607548833999
]
],
"atom_positions_std": [
[
0.0,
0.0,
0.0
],
[
0.75,
0.25,
0.75
],
[
0.0,
0.5,
0.5
],
[
0.75,
0.75,
0.25
],
[
0.5,
0.0,
0.5
],
[
0.25,
0.25,
0.25
],
[
0.5,
0.5,
0.0
],
[
0.25,
0.75,
0.75
]
],
"atomic_numbers_std": [
14,
14,
14,
14,
14,
14,
14,
14
],
"wyckoff_letters_std": [
"a",
"a",
"a",
"a",
"a",
"a",
"a",
"a"
],
"equivalent_atoms_std": [
0,
0,
0,
0,
0,
0,
0,
0
]
},
"section_primitive_system": {
"_name": "section_primitive_system",
"_gIndex": 0,
"lattice_vectors_primitive": [
[
0.0,
2.6988037744169997,
2.6988037744169997
],
[
2.6988037744169997,
0.0,
2.6988037744169997
],
[
2.6988037744169997,
2.6988037744169997,
0.0
]
],
"atom_positions_primitive": [
[
0.0,
0.0,
<