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.

##############################################################
from rdkit import Chem
from rdkit.Chem import AllChem, Draw
from rdkit.Chem.Draw import IPythonConsole

orgsmi = 'CCOC(=O)CCCCCN(CC)CCCCCCCC(=O)OC(C)CC'
m = Chem.MolFromSmiles(orgsmi)
m

pat = Chem.MolFromSmiles('COC(C)=O')
pat

rep = Chem.MolFromSmiles('CSSC')
rep

new = AllChem.ReplaceSubstructs(m, pat, rep)
new[0] # The structure was separated
new[1]  # The structure was separated
len(new)
#################################################################

Can you help me with this? By the way, I have 10K structures, and first I
need to find the compounds with the pattern (ester, COC(C)=O) and replace
them with disulfide ('CSSC'). What is a good way to do this?

Thanks.
Ming
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to