Skip to content

Commit 89a863c

Browse files
authored
Merge pull request #604 from avcopan/dev
Turn off symmetry factor racemization, update dependencies, remove autochem dependency
2 parents 262e76b + b7a199b commit 89a863c

6 files changed

Lines changed: 81 additions & 71 deletions

File tree

pixi.lock

Lines changed: 57 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ scipy = ">=1.12"
5656
pac99 = ">=1.6.0"
5757
projrot = ">=1.8.0"
5858
thermp = ">=0.7.0"
59-
mess-static = ">=2025.9.0"
60-
autochem = "==0.2025.0"
61-
autoio = "==0.2025.0"
59+
mess-static = ">=2026.2.4"
60+
autochem = "==0.2026.2"
61+
autoio = "==0.2026.0"
6262
autofile = "==0.2025.0"
63-
mechanalyzer = "==0.2025.0"
63+
mechanalyzer = "==0.2026.0"
6464

6565
# - Environments
6666
[tool.pixi.pypi-dependencies]
@@ -82,11 +82,11 @@ scipy = ">=1.12"
8282
pac99 = ">=1.6.0"
8383
projrot = ">=1.8.0"
8484
thermp = ">=0.7.0"
85-
mess-static = ">=2025.9.0"
86-
autochem = "==0.2025.0"
87-
autoio = "==0.2025.0"
85+
mess-static = ">=2026.2.4"
86+
autochem = "==0.2026.2"
87+
autoio = "==0.2026.0"
8888
autofile = "==0.2025.0"
89-
mechanalyzer = "==0.2025.0"
89+
mechanalyzer = "==0.2026.0"
9090

9191
[tool.pixi.feature.build.dependencies]
9292
rattler-build = ">=0.47.1"
@@ -165,4 +165,4 @@ push = true
165165
]
166166
"src/mechdriver/__init__.py" = [
167167
'__version__ = "{version}"',
168-
]
168+
]

src/mechdriver/subtasks/_2run.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Standalone script to run AutoMech subtasks in parallel using HyperQueue."""
22

3+
import sys
4+
import traceback
35
import contextlib
46
import functools
57
import itertools
@@ -205,13 +207,13 @@ def assign_atomic_function(
205207
"""Create a HyperQueue task to run automech."""
206208
run_ = run_automech
207209

210+
# Ignore errors if requested
211+
run_ = ignore_error_wrapper(run_) if ignore_error else run_
212+
208213
# Create lock file if requested
209214
lock_path = log_path.with_suffix(Extension.running)
210215
run_ = lock_wrapper(run_, lock_file=lock_path) if lock else run_
211216

212-
# Ignore errors if requested
213-
run_ = ignore_error_wrapper(run_) if ignore_error else run_
214-
215217
resources = hq.resource_request(cpus=cpus, mem=mem)
216218
stdout = stderr = str(log_path)
217219
return job.function(
@@ -232,8 +234,12 @@ def ignore_error_wrapper(func: Callable[..., None]) -> Callable[..., None]:
232234
def wrapper(*args, **kwargs) -> None:
233235
try:
234236
func(*args, **kwargs)
235-
except Exception as err:
236-
print(err)
237+
except Exception as error:
238+
trace = traceback.format_exc()
239+
print(f"{error=}")
240+
print("---traceback start---")
241+
print(trace)
242+
print("---traceback end---")
237243

238244
return wrapper
239245

src/mechdriver/subtasks/util.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import more_itertools as mit
1313
import pandas
1414
import pyparsing as pp
15-
from autochem.util.chemkin import parse_equation
15+
from chemkin_io.parser.reaction import rct_names, prd_names
1616
from pyparsing import common as ppc
1717

1818
COMMENT_REGEX = re.compile(r"#.*$", flags=re.M)
@@ -360,9 +360,8 @@ def parse_mechanism_dat(mechanism_dat: str) -> dict[str, tuple[list[str], list[s
360360
for line in rxn_block_str.splitlines():
361361
line_match = re.search(r"\d\s*(!.*|# .*)?$", line)
362362
if line_match:
363-
result = parse_equation(line)
364-
reactants = result.reactants
365-
products = result.products
363+
reactants = list(rct_names(line))
364+
products = list(prd_names(line))
366365
comment = line_match.group(1)
367366

368367
if comment:

src/mechroutines/models/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def mol_data(spc_name, spc_dct,
381381
zma_locs = ts_zma_locs(spc_dct, spc_name, zma_fs)
382382
zma = zma_fs[-1].file.zmatrix.read(zma_locs)
383383

384-
racemic = True
384+
racemic = False
385385
ioprinter.info_message('Setting symmetry factors as racemic=', racemic)
386386
sym_factor = symm.symmetry_factor(
387387
pf_filesystems, spc_mod_dct_i, spc_dct_i, rotors, grxn=zrxn, zma=zma,

tests/archive.tgz

343 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)