Re: [Open Babel] Pybel calcdesc

2017-08-15 Thread Stefano Forli
I'was having related problems when manually building an OBMol from external data like Matthew, so I've tested calculating descriptors, and I found I get a bunch of Nan's, too. My data contains coordinates, elements and bond orders, so I add to the molecule both OBAtom's and OBBond's (in between

Re: [Open Babel] Pybel calcdesc

2017-08-15 Thread Rafel via OpenBabel-discuss
Hi Matthew, could it be that your code fails to provide the connectivity information, i.e. which atoms are connected by bonds ? Trying to generate a smiles/inchi on disconnected atoms makes no sense, which would explain the nan-values ? OBabel should be able to guess / generate this information

Re: [Open Babel] Pybel calcdesc

2017-08-15 Thread Matthew Kennedy
I tested both these cases. 1) If I call mol.ConnectTheDots() then cast the OBMol to a pybel.Molecule, calcdesc() still returns nan for SMILES/INCHI/SMARTS, but the OBMol.numBonds gets set to the appropriate number. 2) If I call mol.PerceiveBondOrder() then cast the OBMol to a pybel.Molecule, cal

Re: [Open Babel] Pybel calcdesc

2017-08-14 Thread Geoffrey Hutchison
> I am attempting to begin using pybel/openbabel to calculate inchi strings on > the fly without having to write temporary files and use command line open > babel. Try this as a workaround: inchi = pybelmol.write(‘inchi’) smiles = pybelmol.write(‘can’) I’m wondering if there’s something subt