Color all substructure hits

User 25a86f2b53

04-05-2015 21:17:02

Hi,


Given a substructure query molecule and a target molecule, is there anyway to color all instances of the query molecule in the target molecule?


HitDisplayTool and HitDisplayUtils both seem to color only a single instance of the found substructure.


If not, is there any way to get all the hit bonds? Something like MolHandler.getNonHitBonds()?


Using JChem 6.1.0.


Regards,


Tyler

ChemAxon abe887c64e

05-05-2015 11:59:58

Hi Tyler,


Do we correctly understand that you would like to have all the colored substructure hit instances displayed within one target structure? If yes, unfortunately we do not have an already implemented solution, however, we can help you to create an appropriate code snippet.


Krisztina

User 25a86f2b53

05-05-2015 13:40:26

Hi Krisztina,


Yes, that is what I would like to achieve. 


Tyler

ChemAxon abe887c64e

11-05-2015 08:49:22

Hi Tyler,


We are asking for your further patience; hopefully, this week we can send you the code.


Krisztina

ChemAxon a9ded07333

13-05-2015 15:09:00

Hi Tyler,


I've attached a sample code, how to color all the possible hits in the target. This simple program is not guaranteed to work with complex structures, e.g. those that contain link nodes, r-groups, s-groups, ...


In the main() method you can find some test cases.


Best regards,
Tamás