torchdrug
torchdrug copied to clipboard
Retrosynthesis Example
Thank you for providing this nice library! We have tried for quite some time to get the retrosynthesis example to work with a simple SMILES string but have failed terribly. Could you maybe help out by listing the changes we have to make in the code and in the steps described in the tutorial in order to make the library applicable beyond USPTO50k?
Hi, Could you please share the codes you use to generate predictions for simple SMILES?
We basically used the tutorial and then:
mol = data.PackedMolecule.from_smiles([mol_smiles])
mol.num_relation = 4
predictions, num_prediction = self.task.predict(
{'graph': [None, mol],
'reaction': torch.tensor([100], device='cpu'),
'sample id': torch.tensor([30], device="cpu")})
Hi, Can you please check the following tutorial written in Colab? You may need to run the tutorial on your own machine. Please make sure the batch you provided is consistent with the batch provided in the last session in the tutorial. https://colab.research.google.com/drive/1IH1hk7K3MaxAEe5m6CFY7Eyej3RuiEL1?usp=sharing
Thank you! I think this is the code I have and this runs. But it's using the reaction_valid
data. We would like to run the model on other molecules which are not in USPTO50k, but there are several issues (and we do not know how to resolve some) when we try this with the tutorial code.
@shichence Hi! I have the same issue. When i want to run the model on other molecules,such as smiles='N#Cc1ccc(-n2ccc3ccccc32)cc1C#N',i do not know how to load the data.