Skip to content

Commit

Permalink
Don't log species to calc if thermo shouldn't be computed for them
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed May 2, 2024
1 parent 81dd414 commit ab15992
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions t3/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,8 @@ def log_species_to_calculate(self,
Args:
species_keys (List[int]): Entries are T3 species indices.
species_dict (dict): The T3 species dictionary.
Todo:
Log the reasons one by one with line breaks and enumerate
"""
if len(species_keys):
if len(species_keys) and any(spc_dict['compute_thermo'] for spc_dict in species_dict.values()):
self.info('\n\nSpecies to calculate thermodynamic data for:')
max_label_length = max([len(spc_dict['QM label'])
for key, spc_dict in species_dict.items() if key in species_keys])
Expand All @@ -193,6 +190,8 @@ def log_species_to_calculate(self,
self.info(f'-----{space1} ------{space2} -----------------------------')
for key in species_keys:
spc_dict = species_dict[key]
if not spc_dict['compute_thermo']:
continue
smiles = spc_dict['object'].molecule[0].to_smiles()
space1 = ' ' * (max_label_length - len(spc_dict['QM label']) + 1)
space2 = ' ' * (max_smiles_length - len(smiles) + 1)
Expand Down

0 comments on commit ab15992

Please sign in to comment.