Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
run: |
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()" || true
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator' || true
ln -sfn $(which python-jl) $(which python)

# non-regression testing
- name: Unit tests
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
julia -e "using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl\", rev=\"main\"))"
julia -e "using Pkg; Pkg.add(\"PyCall\"); Pkg.add(\"DifferentialEquations\")"
python -c "import julia; julia.install()"
ln -sfn $(which python-jl) $(which python)
- name: Install and compile RMG
run: |
cd ..
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ RUN make
# Install and link Julia dependencies for RMS
RUN python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()" || true
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator' || true
RUN ln -sfn $(which python-jl) $(which python)

# RMG-Py should now be installed and ready
RUN python-jl rmg.py --help
Expand Down
83 changes: 83 additions & 0 deletions documentation/source/users/rmg/installation/anacondaDeveloper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,77 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux
You may now use RMG-Py, Arkane, as well as any of the :ref:`Standalone Modules <modules>` included in the RMG-Py package.


Debugging
=========

If you wish to debug using the (very helpful) debugger in `VSCode <https://code.visualstudio.com>`_,
here is an example launch configuration to put in your launch.json file,
which can be found in the .vscode folder.
You might have to edit them slightly to match your exact paths. Specifically,
you will need ``/opt/miniconda3/envs/rmg_env`` to point to where your conda environment is located.

This configuration will allow you to debug the rms_constant_V example, running through
python-jl. ::

{
"name": "Python: rmg.py rms_constant_V",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/",
"program": "rmg.py",
"python": "/opt/miniconda3/envs/rmg_env/bin/python-jl",
"args": [
"examples/rmg/rms_constant_V/input.py",
],
"console": "integratedTerminal",
"env": {
"PATH": "/opt/miniconda3/envs/rmg_env/bin:${env:PATH}",
"PYTHONPATH": "${workspaceFolder}/",
}
},

This configuration will allow you to debug a subset of the unit tests.
Open one of the many test files named `*Test.py` before you launch it::

{
"name": "Python: nosetest Current File",
"type": "python",
"request": "launch",
"program": "/opt/miniconda3/envs/rmg_env/bin/nosetests",
"args": [
"--nologcapture",
"--nocapture",
"--verbose",
"${file}"
],
"console": "integratedTerminal",
"env": {
"PATH": "/opt/miniconda3/envs/rmg_env/bin:${env:PATH}",
"PYTHONPATH": "${workspaceFolder}/",
},
},

This configuration will allow you to debug running all the database tests.::

{
"name": "Test RMG-database",
"type": "python",
"request": "launch",
"program": "/opt/miniconda3/envs/rmg_env/bin/nosetests",
"args": [
"--nologcapture",
"--nocapture",
"--verbose",
"--detailed-errors",
"${workspaceFolder}/testing/databaseTest.py"
],
"console": "integratedTerminal",
"env": {
"PATH": "/opt/miniconda3/envs/rmg_env/bin:${env:PATH}",
"PYTHONPATH": "${workspaceFolder}/",
},
},

Test Suite
==========

Expand Down Expand Up @@ -188,3 +259,15 @@ A number of basic examples can be run immediately. Additional example input fil

cd RMG-Py
make eg4


Building Documentation
======================
To build the documentation (to test that you have it right before pushing to GitHub) you will need to install sphinx::

conda activate rmg_env
conda install sphinx

Then you can build the documentation::

make documentation
14 changes: 7 additions & 7 deletions documentation/source/users/rmg/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Running a basic RMG job is straightforward, as shown in the example below. Howev

Basic run::

python rmg.py input.py
python-jl rmg.py input.py

.. _inputflags:

Expand All @@ -19,7 +19,7 @@ Input flags

The options for input flags can be found in ``/RMG-Py/rmgpy/util.py``. Running ::

python rmg.py -h
python-jl rmg.py -h

at the command line will print the documentation from ``util.py``, which is reproduced below for convenience::

Expand Down Expand Up @@ -63,23 +63,23 @@ Some representative example usages are shown below.

Run by restarting from a seed mechanism::

python rmg.py -r path/to/seed/ input.py
python-jl rmg.py -r path/to/seed/ input.py

Run with CPU time profiling::

python rmg.py -p input.py
python-jl rmg.py -p input.py

Run with multiprocessing for reaction generation and QMTP::

python rmg.py -n <Max number of processes allowed> input.py
python-jl rmg.py -n <Max number of processes allowed> input.py

Run with setting a limit on the maximum execution time::

python rmg.py -t <DD:HH:MM:SS> input.py
python-jl rmg.py -t <DD:HH:MM:SS> input.py

Run with setting a limit on the maximum number of iterations::

python rmg.py -i <Max number of desired iterations> input.py
python-jl rmg.py -i <Max number of desired iterations> input.py


Details on the multiprocessing implementation
Expand Down
11 changes: 1 addition & 10 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies:

# general-purpose external software tools
- conda-forge::julia>=1.8.5
- conda-forge::pyjulia >=0.6

# Python tools
- python >=3.7
Expand Down Expand Up @@ -94,16 +95,6 @@ dependencies:
# We should use the official channel, not sure how difficult this
# change will be.

- rmg::pyjulia
# This is identical to the conda-forge package, except that we run
# a hard to decipher sed command during the build process:
# https://github.com/ReactionMechanismGenerator/conda-recipes/blob/rmg-deps/pyjulia/build.sh#LL15C69-L15C69
#
# We should either remove the need to use this command or add this
# to the installation steps
#
# Both pyrms and diffeqpy depend on this package.

# conda mutex metapackage
- nomkl

Expand Down
2 changes: 1 addition & 1 deletion utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def update_headers():
start of each file, be sure to double-check the results to make sure
important lines aren't accidentally overwritten.
"""
shebang = """#!/usr/bin/env python3
shebang = """#!/usr/bin/env python-jl

"""

Expand Down