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

Adding Fluorine as a new element in RMG #1543

Merged
merged 6 commits into from
Jan 29, 2019
Merged

Adding Fluorine as a new element in RMG #1543

merged 6 commits into from
Jan 29, 2019

Conversation

oscarwumit
Copy link
Contributor

Motivation or Problem

Adding Fluorine as an atomtype to RMG.

Description of Changes

Files related to atomtypes are changed.

Testing

Added Fluorine atomtype test.

@oscarwumit oscarwumit requested a review from alongd January 25, 2019 16:37
@alongd alongd changed the title Fluorine Adding Fluorine as a new element in RMG Jan 25, 2019
Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Thanks @oscarwumit! Please see the minor comments below


# Sort the reactants and products by C/O/N/S numbers
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, fluorine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be:

Suggested change
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, fluorine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, fluorine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, fluorine, reactant

(same for products below)


# Sort the reactants and products by C/O/N/S numbers
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, fluorine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
in zip(reactantCarbons,reactantOxygens,reactantNitrogens,reactantSilicons,reactantSulfurs,reactantChlorines, reactantIodines, reactants)]
Copy link
Member

Choose a reason for hiding this comment

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

I think reactantFluorines should be added to the zip here, same for products below

reactantIodines = [sum([1 for atom in reactant.molecule[0].atoms if atom.isIodine()]) for reactant in reactants]
productIodines = [sum([1 for atom in product.molecule[0].atoms if atom.isIodine()]) for product in products ]
reactantFluorines = [sum([1 for atom in reactant.molecule[0].atoms if atom.isFluorine()]) for reactant in reactants]
productFluorines = [sum([1 for atom in product.molecule[0].atoms if atom.isFluorine()]) for product in products ]
Copy link
Member

Choose a reason for hiding this comment

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

Do we have the isFluorine() method already defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which file should I modify to define this function?

Copy link
Member

Choose a reason for hiding this comment

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

We do already have isFluorine(), it's here

@codecov
Copy link

codecov bot commented Jan 29, 2019

Codecov Report

Merging #1543 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1543      +/-   ##
==========================================
+ Coverage      42%   42.01%   +<.01%     
==========================================
  Files         165      165              
  Lines       27867    27873       +6     
  Branches     5680     5680              
==========================================
+ Hits        11706    11711       +5     
- Misses      15375    15377       +2     
+ Partials      786      785       -1
Impacted Files Coverage Δ
rmgpy/reaction.py 0% <0%> (ø) ⬆️
rmgpy/molecule/atomtype.py 0% <0%> (ø) ⬆️
rmgpy/data/kinetics/family.py 58.58% <0%> (+0.29%) ⬆️

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 ef169bb...c09f2b9. Read the comment docs.

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for this PR, @oscarwumit!

@alongd alongd merged commit 72fb120 into master Jan 29, 2019
@alongd alongd deleted the fluorine branch January 29, 2019 22:20
@mliu49 mliu49 mentioned this pull request May 15, 2019
5 tasks
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.

2 participants