Skip to content

Commit

Permalink
Fix vasp (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa authored May 27, 2024
1 parent 76bad16 commit 3b16b4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electronicparsers/vasp/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,9 @@ def parse_core_hole(self) -> tuple[Optional[CoreHole], Optional[AtomsGroup], int
source = self.parser.incar
# setup `AtomsGroup` parameters
elem_id = source.get('CLNT', 1) - 1
elem_ids = [int(x) for x in self.parser.atom_info['atomtypes']['atomspertype']]
elem_ids = [
int(x) for x in self.parser.atom_info['atomtypes'].get('atomspertype', [])
]
lower_range = elem_ids[elem_id - 1] if elem_id > 1 else 0
atom_ids = list(range(lower_range, elem_ids[elem_id]))
return (
Expand Down Expand Up @@ -1869,7 +1871,7 @@ def parse_method(self):
for param, n_atoms in dict(
zip(
sec_method.atom_parameters,
self.parser.atom_info['atomtypes']['atomspertype'],
self.parser.atom_info['atomtypes'].get('atomspertype', []),
)
).items():
# correct based on core-holes
Expand Down

0 comments on commit 3b16b4b

Please sign in to comment.