Re: [Rdkit-discuss] GetSubstructMatch bug? + mol depiction issue

2021-11-04 Thread Ivan Tubert-Brohman
That does seem like a bug. You can also see it without involving DeleteSubstructs, by starting from different SMILES representations of the same molecule: >>> m1 = Chem.MolFromSmiles('FC12C31C32F') >>> m2 = Chem.MolFromSmiles('C12C31C32') >>> m3 = Chem.MolFromSmiles('C1CC2C3C(C1)C23')

Re: [Rdkit-discuss] Reading text records from SDF from gzipped files

2021-11-04 Thread Andrew Dalke
Hi Tim, You might also consider using chemfp, which has this sort of functionality available through its toolkit wrapper API: from chemfp import rdkit_toolkit as T import itertools with T.read_ids_and_molecules("chembl_28.sdf.gz") as reader: loc = reader.location for id, mol in

[Rdkit-discuss] Reading text records from SDF from gzipped files

2021-11-04 Thread Tim Dudgeon
I am needing to access the text of each record of a SDF, as well as creating a mol instance. I was successfully doing this using SDMolSupplier.GetItemText(). Then I needed to switch to handling gzipped SD files, and SDMolSupplier can only take a file name in its constructor. ForwardSDMolSupplier