cdk / depict

SMILES Depiction Generator
GNU Lesser General Public License v2.1
54 stars 14 forks source link

depict 1H-imidazole #60

Closed dgcovell closed 1 year ago

dgcovell commented 1 year ago

Am trying to highlight an imidazole fragment on a parent compound. Tried a number of variations on the imidazole SMILES without success. Past github requests of this issue have disappeared?? Following code will not highlight imidazole? Can anyone help??

tmp_smi [1] "CC(n1c(C)ncc1c1ccnc(n1)Nc1ccc(cc1)S(=O)(=O)C)C" tmp_label [1] "CMGC:CDC2:6gu3:A:FB8" pen <- parse_smiles(paste(tmp_smi, tmp_label,sep=" ")) atms <- pen$atoms() bnds <- pen$bonds() tmp_frag <- 'c1cnc[nH]1' #1H-imidazole cav <- parse.smiles(tmp_frag) lactam <- match_smarts(tmp_frag, pen) depiction() %>% highlight_atoms(atms, color$LIGHT_GRAY) %>% highlight_atoms(bnds, color$LIGHT_GRAY) %>% highlight_atoms(lactam, color$GREEN) %>% set_size(1400, 1400) %>% set_zoom(4) %>% outerglow() %>%

add_title() %>%

depict(pen) %>% get_image() %>% grid::grid.raster()

johnmay commented 1 year ago

How are you accessing this? I don’t provide any of those API points.

Mainly curious.

The web API (I have not idea what api you are using) expects a SMARTS and not a SMILES. There is a subtle difference but you’ve queried for a nitrogen with a hydrogen attached but there are none.

“c1ncnc1” Or “c1nc[nX3]c1”

johnmay commented 1 year ago

Past github requests of this issue have disappeared??

I think you might have the wrong project? We’ve not deleted any

johnmay commented 1 year ago

Closing - not CDK depict related, please provide more info if think this is incorrect