I hit send on this too quickly and didn't proofread well: On Fri, Jun 7, 2019 at 5:17 AM Greg Landrum <greg.land...@gmail.com> wrote:
> > molecule_file = protein_pdb_file >> >> my_mol = Chem.MolFromPDBFile(str(molecule_file), sanitize=False, >> removeHs=False) >> >> mol = Chem.SanitizeMol(my_mol) # Error occurs here >> >> > This doesn't sense. It's shorter (and produces the same result) to just do: > > mol = Chem.MolFromPDBFile(str(molecule_file), removeHs=False) > > > That will sanitize the structure but leave the Hs. > I meant: "This doesn't make sense". Another point is that Chem.SanitizeMol() does not return a new molecule: it returns the error (if any) that caused sanitization to fail. -greg
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss