Can MolToSmiles force the SMILES to start&end at a particular atom?? #7199
Replies: 2 comments 3 replies
-
@Haoxu11225 there's not currently any way to do this and it's not clear why you would want to specify the last atom in a SMILES. |
Beta Was this translation helpful? Give feedback.
-
@greglandrum this would definitely come useful when using chemical language models to generate molecules starting from a known fragment. For this, one would need a SMILES string whose last atom corresponds to the attachment point from where the model would complete the rest of the molecule. See this paper for an example: https://chemrxiv.org/engage/chemrxiv/article-details/65e718eee9ebbb4db9f21886 |
Beta Was this translation helpful? Give feedback.
-
We know that MolToSmiles can force SMILES to start at a particular atom,like:
-----------------------------------------------------------------------------------
mol = Chem.MolFromSmiles('Oc1ccc(cc1)C(=O)')
SMILES=Chem.MolToSmiles(mol, rootedAtAtom=1, canonical=False)
Out:c1(O)ccc(C=O)cc1
--------------------------------------------------------------------------------------
But whether MolToSmiles has any way of specifying the last atom of SMILES, or both?
Or is there any other way to force the position of the atoms in the generated SMILES, but still represent the original chemical structure?
If you have any suggestions, thank you for leaving a message
Beta Was this translation helpful? Give feedback.
All reactions