Re: [Rdkit-discuss] kekulize AllChem.CanonSmiles error and workaround

2017-08-01 Thread Richard Hall
When I cut the bonds in the daylight implementation, I add new single bonds to xenon atoms – this means the ‘imidazole’ fragment would be [Xe]n1ccnc1, which *is* a valid smiles. The following python code could then be used to convert these Xe atoms to hydrogen, from rdkit import Chem

Re: [Rdkit-discuss] canonical SMILES of a fragment

2017-08-01 Thread Greg Landrum
Hi Pavel, It is, unfortunately, not that easy. The canonicalization algorithm does not use atomic aromaticity when determining atom ordering, so as far as it is concerned there is no difference between atoms 0 and 2 in either of your examples. What does get used is the number of hydrogens, so you

[Rdkit-discuss] Using inchikey as entry

2017-08-01 Thread Kazmierczak Stéphane
Hello, I would like to draw molecules with rdkit, but only have inchikeys. I compiled rdkit with inchi support but it seems that I can only output inchikeys but not import them. Are there any api function that I am missing ?

Re: [Rdkit-discuss] Using inchikey as entry

2017-08-01 Thread David Hall
I believe InchiKey uses a 1 way hash (sha-256), so what you are asking for is basically impossible. That is, to go from InchiKey to molecule requires already having a table of molecules corresponding to the InchiKeys. There are various services online that have such lookup tables for a large

[Rdkit-discuss] canonical SMILES of a fragment

2017-08-01 Thread Pavel Polishchuk
Hi all, canonicalization of fragment SMILES does not work properly. Below there are two examples of identical fragments. The only difference is the order of atoms (indices). However, it seems that RDKit canonicalization does not take into account atom types. Does someone have an idea