Skip to content

Commit

Permalink
Few small changes suggested by prospector.
Browse files Browse the repository at this point in the history
1) Few error-handeling modifications in the parser. The modifications
introduced are sufficient to avoid the crash of the code, but still are
not probably the best option. Discussion open in issue "Taxonomy of
failure modes #24"

2) Remove files in workflows/workfunction as they were not migreted
to aiida 1.0
  • Loading branch information
bosonie committed Jan 29, 2020
1 parent a73c757 commit da9544a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2,068 deletions.
9 changes: 4 additions & 5 deletions aiida_siesta/parsers/siesta.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_parsed_xml_doc(xml_path):
try:
xmldoc = minidom.parse(xml_path)
except:
xmldoc = None
raise OutputParsingError("Faulty Xml File")
#xmldoc = None

# We might want to add some extra consistency checks

Expand Down Expand Up @@ -156,7 +157,7 @@ def get_sizes_info(xmldoc):
int(s) for s in array.childNodes[0].data.split()
]

return no_u, nnz, mesh
return no_u, nnz, mesh


def get_last_structure(xmldoc, input_structure):
Expand Down Expand Up @@ -269,8 +270,6 @@ def get_final_forces_and_stress(xmldoc):
##################################


from aiida.common.exceptions import OutputParsingError

class SiestaOutputParsingError(OutputParsingError):
pass

Expand Down Expand Up @@ -533,7 +532,7 @@ def get_bands(self, bands_path):
tottx = f.read().split()

ef = float(tottx[0])
if self.node.inputs.bandskpoints.labels == None:
if self.node.inputs.bandskpoints.labels is None:
minfreq, maxfreq = float(tottx[1]), float(tottx[2])
nbands, nspins, nkpoints = int(tottx[3]), int(tottx[4]), int(
tottx[5])
Expand Down
Loading

0 comments on commit da9544a

Please sign in to comment.