From: Egon W. <ego...@gm...> - 2012-06-17 15:58:23
|
Hi all, On Sun, Jun 17, 2012 at 5:21 PM, Rajarshi Guha <raj...@gm...> wrote: > I hesitate to make the alredy complex hierarchy more so. Same here... but I agree with Ralf that it is time to rethink things... It seems that we're all thinking in the same direction, though: simplify the API. I see John talking about only serializing what has content, which sort of is in line with Rajarshi's comment that it is already complex enough... Fact is, by adding even more methods, we effectively create an even more sparsely populated class... mind you, any IAtomContainer, without any content, eats up 32kB of memory (That is *not* the "class" itself, but all the pointers; that is, every new IAtomContainer eats *another* 32 kB)... IAtom's are also large. And in many situations you use only some of it. We have tried to overcome overloading of classes by moving "helper" methods, like get2DCenter() to something like BondManipulator, which is probably a bad name... but it saves memory... I have long wanted to do the following: 1. create a subset of interfaces... a interfacescore or so... just around IAtomContainer, and have a larger set of classes up to IChemFile, and split up classes that deal with just that core, and with more. With the latest IChemObjectBuilder API this is possible. That will reduce the .jar files considerable, but at this moment is blocked by the io module, needing API changes to accomodate for the above. 2. have IAtom have an optional field for coordinates, element, atom type, and isotope... not every atom is of an particular element, or even atom type. Think IFragmentAtom... and most atoms do not have any isotope information... These are just some history and some thoughts... Let's keep talking wishlists, and than move to ideas and later a brand new, 22nd century ready, CDK API :) Egon -- Dr E.L. Willighagen Postdoctoral Researcher Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers |