-
Hello all, I am trying to make
However, I received this error:
If I don't kekulize mol, I got a weird ring connection, and a product does not look right either. Does anyone know how to fix this problem or have an alternative approach? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In my experience it is quite hard to work with radicals using the runreactants machinery. radical_smi = "c1cccc(Cl)c1[CH2]"
mol = Chem.MolFromSmiles(radical_smi)
mol = Chem.AddHs(mol) # unsure whether adding H would help.
products = AllChem.ReactionFromSmarts("[Cv3:0]-[c:1]1[c:2][c:3][c:4][c:5][c:6]1>>[C:0]=[C:1]1-[Cv3:2]=[C:3]-[C:4]=[C:5]-[C:6]1").RunReactants((mol,))
for i in range(len(products)):
i1 = products[i][0]
i1 = Chem.RemoveAllHs(i1)
display(Draw.MolToImage(i1,size=(300,100))) |
Beta Was this translation helpful? Give feedback.
In my experience it is quite hard to work with radicals using the runreactants machinery.
Here is one approach that gives the intended output, the approach here is to use explicit Hs during the reaction, and then remove them afterwards. Another factor is that the entire benzene ring is factored in and explicitly dearomatized. See the below codeblock, which output the two expected structures