private static BaseMapping runSubstructure( IAtomContainer query, IAtomContainer target, int filter, boolean matchBonds, boolean matchRings, boolean matchAtomTypes) throws CDKException { // XXX - if clean and configure is 'true', is that not duplicate configuring? BaseMapping smsd = new Substructure(query, target, matchBonds, matchRings, matchAtomTypes, true); if (smsd.isSubgraph()) { if (filter == 0) { smsd.setChemFilters(false, false, false); } if (filter == 1) { smsd.setChemFilters(true, false, false); } if (filter == 2) { smsd.setChemFilters(true, true, false); } if (filter == 3) { smsd.setChemFilters(true, true, true); } } return smsd; }