Skip to content

Commit

Permalink
f! species
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Jun 2, 2024
1 parent 8a87103 commit 2bb6726
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions t3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,21 +1054,22 @@ def trsh_rmg_tol(self, factor: float = 0.5):
self.logger.info(f'Regenerating the RMG model with a tolerance move to core '
f'of {factor * core_tolerance[self.iteration]}.')

def species_requires_refinement(self, species: Optional[Species]) -> bool:
def species_requires_refinement(self, species: Optional[Union[Species, ARCSpecies]]) -> bool:
"""
Determine whether a species thermochemical properties
should be calculated based on the data uncertainty.
First check that this species was not previously considered.
Args:
species (Species): The species for which the query is performed.
species (Union[Species, ARCSpecies]): The species for which the query is performed.
Returns:
bool: Whether the species thermochemical properties should be calculated. ``True`` if they should be.
"""
if species is None:
return False
thermo_comment = species.thermo.comment.split('Solvation')[0]
thermo = species.thermo if isinstance(species, Species) else species.rmg_species.thermo
thermo_comment = thermo.comment.split('Solvation')[0]
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):
Expand Down

0 comments on commit 2bb6726

Please sign in to comment.