Skip to content

Commit 1ee0b63

Browse files
committed
Enhance Arkane level of theory identification and AEC validation logging
Updated the logic for determining the Arkane level of theory to provide logging regarding its source and integrated AEC validation when BAC is not used. Key changes include: - Added logging to identify if the Arkane level of theory was explicitly set or inferred from the composite method or single point level. - Integrated a call to `check_arkane_aec` to verify atom energy corrections when `bac_type` is not specified.
1 parent 9b55617 commit 1ee0b63

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

arc/main.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from arc.species.converter import str_to_xyz
4242
from arc.species.species import ARCSpecies
4343
from arc.statmech.adapter import StatmechEnum
44-
from arc.statmech.arkane import check_arkane_bacs
44+
from arc.statmech.arkane import check_arkane_aec, check_arkane_bacs
4545
from arc.utils.scale import determine_scaling_factors
4646

4747

@@ -1201,13 +1201,26 @@ def check_arkane_level_of_theory(self):
12011201
"""
12021202
Check that the level of theory has AEC in Arkane.
12031203
"""
1204+
explicitly_set = self.arkane_level_of_theory is not None
12041205
if self.arkane_level_of_theory is None:
12051206
self.arkane_level_of_theory = self.composite_method if self.composite_method is not None \
12061207
else self.sp_level if self.sp_level is not None else None
12071208
if self.arkane_level_of_theory is None:
12081209
logger.warning('Could not determine a level of theory to be used for Arkane!')
1209-
elif self.bac_type is not None:
1210-
check_arkane_bacs(sp_level=self.arkane_level_of_theory, bac_type=self.bac_type, raise_error=self.compute_thermo)
1210+
else:
1211+
if explicitly_set:
1212+
source = ''
1213+
elif self.composite_method is not None:
1214+
source = ' (from composite method)'
1215+
else:
1216+
source = ' (from sp level)'
1217+
logger.info(f'Arkane level of theory:{source} {self.arkane_level_of_theory}')
1218+
if self.bac_type is not None:
1219+
check_arkane_bacs(sp_level=self.arkane_level_of_theory, bac_type=self.bac_type,
1220+
raise_error=self.compute_thermo)
1221+
else:
1222+
check_arkane_aec(sp_level=self.arkane_level_of_theory,
1223+
raise_error=self.compute_thermo)
12111224

12121225
def backup_restart(self):
12131226
"""

0 commit comments

Comments
 (0)