From: Stefan K. <sk...@ip...> - 2007-04-24 14:47:22
|
I must admit I don't understand this. Firstly, hcount cannot be null, but 0= ,=20 since it is an int (isn't it?). Secondly, if it is 0 after reading or not=20 depends on parser. Most file formats do not have implicit Hs (mol for=20 example), so it is 0, since the parser doesn't set it (but it could if it i= s=20 in file). You can run HydrogenAdder to have implicit Hs. Total H should be implicit + explicit. Since both are in, I would not keep= =20 another value (most likely to get inconsistent). On Tuesday 24 April 2007 16:42, sushil ronghe wrote: > Most of the time i am reading a molecule from file and then doing a > substructure search. > > may be that is the reason why getHydrogenCount() is 0 always. > yes i understand this is implicit Hydrogen count and used in > ImplicitHCountAtom class > Package ::"org\openscience\cdk\isomorphism\matchers\smarts". > > Previously in the class TotalHCountAtom we were having this method > > ((Integer)atom.getProperty(" org.openscience.cdk.Atom.totalHCount > ")).intValue(); > > This property is present in the class Atom > Package :: org\openscience\cdk > > But this is also null when i am reading a molecule from file. > > so i think it is really necessary to have a constant TOTAL_H_COUNT > so I am adding this in cdkconstants. =2D-=20 Stefan Kuhn BSc MA IPB Halle AG Bioinformatik & Massenspektrometrie Weinberg 3 06120 Halle http://www.ipb-halle.de http://msbi.bic-gh.de sk...@ip...=C2=A0Tel. +49 (0) 345 5582 1474=C2=A0Fax.+49 (0) 345 558= 2 1409 |