Closed nateharms closed 4 years ago
Merging #59 into master will increase coverage by
0.13%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 62.91% 63.04% +0.13%
==========================================
Files 27 27
Lines 4635 4652 +17
==========================================
+ Hits 2916 2933 +17
Misses 1719 1719
Impacted Files | Coverage Δ | |
---|---|---|
autotst/reaction_test.py | 99.52% <100%> (+0.02%) |
:arrow_up: |
autotst/reaction.py | 80.08% <100%> (+0.21%) |
:arrow_up: |
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 8618e28...ee14d99. Read the comment docs.
Something is weird about this. Ground state [CH2] is a triplet (two unpaired electrons, S=1). So [CH2] + [H] can have total spin S=1/2, 1, or 3/2 The product [H][H] is a singlet S=0. So the reaction is allowed if the product [CH] has S=1/2, 1, or 3/2 The two low-lying electronic states of [CH] have either one unpaired electron or 3 unpaired electrons, i.e. S=1/2 or S=3/2. Both of these electronic states should be spin-allowed products of the reaction. So I don’t understand why RMG did not allow [CH2]+[H]_[H][H]+[CH] Did RMG think that the ground state of [CH2] is a singlet S=0? Is singlet RMG’s default for carbenes?
-Bill Green From: Nate Harms notifications@github.com Sent: Thursday, February 6, 2020 12:12 PM To: ReactionMechanismGenerator/AutoTST AutoTST@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [ReactionMechanismGenerator/AutoTST] Incrementing radicals, specifically for excited [CH] (#59)
There was an issue where when going from SMILES bases reaction strings to a labeled reaction when the reaction included [CH] radical as an abstractor in a hydrogen abstraction reaction. This issue stems from the fact that when one creates an RMG Molecule from the [CH] SMILES string, it creates the unexcited form of this molecule which wasn't able to participate in hydrogen abstraction reactions (e.g. [CH2]+[H]_[H][H]+[CH]). This PR corrects that case by replacing the [CH] SMILES with the excited SMILES string [CH...]. A test was added to cover these changes as well.
You can view, comment on, or merge this pull request online at:
https://github.com/ReactionMechanismGenerator/AutoTST/pull/59
Commit Summary
File Changes
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ReactionMechanismGenerator/AutoTST/pull/59?email_source=notifications&email_token=AAJL7MHM2OTR3ZICGEL2MILRBRAHBA5CNFSM4KRAXMN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ILSP75A, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJL7MGTZETZARVOYZW53QDRBRAHBANCNFSM4KRAXMNQ.
Hi @whgreen thank you for the comment. I wasn't too sure why RMG didn't allow the reaction either, I opened an issue on the RMG-Py repo a while back but I was under the assumption that there was some error on my end so I closed the issue and tried to resolve things on the AutoTST side of things instead.
When I was looking at [CH2]
with the latest version of the master branch of RMG-Py, I get the following which implies that RMG is suggesting triplet [CH2] as we'd hope.
In [1]: import rmgpy.molecule
In [2]: mol = rmgpy.molecule.Molecule(smiles="[CH2]")
In [3]: mol.get_radical_count()
Out[3]: 2
In [4]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C.. : 0, 2
H : 0, 0
H : 0, 0
But when I run the above for non-excited [CH]
, it gives me the following and implies [CH] with a lone pair and a radical
In [12]: mol = rmgpy.molecule.Molecule(smiles="[CH]")
In [13]: mol.get_radical_count()
Out[13]: 1
In [14]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C. : 1, 1
H : 0, 0
BUT when running for excited [CH...]
, I get the following that says we have no lone pairs and 3 radicals
In [15]: mol = rmgpy.molecule.Molecule(smiles="[CH...]")
In [16]: mol.get_radical_count()
Out[16]: 3
In [17]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C... : 0, 3
H : 0, 0
In [18]: mol.to_smiles()
Out[18]: '[CH]'
I'm guessing that although this is an H-Abstraction reaction for both cases of [CH...]
vs [CH]
, the lone pair on the non-excited [CH]
throws an error because it's not part of the reaction template. I'm guessing it is only trying to change the number of radical electrons and bonds on the Carbon and doesn't account for the number of lone pairs. All this being said, I don't develop much for RMG so I could be wrong, but this is just my observation.
Let me know your thoughts and suggestions on how to proceed!
Thanks. So it appears RMG correctly identifies the ground states, but it thinks H-abstraction cannot pair the electrons on carbon atom. Hmmm…. this is a complicated issue…
-Bill
From: Nate Harms notifications@github.com Sent: Thursday, February 6, 2020 2:53 PM To: ReactionMechanismGenerator/AutoTST AutoTST@noreply.github.com Cc: William H Green whgreen@mit.edu; Mention mention@noreply.github.com Subject: Re: [ReactionMechanismGenerator/AutoTST] Incrementing radicals, specifically for excited [CH] (#59)
Hi @whgreenhttps://github.com/whgreen thank you for the comment. I wasn't too sure why RMG didn't allow the reaction either, I opened an issuehttps://github.com/ReactionMechanismGenerator/RMG-Py/issues/1860 on the RMG-Py repo a while back but I was under the assumption that there was some error on my end so I closed the issue and tried to resolve things on the AutoTST side of things instead.
When I was looking at [CH2] with the latest version of the master branch of RMG-Py, I get the following which implies that RMG is suggesting triplet [CH2] as we'd hope.
In [1]: import rmgpy.molecule
In [2]: mol = rmgpy.molecule.Molecule(smiles="[CH2]")
In [3]: mol.get_radical_count()
Out[3]: 2
In [4]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C.. : 0, 2
H : 0, 0
H : 0, 0
But when I run the above for non-excited [CH], it gives me the following and implies [CH] with a lone pair and a radical
In [12]: mol = rmgpy.molecule.Molecule(smiles="[CH]")
In [13]: mol.get_radical_count()
Out[13]: 1
In [14]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C. : 1, 1
H : 0, 0
BUT when running for excited [CH...], I get the following that says we have no lone pairs and 3 radicals
In [15]: mol = rmgpy.molecule.Molecule(smiles="[CH...]")
In [16]: mol.get_radical_count()
Out[16]: 3
In [17]: for atom in mol.atoms:
...: print("{} : {}, {}".format(atom, atom.lone_pairs, atom.radical_electrons))
...:
C... : 0, 3
H : 0, 0
In [18]: mol.to_smiles()
Out[18]: '[CH]'
I'm guessing that although this is an H-Abstraction reaction for both cases of [CH...] vs [CH], the lone pair on the non-excited [CH] throws an error because it's not part of the reaction templatehttps://github.com/ReactionMechanismGenerator/RMG-database/blob/master/input/kinetics/families/H_Abstraction/groups.py. I'm guessing it is only trying to change the number of radical electrons and bonds on the Carbon and doesn't account for the number of lone pairs. All this being said, I don't develop much for RMG so I could be wrong, but this is just my observation.
Let me know your thoughts and suggestions on how to proceed!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ReactionMechanismGenerator/AutoTST/pull/59?email_source=notifications&email_token=AAJL7MBLNPGY7XVPZMFBSBTRBRTBPA5CNFSM4KRAXMN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELARTYA#issuecomment-583080416, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJL7MHY7OBDSL63JWWSLWTRBRTBPANCNFSM4KRAXMNQ.
There was an issue where when going from SMILES bases reaction strings to a labeled reaction when the reaction included
[CH]
radical as an abstractor in a hydrogen abstraction reaction. This issue stems from the fact that when one creates an RMG Molecule from the[CH]
SMILES string, it creates the unexcited form of this molecule which wasn't able to participate in hydrogen abstraction reactions (e.g.[CH2]+[H]_[H][H]+[CH]
). This PR corrects that case by replacing the[CH]
SMILES with the excited SMILES string[CH...]
. A test was added to cover these changes as well.