A vector of OBAtoms is not wrapped by the Python wrappers (other
vectors can be created using the global vector methods - see
dir(openbabel)). Could you describe why you are using this function?
There may be a workaround.

I don't know anything about atom names. If you don't get a reply,
maybe email openbabel-discuss just on that topic.

- Noel

On 28 April 2010 01:45, Rocco Moretti <[email protected]> wrote:
> 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
>

------------------------------------------------------------------------------
_______________________________________________
OpenBabel-scripting mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting

Reply via email to