Hello, I'm using the Python bindings for small molecule analysis and processing, and am running into a few issues. (with version 2.2.3. I'm technically importing pybel, but it happens that I'm doing most of my tweaking at the openbabel level.):
How does one pack up objects for a function which normally accepts a C++ vector? For example, OBMol.RenumberAtoms() is listed as taking a "std::vector< OBAtom * > &" as it's argument. I tried to pass a regular python list of (Python wrapped) OBAtom objects to the wrapper function, hoping it would get converted, but that does not seem to work. The wiki mentions what's needed for functions taking an array of C doubles, but not a vector of object pointers. Also, how does one read/change atom names? I realize not all formats contain named atoms like PDB does, but, best I can tell, Open Babel can recognize atom names, at least well enough to round-trip them from pdb to pdb. Is there any way I can read/change these from within Python? Thanks, Rocco Moretti Senior Fellow University of Washington ------------------------------------------------------------------------------ _______________________________________________ OpenBabel-scripting mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
