Re: [Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-16 Thread Ming Hao
Thanks Rafael. Best, Ming On Mon, May 16, 2022 at 2:27 AM Rafael L wrote: > To find all compounds that match the ester substructure, you can use > GetSubstructMatches. I would do the following (I'm supposing you have all > your structures in a Pandas dataframe, and that you converted SMILES to

Re: [Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-16 Thread Rafael L via Rdkit-discuss
To find all compounds that match the ester substructure, you can use GetSubstructMatches. I would do the following (I'm supposing you have all your structures in a Pandas dataframe, and that you converted SMILES to RDKit Mol): ester_pattern = Chem.MolFromSmarts("COC(C)=O") # in a pandas

Re: [Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-15 Thread Ming Hao
Thanks Christopher. I will try that. Best, Ming On Sun, May 15, 2022 at 12:40 AM Christopher Mayer-Bacon wrote: > Ming, > I’m not at my computer now, but I think you may be better served with > using the reaction functionality instead of replacing substructures via > ReplaceSubstructs. You

Re: [Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-14 Thread Christopher Mayer-Bacon
Ming, I’m not at my computer now, but I think you may be better served with using the reaction functionality instead of replacing substructures via ReplaceSubstructs. You can probably create a reaction SMARTS string for converting a generic ester to a generic disulfide (

[Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-14 Thread Ming Hao
Hi All, I want to replace the ester structure ('COC(C)=O') with disulfide ('CSSC') [image: image.png] Here is what I did, but it does not work. It seems to need specified methods to replace the original structure with the new one, not just put individual SMILES there.