How would the training data look like ? Would it be a set of reactions ? What would be a good algorithm to run on the data ?

Wolfram Alpha does have an interface for chemistry, but does not seem really robust. The other databases for chemical reactions seem to work on a static database.

The ultimate goal is to predict the products given a set of reactants. Any suggestions will be helpful !

  • $\begingroup$ Yeah. I initially went to chemistry stack exchange but I thought they might not be familiar with ML. If you suggest, I will post it on chemistry stack exchange. $\endgroup$
    – pmuntima
    Jan 24 '17 at 3:14
  • 2
    $\begingroup$ Your question has nothing to do with ML. You need to ask for whether it makes sense to use the predictors. ML is not magic, if your inputs are non-sense, your model is also bad. $\endgroup$
    – Student T
    Jan 24 '17 at 3:40

Adding on top of Emre's answer, product formation depends on certain reactive groups say for e.g., $-OH$ (Alcohol) having more chance of releasing a Hydrogen than $-CHO$ (Aldehyde) or a Methyl $-CH_{3}$. Instead of using reactants as categorical variables you should use reactive groups on that, as variables.

For example if you take a vector of say (Chlorine, Alcoholic_group, Amine) to be coded for Para-Amino Phenol, it will be $(0,1,1)$ as chlorine is absent and for $CCl_{4}$, it will be $(1,0,0)$. But remember the first vector will be same for O-Amino Phenol as they are positional isomers. But both have different properties and reactivities. So categorical is kind of wasted here.

In my more deeper and frank opinion, these values should be continuous. You should be kind of looking for a value to quantify these each dimension of the vector coded. Then you can use classifiers from this vectors to find the probability of reaction happening or for product formation as @Emre mentioned.

So, take a simple, small set of molecules and make a vector having fewer dimensions and test it with categorical and continuous values(Give a value to each dimension based on your chemistry gut opinion). That is the better way to find whether your hypothesis/assumptions are reasonable.

EDIT 1: My answer basically answers whether reaction is feasible or not but does not answer which products are returned. I am sorry for that. But I hope it kind of points to what you can achieve with ML if you want to take your first step.

Hope this helps.

  • $\begingroup$ +1 That's precisely the kind of domain expertise I meant. I think the predisposition you refer to can be encoded with a regularizer. Can you quantify how likely one product is to be released relative to another in such cases? $\endgroup$
    – Emre
    Jan 24 '17 at 5:38
  • $\begingroup$ @Emre Yes that can be achieved, but requires quantifying the groups based on reactivity + availability etc. for the molecules involved which I think is a tough job. I don't even know whether there is any quantifiable term for reactive groups :( . That is why I asked him him/her to use chemistry gut knowledge to mark some molecules and test it on a set to see the class probability. $\endgroup$ Jan 24 '17 at 5:48

Have a look at this paper http://pubs.acs.org/journal/doi/full/10.1021/acscentsci.6b00219

(Added to beat character limit)


Let the question run its course here before reposting there. Without knowing much chemistry, I would approach it as a quantized regression problem (i.e., pick a loss function that does not penalize rounding errors). The input is a list of (chemical, coefficient) tuples, and the output is likewise. The order does not matter. The chemicals can be represented as categoricals, and you should also created derived categorical variables for the elements in each chemical. In other words, the input is simply the list of coefficients for the reactants, plus indicators for the derived variables. The goal then is to estimate the coefficients of the resulting products; zero would mean the product is not present.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy