Skip to content

Commit 6f18987

Browse files
committed
Updated behaviour
1 parent 5b43580 commit 6f18987

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
@@ -886,11 +886,10 @@ def _find_best_level_key_for_sp_level(level: "Level",
886886
best_key = lot_str
887887
break
888888

889-
# No target year specified: pick the latest year if present, otherwise fall back to no-year entry.
889+
# No target year specified: prefer no-year entry; if absent, pick latest year.
890890
if cand_year is None:
891-
if best_year is None:
892-
best_key = lot_str
893-
continue
891+
best_key = lot_str
892+
break
894893

895894
if best_year is None or cand_year > best_year:
896895
best_year = cand_year

arc/statmech/arkane_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_get_arkane_model_chemistry(self):
146146
"LevelOfTheory(method='ccsd(t)f12',basis='ccpvtzf12',software='molpro')")
147147
self.assertEqual(get_arkane_model_chemistry(sp_level=Level(method='CBS-QB3'),
148148
freq_scale_factor=1.0),
149-
"LevelOfTheory(method='cbsqb32023',software='gaussian')")
149+
"LevelOfTheory(method='cbsqb3',software='gaussian')")
150150

151151
def test_get_arkane_model_chemistry_year_not_found(self):
152152
"""Test warnings when a requested year is not found in the Arkane database."""
@@ -160,7 +160,7 @@ def test_get_arkane_model_chemistry_latest_year(self):
160160
"""Test selecting the latest available year when no year is specified."""
161161
model_chemistry = get_arkane_model_chemistry(sp_level=Level(method='CBS-QB3'),
162162
freq_scale_factor=1.0)
163-
self.assertEqual(model_chemistry, "LevelOfTheory(method='cbsqb32023',software='gaussian')")
163+
self.assertEqual(model_chemistry, "LevelOfTheory(method='cbsqb3',software='gaussian')")
164164

165165
def test_generate_arkane_input(self):
166166
"""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)