Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 57 additions & 52 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ scipy = ">=1.12"
pac99 = ">=1.6.0"
projrot = ">=1.8.0"
thermp = ">=0.7.0"
mess-static = ">=2025.9.0"
autochem = "==0.2025.0"
autoio = "==0.2025.0"
mess-static = ">=2026.2.4"
autochem = "==0.2026.2"
autoio = "==0.2026.0"
autofile = "==0.2025.0"
mechanalyzer = "==0.2025.0"
mechanalyzer = "==0.2026.0"

# - Environments
[tool.pixi.pypi-dependencies]
Expand All @@ -82,11 +82,11 @@ scipy = ">=1.12"
pac99 = ">=1.6.0"
projrot = ">=1.8.0"
thermp = ">=0.7.0"
mess-static = ">=2025.9.0"
autochem = "==0.2025.0"
autoio = "==0.2025.0"
mess-static = ">=2026.2.4"
autochem = "==0.2026.2"
autoio = "==0.2026.0"
autofile = "==0.2025.0"
mechanalyzer = "==0.2025.0"
mechanalyzer = "==0.2026.0"

[tool.pixi.feature.build.dependencies]
rattler-build = ">=0.47.1"
Expand Down Expand Up @@ -165,4 +165,4 @@ push = true
]
"src/mechdriver/__init__.py" = [
'__version__ = "{version}"',
]
]
16 changes: 11 additions & 5 deletions src/mechdriver/subtasks/_2run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Standalone script to run AutoMech subtasks in parallel using HyperQueue."""

import sys
import traceback
import contextlib
import functools
import itertools
Expand Down Expand Up @@ -205,13 +207,13 @@ def assign_atomic_function(
"""Create a HyperQueue task to run automech."""
run_ = run_automech

# Ignore errors if requested
run_ = ignore_error_wrapper(run_) if ignore_error else run_

# Create lock file if requested
lock_path = log_path.with_suffix(Extension.running)
run_ = lock_wrapper(run_, lock_file=lock_path) if lock else run_

# Ignore errors if requested
run_ = ignore_error_wrapper(run_) if ignore_error else run_

resources = hq.resource_request(cpus=cpus, mem=mem)
stdout = stderr = str(log_path)
return job.function(
Expand All @@ -232,8 +234,12 @@ def ignore_error_wrapper(func: Callable[..., None]) -> Callable[..., None]:
def wrapper(*args, **kwargs) -> None:
try:
func(*args, **kwargs)
except Exception as err:
print(err)
except Exception as error:
trace = traceback.format_exc()
print(f"{error=}")
print("---traceback start---")
print(trace)
print("---traceback end---")

return wrapper

Expand Down
7 changes: 3 additions & 4 deletions src/mechdriver/subtasks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import more_itertools as mit
import pandas
import pyparsing as pp
from autochem.util.chemkin import parse_equation
from chemkin_io.parser.reaction import rct_names, prd_names
from pyparsing import common as ppc

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

if comment:
Expand Down
2 changes: 1 addition & 1 deletion src/mechroutines/models/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def mol_data(spc_name, spc_dct,
zma_locs = ts_zma_locs(spc_dct, spc_name, zma_fs)
zma = zma_fs[-1].file.zmatrix.read(zma_locs)

racemic = True
racemic = False
ioprinter.info_message('Setting symmetry factors as racemic=', racemic)
sym_factor = symm.symmetry_factor(
pf_filesystems, spc_mod_dct_i, spc_dct_i, rotors, grxn=zrxn, zma=zma,
Expand Down
Binary file modified tests/archive.tgz
Binary file not shown.
Loading