From: Rajarshi G. <rg...@in...> - 2008-12-19 20:00:08
|
On Dec 19, 2008, at 2:49 PM, Egon Willighagen wrote: > On Fri, Dec 19, 2008 at 8:34 PM, Rajarshi Guha <rg...@in...> > wrote: >>> Unwritten policy is actually for the CDK *not* to do input checking, >>> and leave that to the one is is using the building blocks... >> >> What's the rationale for this? > > Control, performance, IIRC. Aaah. I'd say that input checking is different from input processing. In the sense that, IMO, code should check that the input has what they need. If not, throw an exception etc, but not necessarily actually do the pre-processing job itself > The LPChecker, for example, could do atom typing itself, but might > then redo something just done already. Same for ring detection, > aromaticity... I agree > Instead, the choice was made to have building blocks... hence the name > Chemistry Development Kit... > > If the interfaces had a clear separation of mutable and immutable data > models, keeping track of what has already been calculated... and then > methods like the LPChecker can decide itself when they have to (re)do > some precalculation... I see. What about the idea of flags? It would require quite a degree of manual examination to decide when and under what conditions a flag needs to be of or on - but would be good for such preconditioning and wouldn't be a big performance hit ------------------------------------------------------------------- Rajarshi Guha <rg...@in...> GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 ------------------------------------------------------------------- Chemistry professors never die, they just fail to react. |