> Digging a bit more suggests that this is a problem with SMARTS parsing.
> Specifically, the match() method of HydrogenAtom seems to not be able to
> match atomic H. But [H] does match [H][H] or even.
>
> A simple fix for atomic H is to replace lines 75-77 with
>
> if (atom.getMassNumber() != null && atom.getMassNumber() >= 1) {
> return true;
> }
>
> Does this sound reasonable?
I was in Goslar, hence the somewhat late reply. Looks like you found it,
however changing that line to >=1 does not have the desired effect,
because the massnumber for [H] is null (as opposed to being 2 for 2H).
There is something related in AnyAtom.java..
public boolean matches(IAtom atom) {
if (atom.getSymbol().equals("H")) {
Integer massNumber = atom.getMassNumber();
return massNumber != null;
}
return true;
}
So it looks to me that not matching [H] to itself is intentional,
considering what I see in AnyAtom. Perhaps Egon can comment?
Mark
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user