public void setSmarts(String smarts) throws SMARTSException { joeSmartsPatern = null; joeSmartsPatern = new JOESmartsPattern(); if (!joeSmartsPatern.init(smarts)) throw new SMARTSException("Invalid SMARTS pattern " + smarts); this.smarts = smarts; }
public String getImplementationDetails() { if (joeSmartsPatern == null) return "Joelib SMARTS"; else return joeSmartsPatern.getClass().getName(); }
public int hasSMARTSPattern(JOEMol mol) throws SMARTSException { if (joeSmartsPatern == null) throw new SMARTSException("Undefined SMARTS pattern"); joeSmartsPatern.match(mol); return joeSmartsPatern.numMatches(); }