-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance of common substructure/maximalcliques #50
Comments
I'm not sure but MolecularGraph.jl/src/graph/product.jl Lines 24 to 30 in be43e65
|
It's not the |
I'm sorry, I didn't get your point.
Here is a minimum sample code that returns modular product graph for using MolecularGraph
using MolecularGraph.Graph
function modprod(G, H)
lg = linegraph(G)
lh = linegraph(H)
am = MolecularGraph.atommatch(G, H)
bm = MolecularGraph.bondmatch(G, H)
ematch = MolecularGraph.Graph.lgedgematcher(lg, lh, am)
nmatch = MolecularGraph.Graph.lgnodematcher(lg, lh, am, bm)
eflt = MolecularGraph.Graph.modprodedgefilter(lg, lh, ematch)
return modularproduct(lg, lh, nodematcher=nmatch, edgefilter=eflt)
end # Tutorial example
ldopa = smilestomol("O=C(O)[C@@H](N)Cc1cc(O)c(O)cc1")
ac = smilestomol("C1=CC=C2C(=C1)C=C(C(=O)O2)N")
prod = modprod(ldopa, ac)
println(nodecount(prod))
println(edgecount(prod))
# Your example
mol2 = smilestomol("C1C2C(CCC1)CCC2")
mol3 = smilestomol("C1C3C(C2C(C1)CCCC2)CCC3")
prod = modprod(mol2, mol3)
println(nodecount(prod))
println(edgecount(prod))
Descriptor matching functions Dealing with uniform molecule is a difficult problem. You can use |
At the version 0.14,
I have tried several times with some graphs and it seems that
The computation time for MCS may have slightly improved. This mainly depends on the computational performance of the modular product generation mentioned above, and still there may be a room for optimization. |
I have some not-huge molecules (a little bigger than the ones in this demo), and
mcismol
/mcesmol
are taking more runtime than I care to allow to finish. Here's a demo that illustrates the problem:even after first warmup. Profiling shows that essentially all the runtime is in
MolecularGraph.jl/src/graph/clique.jl
Lines 83 to 111 in be43e65
In contrast, if I convert this to a LightGraphs
SimpleGraph
:then
I'm far from certain that these are doing the same thing, but if they're even close it's a pretty big difference.
The text was updated successfully, but these errors were encountered: