ReactionMechanismGenerator / ReactionMechanismSimulator.jl

The amazing Reaction Mechanism Simulator for simulating large chemical kinetic mechanisms
https://reactionmechanismgenerator.github.io/ReactionMechanismSimulator.jl
MIT License
75 stars 33 forks source link

Failed to install rmgpy #34

Closed jiweiqi closed 4 years ago

jiweiqi commented 4 years ago
[ Info: Installing rmgpy.molecule via the Conda rmgpy package...
[ Info: Running `conda config --add channels rmg --file /Users/weiqi/miniconda3/envs/conda_jl/condarc-julia.yml --force` in root environment
Warning: 'rmg' already in 'channels' list, moving to the top
[ Info: Running `conda install -y rmgpy` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - rmgpy

Current channels:

  - https://conda.anaconda.org/rmg/osx-64
  - https://conda.anaconda.org/rmg/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/anaconda-fusion/osx-64
  - https://conda.anaconda.org/anaconda-fusion/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

ERROR: InitError: failed process: Process(setenv(`/Users/weiqi/miniconda3/envs/conda_jl/bin/conda install -y rmgpy`,["XPC_FLAGS=0x0", "_CE_M=", "PATH=/usr/local/opt/ruby/bin:/Users/weiqi/miniconda3/bin:/Users/weiqi/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "PWD=/Users/weiqi/Box Sync/Energy-COVID-19/Data Combined for Analysis/Model_Combined", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "SHELL=/bin/zsh", "__CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0", "LD_LIBRARY_PATH=/Users/weiqi/.julia/conda/3/lib", "MKL_INTERFACE_LAYER=LP64,GNU"  …  "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.3BzDhK9N1F/Listeners", "OLDPWD=/Users/weiqi/Box Sync/Energy-COVID-19/Data Combined for Analysis/Model_Combined", "_=/usr/local/bin/julia", "_CE_CONDA=", "USER=weiqi", "TERM=xterm-256color", "HOME=/Users/weiqi", "TERM_PROGRAM_VERSION=433", "OPENBLAS_MAIN_FREE=1", "PYTHONIOENCODING=UTF-8"]), ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] runconda(::Cmd, ::String) at /Users/weiqi/.julia/packages/Conda/3rPhK/src/Conda.jl:114
 [5] add(::String, ::String; channel::String) at /Users/weiqi/.julia/packages/Conda/3rPhK/src/Conda.jl:188
 [6] add at /Users/weiqi/.julia/packages/Conda/3rPhK/src/Conda.jl:187 [inlined] (repeats 2 times)
 [7] pyimport_conda(::String, ::String, ::String) at /Users/weiqi/.julia/packages/PyCall/zqDXB/src/PyCall.jl:699
 [8] __init__() at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/ReactionMechanismSimulator.jl:20
 [9] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [10] _require_from_serialized(::String) at ./loading.jl:748
 [11] _require(::Base.PkgId) at ./loading.jl:1039
 [12] require(::Base.PkgId) at ./loading.jl:927
 [13] require(::Module, ::Symbol) at ./loading.jl:922
during initialization of module ReactionMechanismSimulator
caused by [exception 1]
PyError (PyImport_ImportModule

The Python package rmgpy.molecule could not be found by pyimport. Usually this means
that you did not install rmgpy.molecule in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package.  To install the rmgpy.molecule module, you can
use `pyimport_conda("rmgpy.molecule", PKG)`, where PKG is the Anaconda
package the contains the module rmgpy.molecule, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python.   As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.

) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'rmgpy'")

Stacktrace:
 [1] pyimport(::String) at /Users/weiqi/.julia/packages/PyCall/zqDXB/src/PyCall.jl:536
 [2] pyimport_conda(::String, ::String, ::String) at /Users/weiqi/.julia/packages/PyCall/zqDXB/src/PyCall.jl:694
 [3] __init__() at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/ReactionMechanismSimulator.jl:20
 [4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [5] _require_from_serialized(::String) at ./loading.jl:748
 [6] _require(::Base.PkgId) at ./loading.jl:1039
 [7] require(::Base.PkgId) at ./loading.jl:927
 [8] require(::Module, ::Symbol) at ./loading.jl:922
jiweiqi commented 4 years ago

I am using Mac OS with Julia 1.4.1. Here is my ENV

julia> ENV
Base.EnvDict with 32 entries:
  "TERM_PROGRAM"                     => "Apple_Terminal"
  "SHELL"                            => "/bin/zsh"
  "TERM"                             => "xterm-256color"
  "TMPDIR"                           => "/var/folders/5j/nn5fq5hn55q4q547_mtm5l180000gp/T/"
  "TERM_PROGRAM_VERSION"             => "433"
  "TERM_SESSION_ID"                  => "A56EC80A-ECEC-4CAB-90CC-69007EC419D4"
  "USER"                             => "weiqi"
  "SSH_AUTH_SOCK"                    => "/private/tmp/com.apple.launchd.3BzDhK9N1F/Listeners"
  "PATH"                             => "/usr/local/opt/ruby/bin:/Users/weiqi/miniconda3/bin:/Users/weiqi/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  "PWD"                              => "/Users/weiqi/Box Sync/Energy-COVID-19/Data Combined for Analysis/Model_Combined"
  "LANG"                             => "en_US.UTF-8"
  "XPC_FLAGS"                        => "0x0"
  "XPC_SERVICE_NAME"                 => "0"
  "SHLVL"                            => "1"
  "HOME"                             => "/Users/weiqi"
  "LOGNAME"                          => "weiqi"
  "OLDPWD"                           => "/Users/weiqi/Box Sync/Energy-COVID-19/Data Combined for Analysis/Model_Combined"
  "CONDA_EXE"                        => "/Users/weiqi/miniconda3/bin/conda"
  "_CE_M"                            => ""
  "_CE_CONDA"                        => ""
  "CONDA_PYTHON_EXE"                 => "/Users/weiqi/miniconda3/bin/python"
  "CONDA_SHLVL"                      => "1"
  "CONDA_PREFIX"                     => "/Users/weiqi/miniconda3"
  "CONDA_DEFAULT_ENV"                => "base"
  "CONDA_PROMPT_MODIFIER"            => "(base) "
  "CONDA_MKL_INTERFACE_LAYER_BACKUP" => ""
  "MKL_INTERFACE_LAYER"              => "LP64,GNU"
  "LD_LIBRARY_PATH"                  => "/Users/weiqi/.julia/conda/3/lib"
  "_"                                => "/usr/local/bin/julia"
  "__CF_USER_TEXT_ENCODING"          => "0x1F6:0x0:0x0"
  "OPENBLAS_MAIN_FREE"               => "1"
  "RDBASE"                           => "/Users/weiqi/miniconda3/envs/conda_jl/share/RDKit"
jiweiqi commented 4 years ago

Then I tried to read the example mechanism file_path="/ReactionMechanismSimulator.jl/src/testing/ethane.rms phaseDict = readinput(file_path);

It gives the following outputs

┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = getatomdictsmiles(::String) at Parse.jl:129
└ @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:129
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = getatomdictsmiles(::String) at Parse.jl:129
└ @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:129
[00:27:57] WARNING: not removing hydrogen atom without neighbors
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = getatomdictfromrdkit(::PyCall.PyObject) at Parse.jl:116
└ @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:116
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = getatomdictfromrdkit(::PyCall.PyObject) at Parse.jl:117
└ @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:117
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = getatomdictfromrdkit(::PyCall.PyObject) at Parse.jl:124
└ @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:124
ERROR: MethodError: no method matching Species(; index=1, name="H", bondnum=0, diffusion=StokesDiffusivity{Float64}
  r: Float64 1.5114586307031264e-10
, radius=1.5114586307031264e-10, atomnums=Dict("H" => 1), radicalelectrons=1, thermo=NASA{ReactionMechanismSimulator.EmptyThermoUncertainty}
  polys: Array{NASApolynomial}((2,))
  unc: ReactionMechanismSimulator.EmptyThermoUncertainty ReactionMechanismSimulator.EmptyThermoUncertainty()
, smiles="[H]")
Closest candidates are:
  Species(; name, index, inchi, smiles, thermo, atomnums, bondnum, diffusion, radius) at /Users/weiqi/.julia/packages/Parameters/CVyBv/src/Parameters.jl:520 got unsupported keyword argument "radicalelectrons"
  Species(::Species; kws...) at /Users/weiqi/.julia/packages/Parameters/CVyBv/src/Parameters.jl:530
  Species(::Species, ::AbstractDict) at /Users/weiqi/.julia/packages/Parameters/CVyBv/src/Parameters.jl:533 got unsupported keyword arguments "index", "name", "bondnum", "diffusion", "radius", "atomnums", "radicalelectrons", "thermo", "smiles"
  ...
Stacktrace:
 [1] kwerr(::NamedTuple{(:index, :name, :bondnum, :diffusion, :radius, :atomnums, :radicalelectrons, :thermo, :smiles),Tuple{Int64,String,Int64,StokesDiffusivity{Float64},Float64,Dict{String,Int64},Int64,NASA{ReactionMechanismSimulator.EmptyThermoUncertainty},String}}, ::Type{T} where T) at ./error.jl:157
 [2] top-level scope at REPL[28]:1
 [3] eval at ./boot.jl:331 [inlined]
 [4] eval at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/ReactionMechanismSimulator.jl:1 [inlined]
 [5] fcndict2obj(::Dict{Any,Any}, ::Dict{Any,Any}) at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:186
 [6] readinputyml(::String) at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:275
 [7] readinput(::String; spcdict::String, output::String) at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:199
 [8] readinput(::String) at /Users/weiqi/.julia/packages/ReactionMechanismSimulator/2Y0hL/src/Parse.jl:197
 [9] top-level scope at REPL[28]:1
mjohnson541 commented 4 years ago

So the conda package name is rmg.

jiweiqi commented 4 years ago

Aha. How can I fix the bug?

mjohnson541 commented 4 years ago

Are you on master?

jiweiqi commented 4 years ago

I am not sure. I installed via Pkg. add / build

mjohnson541 commented 4 years ago

So radicalelectron wasn't a valid property in the only release version v0.1.0 so I don't think that version of RMS can handle that attribute in the current input files.

jiweiqi commented 4 years ago

Actually, I just want to test RMS with any mechanism. Do you know which one will work with the master branch?

mjohnson541 commented 4 years ago

If you go to the tagged v0.1.0 release versions and copy the test mechanisms over that should work for v0.1.0. All the test mechanisms on master should work with master. It should also be able to read in arbitrary chemkin files as well.