Skip to content

Commit d9c0048

Browse files
committed
Updated ml
1 parent 8a9460d commit d9c0048

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

molecule/ml/estimator.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,27 @@
3232
from argparse import Namespace
3333
from typing import Callable, Union
3434

35+
chemprop = None
3536
try:
3637
import chemprop
3738
except ImportError as e:
38-
chemprop = None
3939
chemprop_exception = e
4040
import numpy as np
4141

4242
from molecule.molecule import Molecule
4343
from molecule.species import Species
4444
from molecule.thermo import ThermoData
4545

46+
ADMONITION = """
47+
Support for predicting thermochemistry using chemprop has been temporarily removed
48+
from RMG, pending official chemprop support for Python 3.11 and newer.
49+
50+
To use chemprop and RMG, install a previous version of RMG (3.1.1 or earlier).
51+
52+
See the link below for status of re-integration of chemprop:
53+
https://github.com/ReactionMechanismGenerator/RMG-Py/issues/2559
54+
"""
55+
4656

4757
class MLEstimator:
4858
"""
@@ -118,7 +128,7 @@ def load_estimator(model_dir: str) -> Callable[[str], np.ndarray]:
118128
if chemprop is None:
119129
# Delay chemprop ImportError until we actually try to use it
120130
# so that RMG can load successfully without chemprop.
121-
raise chemprop_exception
131+
raise RuntimeError(ADMONITION + "\nOriginal Exception:\n" + str(chemprop_exception))
122132

123133
args = Namespace() # Simple class to hold attributes
124134

0 commit comments

Comments
 (0)