Closed PatWalters closed 1 year ago
Thanks for the feedbacks. This feature is quite new and so not fully mature yet!
Thanks for 1) and 2), those are indeed two implementation mistakes.
As for 3), it would be nice to see those two features indeed and we already thought about those but didn't get the time to implement them yet!
This is fixed in #198
Thanks for reporting the bugs but also for digging into the code and debugging those issues. This is much appreciated!
It would be great to do lasso highlighting with a grid containing multiple images.
I won't be able to tackle that short term but will open an issue so we don't forget!
It would be helpful to have a function that would accept a list of lists of atom indices to be highlighted in addition to the existing function that takes SMILES.
In the same PR as above, you can now do:
This is fantastic, thank you!
For the record: https://github.com/datamol-io/datamol/issues/199
I like the functionality of dm.viz.lasso_highlight_image, but there are a couple of things that could be improved.
1. Aromatic queries don't work.
If you try this
you'll get
This should work. I think the problem is that you're calling
before you do the matching. This converts the RDKit molecule to kekule form, then it won't match any aromatic queries. I think you could fix this by simply doing the matching before you call prepare_mol_for_drawing.
2. SMARTS don't work
If you do this
you again get
This appears to because you are are parsing the SMARTS with dm.to_mol which won't work for SMARTS.
This would work better if you did
3. A couple of requests
It would be great to do lasso highlighting with a grid containing multiple images. It would be helpful to have a function that would accept a list of lists of atom indices to be highlighted in addition to the existing function that takes SMILES.