Interface SimpleSearcher

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addMatch​(int queryAtom, int targetAtom)
      Adds a fixed matching between the given query and target atoms.
      SearchHit findNextHit()
      Searches for the next hit.
      boolean isMatching()
      Determines if there is a matching between the specified query and target.
      void setQuery​(Molecule query)
      Sets the query structure of the searcher.
      void setQuery​(Molecule query, int[] excludedAtoms)
      Sets the query structure of the searcher with excluded atoms.
      void setTarget​(Molecule target)
      Sets the target structure of the searcher.
      void setTarget​(Molecule target, int[] excludedTargetAtoms)
      Sets the target structure of the searcher with excluded atoms.
    • Method Detail

      • setQuery

        void setQuery​(Molecule query)
        Sets the query structure of the searcher.

        Note: If the molecule is changed, it will need to be reset for the searcher.

        Parameters:
        query - the query structure
      • setQuery

        void setQuery​(Molecule query,
                      int[] excludedAtoms)
        Sets the query structure of the searcher with excluded atoms. Excluded atoms are not used during the search procedure. Atoms connected to excluded ones keep their stereo features.

        Note: If the molecule is changed, it will need to be reset for the searcher.

        Parameters:
        query - the query structure
        excludedAtoms - atoms excluded from search
      • setTarget

        void setTarget​(Molecule target)
        Sets the target structure of the searcher.

        Note: If the molecule is changed, it will need to be reset for the searcher.

        Parameters:
        target - the target structure
      • setTarget

        void setTarget​(Molecule target,
                       int[] excludedTargetAtoms)
        Sets the target structure of the searcher with excluded atoms. Excluded atoms are not used during the search procedure. Atoms connected to excluded ones keep their stereo features.

        Note: If the molecule is changed, it will need to be reset for the searcher.

        Parameters:
        target - the target structure
        excludedTargetAtoms - atoms excluded from search
      • addMatch

        void addMatch​(int queryAtom,
                      int targetAtom)
        Adds a fixed matching between the given query and target atoms. That is, the query atom can only match the given target atom. If such a hit is not possible, no hits will be returned. The use of this method makes the search more effective than checking the hits afterwards.
        Parameters:
        queryAtom - index of the query atom
        targetAtom - index of the target atom
      • findNextHit

        SearchHit findNextHit()
                       throws SearchException
        Searches for the next hit.
        Returns:
        the next search hit or null if there is no more hit
        Throws:
        SearchException - in case some error is encountered.
      • isMatching

        boolean isMatching()
                    throws SearchException
        Determines if there is a matching between the specified query and target.
        Returns:
        true if there is matching, false if not.
        Throws:
        SearchException - in case some error is encountered.