|
| 1 | +module ReactionMechanismSimulator |
1 | 2 | import Logging
|
2 | 3 | Logging.disable_logging(Logging.Warn)
|
3 |
| - |
4 |
| -module ReactionMechanismSimulator |
5 |
| - using PyCall |
6 |
| - push!(PyVector(pyimport("sys")["path"]), "") |
7 |
| - const Chem = PyNULL() |
8 |
| - const Desc = PyNULL() |
9 |
| - const molecule = PyNULL() |
10 |
| - const fragment = PyNULL() |
11 |
| - const pydot = PyNULL() |
12 |
| - const chemkin =PyNULL() |
13 |
| - const species = PyNULL() |
14 |
| - const reaction = PyNULL() |
15 |
| - const nasa = PyNULL() |
16 |
| - const wilhoit = PyNULL() |
17 |
| - const arrhenius = PyNULL() |
18 |
| - const falloff = PyNULL() |
19 |
| - const chebyshev = PyNULL() |
20 |
| - const solvation = PyNULL() |
21 |
| - const os = PyNULL() |
22 |
| - function __init__() |
23 |
| - copy!(Chem,pyimport_conda("rdkit.Chem","rdkit","rmg")) |
24 |
| - copy!(Desc,pyimport_conda("rdkit.Chem.Descriptors","rdkit","rmg")) |
25 |
| - try |
26 |
| - copy!(molecule,pyimport("rmgpy.molecule")) |
27 |
| - copy!(chemkin,pyimport("rmgpy.chemkin")) |
28 |
| - copy!(species,pyimport("rmgpy.species")) |
29 |
| - copy!(reaction,pyimport("rmgpy.reaction")) |
30 |
| - copy!(nasa,pyimport("rmgpy.thermo.nasa")) |
31 |
| - copy!(wilhoit,pyimport("rmgpy.thermo.wilhoit")) |
32 |
| - copy!(arrhenius,pyimport("rmgpy.kinetics.arrhenius")) |
33 |
| - copy!(falloff,pyimport("rmgpy.kinetics.falloff")) |
34 |
| - copy!(chebyshev,pyimport("rmgpy.kinetics.chebyshev")) |
35 |
| - copy!(solvation,pyimport("rmgpy.data.solvation")) |
36 |
| - copy!(fragment,pyimport("rmgpy.molecule.fragment")) |
37 |
| - catch e |
38 |
| - copy!(molecule,pyimport_conda("molecule.molecule","rmgmolecule","hwpang")) |
39 |
| - copy!(chemkin,pyimport_conda("molecule.chemkin","rmgmolecule","hwpang")) |
40 |
| - copy!(species,pyimport_conda("molecule.species","rmgmolecule","hwpang")) |
41 |
| - copy!(reaction,pyimport_conda("molecule.reaction","rmgmolecule","hwpang")) |
42 |
| - copy!(nasa,pyimport_conda("molecule.thermo.nasa","rmgmolecule","hwpang")) |
43 |
| - copy!(wilhoit,pyimport_conda("molecule.thermo.wilhoit","rmgmolecule","hwpang")) |
44 |
| - copy!(arrhenius,pyimport_conda("molecule.kinetics.arrhenius","rmgmolecule","hwpang")) |
45 |
| - copy!(falloff,pyimport_conda("molecule.kinetics.falloff","rmgmolecule","hwpang")) |
46 |
| - copy!(chebyshev,pyimport_conda("molecule.kinetics.chebyshev","rmgmolecule","hwpang")) |
47 |
| - copy!(solvation,pyimport_conda("molecule.data.solvation","rmgmolecule","hwpang")) |
48 |
| - copy!(fragment,pyimport_conda("molecule.molecule.fragment","rmgmolecule","hwpang")) |
49 |
| - end |
50 |
| - copy!(pydot,pyimport_conda("pydot","pydot")) |
51 |
| - copy!(os,pyimport_conda("os","os")) |
| 4 | +using PythonCall |
| 5 | +pyimport("sys").path.append("") |
| 6 | +function __init__() |
| 7 | + Chem = @pyconst(pyimport("rdkit.Chem")) |
| 8 | + Desc = @pyconst(pyimport("rdkit.Chem.Descriptors")) |
| 9 | + try |
| 10 | + molecule = @pyconst(pyimport("rmgpy.molecule")) |
| 11 | + chemkin = @pyconst(pyimport("rmgpy.chemkin")) |
| 12 | + species = @pyconst(pyimport("rmgpy.species")) |
| 13 | + reaction = @pyconst(pyimport("rmgpy.reaction")) |
| 14 | + nasa = @pyconst(pyimport("rmgpy.thermo.nasa")) |
| 15 | + wilhoit = @pyconst(pyimport("rmgpy.thermo.wilhoit")) |
| 16 | + arrhenius = @pyconst(pyimport("rmgpy.kinetics.arrhenius")) |
| 17 | + falloff = @pyconst(pyimport("rmgpy.kinetics.falloff")) |
| 18 | + chebyshev = @pyconst(pyimport("rmgpy.kinetics.chebyshev")) |
| 19 | + solvation = @pyconst(pyimport("rmgpy.data.solvation")) |
| 20 | + fragment = @pyconst(pyimport("rmgpy.molecule.fragment")) |
| 21 | + catch e |
| 22 | + molecule = @pyconst(pyimport("molecule.molecule")) |
| 23 | + chemkin = @pyconst(pyimport("molecule.chemkin")) |
| 24 | + species = @pyconst(pyimport("molecule.species")) |
| 25 | + reaction = @pyconst(pyimport("molecule.reaction")) |
| 26 | + nasa = @pyconst(pyimport("molecule.thermo.nasa")) |
| 27 | + wilhoit = @pyconst(pyimport("molecule.thermo.wilhoit")) |
| 28 | + arrhenius = @pyconst(pyimport("molecule.kinetics.arrhenius")) |
| 29 | + falloff = @pyconst(pyimport("molecule.kinetics.falloff")) |
| 30 | + chebyshev = @pyconst(pyimport("molecule.kinetics.chebyshev")) |
| 31 | + solvation = @pyconst(pyimport("molecule.data.solvation")) |
| 32 | + fragment = @pyconst(pyimport("molecule.molecule.fragment")) |
52 | 33 | end
|
53 |
| - include("Constants.jl") |
54 |
| - include("Tools.jl") |
55 |
| - include("Calculators/RateUncertainty.jl") |
56 |
| - include("Calculators/ThermoUncertainty.jl") |
57 |
| - include("Calculators/Thermo.jl") |
58 |
| - include("Calculators/Diffusion.jl") |
59 |
| - include("Calculators/Rate.jl") |
60 |
| - include("Calculators/Viscosity.jl") |
61 |
| - include("Calculators/Thermovec.jl") |
62 |
| - include("Calculators/Ratevec.jl") |
63 |
| - include("Calculators/kLAkH.jl") |
64 |
| - include("Species.jl") |
65 |
| - include("Solvent.jl") |
66 |
| - include("Reaction.jl") |
67 |
| - include("Phase.jl") |
68 |
| - include("PhaseState.jl") |
69 |
| - include("Interface.jl") |
70 |
| - include("Domain.jl") |
71 |
| - include("yml.jl") |
72 |
| - include("Parse.jl") |
73 |
| - include("ModelReduction.jl") |
74 |
| - include("Reactor.jl") |
75 |
| - include("ThreadedSensitivities.jl") |
76 |
| - include("Simulation.jl") |
77 |
| - include("TransitorySensitivities.jl") |
78 |
| - include("AutomaticMechanismAnalysis.jl") |
79 |
| - include("EdgeAnalysis.jl") |
80 |
| - include("Debugging.jl") |
81 |
| - include("Plotting.jl") |
82 |
| - include("fluxdiagrams.jl") |
| 34 | + pydot = @pyconst(pyimport("pydot")) |
| 35 | + os = @pyconst(pyimport("os")) |
| 36 | +end |
| 37 | +include("Constants.jl") |
| 38 | +include("Tools.jl") |
| 39 | +include("Calculators/RateUncertainty.jl") |
| 40 | +include("Calculators/ThermoUncertainty.jl") |
| 41 | +include("Calculators/Thermo.jl") |
| 42 | +include("Calculators/Diffusion.jl") |
| 43 | +include("Calculators/Rate.jl") |
| 44 | +include("Calculators/Viscosity.jl") |
| 45 | +include("Calculators/Thermovec.jl") |
| 46 | +include("Calculators/Ratevec.jl") |
| 47 | +include("Calculators/kLAkH.jl") |
| 48 | +include("Species.jl") |
| 49 | +include("Solvent.jl") |
| 50 | +include("Reaction.jl") |
| 51 | +include("Phase.jl") |
| 52 | +include("PhaseState.jl") |
| 53 | +include("Interface.jl") |
| 54 | +include("Domain.jl") |
| 55 | +include("yml.jl") |
| 56 | +include("Parse.jl") |
| 57 | +include("ModelReduction.jl") |
| 58 | +include("Reactor.jl") |
| 59 | +include("ThreadedSensitivities.jl") |
| 60 | +include("Simulation.jl") |
| 61 | +include("TransitorySensitivities.jl") |
| 62 | +include("AutomaticMechanismAnalysis.jl") |
| 63 | +include("EdgeAnalysis.jl") |
| 64 | +include("Debugging.jl") |
| 65 | +include("Plotting.jl") |
| 66 | +include("fluxdiagrams.jl") |
83 | 67 | end
|
0 commit comments