code: public boolean matches(IAtomContainer atomContainer, boolean forceInitialization) throws CDKException {
  
          if (this.atomContainer == atomContainer) {
              if (forceInitialization) initializeMolecule();
          } else {
              this.atomContainer = atomContainer;
              initializeMolecule();
          }
  
          // lets see if we have a single atom query
          if (query.getAtomCount() == 1) {
              // lets get the query atom
              IQueryAtom queryAtom = (IQueryAtom) query.getAtom(0);
  
              mappings = new ArrayList<int[]>();
              for (int i = 0; i < atomContainer.getAtomCount(); i++) {
                  if (queryAtom.matches(atomContainer.getAtom(i))) {
                      mappings.add(new int[]{i});
                  }
              }
          } else {
              mappings = FluentIterable.from(VentoFoggia.findSubstructure(query)
                                                        .matchAll(atomContainer)
                                                        .filter(new SmartsStereoMatch(query, atomContainer)))
                                       .toList();
          }
  
          return !mappings.isEmpty();
      }
docs: Perform a SMARTS match and check whether the query is present in the target molecule.  This function simply
  checks whether the query pattern matches the specified molecule. However the function will also, internally, save
  the mapping of query atoms to the target molecule
  
  @param atomContainer       The target moleculoe
  @param forceInitialization If true, then the molecule is initialized (ring perception, aromaticity etc). If
  false, the molecule is only initialized if it is different (in terms of object
  reference) than one supplied in a previous call to this method.
  @return true if the pattern is found in the target molecule, false otherwise
  @throws CDKException if there is an error in ring, aromaticity or isomorphism perception
  @see #getMatchingAtoms()
  @see #countMatches()
  @see #matches(org.openscience.cdk.interfaces.IAtomContainer)