[Rdkit-discuss] PyObject * - RDKit::ROMol *

2012-04-29 Thread Paul Emsley
Hi all, I am trying to write a C++ function to examine an RDKit::ROMol... but running it from a python script: m = Chem.MolFromSmilesString('Oc1c1') do_cool_stuff(m) my C++ (which gets swigged) is: PyObject *do_cool_stuff(PyObject *pyo) { RDKit::ROMol *mol = magic(pyo);

Re: [Rdkit-discuss] Molecule with no atoms, so is it valid?

2012-04-29 Thread Eddie Cao
Hi Andrew, I also prefer #2. #1 is not quite sensible because many readers like MolFromSmiles will return None on failure and it will be hard to distinguish bad input from an empty one if we choose to do #1. Semantically, in many RDKit use cases, None and Empty Mol are as different as a