Closed jiweiqi closed 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"
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
So the conda package name is rmg
.
Aha. How can I fix the bug?
Are you on master?
I am not sure. I installed via Pkg. add / build
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.
Actually, I just want to test RMS with any mechanism. Do you know which one will work with the master branch?
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.