From: Noel O'B. <bao...@gm...> - 2007-04-23 07:47:55
|
On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > > > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > > > This executes fine, but uc is an instance of openbabel.OBGenericData > > class and it does not have GetA() or any other method of the > > OBUnitCell() class. > > Ugh. In C++ such type conversion is done with casting. I think the > only solution will be to add conversion functions -- perhaps in the > SWIG interface file, which allows such conversion. Unfortunately, > Noel, who contributed Pybel is on vacation right now, or he might > have some other ideas. I also really want to be able to access the Data in molecule file formats. I will discuss some ideas with Geoff. In the meanwhile, you should check out PyCiFRW, a Python module for reading/writing CIF files: (1) http://anbf2.kek.jp/CIF/ (2) http://scripts.iucr.org/cgi-bin/paper?wf5020 (Open Access paper) > Could you file this as a bug report in the tracker? > > Thanks, > -Geoff > > P.S. On the plus side, I think we should be able to release a fixed > Python interface without needing to wait for a 2.1.1 update to Open > Babel itself. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |