cdk / depict

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

Multiple SMARTS highlighting? #12

Closed schymane closed 6 years ago

schymane commented 6 years ago

I thought we'd discussed this but can't find the trace ... would it be possible to accept multiple SMARTS to highlight? I have a functional group of varying length (repeater unit) that I'd like to highlight, see e.g.: image can't capture the entire CF2 chain vs image

can capture the CF2 but not the SO2 vs image

only the SO2 ... if I could enter: S(=O)(=O)C(F)(F),C(F)(F)C(F)(F) I would be able to highlight the entire chain plus the SO2s that are only connected to CF2s, which is what I am after.

Some URLs: http://simolecule.com/cdkdepict/depict/cow/svg?smi=OCCNS(%3DO)(%3DO)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F%09FBSE&abbr=off&hdisp=bridgehead&showtitle=false&sma=S(%3DO)(%3DO)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F&zoom=1.6&annotate=none http://simolecule.com/cdkdepict/depict/cow/svg?smi=OCCNS(%3DO)(%3DO)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F%09FBSE&abbr=off&hdisp=bridgehead&showtitle=false&sma=S(%3DO)(%3DO)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F&zoom=1.6&annotate=none and smiles:

OCCNS(=O)(=O)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F  FBSE
CCNS(=O)(=O)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F   EtFOSE

Other ideas also welcome, this is just one example, thanks!

johnmay commented 6 years ago

Sorry didn't mean to close it.

johnmay commented 6 years ago

This feels a bit like feature creep, for example how many patterns is reasonable to allow? I really don't want people typing in a list of 100 patterns as it's really not the right tool for the job.

Generic highlight capabilities are available in the CDK if you want to do this, I would like to keep the depiction service as simple as possible.

schymane commented 6 years ago

yes I see what you mean, if I say 2 (which I need for this case), why not 3? If 3, why not 4 ... I agree 100 would be far too many and it would be very slow.

schymane commented 6 years ago

Or one could go for a creative workaround to capture varying chain lengths :-)

OCCNS(=O)(=O)C(F)(F)C(F)(F)F |Sg:n:7::ht| FBSE n=x

image

johnmay commented 6 years ago

I have explored this internally at NextMove, but unlikely to make it to CDK anytime soon: image