@@ -2,23 +2,6 @@ module ReactionMechanismSimulator
2
2
using PythonCall
3
3
using CondaPkg
4
4
using Logging
5
- packages = keys (CondaPkg. current_packages ())
6
-
7
- if ! (" rmg" in packages) && ! (" rmgmolecule" in packages)
8
- @info " missing rmg and rmgmolecule installing rmgmolecule..."
9
- if ! (v " 3.7" <= PythonCall. C. python_version () && PythonCall. C. python_version () <= v " 3.9" )
10
- @info " python version was not in 3.7-3.9 changing python version"
11
- CondaPkg. add (" python" ; version= " 3.9" )
12
- end
13
- CondaPkg. add (" rmgmolecule" ; version= " >=0.3.0" , channel= " mjohnson541" )
14
- CondaPkg. add (" matplotlib" , channel= " conda-forge" )
15
- CondaPkg. add (" rdkit" , channel= " conda-forge" )
16
- CondaPkg. add (" pydot" , channel= " conda-forge" )
17
-
18
- const Pkg = Base. require (Base. PkgId (Base. UUID (" 44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ), " Pkg" ))
19
- Pkg. build (" PythonCall" )
20
- end
21
-
22
5
const Chem = PythonCall. pynew ()
23
6
const Desc = PythonCall. pynew ()
24
7
const molecule = PythonCall. pynew ()
@@ -34,6 +17,23 @@ const solvation = PythonCall.pynew()
34
17
const fragment = PythonCall. pynew ()
35
18
const pydot = PythonCall. pynew ()
36
19
function __init__ ()
20
+
21
+ packages = keys (CondaPkg. current_packages ())
22
+
23
+ if ! (" rmg" in packages) && ! (" rmgmolecule" in packages)
24
+ @info " missing rmg and rmgmolecule installing rmgmolecule..."
25
+ if ! (v " 3.7" <= PythonCall. C. python_version () && PythonCall. C. python_version () <= v " 3.9" )
26
+ @info " python version was not in 3.7-3.9 changing python version"
27
+ CondaPkg. add (" python" ; version= " 3.9" )
28
+ end
29
+ CondaPkg. add (" rmgmolecule" ; version= " >=0.3.0" , channel= " mjohnson541" )
30
+ CondaPkg. add (" matplotlib" , channel= " conda-forge" )
31
+ CondaPkg. add (" rdkit" , channel= " conda-forge" )
32
+ CondaPkg. add (" pydot" , channel= " conda-forge" )
33
+
34
+ const Pkg = Base. require (Base. PkgId (Base. UUID (" 44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ), " Pkg" ))
35
+ Pkg. build (" PythonCall" )
36
+ end
37
37
PythonCall. pycopy! (Chem, pyimport (" rdkit.Chem" ))
38
38
PythonCall. pycopy! (Desc, pyimport (" rdkit.Chem.Descriptors" ))
39
39
try
0 commit comments