Hi,
Am 29.04.2012 16:19, schrieb Paul Emsley:
> I am trying to write a C++ function to examine an RDKit::ROMol... but
> running it from a python script:
>
> m = Chem.MolFromSmilesString('Oc1ccccc1')
> do_cool_stuff(m)
>
> my C++ (which gets swigged) is:
>
> PyObject *do_cool_stuff(PyObject *pyo) {
>
> RDKit::ROMol *mol = magic(pyo);
using a reference instead of pointer access:
RDKit::ROMol &mol = boost::python::extract<RDKit::ROMol&>(m);
via pointer access:
RDKit::ROMol *mol;
mol=boost::python::extract<RDKit::ROMol*>(m);
> inner_cool_stuff(mol);
> ...
Regards
Uwe
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss