Hi Tim,

you only need to call SanitizeMol on merged_mol:

merged_mol
[image: image.png]
Chem.SanitizeMol(merged_mol)
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE

merged_mol
[image: image.png]

In general, the RDKit defers calling SanitizeMol to the user rather than
calling it after each molecule manipulation operation, since it's an
expensive operation.
For example, in your case you might want to do multiple insertions and only
sanitize at the end of the insertion process.

Cheers,
p.

On Mon, Oct 25, 2021 at 1:15 PM Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> I'm trying to merge two molecules into one, and it looks like the
> InsertMol() function is supposed to do this. But when I try the merged
> molecule is messed up.
>
> [image: image.png]
> Am I doing the right thing?
> Thanks
> Tim
>
> _______________________________________________
> 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