Re: [Rdkit-discuss] python/c++ interface again...

2012-06-02 Thread Paul Emsley
On 02/06/12 04:44, Greg Landrum wrote: On Fri, Jun 1, 2012 at 1:41 PM, Paul Emsleypaul.ems...@bioch.ox.ac.uk wrote: I'd like to return a PyObject *. I have a RDKit::RWMol, say - or a pointer to a new one if need be... If you are using a boost.python interface, and your function is

[Rdkit-discuss] python/c++ interface again...

2012-06-01 Thread Paul Emsley
Hi, I've been trying to read boost python docs and I am lost... I'd like to return a PyObject *. I have a RDKit::RWMol, say - or a pointer to a new one if need be... // return a regularized molecule (copy of input with coordinates replaced) PyObject * coot::regularize(PyObject *mol_in_py) {

Re: [Rdkit-discuss] python/c++ interface again...

2012-06-01 Thread Eddie Cao
Hi, I am not quite fluent with Boost.Python myself, but you could try this: return RDKit::RWMOL_SPTR(regularized_mol); or return RDKit::ROMOL_SPTR(regularized_mol); Eddie On Jun 1, 2012, at 4:41 AM, Paul Emsley wrote: Hi, I've been trying to read boost python docs and I am lost...

Re: [Rdkit-discuss] python/c++ interface again...

2012-06-01 Thread Greg Landrum
Hi Paul, On Fri, Jun 1, 2012 at 1:41 PM, Paul Emsley paul.ems...@bioch.ox.ac.uk wrote: I've been trying to read boost python docs and I am lost... I'd like to return a PyObject *.  I have a RDKit::RWMol, say - or a pointer to a new one if need be... If you are using a boost.python