Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMG-Cat!!! #1537

Merged
merged 97 commits into from
Apr 25, 2019
Merged

RMG-Cat!!! #1537

merged 97 commits into from
Apr 25, 2019

Conversation

rwest
Copy link
Member

@rwest rwest commented Jan 19, 2019

Here is RMG for Heterogeneous Catalysis.

This replaces #1536 which came from my own fork (something that can't be changed once a PR is open).

I'm hopefully going to continue trying to tidy up this pull request via some rebasing to make it easier to review in chunks, but however this is sliced up in terms of commits, I think this PR contains all the actual changes that will be included in merging RMG-Cat, so if anyone brave wants to start reviewing, here at least is something we can start to discuss...

(Oh, it needs the catmerge version of the RMG-database too, which should be taken care of for Travis with the temporary commit at the end)

@rwest rwest mentioned this pull request Jan 19, 2019
@rwest
Copy link
Member Author

rwest commented Jan 19, 2019

I think the current problem is cfgoldsmith#42 which is still a bit mysterious.

@rwest rwest force-pushed the catmerge branch 7 times, most recently from 030761c to 7dec096 Compare January 27, 2019 01:42
@codecov
Copy link

codecov bot commented Jan 27, 2019

Codecov Report

Merging #1537 into master will decrease coverage by 0.05%.
The diff coverage is 37.43%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1537      +/-   ##
=========================================
- Coverage   41.65%   41.6%   -0.06%     
=========================================
  Files         166     176      +10     
  Lines       28452   29138     +686     
  Branches     5855    5991     +136     
=========================================
+ Hits        11853   12122     +269     
- Misses      15777   16176     +399     
- Partials      822     840      +18
Impacted Files Coverage Δ
rmgpy/rmg/output.py 53.36% <ø> (ø) ⬆️
rmgpy/molecule/translator.py 0% <ø> (ø) ⬆️
rmgpy/data/kinetics/database.py 46.65% <ø> (ø) ⬆️
rmgpy/kinetics/uncertainies.py 100% <ø> (ø) ⬆️
rmgpy/reaction.py 0% <0%> (ø) ⬆️
rmgpy/molecule/molecule.py 0% <0%> (ø) ⬆️
rmgpy/molecule/group.py 0% <0%> (ø) ⬆️
rmgpy/species.py 0% <0%> (ø) ⬆️
rmgpy/quantity.py 0% <0%> (ø) ⬆️
rmgpy/molecule/atomtype.py 0% <0%> (ø) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b1c083...51a8656. Read the comment docs.

@rwest rwest force-pushed the catmerge branch 3 times, most recently from 5499040 to 4ce93a8 Compare February 1, 2019 04:05
@rwest rwest force-pushed the catmerge branch 3 times, most recently from 28d9f7f to 4671bb1 Compare February 12, 2019 20:19
@rwest
Copy link
Member Author

rwest commented Feb 12, 2019

Can't seem to get the rmg-tests regression tests to run with the catmerge branch of the database, so those test are going to fail, but all the travis-ci tests now pass, including the database tests!

I think the code is ready for a first review; documentation will be coming shortly (there's a PR at cfgoldsmith#56 )

if r.containsSurfaceSite():
rateCoefficient /= surfaceSiteDensity
else:
adsorbate = r
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am adding a check here to make sure to throw an error if there is more than one adsorbate

rmgpy/data/kinetics/rules.py Outdated Show resolved Hide resolved
rmgpy/data/kinetics/family.py Outdated Show resolved Hide resolved
rmgpy/data/kinetics/family.py Show resolved Hide resolved
rmgpy/data/kinetics/family.py Outdated Show resolved Hide resolved
assert not species.isSurfaceSite(), "Can't estimate thermo of vacant site. Should be in library (and should be 0)"

logging.debug(("Trying to generate thermo for surface species"
" with these {} resonance isomer(s):").format(len(species.molecule)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really seem like a useful debug message. Was the intention to log the adjlists as well?

raise

# (groupAdditivity=True means it appends the comments)
addThermoData(thermo, adsorptionThermo, groupAdditivity=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason for adding the adsorption correction separately instead of providing thermo directly to __addGroupThermoData?

rwest and others added 5 commits April 25, 2019 17:47
X is a surface site.
Xv is a vacant surface site.
Xo is an occupied surface site.

They have 0 covalent radius.
They are represented by Ni in RDKit (and hence SMILES strings)

Add surface site 'X' to allElements list in atomtype.py

Xo atomtype can form bonds (making Xo)
A vdW adsorbate includes an Xo site with no bonds,
which could then become bonded via a reaction recipe,
meaning the Xo atom type needs to have a valid formBond
setting, which is also Xo.

Surface site X group atom by default has 0 lone pairs
Just asks the first molecule.
This is like a RateCoefficient but with more flexible units.
To allow for:
 A + * -> A*
 A* -> B*
 A* + B* -> C*
 2A + * + * -> A* + A*
kblondal and others added 26 commits April 25, 2019 17:47
…d reaction families to RMG-Cat documentation.
This includes a description of adding binding energies in the input file and a linear scaling relations section.
Added references.
Added some minor fixes/clarifications.
A list of the current surface reaction libraries.
More about adsorption corrections.
I think perhaps a sphinx plugin to MS VS Code created this.
Usually things end up in the build folder, not source/_build.
But if they do end up here, lets ignore them.
This should allow linear scaling relations to work
for N atoms.
…lies

Add termolecular and surface termolecular families to testing database
This now stores the surfaceSiteDensity, once per
RMG run instead of once per reactor. It's also
where you specify the binding energies.

The surfaceSiteDensity is now preserved and output
in the CHEMKIN files.

Closes cfgoldsmith#68
Atom: isSilicon, isNitrogen, isFluorine, isClorine, isIodine, isSulfur,
isNOS, isSurfaceSite
Molecule: tests for isSurfaceSite
suggestion by @mliu49

I left a type check in there, which may just slow
things down. Worth it for the extra safety???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants