Re: [Rdkit-discuss] HasSubstructMatch return False where it shouldn't

2016-11-01 Thread Maciek Wójcikowski
Hi Michał, Have you tried using AdjustQueryProperties(). I think Greg mentioned it in his presentation at UGM http://www.rdkit.org/Python_Docs/rdkit.Chem.rdmolops-module.html#AdjustQueryProperties Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2016-11-01 19:20

[Rdkit-discuss] HasSubstructMatch return False where it shouldn't

2016-11-01 Thread Michał Nowotka
Hi, I have this molfile (CHEMBL265667): 11280714432D 1 1.0 0.0 0 25 27 0 0 0999 V2000 3.8042 -1.60000. C 0 0 0 0 0 0 0 0 0 4.3167 -1.90000. N 0 0 3 0 0 0 0 0 0 3.8042 -1.

Re: [Rdkit-discuss] Is there a way to init the conformations of smiles supplier to improve the performance for substructure matching.

2016-11-01 Thread 杨弘宾
Hi, Brian,    The first point you mentioned was acturally what I guessed and it is deprecated in my context, I think.    Thanks for the second suggestion, I tried this and the performance improved: suppl = AllChem.SmilesMolSupplier('allmoleculenew.smi',delimiter='\t')l = len(suppl)  #

Re: [Rdkit-discuss] Is there a way to init the conformations of smiles supplier to improve the performance for substructure matching.

2016-11-01 Thread Brian Kelley
I'll make two more points ( thanks to Greg Landrum for pointing this out ) 1). In your code each call to suppl[i] makes a new molecule, calling it twice in a row is twice as slow. This explains your last result. 2) in my example, I was assuming that the queries were already in a python list

Re: [Rdkit-discuss] Substructure by atom indices

2016-11-01 Thread Maciek Wójcikowski
Hi, There is PathToSubmol() although it takes the list of bonds. If you have atom indices: bonds = [] > atommap = {} for i,j in combinations(atom_path, 2): > b = ParentMol.GetBondBetweenAtoms(i,j) > if b: >bonds.append(b.GetIdx()) NewMol = Chem.PathToSubmol(ParentMol,

[Rdkit-discuss] Substructure by atom indices

2016-11-01 Thread Juuso Lehtivarjo
Hi All, Is there a python function (or any simple way whatsoever) to create a substructure mol object from another one based on the given atom indices? In C++ this could apparently be done with getMolFragsWithQuery, but that does not seem to be much used in python wrappers... Best, Juuso

Re: [Rdkit-discuss] Is there a way to init the conformations of smiles supplier to improve the performance for substructure matching.

2016-11-01 Thread Brian Kelley
A supplier is random access, so your call to supp[I] here is probably quite expensive: suppl = AllChem.SmilesMolSupplier('allmoleculenew.smi',delimiter='\t') l = len(suppl) for j in range(ll): # I have to make substructures in the first loop. for i in range(l):

[Rdkit-discuss] Problem adding hydrogens to peptides

2016-11-01 Thread James Davidson
Dear All, Enthused by all the great talks at the UGM, for the last couple of days I have been getting more hands-on with RDKit than I have in quite a while! I was keen to work with some peptides/proteins in 3D, but am having some problems when adding hydrogens... I have uploaded a GIST to

[Rdkit-discuss] Is there a way to init the conformations of smiles supplier to improve the performance for substructure matching.

2016-11-01 Thread 杨弘宾
Hi,? ??Supposing I'd like to matching 100 substructures with 1000 compounds represented as smiles.What I did is: suppl = AllChem.SmilesMolSupplier('allmoleculenew.smi',delimiter='\t')l = len(suppl)for j in range(ll): ?# I have to make substructures in the first loop.? ??for i in range(l):