Motivation and Overview
Motivation and Overview
It’s been chemists’ dream for many years to use the computer to plan and predict organic synthesis. While there have been many attempts and approaches, the literature suggests that the reason there has not been many computationally designed synthetic pathways due to the problem’s complexity. This complexity is chiefly due to the inefficiency of navigating the enormous space of synthetic possibility, the improper building of “chemical intuition” rules, and limited knowledge of chemical transformations.
Using the impressive chemoinformatics architecture present in the Wolfram Language (WL), it is possible to imagine a software-based to predict all possible products from simple reactants. Ultimately, we hope this project has been a modest contribution to a true in silico or computational chemical reaction synthesis language foundation.
Using the impressive chemoinformatics architecture present in the Wolfram Language (WL), it is possible to imagine a software-based to predict all possible products from simple reactants. Ultimately, we hope this project has been a modest contribution to a true in silico or computational chemical reaction synthesis language foundation.
Assumptions and Key Challenges
Assumptions and Key Challenges
The deliverable goal for this Summer School is to build a nice infrastructure for chemical transformation then add all the complexity and logic to our model on a later date. As such, we made the current model ignoring the effects of stereochemistry, regiochemistry, enantio-selectivity, mixture formations, kinetics, thermodynamics, etc. With that being said, this is not a fundamental flaw to the approach we took as it can be remedied with additional representation of the environment and more complicated properties of the molecules under study with this very infrastructure.
These assumptions simplified the projects into three key challenges:
These assumptions simplified the projects into three key challenges:
◼
Is it possible to identify the relevant the reactants that will be considered for manipulation in the system?
◼
Is it possible to identify the relevant substructure, components, or parameters in the manipulation, through which the manipulation can be directed or localized appropriately?
◼
Is it possible to provide these parameter in the manipulation?
Proof-of-Concept process
Proof-of-Concept process
To solve these challenges, we looked into the WL powerful chemistry functionalities like Molecule, MoleculePattern, and MoleculeModify, which can be used to simulate some reactions. In the below example, we are simulating a substitution reaction.
Molecule identification, selection, and manipulation of 2-Methyl-2-hexanol (m)
In[]:=
m=Molecule;react=MoleculePlot[m]BondList[m,Bond[{"C","C"}]]
Out[]=
Out[]=
{Bond[{2,3},Single],Bond[{2,6},Single],Bond[{2,7},Single],Bond[{3,4},Single],Bond[{4,5},Single],Bond[{5,8},Single]}
You can circumvent the need to find how every atom and bond are connected by utilizing the built-in WL understanding of the SMARTS /SMILES chemical notation that condenses vital structural properties of a molecule, which can be used to modify the given molecule according to patterns.
Molecule identification, selection, and manipulation of 2-Methyl-2-hexanol (m) to undergo a “substitution reaction”
In[]:=
MoleculeModify[m,{"ReplaceSubstructure",MoleculePattern["[#6][OX2H]"]"CS(=O)(=O)[O-]"}]//MoleculePlot
Out[]=
This framework can be used to simulate chemical reactions via MoleculePattern, which we built not using MoleculeModification, but purely strings object transformation as a proof-of-concept first. We hope that in future work the framework will be adapted to Molecule objects directly and tackle the three challenges more thoroughly.
In[]:=
Out[]=
Building a String Framework for Molecule Identification and Modification
Building a String Framework for Molecule Identification and Modification
Based on the key challenges in the given infrastructure, we focused on four reactions:
1) Ozonolysis (cleaving double bonds)
2) Grignard reaction (creating carbons chain from the carbonyls made from above rxn)
3) Alcohol substitution
4) Alkyne formation
All of which can be done as Molecule object modifications as above, and fortunately, these four reactions also follow through our underlying assumptions.
1) Ozonolysis (cleaving double bonds)
2) Grignard reaction (creating carbons chain from the carbonyls made from above rxn)
3) Alcohol substitution
4) Alkyne formation
All of which can be done as Molecule object modifications as above, and fortunately, these four reactions also follow through our underlying assumptions.
Transformation function that using String replacement rules for a hypothetical pot with reactants.
In[]:=
transformation[specificReactant_,reactantPartAssoc_,reactantName_,reactantPatternIndex_,replacement_]:=(specificReactantStringReplacePart[specificReactant,replacement,#])&/@reactantPartAssoc[reactantName][reactantPatternIndex]
Showcasing sample reactions with the given patterns rules containing both the reactant, reagent, and product.
In[]:=
chemicalReactionExamples=<|(*Cleave*)"Amylene and Ozone react to form Acetone & Acetaldehyde"<|"ReactionName""Amylene and Ozone react to form Acetone & Acetaldehyde","ReactantTests"<|"r1"("C(=C(C([H])([H])[H])[H])(C([H])([H])[H])C([H])([H])[H]"),"r2"("[O-][O+]=O")|>,"ReactantPatternLists"<|"r1"{"C(=C(C([H])([H])[H])[H])(C([H])([H])[H])C([H])([H])[H]"},"r2"{"[O-][O+]=O"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CC(=O)C","O=CC"},"DeletionPatterns"{}|>|>,(*grignardreaction1*)"Acetone and BrMg react to form 2-Methyl-2-hexanol"<|"ReactionName""Acetone and BrMg react to form 2-Methyl-2-hexanol","ReactantTests"<|"r1"("CC(=O)C"),"r2"("CC[CH2-].[Mg+2].[Br-]")|>,"ReactantPatternLists"<|"r1"{"CC(=O)C"},"r2"{"CC[CH2-].[Mg+2].[Br-]"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCCC(C)(C)O"},"DeletionPatterns"{}|>|>,(*grignardreaction2*)"Acetaldehyde and BrMg react to form Methylbutan-1-ol"<|"ReactionName""Acetaldehyde and BrMg react to form Methylbutan-1-ol","ReactantTests"<|"r1"("O=CC"),"r2"("CC[CH2-].[Mg+2].[Br-]")|>,"ReactantPatternLists"<|"r1"{"O=CC"},"r2"{"CC[CH2-].[Mg+2].[Br-]"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCC(C)O"},"DeletionPatterns"{}|>|>,(*Sub1A*)"2-Methyl-2-hexanol and mesilate react to form S"<|"ReactionName""2-Methyl-2-hexanol and mesilate react to form S","ReactantTests"<|"r1"("CCCCC(C)(C)O"),"r2"("CS(=O)(=O)[O-]")|>,"ReactantPatternLists"<|"r1"{"CCCCC(C)(C)O"},"r2"{"CS(=O)(=O)[O-]"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCCC(C)(C)S(=O)(=O)[O-]"},"DeletionPatterns"{}|>|>,(*Sub1B*)"S and 1-Propyne react to form 3,3-Dimethylhept-1-yne"<|"ReactionName""S and 1-Propyne react to form 3,3-Dimethylhept-1-yne","ReactantTests"<|"r1"("CCCCC(C)(C)S(=O)(=O)[O-]"),"r2"("CC#C")|>,"ReactantPatternLists"<|"r1"{"CCCCC(C)(C)S(=O)(=O)[O-]"},"r2"{"CC#C"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCCC(C)(C)C#C"},"DeletionPatterns"{}|>|>,(*Sub2A*)"Methylbutan-1-ol and mesilate react to form S"<|"ReactionName""Methylbutan-1-ol and mesilate react to form S","ReactantTests"<|"r1"("CCCC(C)O"),"r2"("CS(=O)(=O)[O-]")|>,"ReactantPatternLists"<|"r1"{"CCCC(C)O"},"r2"{"CS(=O)(=O)[O-]"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCC(C)S(=O)(=O)[O-]"},"DeletionPatterns"{}|>|>,(*Sub2B*)"S and 1-Propyne react to form 3-Methyl-1-hexyne"<|"ReactionName""S and 1-Propyne react to form 3-Methyl-1-hexyne","ReactantTests"<|"r1"("CCCC(C)S(=O)(=O)[O-]"),"r2"("CC#C")|>,"ReactantPatternLists"<|"r1"{"CCCC(C)S(=O)(=O)[O-]"},"r2"{"CC#C"}|>,"Productions"<|"TransformationRules"{},"Additions"{"CCCC(C)C#C"},"DeletionPatterns"{}|>|>|>;
C
3
H
7
C
3
H
7
C
3
H
7
C
3
H
7
-
C
7
H
15
O
3
-
C
7
H
15
O
3
-
C
7
H
15
O
3
-
C
7
H
15
O
3
-
C
5
H
11
O
3
-
C
5
H
11
O
3
-
C
5
H
11
O
3
-
C
5
H
11
O
3
Choosing an arbitrary starting reactant pool in the pot
In[]:=
testReactantPool={"C(=C(C([H])([H])[H])[H])(C([H])([H])[H])C([H])([H])[H]","[O-][O+]=O","CC[CH2-].[Mg+2].[Br-]","CS(=O)(=O)[O-]","CC#C"};
Then we look at the reactant pool check if it has the needed patterns and is able to transform:
In[]:=
determineMatchingReactants[chemicalReaction_,currentReactantPool_]:=Module[{reactantMatchFunction,reactantPositions},reactantPositions=KeyValueMap[Function[{reactantName,reactantTest},reactantMatchFunction=StringMatchQ[reactantTest];reactantNamePosition[currentReactantPool,_String?reactantMatchFunction]],chemicalReaction["ReactantTests"]];<|MapThread[Rule,{First/@reactantPositions,#}]|>&/@Tuples[Last/@reactantPositions]]
A check to see if there are multiple similar reactants in the pool
(Note: in an infinite pot where you keep all the reactants, it’s silly to explore all the different ways except to prove the functionality is working by converging to a common list of chemicals; where it’s really helpful is when you have some small supply of each and want to express tradeoffs between the proportions of each product that can be achieved. We hope to implement this more thoroughly in future work a well)
(Note: in an infinite pot where you keep all the reactants, it’s silly to explore all the different ways except to prove the functionality is working by converging to a common list of chemicals; where it’s really helpful is when you have some small supply of each and want to express tradeoffs between the proportions of each product that can be achieved. We hope to implement this more thoroughly in future work a well)
In[]:=
testReactants=determineMatchingReactants[Values[chemicalReactionExamples][[2]],testReactantPool];
From here we are applying the rules per the associations, defining correct transformations, adding and deleting chemicals in as per the rules and associations defined.
In[]:=
findReactantPartAssociation[chemicalReaction_,currentReactantPool_,foundReactantSet_Association]:=With[{reactantPatterns=chemicalReaction["ReactantPatternLists"]},<|Map[Function[{reactantNameValue},reactantNameValue[[1]]<|MapIndexed[(#2[[1]]StringPosition[reactantNameValue[[2]],#])&,reactantPatterns[reactantNameValue[[1]]]]|>],KeyValueMap[{#1,Extract[currentReactantPool,#2]}&,foundReactantSet]]|>]
Optimization of the Synthesis Routes
Optimization of the Synthesis Routes
Assuming a reaction happens, the pool will be updated accordingly and the chemical space gets expanded. As such, We defined failure states and conditionals on how the reactions sorting in the pot works.
We were also interested in finding the shortest path to the product given reactant transformations as well as defining the parameters of transformation to build more concretely to future work.
We were also interested in finding the shortest path to the product given reactant transformations as well as defining the parameters of transformation to build more concretely to future work.
Below is an illustration of what would reaction would initiate in the pot given a reactant.
Conclusion and Future Work
Conclusion and Future Work
We were able to construct a proof-of-concept model for an organic synthesis predicator. We found that WL had some existing work on strings that could be used to express those three concepts, to which molecule identification, selection, and manipulation also applied, and used that existing work as a foundation to demonstrate what some aspects of those three points applied to chemicals would also look like.
In the future, we hope to:
In the future, we hope to:
◼
Adapt the framework to Molecule objects directly and tackle the three challenges more thoroughly
◼
Implement higher-order logic directing how each individual steps should be put together to generate viable pathways
◼
Fit this framework such that it can be used in theorem proving or multiway functionalities
Keywords
Keywords
◼
Chemical Synthesis
◼
Chem-informatics
◼
Graph Theory
Acknowledgment
Acknowledgment
Mentor: John Cassel
I will like to sincerely thank John for his patience, incredibly leadership, pertinent advice, and active code help throughout this entire project. I would like to also extend my gratitude to every Wolfram Summer School TA: Jesse Friedman, Carlos Munoz, Daniel Sanchez, Robert Mendelsohn, Mark Greenberg, and József Konczer for helping every student in the school with practical coding tips and superb question-response time to anyone struggling. I would like to also thank Dr. Stephen Wolfram, Dr. Robert Nachbar, Dr. Jason Biggs, and Dr. Mohammad Barhami for deciding that this project is worth pursuing, encouraging me throughout the entire process, and having thoughtful discussions with throughout my time with this project.
I will like to sincerely thank John for his patience, incredibly leadership, pertinent advice, and active code help throughout this entire project. I would like to also extend my gratitude to every Wolfram Summer School TA: Jesse Friedman, Carlos Munoz, Daniel Sanchez, Robert Mendelsohn, Mark Greenberg, and József Konczer for helping every student in the school with practical coding tips and superb question-response time to anyone struggling. I would like to also thank Dr. Stephen Wolfram, Dr. Robert Nachbar, Dr. Jason Biggs, and Dr. Mohammad Barhami for deciding that this project is worth pursuing, encouraging me throughout the entire process, and having thoughtful discussions with throughout my time with this project.
References
References
◼
Wolfram Mathematica Chemistry Documentation https://reference.wolfram.com/language/guide/MolecularStructureAndComputation.html (accessed Jul 14, 2020).
◼
Kochev, N.; Avramova, S.; Jeliazkova, N. Ambit-SMIRKS: a Software Module for Reaction Representation, Reaction Search and Structure Transformation. Journal of Cheminformatics 2018, 10.