Class AtomMatcher


  • public abstract class AtomMatcher
    extends Object
    Defines compatibility checking of atoms for (subgraph)-isomorphism mapping.
    Author:
    John May
    Belongs to CDK module:
    isomorphism
    • Constructor Detail

      • AtomMatcher

        public AtomMatcher()
    • Method Detail

      • matches

        public abstract boolean matches​(IAtom atom1,
                                        IAtom atom2)
        Are the semantics of atom1 compatible with atom2.
        Parameters:
        atom1 - an atom from a query container
        atom2 - an atom from the target container
        Returns:
        the atom1 can be paired with atom2
      • forAny

        public static AtomMatcher forAny()
        Atoms are always compatible.
        Returns:
        a matcher for which all atoms match
      • forElement

        public static AtomMatcher forElement()
        Atoms are compatible if they are the same element.
        Returns:
        a matcher which checks element compatibility
      • forQuery

        public static AtomMatcher forQuery()
        Atoms are compatible if the second atom (atom2) is accepted by the IQueryAtom, atom1.
        Returns:
        a matcher which checks query atom compatibility