File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232and implementing the SLS master equation reduction method
3333"""
3434
35- from juliacall import Main
36-
37- Main .seval ("using ReactionMechanismSimulator.SciMLBase" )
38- Main .seval ("using ReactionMechanismSimulator.Sundials" )
39- import sys
4035import logging
36+ import sys
4137
4238import numpy as np
4339import scipy .linalg
5046
5147NO_JULIA = False
5248try :
53- from diffeqpy import de
54- from julia import Main
49+ from juliacall import Main
50+
51+ Main .seval ("using ReactionMechanismSimulator.SciMLBase" )
52+ Main .seval ("using ReactionMechanismSimulator.Sundials" )
5553except Exception as e :
5654 logging .info (
5755 f"Unable to import Julia dependencies, original error: { str (e )} "
Original file line number Diff line number Diff line change 3434import logging
3535import sys
3636
37- import juliacall
3837import numpy as np
39- from juliacall import Main
4038
4139import rmgpy .constants as constants
4240
43- Main .seval ("using PythonCall" )
44- Main .seval ("using ReactionMechanismSimulator" )
45- Main .seval ("using ReactionMechanismSimulator.Sundials" )
41+ NO_JULIA = True
42+ try :
43+ import juliacall
44+ from juliacall import Main
45+ Main .seval ("using PythonCall" )
46+ Main .seval ("using ReactionMechanismSimulator" )
47+ Main .seval ("using ReactionMechanismSimulator.Sundials" )
48+ NO_JULIA = False
49+ except :
50+ logging .warning ("Julia import failed, RMS reactors not available." )
4651
4752from rmgpy import constants
4853from rmgpy .data .kinetics .depository import DepositoryReaction
You can’t perform that action at this time.
0 commit comments