Chemformer icon indicating copy to clipboard operation
Chemformer copied to clipboard

Direct Reaction Product Prediction

Open TeresaZhou0127 opened this issue 1 year ago • 5 comments

Hi Chemformer team,

I am using your Chemformer model for predicting the products of some reactions. However, I am a bit confused that if it's proper for me to use the same model for direct reaction prediction and retrosynthesis prediction. I didn't find any params that I can set for distinguish between the two downstream tasks. Can you please help me confirm what is the correct way for me to get the predicted reaction product with Chemformer?

Thank you so much for your help!

Best

TeresaZhou0127 avatar Oct 24 '24 20:10 TeresaZhou0127

There used to be different pretrained weights for the different finetuned tasks.

EBjerrum avatar Oct 26 '24 13:10 EBjerrum

Thank you so much for your reply! Can you please give me some hints about where to find these weights and how to use them for different downstream task? Since I am fine-tuning chemformer for direct reaction prediction, but I found the predicted products kind of a mixture of both direct and retro-synthesis. Thank you again for your help!

TeresaZhou0127 avatar Oct 26 '24 14:10 TeresaZhou0127

Hi! The link to the weights trained in the first Chemformer paper is found in the first paragraph in the README file: "The public models and datasets available here.". The weights are under models/fine-tuned: uspto_50 is the the model trained for retrosynthesis, while uspto_sep and uspto_mixed are for forward prediction (predicting products given reactants). See the paper for more info on the difference between uspto_sepand uspto_mixed.

anniewesterlund avatar Oct 29 '24 08:10 anniewesterlund

Thank you for the clarification! Since we would like to use chemformer as the pretrained model for our own data finetuning. I am wondering if the model under models/pre-trained: combined can be used for forward prediction finetuning and prediction? And also is chemformer model available for us to pretrain with a set of chemical reactions?

TeresaZhou0127 avatar Oct 29 '24 18:10 TeresaZhou0127

Yes, the pretrained models are exactly the starting point for further finetuning. Pretraining was done with Smiles2smiles tasks with masking and smiles data augmentation, not reaction data. You can train from scratch on reaction data, if that's what you want, but the benefits of using the pretrained model as a starting point is quite large in terms of training speed and accuracy in top-1 prediction.

EBjerrum avatar Nov 05 '24 07:11 EBjerrum

Closing due to inactivity

anniewesterlund avatar Jun 04 '25 10:06 anniewesterlund