You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for contributing to RMG-Py! Please take a moment to review our guidelines:
4
+
5
+
### **Did you find a bug? Do you want to see a new feature?**
6
+
7
+
* Please open an Issue to the corresponding repository:
8
+
*[RMG-Py](https://github.com/ReactionMechanismGenerator/RMG-Py/issues): For functionality of the RMG and Arkane software packages
9
+
*[RMG-database](https://github.com/ReactionMechanismGenerator/RMG-database/issues): For issues related to the data available to RMG
10
+
*[RMG-website](https://github.com/ReactionMechanismGenerator/RMG-website/issues): For issues related to the [RMG website](https://rmg.mit.edu)
11
+
12
+
13
+
### **Did you write code that fixes a bug or adds a new feature?**
14
+
15
+
* Open a new GitHub PR to merge into the main branch. Make sure the PR clearly describes the problem + solution. If applicable, include the relevant issue.
16
+
17
+
* Your PR must pass unit tests, regression tests, and code coverage, and receive approval from at least one reviewer before it can be merged in.
18
+
19
+
* If you wrote a new feature, please [add unit tests](https://github.com/ReactionMechanismGenerator/RMG-Py/tree/main/test/rmgpy). We currently use [pytest](https://docs.pytest.org/en/stable/) for our unit testing.
20
+
21
+
* If you wrote a significant new feature, please add a regression test:
22
+
* First, please create an input file that includes your new feature. Ensure `saveEdgeSpecies` is set to `True` so that the edge model will also be saved to a file. If applicable, include diverse sets of input conditions to test compatibility with other features.
23
+
* Generate the reaction mechanism corresponding to the input file. Ensure that the simulation does not take more than 15 minutes maximum. You can reduce simulation times in multiple ways, e.g. by increasing the `toleranceMoveToCore` flag.
24
+
* In the `test/regression` folder, create a new folder with a relevant name, and copy the RMG-Py simulation input file in this folder. Include this new folder in your PR.
25
+
* In `.github/workflows/CI.yml`, edit the two lists of regression tests in the `Regression Tests - Execution` and `Regression Tests - Compare to Baseline` steps to add the name of your folder. Be sure to follow BASH syntax.
26
+
27
+
*> Warning: This will __fail__ CI because of directory not found errors. This is because the baseline files used for comparison in the regression tests do not exist yet. Your PR will need to be merged by bypassing branch protection restrictions.
28
+
29
+
30
+
### **Do you want to contribute to the documentation?**
31
+
32
+
* Documentation is [hosted here](http://reactionmechanismgenerator.github.io/RMG-Py/) using [Sphinx](https://www.sphinx-doc.org/en/master/).
33
+
34
+
* The live version of the documentation is hosted on the `gh-pages` branch which is updated upon pushes to the `main` branch of RMG-Py.
35
+
36
+
* To add new documentation, create or modify `.rst` (reStructuredText) files under the `documentation` directory and create a PR to push to `main`. For a primer on how to write `.rst` markup, please [check out the Sphinx documentation.](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
37
+
38
+
* Please test the documentation on a local build (e.g., via `make html` in the `documentation` directory) before pushing changes.
39
+
40
+
### **Do you have questions?**
41
+
42
+
* Email us at rmg_dev@mit.edu.
43
+
44
+
### **Best practices for PRs**
45
+
46
+
* Rebase to the main branch before working, to avoid merge conflicts.
47
+
48
+
* Keep PRs small and aim to merge quickly.
49
+
50
+
* Commits should be specific and as small as required; commit messages should be descriptive and as long as required. Commit messages should explain *why* the change is needed. We recommend following [these guidelines.](https://wiki.openstack.org/wiki/GitCommitMessages)
51
+
52
+
* Submit a PR only when the code is polished and ready for review. Consider opening a draft PR for work in progress that requires collaborator input.
53
+
54
+
* Please follow the [PEP8 Python style guide.](https://peps.python.org/pep-0008/)
Copy file name to clipboardExpand all lines: documentation/source/theory/rmg/prune.rst
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,30 +12,30 @@ in order to achieve both low memory consumption and mechanism accuracy. Pruning
12
12
Key Parameters in Pruning
13
13
=========================
14
14
15
-
* toleranceKeepInEdge
15
+
* ``toleranceKeepInEdge``
16
16
17
-
Any edge species to prune should have peak flux along the whole conversion course lower than toleranceKeepInEdge :math:`*` characteristic flux. Thus, larger values will lead to smaller edge mechanisms.
17
+
Any edge species to prune should have peak flux along the whole conversion course lower than ``toleranceKeepInEdge``:math:`*` characteristic flux. Thus, larger values will lead to smaller edge mechanisms.
18
18
19
-
* toleranceMoveToCore
19
+
* ``toleranceMoveToCore``
20
20
21
-
Any edge species to enter core model should have flux at some point larger than toleranceMoveToCore :math:`*` characteristic flux Thus, in general, smaller values will lead to larger core mechanisms.
21
+
Any edge species to enter core model should have flux at some point larger than ``toleranceMoveToCore``:math:`*` characteristic flux. Thus, in general, smaller values will lead to larger core mechanisms.
22
22
23
-
* toleranceInterrupSimulation
23
+
* ``toleranceInterruptSimulation``
24
24
25
-
Once flux of any edge species exceeds toleranceInterruptSimulation :math:`*` characteristic flux, dynamic simulation will be stopped.
25
+
Once flux of any edge species exceeds ``toleranceInterruptSimulation``:math:`*` characteristic flux, dynamic simulation will be stopped.
26
26
Usually this tolerance will be set a very high value so that any flux's exceeding that means mechanism is too incomplete to continue
27
27
dynamic simulation.
28
28
29
-
* maximumEdgeSpecies
29
+
* ``maximumEdgeSpecies``
30
30
31
31
If dynamic simulation isn't interrupted in half way and total number of the edge species whose peak fluxes are higher than
32
-
toleranceKeepInEdge :math:`*` characteristic flux exceeds maximumEdgeSpecies, such excessive amount of edge species with lowest peak fluxes will be pruned.
32
+
``toleranceKeepInEdge``:math:`*` characteristic flux exceeds ``maximumEdgeSpecies``, such excessive amount of edge species with lowest peak fluxes will be pruned.
33
33
34
-
* minCoreSizeForPrune
34
+
* ``minCoreSizeForPrune``
35
35
36
36
Ensures that a minimum number of species are in the core before pruning occurs, in order to avoid pruning the model when it is far away from completeness. The default value is set to 50 species.
37
37
38
-
* minSpeciesExistIterationsForPrune
38
+
* ``minSpeciesExistIterationsForPrune``
39
39
40
40
Set the number of iterations an edge species must stay in the job before it can be pruned. The default value is 2 iterations.
41
41
@@ -46,20 +46,20 @@ How Pruning Works
46
46
47
47
The goal of pruning is to delete those "useless" edge species. So "usefulness" should be defined and it's natural to have flux as a
48
48
criterion for "usefulness". Since flux changes with reactant conversion, peak flux is chosen here to make decision of pruning or not.
49
-
Every time pruning is triggered, edge species with peak flux lower than toleranceKeepInEdge :math:`*` characteristic flux will be deleted.
49
+
Every time pruning is triggered, edge species with peak flux lower than ``toleranceKeepInEdge``:math:`*` characteristic flux will be deleted.
50
50
51
51
.. figure:: fluxDiagramWithTolerance.png
52
52
53
-
However, pruning is not always triggered because of toleranceInterruptSimulation. As mentioned above, in order to prune, RMG needs to figure out
53
+
However, pruning is not always triggered because of ``toleranceInterruptSimulation``. As mentioned above, in order to prune, RMG needs to figure out
54
54
the peak flux of each edge species, which requires dynamic simulation to complete. If some run of dynamic simulation is terminated in half way
55
-
by toleranceInterruptSimulation, pruning is rejected although there might be some edge species with peak fluxes lower than
56
-
toleranceKeepInEdge :math:`*` characteristic flux. Since pruning requires to complete dynamic simulation, setting toleranceInterruptSimulation to be positive infinity,
57
-
as an extreme case, means always enabling pruning. Another extreme case would be that it has same value as toleranceMoveToCore where
55
+
by ``toleranceInterruptSimulation``, pruning is rejected although there might be some edge species with peak fluxes lower than
56
+
``toleranceKeepInEdge``:math:`*` characteristic flux. Since pruning requires to complete dynamic simulation, setting ``toleranceInterruptSimulation`` to be positive infinity,
57
+
as an extreme case, means always enabling pruning. Another extreme case would be that it has same value as ``toleranceMoveToCore`` where
58
58
no pruning occurs.
59
59
60
-
In summary, each run of dynamic simulation will proceed towards terminationConversion unless some flux exceeds
61
-
toleranceInterruptSimulation :math:`*` characteristic flux.Following complete simulation is the pruning of edge species whose flux is not high enough be kept
62
-
in the edge, which is followed by pruning of excessive amount of edge species to make sure total edge species number is no greater than maximumEdgeSpecies.
60
+
In summary, each run of dynamic simulation will proceed towards ``terminationConversion`` unless some flux exceeds
61
+
``toleranceInterruptSimulation``:math:`*` characteristic flux.Following complete simulation is the pruning of edge species whose flux is not high enough be kept
62
+
in the edge, which is followed by pruning of excessive amount of edge species to make sure total edge species number is no greater than ``maximumEdgeSpecies``.
Please refer to the ``RMG``, ``RMG3``, and ``RMG_Database`` citations in the `CITATIONS.bib file <https://github.com/ReactionMechanismGenerator/RMG-Py/blob/main/CITATIONS.bib>`_.
0 commit comments