Skip to content

Commit

Permalink
Catch error if fit doesn't find equilibrium volume
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrv committed Oct 28, 2023
1 parent 1c43480 commit 0a3839d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pyiron_atomistics/atomistics/master/quasi.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,17 @@ def optimise_volume(self, bulk_eng):
fit_funct=fit, x=v, save_range=0.0, return_ind=True
)

v0_lst.append(v0)
free_eng_lst.append(fit([v0]))
entropy_lst.append(entropy[ind])
cv_lst.append(cv[ind])
if v0 is not None:
v0_lst.append(v0)
free_eng_lst.append(fit(v0))
entropy_lst.append(entropy[ind])
cv_lst.append(cv[ind])
else:
v0_lst.append(np.nan)
free_eng_lst.append(np.nan)
entropy_lst.append(np.nan)
cv_lst.append(np.nan)

return v0_lst, free_eng_lst, entropy_lst, cv_lst

def plot_free_energy_volume_temperature(
Expand Down

0 comments on commit 0a3839d

Please sign in to comment.