Skip to content

Commit 97d6a3c

Browse files
committed
Extend abinit parser
1 parent 648866d commit 97d6a3c

File tree

4 files changed

+677
-24
lines changed

4 files changed

+677
-24
lines changed

src/nomad_simulation_parsers/parsers/abinit/file_parser.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import re
22

33
import numpy as np
4-
from ase.data import chemical_symbols
54
from nomad.parsing.file_parser import Quantity, TextParser
65
from nomad.units import ureg
76

@@ -13,7 +12,7 @@ class AbinitOutParser(TextParser):
1312
def __init__(self):
1413
self.energy_components = {
1514
'energy_kinetic_electronic': 'Kinetic energy',
16-
'energy_electronstatic': 'Hartree energy',
15+
'energy_electrostatic': 'Hartree energy',
1716
'energy_XC': 'XC energy',
1817
'ewald': 'Ewald energy',
1918
'psp_core': 'PspCore energy',
@@ -707,16 +706,3 @@ def input_vars(self):
707706
else:
708707
self._input_vars[key] = [val] * self.n_datasets
709708
return self._input_vars
710-
711-
def get_input_var(self, key, n_dataset, default=None):
712-
val = self.input_vars.get(key)
713-
if val is None or val[n_dataset - 1] is None:
714-
val = [default] * n_dataset
715-
return val[n_dataset - 1]
716-
717-
def get_atom_labels(self):
718-
znucl = self.get_input_var('znucl', 1)
719-
typat = self.get_input_var('typat', 1)
720-
if znucl is None or typat is None:
721-
return
722-
return [chemical_symbols[int(znucl[n_at - 1])] for n_at in typat]

0 commit comments

Comments
 (0)