Interface SimpleSearcher

All Known Implementing Classes:
MolSearch, RGroupDecomposition, StandardizedMolSearch

@PublicApi public interface SimpleSearcher
Search interface for different Molecule-Molecule search types.
  • Method Summary

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

    • 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.