RXN for Chemistry - Predict product
This guide is a tutorial to learn how to use RXN for Chemistry to predict which forward reaction will occur from a set of given reagents.
Start Tutorial
An RXN for Chemistry account is required to complete this tutorial. |
|
Step 1: Log into RXN for Chemistry
See our RXN for Chemistry Quick Start for directions on logging into the RXN for Chemistry system. |
Step 2: From the Home screen click "Predict product"
Step 3: Select "Add to pre-existing project" or "Add to a brand new project"
If selecting Add to pre-existing project then use the dropdown labeled "Filter" to select the project.
Step 4: Click "Predict forward reaction"
Step 5: In the visual editor, click "Smiles string editor" at the top of the page
Step 6: Copy and paste a SMILES string into the text box.
On this page you will paste a SMILES string representing the reactant molecules to use for the product prediction. Use the one shown below.
We will use the SMILES string below for our starting materials. There are four organic molecules and a potassium counterion, separated by periods.
CC(C)(C)OC(=O)N1CCCC1[B-](F)(F)F.CN(C)C=O.COC(=O)c1ccc(/C=C/S(=O)(=O)c2ccccc2)cc1.Cc1c(Br)cc2c(-c3ccccc3C(=O)O)c3cc(Br)c(=O)c(Br)c-3oc2c1Br.[K+]
Step 7: Click "Validate string smiles" to validate the structure in the SMILES string
Step 8: Click "Load in visual editor" to view a visual model of the molecules and ion
Step 9: Click "Run forward reaction prediction" to start the process
Step 10: Select the 2020-08-10 machine learning model then click "Run forward reaction prediction"
Step 11: After viewing the results and confidence score, click "Generate more outcomes" to generate more potential products.
What is confidence?
Predictions derived from machine learning models will often come with a computed confidence level. This number represents the machine’s estimate of the probability that the model’s prediction is correct, and that the predicted reaction will proceed as shown. Since it is a probability score the value of the confidence is usually given as a number between 0 and 1. Confidence scores closest to 1 are considered the best. However, the relative utility of confidence scores depends very heavily on the use case and nature of the training machine learning model. A confidence score of 0.71 might be considered unacceptable in one use case, but acceptable in another. |
Results will be presented in a visual format as show below. You also have the option of downloading the results as a SMILES string or a PDF file of the molecular models.
The process of generating the first result shown below can take anywhere from a few seconds to a few minutes, depending upon the complexity of the reactions. |
Step 12: The newly predicted products may be viewed via the dropdown list labeled with the project name.
The process of generating the first result show below can take anywhere from a few seconds to a few minutes, depending upon the complexity of the reactions. |
Step 13: After selecting a predicted reaction click the icon for Predict reaction properties in upper right
The icon for Predict reaction properties is shown below.
The algorithms for predicting reaction properties take a representation of the reaction (Condensed Graph of Reaction, CGR) and use it as input to a graph-based convolutional neural network. See this article for an example of this approach: https://pubs.acs.org/doi/10.1021/acs.jcim.1c00975# |
Step 14: In the dialog box select "atom-mapping-2020" under "AI model" then click Get prediction
Step 15: Click on the the dropdown to view results or Download results to download to CSV
Step 16: Click on the TMAP icon as shown below
This will take you to a visual TMAP showing your retrosynthesis results in the context of other chemical structures and properties.
What is a TMAP? TMAP (TreeMAP) is a set of algorithms to help visualize high-dimensional data sets containing chemical structures. It provides the ability to visualize such data while preserving both global and local features with a sufficient level of detail to allow for human inspection and interpretation. For more information on TMAP see the following: |
Step 17: After reading the TMAP guidance, click "Continue with TMAP"
Step 18: Click on the +/- zoom icons to zoom in and out of TMAP
The legend on the right hand side of the TMAP shows you the colors used to represent your reactions most closely related neighbors in the TMAP. |
Step 19: Click on the "X" in the upper right of the screen to close the TMAP
After you have finished exploring the TMAP close it to return to the reactions view.
Step 20: Click on the icon for "Similar reactions list" as shown below
The Similar reactions list will identify reactions in the RXN database that are similar to the predicted reaction.
Click the same icon again to close the Similar reactions list.
Step 21: Click on the icon for "Copy fingerprint" as shown below
The reaction fingerprint for the predicted product reaction will be copied to the clipboard of your browser. You may then paste it into a text document.
A unique "fingerprint" for a chemical reaction can be computed and used as a means to compare molecules and reactions for similarity. For more information on fingerprints as used here see the following: Mapping the space of chemical reactions using attention-based neural networks |
This is an example of a chemical reaction fingerprint. It is the fingerprint of the example prediction used in this tutorial.
[-1.6735221147537231,-1.8661422729492188,-1.81363844871521,-0.42113983631134033,0.8483024835586548,-1.4488575458526611,-0.3686295449733734,0.48501721024513245,-0.4201167821884155,0.7862669229507446,1.6044626235961914,1.9873979091644287,-0.6177471876144409,-1.3560351133346558,0.8070701360702515,1.600415825843811,2.0789148807525635,1.0853002071380615,-1.16912841796875,1.8132174015045166,-0.04413942992687225,-1.5996822118759155,1.5000373125076294,-2.158449172973633,-0.043316882103681564,0.6088337898254395,-2.3338332176208496,0.26505646109580994,-0.6696520447731018,0.18725325167179108,-1.8624275922775269,0.2769564390182495,-1.665277123451233,0.6663358807563782,0.9145832061767578,0.8559666275978088,-0.28232306241989136,2.012446403503418,0.7017057538032532,-0.20654496550559998,-0.9641878008842468,0.6031150817871094,2.5843288898468018,0.05475091561675072,0.16606159508228302,-0.7218376398086548,-1.1366875171661377,-0.1451134979724884,1.0618172883987427,-2.5014426708221436,-0.9198063015937805,-1.2385824918746948,-1.9134392738342285,1.3107930421829224,-0.4073719382286072,0.6758602261543274,-0.24437646567821503,0.23337365686893463,0.4276561439037323,-2.0148684978485107,0.15300783514976501,0.24463608860969543,1.647057294845581,1.000285267829895,-2.3709778785705566,-2.2312567234039307,-0.23227889835834503,-0.9871393442153931,-0.0332455113530159,1.4668725728988647,0.21972636878490448,0.40992364287376404,0.8064353466033936,-1.5371326208114624,1.3094781637191772,1.1358438730239868,1.990492343902588,0.583197295665741,1.4765615463256836,-1.9212021827697754,1.8876357078552246,-0.9314133524894714,0.9261294007301331,-0.9328246116638184,-2.023683547973633,0.5802607536315918,1.6187268495559692,-1.1474950313568115,-1.4451885223388672,-0.6014682054519653,2.982538938522339,-1.2691913843154907,2.520561695098877,0.3426623046398163,0.45115330815315247,-1.2578530311584473,0.9584701657295227,-0.4342820346355438,1.8066455125808716,-0.2416236251592636,-1.919986367225647,-0.4358331561088562,-0.22032895684242249,-0.48406532406806946,-1.5424023866653442,-0.5284754037857056,-0.41207802295684814,0.6387926340103149,1.5004230737686157,-0.46045300364494324,-0.295758455991745,-1.4000827074050903,2.247321367263794,-0.16716280579566956,0.35531893372535706,1.403519868850708,2.022871732711792,-0.9577924013137817,-1.4963902235031128,-0.6279836297035217,1.521104335784912,1.694411039352417,0.9639431834220886,0.817285418510437,-0.37822556495666504,-0.4834178686141968,-2.0221869945526123,0.25094929337501526,0.6673620343208313,-0.7312247157096863,-0.08003901690244675,-0.9209358096122742,-1.050477385520935,0.15671633183956146,-1.3165003061294556,0.49190762639045715,0.6970290541648865,-0.7401221990585327,-1.9508565664291382,-0.06427758187055588,-0.3380867838859558,-3.0102744102478027,0.1726202666759491,-0.7045319080352783,1.016224980354309,-1.933265209197998,0.49109789729118347,0.9653928875923157,-1.1889824867248535,-1.1172419786453247,-0.8418462872505188,2.8990540504455566,0.17563675343990326,0.3059397041797638,0.8853565454483032,2.375370740890503,-1.5038506984710693,1.3053393363952637,2.7178006172180176,0.025221142917871475,0.7661250829696655,0.8579445481300354,-1.7825069427490234,-0.061436738818883896,1.7058143615722656,-0.679970920085907,0.7506396174430847,-0.46935972571372986,0.52462238073349,-0.02844817191362381,-0.4783799350261688,1.4757037162780762,2.03218936920166,-1.2990103960037231,2.2932684421539307,0.7963569760322571,1.37050199508667,-1.4677737951278687,-1.2829804420471191,1.245859980583191,-1.6395522356033325,1.849403738975525,0.6918516159057617,-1.7216944694519043,1.243910312652588,2.095116376876831,0.857475996017456,-1.9396564960479736,2.579957962036133,0.9238468408584595,1.989099144935608,-1.0537619590759277,-2.0923664569854736,0.2938729524612427,1.5466368198394775,-1.5715738534927368,-1.1522927284240723,-4.446835041046143,-0.19612669944763184,0.7210275530815125,-2.6536903381347656,0.8428071141242981,0.6317269802093506,-0.5896157622337341,0.2165938764810562,-0.4859275817871094,-0.5935143232345581,-0.10690609365701675,0.09114240109920502,-0.7064465880393982,-1.164090871810913,-1.0682263374328613,1.7902114391326904,-0.6769233345985413,-0.04595673829317093,0.2578873336315155,-2.1300554275512695,-1.3884824514389038,-1.9772262573242188,0.41490432620048523,-2.239422559738159,-2.1128203868865967,-1.1498372554779053,0.14713731408119202,-1.645789384841919,-0.3932664692401886,0.21344704926013947,-0.2262546271085739,1.3906936645507812,1.2502527236938477,-1.8673160076141357,1.4302036762237549,-0.38463717699050903,3.1459286212921143,2.592770576477051,2.7141170501708984,1.7206215858459473,-0.254597932100296,0.08853600919246674,0.5446722507476807,-1.540218710899353,0.631365954875946,0.6449835896492004,-1.7046161890029907,0.827869713306427,1.0190151929855347,-0.17432191967964172,1.2357866764068604,1.4040271043777466,0.01728861592710018,0.9723564386367798,-0.9273874163627625,-2.049819231033325,0.5417112708091736,-0.15818624198436737,0.3782133460044861]
Step 22: Click on the icon for "Attention weights" as shown below
A small box will open with a heat map of attention weights calculated when the product prediction was derived.
Right-click on the heat map and select "Open image in new tab" for a higher resolution view. |
The attention weight heat map is derived from the attention weights calculated while RXN is generating predictions. Attention weights reflect the molecular interactions in the reaction that were most critical when predicting the product (Y-axis of the heat map) from the reactants (X-axis of the heat map). The following article provides a simple overview of attention in machine learning models: Understanding Attention In Transformers Models |
Step 23: Click the "X" in the upper right to return to the RXN for Chemistry Home page
Step 24: Tutorial completed
This completes the Predict product tutorial for RXN for Chemistry.
In this tutorial, we:
-
Executed a product prediction
-
Viewed the results in a Project
-
Viewed the details of the predicted product reactions
-
Viewed the TreeMAP, fingerprint, and attention heat map of the predicted product reactions
IBM®, the IBM® logo, and ibm.com® are trademarks or registered trademarks of IBM® Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM® or other companies. A current list of IBM® trademarks is available here: Copyright and Trademark Information.