Logo Search packages:      
Sourcecode: cdk version File versions  Download package

boolean org::openscience::cdk::isomorphism::matchers::smarts::RecursiveSmartsAtom::matches ( IAtom  atom ) [inline]

Returns true of the given atom matches this IQueryAtom.

atomIAtom to match against
true, if this IQueryAtom matches the given IAtom

Reimplemented from org::openscience::cdk::isomorphism::matchers::smarts::SMARTSAtom.

Definition at line 81 of file RecursiveSmartsAtom.java.

References atomContainer, bitSet, org::openscience::cdk::tools::LoggingTool::error(), org::openscience::cdk::interfaces::IAtomContainer::getAtom(), org::openscience::cdk::interfaces::IAtomContainer::getAtomCount(), org::openscience::cdk::interfaces::IAtomContainer::getAtomNumber(), initilizeBitSets(), and recursiveQuery.

      if (recursiveQuery.getAtomCount() == 1) { // only one atom. Then just match that atom
            return ((IQueryAtom)recursiveQuery.getAtom(0)).matches(atom);
      // Check wither atomContainer has been set
      if (atomContainer == null) {
            logger.error("In RecursiveSmartsAtom, atomContainer can't be null! You must set it before matching");
            return false;
      // initialize bitsets
      if (bitSet == null) {
            try {
            } catch (CDKException cex) {
                  logger.error("Error found when matching recursive smarts: " + cex.getMessage());
                  return false;
      int atomNumber = atomContainer.getAtomNumber(atom);
        return bitSet.get(atomNumber);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index