Skip to content

Commit 2fb5007

Browse files
committed
add extra check in case ADS source is empty to avoid crashing
1 parent 89594c8 commit 2fb5007

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rmgpy/tools/uncertainty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,9 @@ def load_thermo_covariances_from_groups(self):
708708
# --------------------------------- add group-group correlations ---------------------------------
709709
# only consider groups actually in the model to keep this a reasonable size
710710
groups_in_model = []
711-
if cov_group_tree_name == 'adsorptionPt111' and 'ADS' in self.all_thermo_sources:
711+
if cov_group_tree_name == 'adsorptionPt111' and 'ADS' in self.all_thermo_sources and cov_group_tree_name in self.all_thermo_sources['ADS']:
712712
groups_in_model = self.all_thermo_sources['ADS'][cov_group_tree_name]
713-
else:
713+
elif cov_group_tree_name in self.all_thermo_sources['GAV']:
714714
groups_in_model = self.all_thermo_sources['GAV'][cov_group_tree_name]
715715
group_items_in_model = [x.item for x in groups_in_model]
716716
group_labels_in_model = [x.label for x in groups_in_model]

0 commit comments

Comments
 (0)