Find targets whose substructure matches with a query.

match_substructure(
  query,
  target = NULL,
  substructure_args = NULL,
  url = "http://127.0.0.1:8000"
)

Arguments

query

A character vector of query compounds or fragments, optionally named. Assumed to be InChI. Specify descriptor explicitly using compounds(). Their structure will be compared to the substructure of the target compounds.

target

A character vector of compounds like query. If not given, The substructure of targets will be scanned for matches with the query structures. If not given, the all pairwise combinations between query compounds are scanned for matches.

substructure_args

Optional additional arguments passed to RDKit substructure matching function. See http://www.rdkit.org/docs/source/rdkit.Chem.rdchem.html#rdkit.Chem.rdchem.Mol.GetSubstructMatches

url

URL to the lspcheminf python server

Value

A tibble with three columns, containing names of query and target compounds and the atom indices of substructre matches. If no match is found the query target combination is not included.

Examples

match_substructure( compounds( c("secondary_amine" = "[H]N(C)C"), descriptor = "smiles" ), c( "tofacitnib" = "InChI=1S/C16H20N6O/c1-11-5-8-22(14(23)3-6-17)9-13(11)21(2)16-12-4-7-18-15(12)19-10-20-16/h4,7,10-11,13H,3,5,8-9H2,1-2H3,(H,18,19,20)/t11-,13+/m1/s1", "aspirin" = "InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)" ) )
#> # A tibble: 1 x 3 #> match query target #> <list> <chr> <chr> #> 1 <list [6]> secondary_amine tofacitnib