mojaie / MolecularGraph.jl

Graph-based molecule modeling toolkit for cheminformatics
MIT License
197 stars 29 forks source link

Tidy up structure matching functions #33

Closed mojaie closed 3 years ago

mojaie commented 4 years ago

(sub)structure matching methods will be integrated and renamed.

mojaie commented 3 years ago

After consideration, structure matching methods will be as follows:

These methods return a lazy iterator that generate node mappings (or edge mappings for edgeinducedmatches).

There will be some convenient methods, hasexactmatch, hassubstructmatch, hasnodeinducedmatch, hasedgeinducedmatch that returns whether the structures have matches or not.

Here is rough correspondence between the new method and the old one is as follows. structmatches -> exactmatches isstructmatch -> hasexactmatch substructmatches -> edgeinducedmatches issubstructmatch -> hasedgeinducedmatch querymatch, fastquerymatches -> substructmatches

vf2 isomorphism detection methods in MolecularGraph.Graph are also reconstructed and renamed.

See src/substructurematch.jl and src/graph/isomorphism/vf2.jl for details.

mojaie commented 3 years ago
mojaie commented 3 years ago

Merged d551ee55a9d3403de7ca4f5a967bb8e7fa12c685