This is related to
https://sourceforge.net/p/cdk/bugs/1357/
caused by: java.lang.NullPointerException at org.openscience.cdk.fingerprint.CircularFingerprinter.rubricTetrahedral(CircularFingerprinter.java:859) at org.openscience.cdk.fingerprint.CircularFingerprinter.excavateMolecule(CircularFingerprinter.java:603) at org.openscience.cdk.fingerprint.CircularFingerprinter.calculate(CircularFingerprinter.java:201)
unfortunately, I cannot reproduce this bug, sometimes it occurs with this compound:
C([C@@H]1C@H/C=C\C(=O)O)/C#N)O)O)O)O
all i do with the molecule is parsing the smiles, and all 2d positions are null
maybe the fix from the bug above should be applied to line 859 as well?
C([C@@H]1[C@H]([C@@H]([C@H]([C@@H](O1)O/C(=C(\CC(=O)O)/C=C\C(=O)O)/C#N)O)O)O)O
here is the smiles again with [] brackets
ok, I can now reproduce it:
the code works if the depiction is disabled
I have not investigated why, but apparently the depiction changes the molecule in a way the fp computation fails
I dont like the fact that the fp results depend on the d2 layout. so far I did not care about that. should I perform a 2d layout before calculating the fp or not?
Odd will investigate. BTW we're wanting to move to github for issues.
Fixed - problem was more subtle though: https://github.com/cdk/cdk/pull/259
On 5 January 2017 at 15:37, John May jwmay@users.sf.net wrote:
Related
Bugs:
#1385BTW martin if you want to fix your example either generate the depiction using SDG first or call bond.setStereo(IBond.Stereo.None) on all bonds.
The issue is the depiction generator needs a layout for the depiction so it automatically creates if it's not there - it also scales coordinates. Afterwards and to avoid side affects it rollsback the molecule to the state before the function was called - i.e. no coordinates. I forgot part of a layout is also wedge bonds which need to be reset as well.
John
Thanks for the explanation. I have two more questions:
How is the circular FP different if SDG is computed beforehand or not?
Should SDG be applied before computing circular fingerprints?
It will be different if there's stereochemistry, it would be possible to
make them the same but no ones done that yet. However since the
fingerprints are used for similarity and not identity it should be v.
similar and cluster correctly.
I'm sure if anyone's done an activity benchmark where stereochemistry is
important (clearly it is) but no test sets.
John