Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Greg Landrum
I'm not sure if this helps, but maybe... If you have xyz files, how about trying xyz2mol: https://github.com/jensengroup/xyz2mol -greg On Wed, Oct 23, 2019 at 4:57 PM Navid Shervani-Tabar wrote: > Thanks for the prompt response Greg, these are from QM9 dataset (from the > original paper). Do y

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Navid Shervani-Tabar
Thanks for the prompt response Greg, these are from QM9 dataset (from the original paper). Do you know of any package that has already fixed them by any chance? I used to use Chainer Chemistry to load the dataset, but those seem not to have coordinate information included. Navid On Wed, Oct 23, 2

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Greg Landrum
Given that those molecules are not chemically reasonable, I would suggest either fixing them by hand or removing them. On Wed, 23 Oct 2019 at 16:46, Navid Shervani-Tabar wrote: > Thanks Dan, > > There are two more issues after sanitizing: > > 1. For some molecules (e.g; c1ccnc1), I get the follo

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Navid Shervani-Tabar
Thanks Dan, There are two more issues after sanitizing: 1. For some molecules (e.g; c1ccnc1), I get the following error: Can't kekulize mol. Unkekulized atoms: 0 1 2 3 4 2. For some molecules (e.g; C#CC#CN#N), I get the following error: ValueError: Sanitization error: Explicit valence for atom

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-22 Thread Dan Nealschneider
Navid- You probably need to "sanitize" the mol: rdkit.Chem.rdmolops.SanitizeMol(mol) *dan nealschneider* | senior developer [image: Schrodinger Logo] On Tue, Oct 22, 2019 at 6:31 PM Navid Shervani-Tabar wrote: > Hello, > > I am trying to load a dataset using a v

[Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-22 Thread Navid Shervani-Tabar
Hello, I am trying to load a dataset using a vector of atoms (e.g [6,6,7,6,6,8]) and the corresponding adjacency matrix. I am using the following script to transform these into a mol object: def MolFromGraphs(node_list, adjacency_matrix): # create empty editable mol object mol = Chem.RWM