Skip to content

Commit

Permalink
RMG-Py v2.1.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mliu49 committed May 2, 2018
2 parents 352fafe + 5cf04af commit 57d0c53
Show file tree
Hide file tree
Showing 67 changed files with 3,991 additions and 503 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ before_install:
install:
- conda env create -f environment_linux.yml
- source activate rmg_env
- conda list
- pip install codecov
- yes 'Yes' | $HOME/miniconda/envs/rmg_env/bin/mopac $MOPACKEY > /dev/null
- make

script:
- make test-all
- make test-unittests
- make test-functional
- make test-database

after_success:
Expand Down
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,31 @@ else
nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
endif

test:
test-unittests:
ifeq ($(OS),Windows_NT)
nosetests --nocapture --nologcapture --all-modules --attr '!auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
else
mkdir -p testing/coverage
rm -rf testing/coverage/*
nosetests --nocapture --nologcapture --all-modules --attr '!auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
endif

test test-unittests-non-auth:
ifeq ($(OS),Windows_NT)
nosetests --nocapture --nologcapture --all-modules -A 'not functional and not auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
else
mkdir -p testing/coverage
rm -rf testing/coverage/*
nosetests --nocapture --nologcapture --all-modules -A 'not functional and not auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
endif

test-functional:
ifeq ($(OS),Windows_NT)
nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy
else
mkdir -p testing/coverage
rm -rf testing/coverage/*
nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy
endif

test-database:
Expand Down
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# <img align="top" src="https://raw.githubusercontent.com/ReactionMechanismGenerator/RMG-Py/master/documentation/source/_static/rmg-logo-small.png"> Reaction Mechanism Generator (RMG)

[![Build status](https://img.shields.io/travis/ReactionMechanismGenerator/RMG-Py/master.svg)](https://travis-ci.org/ReactionMechanismGenerator/RMG-Py)
[![Codecov report](https://img.shields.io/codecov/c/github/ReactionMechanismGenerator/RMG-Py/master.svg)](https://codecov.io/gh/ReactionMechanismGenerator/RMG-Py)
[![Codacy report](https://img.shields.io/codacy/grade/c4b23c89e2e6486e981704d8d973d3e7/master.svg)](https://www.codacy.com/app/ReactionMechanismGenerator/RMG-Py/dashboard)
[![GitHub release](https://img.shields.io/github/release/ReactionMechanismGenerator/RMG-Py.svg)](https://github.com/ReactionMechanismGenerator/RMG-Py/releases)
[![Anconda](https://img.shields.io/conda/v/rmg/rmg.svg)](https://anaconda.org/rmg/rmg)
[![Gitter](https://img.shields.io/gitter/room/ReactionMechanismGenerator/RMG-Py.svg)](https://gitter.im/ReactionMechanismGenerator/RMG-Py)
[![RMG Website](https://img.shields.io/website-up-down-green-red/http/rmg.mit.edu.svg?label=rmg%20website)](http://rmg.mit.edu/)

## Description
This repository contains the Python version of **Reaction Mechanism Generator (RMG)**,
Expand All @@ -16,14 +23,9 @@ Gaussian, MOPAC, QChem, and MOLPRO.
- [RMG Github Repository](https://github.com/ReactionMechanismGenerator/RMG-Py): contains the latest source code for RMG
- [RMG-database Github Repository](https://github.com/ReactionMechanismGenerator/RMG-database): contains source code for the latest version of the database

## Latest Stable Release
**RMG v2.1.4**
[![Anaconda-Server Badge](https://anaconda.org/rmg/rmg/badges/version.svg)](https://anaconda.org/rmg/rmg)

View the [Release Notes](http://reactionmechanismgenerator.github.io/RMG-Py/users/rmg/releaseNotes.html).

## How to Install
View the [Download and Install](http://reactionmechanismgenerator.github.io/RMG-Py/users/rmg/installation/index.html) page.
You can either download the source from GitHub and compile yourself, or download the binaries from Anaconda.
Please see the [Download and Install](http://reactionmechanismgenerator.github.io/RMG-Py/users/rmg/installation/index.html) page for detailed instructions.

## Documentation
- [RMG Documentation](http://ReactionMechanismGenerator.github.io/RMG-Py/) ([PDF version](https://github.com/ReactionMechanismGenerator/RMG-Py/raw/master/documentation/RMG-Py_and_CanTherm_Documentation.pdf))
Expand All @@ -32,18 +34,14 @@ View the [Download and Install](http://reactionmechanismgenerator.github.io/RMG-

Alternatively, PDF versions of all the documentation can also be found in the `documentation` folder of the source code.

## Credits

- [Professor William H. Green's research group](http://cheme.scripts.mit.edu/green-group/) at the
[Massachusetts Institute of Technology](http://web.mit.edu/)
- [Professor Richard H. West's research group](http://www.northeastern.edu/comocheng/) at
[Northeastern University](http://www.northeastern.edu/).
## How to Contribute
Please see the [Contributor Guidelines](https://github.com/ReactionMechanismGenerator/RMG-Py/wiki/RMG-Contributor-Guidelines)
for details on how to contribute to RMG-Py or RMG-database.

## How to Give Feedback

Please post any issues you may have to the [issues page](https://github.com/ReactionMechanismGenerator/RMG-Py/issues/)
or drop in to the [chat room](https://gitter.im/ReactionMechanismGenerator/RMG-Py) or email [rmg_dev@mit.edu](mailto:rmg_dev@mit.edu) if you have questions.
[![Join the chat at https://gitter.im/ReactionMechanismGenerator/RMG-Py](https://badges.gitter.im/ReactionMechanismGenerator/RMG-Py.svg)](https://gitter.im/ReactionMechanismGenerator/RMG-Py?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Useful Links

Expand All @@ -52,10 +50,9 @@ perform thermodynamics and kinetics searches
- [Wiki](https://github.com/ReactionMechanismGenerator/RMG-Py/wiki): a wiki for developer notes
- [Issues Page](https://github.com/ReactionMechanismGenerator/RMG-Py/issues/): view current issues and feature requests

## Credits

## Continuous Integration

We have a continuous integration build test suite
which you can access at https://travis-ci.org/ReactionMechanismGenerator/RMG-Py
The current build status is
[![Build Status](https://travis-ci.org/ReactionMechanismGenerator/RMG-Py.svg?branch=master)](https://travis-ci.org/ReactionMechanismGenerator/RMG-Py)
- [Professor William H. Green's research group](http://cheme.scripts.mit.edu/green-group/) at the
[Massachusetts Institute of Technology](http://web.mit.edu/)
- [Professor Richard H. West's research group](http://www.northeastern.edu/comocheng/) at
[Northeastern University](http://www.northeastern.edu/).
2 changes: 2 additions & 0 deletions documentation/source/users/rmg/database/kinetics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Below is a list of pre-packaged kinetics library reactions in RMG:
+---------------------------------------+------------------------------------------------------------------------------------------+
|BurkeH2O2inN2 |Comprehensive H2/O2 kinetic model in N2 atmosphere |
+---------------------------------------+------------------------------------------------------------------------------------------+
|C2H4+O_Klipp2017 |C2H4 + O intersystem crossing reactions, probably important for all C/H/O combustion |
+---------------------------------------+------------------------------------------------------------------------------------------+
|C10H11 |Cyclopentadiene pyrolysis in the presence of ethene |
+---------------------------------------+------------------------------------------------------------------------------------------+
|C3 |Cyclopentadiene pyrolysis in the presence of ethene |
Expand Down
33 changes: 33 additions & 0 deletions documentation/source/users/rmg/releaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@
Release Notes
*************

RMG-Py Version 2.1.5
====================
Date: October 18, 2017

- New bicyclic formula:
- Estimates polycyclic corrections for unsaturated bicyclics by adjusting the correction for the saturated version
- Can provide a decent estimate in many cases where there is not an exact match

- Other changes:
- Refactored simulation algorithm to properly add multiple objects per iteration
- Print equilibrium constant and reverse rate coefficient values when using Cantherm to calculate kinetics
- Speed up degeneracy calculation by reducing unnecessary operations

- Fixes:
- Loosen tolerance for bond order identification to account for floating point error
- Fixed uncertainty analysis to allow floats as bond orders
- Fixed some comment parsing issues in uncertainty analysis
- Added product structure atom relabeling for families added in RMG-database v2.1.5
- Fixed issue with automatic debugging of kinetics errors due to forbidden structures

RMG-database Version 2.1.5
==========================
Date: October 18, 2017

- Additions:
- New thermo groups added for species relevant in cyclopentadiene and natural gas pyrolysis
- Added C2H4+O_Klipp2017 kinetics library

- Fixes:
- Prevent charged carbenes from reacting in Singlet_Carbene_Intra_Disproportionation
- Updated H_Abstraction rates in ethylamine library and corresponding training reactions


RMG-Py Version 2.1.4
====================
Date: September 08, 2017
Expand Down
2 changes: 1 addition & 1 deletion environment_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- libgcc # [unix]
- python
- numpy >=1.10.0
- cantera >=2.2
- cantera >=2.3.0a3
- coolprop
- cython >=0.25.2
- matplotlib >=1.5
Expand Down
2 changes: 1 addition & 1 deletion environment_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- libgcc # [unix]
- python
- numpy >=1.10.0
- cantera >=2.2
- cantera >=2.3.0a3
- coolprop
- cython >=0.25.2
- matplotlib >=1.5
Expand Down
2 changes: 1 addition & 1 deletion environment_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- mingwpy
- python
- numpy >=1.10.0
- cantera >=2.2
- cantera >=2.3.0a3
- coolprop
- cython >=0.25.2
- matplotlib >=1.5
Expand Down
68 changes: 68 additions & 0 deletions examples/rmg/minimal_multisurf/input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)

# List of species
species(
label='ethane',
reactive=True,
structure=SMILES("CC"),
)

# Reaction systems
simpleReactor(
temperature=(1350,'K'),
pressure=(1.0,'bar'),
initialMoleFractions={
"ethane": 1.0,
},
terminationConversion={
'ethane': 0.9,
},
terminationTime=(1e6,'s'),
)

simpleReactor(
temperature=(1000,'K'),
pressure=(1.0,'bar'),
initialMoleFractions={
"ethane": 1.0,
},
terminationConversion={
'ethane': 0.9,
},
terminationTime=(1e6,'s'),
)



simulator(
atol=1e-16,
rtol=1e-8,
)

model(
toleranceKeepInEdge=0.0,
toleranceMoveToCore=100,
toleranceInterruptSimulation=100,
maximumEdgeSpecies=100000,
toleranceMoveEdgeReactionToSurface=2.0,
toleranceMoveSurfaceReactionToCore=100,
toleranceMoveSurfaceSpeciesToCore=1e-6,
maxNumObjsPerIter=0,
)

options(
units='si',
saveRestartPeriod=None,
generateOutputHTML=False,
generatePlots=False,
saveEdgeSpecies=True,
saveSimulationProfiles=True,
)
4 changes: 2 additions & 2 deletions examples/rmg/minimal_staged/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
model( #second stage
toleranceKeepInEdge=0.0,
toleranceMoveToCore=0.1,
toleranceInterruptSimulation=0.1,
toleranceInterruptSimulation=1.0,
maximumEdgeSpecies=100000,
maxNumObjsPerIter=2,
maxNumObjsPerIter=3,
maxNumSpecies = 100,
)

Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ requirements:
- pyzmq
- quantities
- rdkit >=2015.09.2
- rmgdatabase >=2.1.4
- rmgdatabase >=2.1.5
- scipy
- scoop
- symmetry
Expand Down
34 changes: 34 additions & 0 deletions rmgpy/cantherm/kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def generateKinetics(self,Tlist=None):
order = len(self.reaction.reactants)
klist *= 1e6 ** (order-1)
self.kunits = {1: 's^-1', 2: 'cm^3/(mol*s)', 3: 'cm^6/(mol^2*s)'}[order]
self.Kequnits = {2:'mol^2/cm^6', 1:'mol/cm^3', 0:' ', -1:'cm^3/mol', -2:'cm^6/mol^2'}[len(self.reaction.products)-len(self.reaction.reactants)]
self.krunits = {1: 's^-1', 2: 'cm^3/(mol*s)', 3: 'cm^6/(mol^2*s)'}[len(self.reaction.products)]
self.reaction.kinetics = Arrhenius().fitToData(Tlist, klist, kunits=self.kunits)

def save(self, outputFile):
Expand All @@ -166,6 +168,11 @@ def save(self, outputFile):
"""
reaction = self.reaction

ks = []
k0s = []
k0revs = []
krevs = []

logging.info('Saving kinetics for {0}...'.format(reaction))

order = len(self.reaction.reactants)
Expand All @@ -190,9 +197,36 @@ def save(self, outputFile):
k = reaction.calculateTSTRateCoefficient(T) * factor
tunneling = reaction.transitionState.tunneling
kappa = k / k0
ks.append(k)
k0s.append(k0)
f.write('# {0:4g} K {1:11.3e} {2:11g} {3:11.3e} {4}\n'.format(T, k0, kappa, k, self.kunits))
f.write('# ======= =========== =========== =========== ===============\n')
f.write('\n\n')

f.write('# ======= ============ =========== ============ ============= =========\n')
f.write('# Temp. Kc (eq) Units krev (TST) krev (TST+T) Units\n')
f.write('# ======= ============ =========== ============ ============= =========\n')

for n,T in enumerate(Tlist):
k = ks[n]
k0 = k0s[n]
Keq = reaction.getEquilibriumConstant(T)
k0rev = k0/Keq
krev = k/Keq
k0revs.append(k0rev)
krevs.append(krev)
f.write('# {0:4g} K {1:11.3e} {2} {3:11.3e} {4:11.3e} {5}\n'.format(T, Keq, self.Kequnits, k0rev, krev, self.krunits))


f.write('# ======= ============ =========== ============ ============= =========\n')
f.write('\n\n')

kinetics0rev = Arrhenius().fitToData(Tlist, numpy.array(k0revs), kunits=self.krunits)
kineticsrev = Arrhenius().fitToData(Tlist, numpy.array(krevs), kunits=self.krunits)

f.write('# krev (TST) = {0} \n'.format(kinetics0rev))
f.write('# krev (TST+T) = {0} \n\n'.format(kineticsrev))

# Reaction path degeneracy is INCLUDED in the kinetics itself!
string = 'kinetics(label={0!r}, kinetics={1!r})'.format(reaction.label, reaction.kinetics)
f.write('{0}\n\n'.format(prettify(string)))
Expand Down
Loading

0 comments on commit 57d0c53

Please sign in to comment.