Commit 8eeeff89 authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Implemented basic siesta parser

parent d9bfce2a
Subproject commit c9e2bd0c179e85d881594c68cc2c0d53f3e59bf4
Subproject commit d8e2986420f101011eddf3571f5bd6d076f972fd
......@@ -197,10 +197,12 @@ class BasicParser(FairdiParser):
if 'atom_labels' in key:
val = get_value(value, r'([A-Z][a-z]*)\s', 'atom_labels')
val = [val] if isinstance(val, str) else val
set_value(sec_system, 'atom_labels', val, shape=(len(val)), dtype=str)
if 'atom_atom_number' in key:
val = get_value(value, r'(\d+)\s', 'atom_atom_number')
val = [val] if isinstance(val, str) else val
set_value(sec_system, 'atom_atom_number', val, shape=(len(val)), dtype=np.int32)
set_value(sec_system, 'atom_labels', [chemical_symbols[int(n)] for n in sec_system.atom_atom_number], shape=(len(val)))
......
......@@ -65,6 +65,7 @@ from molcasparser import MolcasParser
from mopacparser import MopacParser
from namdparser import NAMDParser
from onetepparser import OnetepParser
from siestaparser import SiestaParser
try:
# these packages are not available without parsing extra, which is ok, if the
......@@ -190,13 +191,7 @@ parsers = [
mainfile_mime_re=r'application/octet-stream'
),
GulpParser(),
LegacyParser(
name='parsers/siesta', code_name='Siesta', code_homepage='https://departments.icmab.es/leem/siesta/',
parser_class_name='siestaparser.SiestaParser',
mainfile_contents_re=(
r'(Siesta Version: siesta-|SIESTA [0-9]\.[0-9]\.[0-9])|'
r'(\*\s*WELCOME TO SIESTA\s*\*)')
),
SiestaParser(),
ElkParser(),
ElasticParser(),
GamessParser(),
......
......@@ -73,7 +73,8 @@ parser_exceptions = {
'parsers/band': ['dft.system'],
'parsers/qbox': ['dft.xc_functional'],
'parsers/cpmd': ['formula', 'dft.basis_set', 'dft.xc_functional', 'dft.system'],
'parser/onetep': ['formula', 'dft.basis_set', 'dft.xc_functional', 'dft.system']
'parser/onetep': ['formula', 'dft.basis_set', 'dft.xc_functional', 'dft.system'],
'parsers/siesta': ['dft.basis_set', 'dft.xc_functional', 'dft.system']
}
'''
Keys that the normalizer for certain parsers might not produce. In an ideal world this
......
Markdown is supported
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