Draw grid of compound structures.
draw_compound_grid( x, file, common_core = NULL, draw_args = NULL, url = "http://127.0.0.1:8000" )
x | A character vector of compounds, optionally named.
Assumed to be InChI. Specify descriptor explicitly or attach
pre-computed fingerprints using |
---|---|
file | Path to output file where svg of compounds will be saved. |
common_core | Optionally, a single common core structure of all compounds
used to align them for plotting. Use |
draw_args | Optional list of additional arguments to the RDKit drawing function. |
url | URL to the lspcheminf python server |
Invisibly returns character vector with svg file content.
draw_compound_grid( 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)" ), file = "test.svg", draw_args = list(molsPerRow = 6) ) draw_compound_grid( 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)" ), file = "test.svg", common_core = compounds("[H]N(C)C", descriptor = "smiles"), draw_args = list(molsPerRow = 6) )