+ isSmarts + "; isAll? " + isAll);
lastError = null;
int ret = -1;
try {
SmilesMatcher sm = new SmilesMatcher();
BitSet[] result = sm.find(pattern, smiles, isSmarts, !isAll);
if (result == null)
lastError = InvalidSmilesException.getLastError();
ret = (result == null ? -1 : result.length);
} catch (Exception e) {
e.printStackTrace();