Skip to content

Commit

Permalink
Still to be optimised (as comment suggests) but working without stere…
Browse files Browse the repository at this point in the history
…o as provide (need to work out dependency juggling to get the stereo working).
  • Loading branch information
johnmay committed Oct 10, 2018
1 parent 6e3562c commit 121ecf5
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,14 @@ private boolean matches(Type type, IAtom atom, int stereo) {
left.type == OR && left.left.type == STEREOCHEMISTRY));

case RECURSIVE:
// TO BE OPTIMIZED
// for (int[] match : VentoFoggia.findSubstructure(query,
// AtomMatcher.forQuery(),
// BondMatcher.forQuery())
// .matchAll(atom.getContainer())
// .filter(new StereoFilter(query, atom.getContainer()))
// .filter(new ComponentGrouping(query, atom.getContainer()))) {
// if (match[0] == atom.getIndex())
// return true;
// }
for (int[] match : VentoFoggia.findSubstructure(query,
AtomMatcher.forQuery(),
BondMatcher.forQuery())
.matchAll(atom.getContainer())
.filter(new ComponentGrouping(query, atom.getContainer()))) {
if (match[0] == atom.getIndex())
return true;
}
return false;

default:
Expand Down

0 comments on commit 121ecf5

Please sign in to comment.