Commit 4f6a6bc7 authored by Daniel Speckhard's avatar Daniel Speckhard
Browse files

Added Gaussian parser.

parent ed01315b
Pipeline #43566 failed with stages
in 20 minutes and 1 second
......@@ -41,4 +41,7 @@
[submodule "dependencies/parsers/wien2k"]
path = dependencies/parsers/wien2k
url = https://gitlab.mpcdf.mpg.de/nomad-lab/parser-wien2k
branch = nomad-fair
\ No newline at end of file
branch = nomad-fair
[submodule "dependencies/parsers/gaussian"]
path = dependencies/parsers/gaussian
url = https://gitlab.mpcdf.mpg.de/nomad-lab/parser-gaussian
......@@ -87,7 +87,26 @@
"-sv", "tests/test_normalizing.py::test_normalizer[parsers/wien2k-tests/data/parsers/wien2k/AlN/AlN_ZB.scf]"
]
},
{
"name": "Python: gaussian normalizer test",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/.pyenv/bin/pytest",
"args": [
"-sv", "tests/test_normalizing.py::test_normalizer[parsers/gaussian-tests/data/parsers/gaussian/Al.out]"
]
},
{
"name": "Python: aniline gaussian normalizer test",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/.pyenv/bin/pytest",
"args": [
"-sv", "tests/test_normalizing.py::test_normalizer[parsers/gaussian-tests/data/parsers/gaussian/al-1.out]"
]
},
{
"name": "Python: test_parsing match test",
"type": "python",
......
Subproject commit f68330c5fd3686f49f4a6d708fbf4d921eaa73c7
Subproject commit f03817034886e2c7225806e284a1eb8ecd8b3e25
Subproject commit 2a59119a6635454eba33c268d8cf8caa6eecd204
......@@ -13,6 +13,7 @@
# limitations under the License.
import re
import json
from nomad.parsing import BadContextURI
......@@ -68,7 +69,8 @@ class RepositoryNormalizer(Normalizer):
except BadContextURI:
b.openNonOverlappingSection('section_repository_info')
repository_info_context = None
with open("test_file_inside_repopy_normalizer.json", "wt") as file:
b.write_json(file)
b.openNonOverlappingSection('section_repository_parserdata')
b.addValue('repository_checksum', b.get_value('calc_hash', 0))
......@@ -77,7 +79,6 @@ class RepositoryNormalizer(Normalizer):
'repository_code_version',
self.simplify_version(b.get_value('program_version', 0)))
b.addValue('repository_parser_id', b.get_value('parser_name', 0))
b.addValue('repository_chemical_formula', b.get_value('chemical_composition_bulk_reduced', 0))
atom_labels = b.get_value('atom_labels', 0)
b.addValue('repository_atomic_elements', list(set(atom_labels)))
......
......@@ -308,4 +308,5 @@ class SystemNormalizer(SystemBasedNormalizer):
if nomad_classification == 'Atom' and (len(self.atom_labels) > 1):
nomad_classification = 'Molecule / Cluster'
return nomad_classification
......@@ -189,6 +189,17 @@ parsers = [
parser_class_name='wien2kparser.Wien2kParser',
main_file_re=r'^.*\.scf$', # This looks for files with .scf
main_contents_re=r':ITE[0-9]+: 1. ITERATION'
),
LegacyParser(
name='parsers/gaussian',
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]+)')
)
]
......
{
"section_run": {
"_name": "section_run",
"_gIndex": 0,
"program_name": "VASP",
"program_version": "4.6.35 3Apr08 complex parallel LinuxIFC",
"program_basis_set_type": "plane waves",
"section_method": {
"_name": "section_method",
"_gIndex": 0,
"electronic_structure_method": "DFT",
"section_XC_functionals": {
"_name": "section_XC_functionals",
"_gIndex": 0,
"XC_functional_name": "GGA_X_PBE"
}
},
"section_system": {
"_name": "section_system",
"_gIndex": 0,
"configuration_raw_gid": "sTZqOzYKfxJbI5jmm8xVLp4OcGhdj",
"atom_species": [
35,
19,
14,
14
],
"chemical_composition": "BrKSiSi",
"chemical_composition_reduced": "BrKSi2",
"chemical_composition_bulk_reduced": "BrKSi2",
"system_type": "Unknown",
"configuration_periodic_dimensions": [
true,
true,
true
],
"atom_positions": [
[
true,
false,
true
],
[
true,
false,
true
],
[
true,
false,
true
],
[
true,
true,
false
]
],
"atom_labels": [
"Br",
"K",
"Si",
"Si"
]
},
"section_single_configuration_calculation": {
"_name": "section_single_configuration_calculation",
"_gIndex": 0,
"single_configuration_calculation_to_system_ref": 0,
"single_configuration_to_calculation_method_ref": 0,
"energy_free": -1.5936767191492225e-18,
"energy_total": -1.5935696296699573e-18,
"energy_total_T0": -3.2126683561907e-22
},
"section_sampling_method": {
"_name": "section_sampling_method",
"_gIndex": 0,
"sampling_method": "geometry_optimization"
},
"section_frame_sequence": {
"_name": "section_frame_sequence",
"_gIndex": 0,
"frame_sequence_to_sampling_ref": 0,
"frame_sequence_local_frames_ref": [
0
]
}
},
"section_calculation_info": {
"_name": "section_calculation_info",
"_gIndex": 0,
"upload_id": "test_upload_id",
"calc_id": "test_calc_id",
"calc_hash": "test_calc_hash",
"main_file": "test/mainfile.txt",
"parser_name": "testParser"
},
"section_repository_info": {
"_name": "section_repository_info",
"_gIndex": 0
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,6 +38,7 @@ parser_examples = [
('parsers/nwchem', 'tests/data/parsers/nwchem/single_point/output.out'),
('parsers/bigdft', 'tests/data/parsers/bigdft/n2_output.out'),
('parsers/wien2k', 'tests/data/parsers/wien2k/AlN/AlN_ZB.scf'),
('parsers/gaussian', 'tests/data/parsers/gaussian/aniline.out')
]
faulty_unknown_one_d_matid_example = [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment