Dear Paolo,

Thank you for all the tips. I was not aware of these.

In fact I did suspect that that [H] has something to do with the
stereochemistry, since the original F made the bond stereo. However, the
"[H]" did not go away even after I called

AllChem.SanitizeMol(m6)
AllChem.AssignStereochemistry(m6)

or

AllChem.SanitizeMol(m6)
AllChem.FindPotentialStereo(m6)

I thought these would trigger the re-perception of the double bond, which
is no longer stereo.

By the way, I wrote down in my notes that
rdkit.Chem.rdmolops.AssignStereochemistry is old, while
rdkit.Chem.rdmolops.FindPotentialStereo is new. So it may be better to use
the latter.

As for DeleteSubstructs, in fact I started out using this but ran into some
problem. Then I switched to ReplaceSubstructs. I am still analyzing that
problem. I ran it on a big data set and hence I need to make sense of the
issue first. If I can boil it down, I may make a separate forum post.

Ling



Paolo Tosco <paolo.tosco.m...@gmail.com> 於 2021年11月5日週五 上午5:54寫道:

> Hi Ling,
>
> By default hydrogens defining double bond stereochemistry are not removed.
> You may remove that residual hydrogen by either
>
> params = Chem.RemoveHsParameters()
> params.removeDefiningBondStereo = True
> Chem.RemoveHs(m6, params)
>
> or simply
>
> Chem.RemoveAllHs(m6)
>
> I think you may obtain the same result by just
>
> m6s = AllChem.DeleteSubstructs(m5, mf)
>
> Cheers,
> p.
>
>
> On Wed, Nov 3, 2021 at 9:29 PM Ling Chan <lingtrek...@gmail.com> wrote:
>
>> Hello colleagues,
>>
>> I tried to change all F's into H's. It worked. But when I converted the
>> result into a smiles string, there is the occasional lingering explicit
>> hydrogen. It is there even after I do a RemoveHs().
>>
>> Just wonder what is this explicit H about, since it may have implications
>> on any further processing.
>>
>> Thank you!
>>
>> Ling
>>
>>
>>
>> mh = Chem.MolFromSmiles("[#1]")
>> mf = Chem.MolFromSmarts('F')
>> m5 = Chem.MolFromSmiles("F/C=C1/[C@H](F)[C@@H](F)O[C@@H]1F")
>> m6s = AllChem.ReplaceSubstructs(m5,mf,mh,replaceAll=True)
>> m6 = m6s[0]
>> print(Chem.MolToSmiles(Chem.RemoveHs(m6)))
>>
>> [H]C=C1CCOC1
>>
>>
>>
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to