User 7a9cb0374c
30-01-2014 19:54:50
Hi Chemaxon,
As part of a substructure search, we highlight the substructure in each of the matching molecules. In some cases, the highlighting does not complete because no hits are found even when the molecule and substructure are the same.
For a test case, I have been using caffeine (see attached Molfile). The specific part of the highlighting code that is generating unexpected results is:
public static int[][] findHits(Molecule targetMol, Molecule queryMol) {
MolSearch search = new MolSearch();
MolSearchOptions options = new MolSearchOptions(MolSearchOptions.SUBSTRUCTURE);
options.setHitIncludesRNodes(true);
search.setSearchOptions(options);
search.setQuery(query);
search.setTarget(target);
int[][] hits = null;
try {
hits = search.findAll();
} catch (SearchException e) {
throw new CannotHighlightException(e);
}
}
More specifically, search.findAll() is returning null even when query and target are the same structure.
I am using JChem version 6.1.7.
Xiao