Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vasp h5 parser #269

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions electronicparsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,36 @@ def load(self):
},
)

vasph5_parser_entry_point = EntryPoint(
name='parsers/vasph5',
aliases=['parsers/vasph5'],
description='NOMAD parser for VASP HDF5 output.',
python_package='electronicparsers.vasp',
mainfile_contents_dict={
'__mime:application/x-hdf5': {'input': {'__has_key': 'incar'}}
},
mainfile_mime_re='application/.*',
mainfile_name_re='.*[^/]*h5[^/]*',
supported_compressions=['gz', 'bz2', 'xz'],
parser_class_name='electronicparsers.vasp.VASPParser',
code_name='VASP',
code_homepage='https://www.vasp.at/',
code_category='Atomistic code',
metadata={
'codeCategory': 'Atomistic code',
'codeLabel': 'VASP',
'codeLabelStyle': 'All in capitals',
'codeName': 'vasp',
'codeUrl': 'https://www.vasp.at/',
'parserDirName': 'dependencies/electronic/electronicparsers/vasp/',
'parserGitUrl': 'https://github.com/nomad-coe/electronic-parsers.git',
'parserSpecific': '',
'preamble': '',
'status': 'production',
'tableOfFiles': "|Input Filename| Description|\n|--- | --- |\n|`vasprun.xml` | **Mainfile** in plain-text (structured) XML format |\n|`OUTCAR` | plain-text (semi-structured) file, VAPS's detailed output. Read by NOMAD only as fallback to parse `outcar` data |\n",
},
)

w2dynamics_parser_entry_point = EntryPoint(
name='parsers/w2dynamics',
aliases=['parsers/w2dynamics'],
Expand Down
2 changes: 1 addition & 1 deletion electronicparsers/ams/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ def parse(self, key=None):
nspin = general.get('nspin', 1)
xc_functional = {}
if (ldapot := general.get('ldapot')) is not None:
xc_functional['LDA'] = self._ldapot.get(ldapot)
xc_functional['LDA'] = self._ldapot.get(ldapot, '')
if ggapot := general.get('ggapot', '').strip():
xc_functional['GGA'] = ggapot
if mgga := general.get('MetaGGAConfig', {}).get('metagga', '').strip():
Expand Down
6 changes: 3 additions & 3 deletions electronicparsers/castep/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def add_unit(val):
elif line and last_parameter:
last_parameter[1].append(add_unit(line.strip()))

for key in title.keys():
for sub_key, val in title[key].items():
title[key][sub_key] = val[0] if len(val) == 1 else val
for key, tval in title.items():
for sub_key, val in tval.items():
tval[sub_key] = val[0] if len(val) == 1 else val

return title

Expand Down
8 changes: 4 additions & 4 deletions electronicparsers/quantumespresso/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3207,11 +3207,11 @@ def parse_configuration(calculation):
'damped_dynamics': 'geometry_optimization',
'vcs_wentzcovitch_damped_minimization': 'geometry_optimization',
}
for method in methods:
sampling = run.get(method)
for key, val in methods.items():
sampling = run.get(key)
if sampling is not None:
self.sampling_method = methods[method]
if method.startswith('vcs') and sampling.get('dynamics') is not None:
self.sampling_method = val
if key.startswith('vcs') and sampling.get('dynamics') is not None:
self.sampling_method = 'molecular_dynamics'
for calculation in sampling.get('self_consistent', []):
parse_configuration(calculation)
Expand Down
Loading
Loading