-
Notifications
You must be signed in to change notification settings - Fork 34
RMS Installation
RMS is written in Juila language. So before stepping any further, Julia needs to be installed. The download links can be found at download Julia. More instructions can be found from the instruction page.
There is no need to clone this repository if you don't care about developing RMS yourself and just want to use its default methods. Otherwise, clone RMS to a directory you like and remember the path RMS_PATH
which is needed in the later step.
Since RMS is built on RMG-Py APIs, you need to have RMG-Py available. You can consider the ways showing below to install RMG on your machine:
- For Basic Users: Binary Installation Using Anaconda
- For Developers: Installation by Source Using Anaconda Environment
Both methods require you to create a conda environment. Please remember the path to the environment and its python binary. You can check the paths by running conda activate rmg_env; which python
in a terminal. The output should be something like the following:
-
/Users/USER_NAME/anaconda3/envs/rmg_env/bin/python
(on Mac OS) -
/home/USER_NAME/anaconda3/envs/rmg_env/bin/python
(on Linux) (This can be different if you have anaconda in a different version or installed in another place)
Taking the Mac OS version as an example, please remember the following:
PATH_TO_YOUR_CONDA_ENV = "/Users/USER_NAME/anaconda3/envs/rmg_env/"
PATH_TO_YOUR_PYTHON = "/home/USER_NAME/anaconda3/envs/rmg_env/bin/python"
You'll also want to make sure that the conda binary is in your environment
conda activate rmg_env
conda install conda
To have Julia successfully links to Python, you need both PyCall.jl
and Conda.jl
packages and set them correctly before compiling RMS. Please open Julia (Simply click the application icon or run juila
in a terminal) and run the following:
import Pkg
Pkg.add("PyCall") # Install PyCall.jl; Conda.jl will be automatically installed as well
ENV["CONDA_JL_HOME"] = PATH_TO_YOUR_CONDA_ENV # Replace the `PATH_TO_YOUR_CONDA_ENV` to the quoted path
Pkg.build("Conda") # Allows you to use a pre-existing Conda installation
ENV["PYTHON"] = PATH_TO_YOUR_PYTHON # Replace the `PATH_TO_YOUR_Python` to the other quoted path
Pkg.build("PyCall") # Allows you to use non-PyCall-default Python
Besides, you need to install DifferentialEquations.jl
. following the above, run:
Pkg.add("DifferentialEquations")
Pkg.build("DifferentialEquations")
As described earlier, you may just want to use default functions and did not clone the depository to your local machine. Please run:
import Pkg
Pkg.develop(Pkg.PackageSpec(url="https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl"))
Pkg.build("ReactionMechanismSimulator")
Make sure you have cloned RMS onto your local machine. Please run:
import Pkg
Pkg.develop(Pkg.PackageSpec(path=RMS_PATH)) # RMS_PATH is the path to which this depository is cloned to
Pkg.build("ReactionMechanismSimulator")
Don't worry about the warnings generated during compiling. If you have no error encountered when you finish all of the steps above, you are very likely to have RMS installed properly.
import Pkg
Pkg.test("ReactionMechanismSimulator")
If all of the tests are passed, congratulations! your RMS is ready!
If you want to use RMS with Python, we have a Python wrapper for this purpose. Please find the other depository pyrms for more guidance.