File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232from argparse import Namespace
3333from typing import Callable , Union
3434
35+ chemprop = None
3536try :
3637 import chemprop
3738except ImportError as e :
38- chemprop = None
3939 chemprop_exception = e
4040import numpy as np
4141
4242from molecule .molecule import Molecule
4343from molecule .species import Species
4444from 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
4757class 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 + " \n Original Exception: \n " + str ( chemprop_exception ))
122132
123133 args = Namespace () # Simple class to hold attributes
124134
You can’t perform that action at this time.
0 commit comments