Rajarshi Guha wrote: > > On May 22, 2008, at 1:12 AM, Nina Jeliazkova wrote: > > Rajarshi Guha wrote: > >> I took the source code from your Sourceforge bug report and tried > running it. However I cannot get the 3D structure in the first place > (it reports that not all ring atoms were placed). > >> > >> So I converted the SMILES to 3D using smi23d and tested it > directly with the LengthOverBreadth descriptor and it works fine in > that it does not report any typing error. > >> > >> Furthermore if run your code using CCCCC as the input SMILES it > works fine. So I'm guessing that the problem is with the 3D > structure generation code. > >> > > Couple of months ago I was told 3D generation code does not work > well currently - are there any changes of this status recently? > > I don't know the details of it - my understanding is that initial 3D > coordinates work for many cases (though the ring system in Nicholas's > example did not work for me) but geometry optimization does not work. > > I'd also like to know the status of this package > > > While this is correct for the current state of affairs, I am > wondering if it would be more convenient to introduce some class > hierarchy that will allow to avoid this kind of "instance of" checks, > for example in the manner java.lang.Number derived classes can all use > methods like "doubleValue()", "intValue()", exploiting the class > inheritance. May not be that straightforward to integrate array > classes, but not impossible. > > Correct - but if vector results have to be differentiated from scalar > results, I don't see much way other than an instanceof check, or prior > knowledge of the result type and a coercion. > > So if you're going to do an instanceof check, why not do 3 more :) Main reason - code doesn't look good :) ( joking). Also AFAIK, "instance of" is not considered an efficient piece of code from performance point of view, aside from aesthetic reasons. Finally, imagine somebody introduce a derived DescriptorResult type for a descriptor he is inventing. This will need adding "instance of" check in every piece of code that works with descriptors, while in case of exploiting inheritance, it will be handled by the derived type and the integration is completely transparent.
Some possible solutions: - The top class in the hierarchy can be array, with size 1 for scalars - The results can be accessed via iterator, which will (naturally) return only a single value for the scalar. - Some other technique, based on generics (let me get my morning coffee first ...) There are other issues of interest to me in QSAR library, for example having descriptors short names somewhere in DescriptorSpecification, rather than only in DescriptorValue. Regards, Nina > > ------------------------------------------------------------------- > Rajarshi Guha <[EMAIL PROTECTED]> > GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 > ------------------------------------------------------------------- > A mouse is an elephant built by the Japanese. > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

