Closed salman-moh closed 1 year ago
You probably need to strip your input smiles of the atommapping, it seems like the code doesn't understand the input.
Ok, I've switched the dataset, but the problem remains, am I missing something?
Yes, the model is indeed outputting gibberish. Did you train it at all or use the pretrained weights? By standard the top 10 predictions are output I guess, they may or may not correspond to the same molecule (e.g. Alternative noncanonical SMILES).
No, I simply used pretrained weights... the ckpt in pretrained folder.
Which ckpt?
models/pre-trained/combined/step=1000000.ckpt from https://az.box.com/s/7eci3nd9vy0xplqniitpk02rbg9q2zcq
If you want to do retrosynthesis, you should use one of the fine-tuned ones. For retrosynthesis its th uspto_50, but be aware that it's only trained on the 10 reaction classes from the USPTO-50K dataset. That being said, it's still strange that you see the ?, using the pretrained model. It should be able to predict the same molecule, but in a different SMILES form. Do you have spaces in your SMILES? some people do pretokenization in that way, we do not, as we augment, then tokenize, so no spaces, it should be smiles that you can do a from rdkit import chem\n Chem.MolFromSmiles(smiles) on.
Yea theres spaces in those SMILES, got it I will make sure rdkit can recognise the SMILES first then.
I'm trying to (for now) use the Chemformer for predicting compound solubility aka the ESOL dataset downstream task. How I would need to change the DataModule/Model/Prediction pipeline?
Maybe a presanitization of input SMILES could be great to have in the long run.
You will need to finetune the encoder of the pretrained Chemformer. Did we put an example there on how to do that? It was Spyridon who worked on that part.
Do you not have the finetuned model available? I'm talking about this one "combined"
This is fine-tuned model folder
which one of these is Combined from Table 3 in the paper?
I don't work at AZ anymore, so I don't have access to the files
This is only the direct synthesis prediction task and retrosynthesis prediction task fine-tuning weights. For all other Seq2Seq / Discriminative tasks we will need to curate the dataset and fine-tune ourselves.
As I want to do the molecule property prediction, I guess I would need to curate the data as mentioned here:
And fine-tune (from the regression folder).
Anyways I will try to predict with proper SMILES and check if the prediction works for retrosynthesis prediction task and update this issue.
@salman-moh how did you tackle this issue I am having similar issue with my dataset. It is giving result with ? in between.
C=[N+]=[N-].C?(C)(C)[O-].N#CN?'
This is the output on USPTO-15K dataset; a few questions on the output (I'm new to the pharma domain)
The columns of the output file: