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, calcdesc() still returns nan for SMILES/INCHI/SMARTS, but
the OBMol.numBonds doesn't get changed, still reads 0.
3)  If I call pybelMol.write("inchi") it returns the correct (or at least
the same one as Babel command line) inchi string if I have previously
called ConnectTheDots().

Thanks for the help!


On Mon, Aug 14, 2017 at 3:07 PM, Geoffrey Hutchison <
geoff.hutchi...@gmail.com> wrote:

> > 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 subtly wrong with the install - these
> should be able to write the InChI and canonical SMILES.
>
> -Geoff




-- 
Matthew Kennedy, Ph. D.
matthew.kenned...@gmail.com
404-376-0969
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to