Skip to content

Commit

Permalink
BugFix: Do calc thermo for a species if it exists in self.species
Browse files Browse the repository at this point in the history
when it's 'converged' value is non-determined (i.e., if it's None)
  • Loading branch information
alongd committed Jan 7, 2021
1 parent 1c8be0e commit 2e2bae3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,8 @@ def determine_species_to_calculate(self) -> bool:

species_keys = list(set([key for key in species_keys if key is not None]))

additional_calcs_required = bool(len(species_keys))
additional_calcs_required = bool(len(species_keys)) \
or any(spc['converged'] is None for spc in self.species.values())
self.logger.info(f'Additional calculations required: {additional_calcs_required}\n')
if additional_calcs_required:
self.logger.log_species_to_calculate(species_keys, self.species)
Expand Down Expand Up @@ -1042,7 +1043,8 @@ def species_requires_refinement(self, species: Species) -> bool:
bool: Whether the species thermochemical properties should be calculated. ``True`` if they should be.
"""
thermo_comment = species.thermo.comment.split('Solvation')[0]
if self.get_species_key(species=species) is None \
if (self.get_species_key(species=species) is None
or self.species[self.get_species_key(species=species)]['converged'] is None) \
and ('group additivity' in thermo_comment or '+ radical(' in thermo_comment):
return True
return False
Expand Down

0 comments on commit 2e2bae3

Please sign in to comment.