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) {

    RDKit::ROMol &mol = 
boost::python::extract<RDKit::ROMol&>(mol_in_py); // thanks Uwe H
    .. do stuff ..
    // construct return value
    RDKit::RWMol *regularized_mol = new RDKit::RWMol(mol);  // needs 
boostifying?
    update_coords(regularized_mol);  // replace with refined positions

    return somehow_wrap(regularized_mol);

}

What is somehow_wrap()?  What should I have read to find this out for 
myself?

Cheers,

Paul.


------------------------------------------------------------------------------
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to