Hi Navid,

if I interpret correctly your question, either of these should do what you
need:
Chem.DeleteSubstructs(mol, Chem.MolFromSmarts("[#1X0]"))
Chem.DeleteSubstructs(mol, Chem.MolFromSmarts("[#1]"), onlyFrags=True)

HTH,
p.

On Wed, Jan 20, 2021 at 5:38 PM Navid Shervani-Tabar <[email protected]>
wrote:

> Dear all,
>
> I was wondering if there is a function to remove "hydrogen atoms without
> neighbors" from the mol object. Thanks!
>
> Regards,
> Navid
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to