Skip to content

Commit

Permalink
simplify and update the conda binary installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonBurns committed Apr 1, 2024
1 parent 2563f21 commit d4f71f4
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions documentation/source/users/rmg/installation/anacondaUser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,41 @@ Binary Installation Using Anaconda for Unix-Based Systems: Linux and Mac OSX
****************************************************************************


#. Install the `conda` package manager, if you do not already have it (or Anaconda).
Select one of the following options:
#. Install the ``conda`` package manager via `Miniconda <https://docs.anaconda.com/free/miniconda/miniconda-install/>`_.

a. Users of Fedora Linux and Red Hat derivatives (RHEL, CentOS Stream) may install from the official repositories and EPEL, respectively, with the command ::
#. Create and activate a new ``conda`` environment::

sudo dnf install conda
conda create --name rmg_env python=3.7
conda activate rmg_env

b. All other users, download and install `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_.
#. Install the core RMG Python package::

The download will be a .sh file with a name like ``Miniconda3-latest-Linux-x86_64.sh``.
Open a terminal in the same directory as this file, and type the following to install Conda
(replace the name of your .sh file below). ::
conda install rmg --channel rmg

bash Miniconda3-latest-Linux-x86_64.sh
#. Install RMS::

**When prompted to append Anaconda to your PATH, select or type Yes**.
Install the Conda folder inside your home directory
(typically ``/home/YourUsername/`` in Linux and ``/Users/YourUsername`` in Mac).
conda install julia=1.9.1 pyjulia>=0.6 --channel conda-forge
conda install pyrms diffeqpy --channel rmg
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'

Note that you should reinitialize or restart your terminal in order for the changes to take effect, as the installer will tell you.
.. NOTE::
Arkane and RMG can both be run without installing RMS, though with a reduced feature set.
Arkane will use the slower ``scipy`` solvers instead of ``diffeqpy`` when solving the master equation
and RMG will lose some advanced reactor types and the sensitivity analysis feature.

#. Install both RMG and the RMG-database binaries through the terminal. Dependencies will be installed automatically. It is safest to make a new conda environment for RMG and its dependencies. Type the following command into the terminal to create the new environment named 'rmg_env' containing the latest stable version of the RMG program and its database. ::
#. You may now run an RMG test job. Save the `Minimal Example Input File <https://raw.githubusercontent.com/ReactionMechanismGenerator/RMG-Py/master/examples/rmg/minimal/input.py>`_
to a local directory. Use the terminal to run your RMG job inside that folder using the following command ::

conda create -c defaults -c rmg -c rdkit -c cantera -c pytorch -c conda-forge --name rmg_env rmg rmgdatabase
rmg.py input.py

Whenever you wish to use it you must first activate the environment::
To run models requiring RMS, prefix the command with ``python-jl``::

conda activate rmg_env
python-jl rmg.py input.py

#. You may now run an RMG test job. Save the `Minimal Example Input File <https://raw.githubusercontent.com/ReactionMechanismGenerator/RMG-Py/master/examples/rmg/minimal/input.py>`_
to a local directory. Use the terminal to run your RMG job inside that folder using the following command ::
Whenever you wish to use RMG you must first activate the environment::

rmg.py input.py
conda activate rmg_env

If you encounter the ImportError related to ``libmkl_rt.so.2``, refer to the :ref:`Fixing the ImportError related to libmkl_rt.so.2 <fixImportError>`
section below to fix the error and re-run the RMG test job.
Expand Down Expand Up @@ -83,8 +85,8 @@ You will see a line saying ``MODEL GENERATION COMPLETED`` on your terminal if yo
Updating your binary installation of RMG in Linux or Mac OSX
============================================================

If you had previously installed a binary version of the RMG package, you may
If you had previously installed a binary version of the RMG package you may
check and update your installation to the latest stable version available on Anaconda by typing the following command on the terminal ::

source activate rmg_env
conda update rmg rmgdatabase -c rmg
conda activate rmg_env
conda update rmg --channel rmg

0 comments on commit d4f71f4

Please sign in to comment.