Skip to content

Commit bb2e2aa

Browse files
committed
Updated behaviour
1 parent df92b40 commit bb2e2aa

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

arc/statmech/arkane.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,11 +892,10 @@ def _find_best_level_key_for_sp_level(level: "Level",
892892
best_key = lot_str
893893
break
894894

895-
# No target year specified: pick the latest year if present, otherwise fall back to no-year entry.
895+
# No target year specified: prefer no-year entry; if absent, pick latest year.
896896
if cand_year is None:
897-
if best_year is None:
898-
best_key = lot_str
899-
continue
897+
best_key = lot_str
898+
break
900899

901900
if best_year is None or cand_year > best_year:
902901
best_year = cand_year

arc/statmech/arkane_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_get_arkane_model_chemistry(self):
165165
"LevelOfTheory(method='ccsd(t)f12',basis='ccpvtzf12',software='molpro')")
166166
self.assertEqual(get_arkane_model_chemistry(sp_level=Level(method='CBS-QB3'),
167167
freq_scale_factor=1.0),
168-
"LevelOfTheory(method='cbsqb32023',software='gaussian')")
168+
"LevelOfTheory(method='cbsqb3',software='gaussian')")
169169

170170
def test_get_arkane_model_chemistry_year_not_found(self):
171171
"""Test warnings when a requested year is not found in the Arkane database."""
@@ -179,7 +179,7 @@ def test_get_arkane_model_chemistry_latest_year(self):
179179
"""Test selecting the latest available year when no year is specified."""
180180
model_chemistry = get_arkane_model_chemistry(sp_level=Level(method='CBS-QB3'),
181181
freq_scale_factor=1.0)
182-
self.assertEqual(model_chemistry, "LevelOfTheory(method='cbsqb32023',software='gaussian')")
182+
self.assertEqual(model_chemistry, "LevelOfTheory(method='cbsqb3',software='gaussian')")
183183

184184
def test_generate_arkane_input(self):
185185
"""Test generating Arkane input"""

docs/source/advanced.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ Equivalent ``input.yml`` form::
108108
basis: def2tzvp
109109
year: 2023
110110

111-
If ``year`` is omitted, ARC will match the newest available entry for that method/basis in the Arkane database.
111+
If ``year`` is omitted, ARC will prefer the no-year Arkane entry for that method/basis. If none exists,
112+
ARC will fall back to the latest available year in the Arkane database.
112113

113114

114115
The following are examples for **equivalent** definitions::

docs/source/examples.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ To specify a composite method, simply define something like::
8787
Note: Do not include year suffixes in ``level_of_theory`` (e.g., ``wb97xd32023``). Year suffixes are
8888
for Arkane database matching only and are not valid QC methods. If you need a specific correction year,
8989
set ``arkane_level_of_theory`` with a ``year`` value instead.
90+
If ``year`` is omitted, ARC will prefer the no-year Arkane entry for that method/basis; if none exists,
91+
ARC will fall back to the latest available year in the Arkane database.
9092

9193
Note that for composite methods the ``freq_level`` and ``scan_level`` may have different
9294
default values than for non-composite methods (defined in settings.py). Note: an independent

0 commit comments

Comments
 (0)