Oh right. If I were you I would just use a Python dictionary by Atom Id to store the info.
Otherwise, I would double check first of all that the code works from C++ (the quick way of doing this is grepping our source code for any usage of OBPairFloatingData - I have a suspicion that I tried to use this before and it didn't work from C++ even). Then search openbabel-python.i for any mentions of other datatypes and see how they are wrapped. But in short, the wrapper is C code, and doesn't support templates, so it's necessary to explicitly define the template in the code - there are examples of expanding templates in the .i file. But in short, to figure it out properly I'd just have to do it myself, so why don't you have a go first, and then I'll try early next week. - Noel On 15 November 2013 13:04, Casper Steinmann <casper.steinm...@gmail.com> wrote: > Hi, > > I know the specifics about the git-stuff - it was more a question > about what can go through the SWIG interface - I am not familiar with > the details at all and the openbabel-python.i file was kinda > intimidating. The super class of the OBPairFloatingData is something > based on templates and I thought at this was not exported for some > exotic reason. Maybe it has not been done yet. > > I am in this case interested in storing atomic floating point data > (such as experimental nuclear magnetic shieldings) with the atoms. I > agree that storing them as a string is fine, but why not store it as a > floating point if I it is possible in the C++ API. > > I'll just try to see if my plan about tweaking the SWIG interface file > is sufficient. > > Thanks > > Casper > > On Fri, Nov 15, 2013 at 1:56 PM, Noel O'Boyle <baoille...@gmail.com> wrote: >> Fork on github, make branch called pythonpair, fix issue, send pull request. >> >> As a matter of interest, why do you need this specific functionality? >> >> - Noel >> >> On 6 November 2013 16:31, Casper Steinmann <casper.steinm...@gmail.com> >> wrote: >>> Hi, >>> >>> I wonder what the formal approach is if I want to export >>> OBPairFloatingPoint to the python interface (and the others of >>> course). Any points would be appreciated. >>> >>> thanks >>> >>> Casper >>> >>> ------------------------------------------------------------------------------ >>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps >>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access >>> Free app hosting. Or install the open source package on any LAMP server. >>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! >>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> OpenBabel-Devel mailing list >>> OpenBabel-Devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/openbabel-devel ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel