Structure match
MolecularGraph.connected_mcis
— Methodconnected_mcis(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
connected_mces(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
Compute connected maximum common substructure (MCS) of mol1 and mol2.
Keyword arguments
- timeout(Real): abort calculation and return suboptimal results if the execution
time has reached the given value (default=60, in seconds).
- targetsize(Int): abort calculation and return suboptimal result so far if the
given mcs size achieved.
MolecularGraph.disconnected_mcis
— Methoddisconnected_mcis(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
disconnected_mces(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
Compute disconnected maximum common substructure (MCS) of mol1 and mol2.
Keyword arguments
- timeout(Real): abort calculation and return suboptimal results if the execution
time has reached the given value (default=60, in seconds).
- targetsize(Int): abort calculation and return suboptimal result so far if the
given mcs size achieved.
MolecularGraph.edge_substruct_matches
— Methodedge_substruct_matches(mol1, mol2; kwargs...) -> Iterator
Return a lazy iterator that generate node mappings between mol
and query
if mol
has query
as a substructure. See substruct_matches
for available options.
MolecularGraph.emaptonmap
— Methodnmap = emaptonmap(emap, mol, query)
Convert an edge-based mapping, of the form returned by edge_substruct_matches
, into a map between nodes. Commonly, nmap[i]
is a length-1 vector [j]
, where i=>j
is the mapping from nodeattr(query, i)
to nodeattr(mol, j)
. In cases where the mapping is ambiguous, nmap[i]
may be multivalued.
MolecularGraph.ematchgen
— Methodematchgen(mol1::MolGraph, mol2::MolGraph) -> Function
ematchgen(mol::MolGraph{T1,V1,E1}, qmol::MolGraph{T2,V2,E2}
) where {T1,T2,V1,V2,E1,E2<:QueryTree}
ematchgen(mol1::MolGraph{T1,V1,E1}, mol2::MolGraph{T2,V2,E2}
) where {T1,T2,V1,V2,E1<:QueryTree,E2<:QueryTree}
Return a default edge attribute matching function for graph isomorphism algorithms.
MolecularGraph.exact_matches
— Methodexact_matches(mol1, mol2; kwargs...) -> Iterator
Return a lazy iterator that generate node mappings between mol
and query
if these are exactly same. See substruct_matches
for available options.
MolecularGraph.has_edge_substruct_match
— Methodhas_edge_substruct_match(mol1, mol2; kwargs...) -> Bool
Return whether mol
has query
as a substructure. See substruct_matches
for available options.
MolecularGraph.has_exact_match
— Methodhas_exact_match(mol1, mol2; kwargs...) -> Bool
Return whether mol
and query
have exactly the same structure. See substruct_matches
for available options.
MolecularGraph.has_node_substruct_match
— Methodhas_node_substruct_match(mol1, mol2; kwargs...) -> Bool
Return whether mol
has query
as a substructure. See substruct_matches
for available options.
MolecularGraph.has_substruct_match
— Methodhas_substruct_match(mol1, mol2; kwargs...) -> Bool
Return whether mol
has query
as a substructure. See substruct_matches
for available options.
MolecularGraph.node_substruct_matches
— Methodnode_substruct_matches(mol1, mol2; kwargs...) -> Iterator
Return a lazy iterator that generate node mappings between mol
and query
if mol
has query
as a substructure. See substruct_matches
for available options.
MolecularGraph.substruct_matches
— Methodsubstruct_matches(mol1, mol2; kwargs...) -> Iterator
Return a lazy iterator that generate node mappings between mol
and query
if mol
has query
as a substructure.
options
vmatch::Function
: a function for semantic atom attribute matching (default:MolecularGraph.vmatch
)ematch::Function
: a function for semantic bond attribute matching (default:MolecularGraph.ematch
)mandatory::Dict{Int,Int}
: mandatory node mapping (or edge mapping if matchtype=:edgeinduced)forbidden::Dict{Int,Int}
: forbidden node mapping (or edge mapping if matchtype=:edgeinduced)timeout::Union{Int,Nothing}
: if specified, abort vf2 calculation when the time reached and return empty iterator (default: 10 seconds).
MolecularGraph.tdmcis
— Methodtdmcis(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
tdmces(mol1::MolGraph, mol2::MolGraph; kwargs...) -> (Dict, Symbol)
Compute disconnected MCS of mol1 and mol2 with topological constraint (td-MCS).
Keyword arguments
- diameter(Int): distance cutoff for topological constraint.
- tolerance(Int): distance mismatch tolerance for topological constraint.
- timeout(Real): abort calculation and return suboptimal results if the execution
time has reached the given value (default=60, in seconds).
- targetsize(Int): abort calculation and return suboptimal result so far if the
given mcs size achieved.
References
- Kawabata, T. (2011). Build-Up Algorithm for Atomic Correspondence between
Chemical Structures. Journal of Chemical Information and Modeling, 51(8), 1775–1787. https://doi.org/10.1021/ci2001023
- https://www.jstage.jst.go.jp/article/ciqs/2017/0/2017P4/article/-char/en
MolecularGraph.vmatchgen
— Methodvmatchgen(mol1::MolGraph, mol2::MolGraph) -> Function
vmatchgen(mol1::MolGraph{T1,V1,E1}, mol2::MolGraph{T2,V2,E2}
) where {T1,T2,V1,V2<:QueryTree,E1,E2} -> Function
vmatchgen(mol1::MolGraph{T1,V1,E1}, mol2::MolGraph{T2,V2,E2}
) where {T1,T2,V1<:QueryTree,V2<:QueryTree,E1,E2}
Return a default vertex attribute matching function for graph isomorphism algorithms.