Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-phonopy
Commits
0bdd8ab6
Commit
0bdd8ab6
authored
Jan 26, 2021
by
Alvin Noe Ladines
Browse files
Added error handler in reading fhiaims
parent
edec79da
Changes
1
Hide whitespace changes
Inline
Side-by-side
phonopyparser/fhiaims_io.py
View file @
0bdd8ab6
...
...
@@ -134,7 +134,8 @@ def read_forces_aims(cell_obj, supercell_matrix, displacement, sym, tol=1e-6, lo
check_var
=
True
break
if
not
check_var
:
raise
Exception
(
"No phonon calculations found"
)
logger
.
error
(
"No phonon calculations found"
)
return
set_of_forces
,
phonopy_obj
,
Relative_Path
os
.
chdir
(
"../"
)
Relative_Path
.
append
(
aims_out
)
supercell_calculated
=
read_aims_output
(
aims_out
)
...
...
@@ -162,6 +163,6 @@ def read_forces_aims(cell_obj, supercell_matrix, displacement, sym, tol=1e-6, lo
force
-=
drift_force
/
forces
.
shape
[
0
]
set_of_forces
.
append
(
forces
)
else
:
raise
Exception
(
"calculated varies from expected supercell in FHI-aims output
%s"
%
aims_out
)
logger
.
error
(
"calculated varies from expected supercell in FHI-aims output
"
)
return
set_of_forces
,
phonopy_obj
,
Relative_Path
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment