epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
317 stars 104 forks source link

bug for bingo-elastic substructure search #2544

Open jank9201 opened 1 month ago

jank9201 commented 1 month ago

@Summary it seems that bingo-elastic for substructure search is not really working

Steps to Reproduce 1.example from Substructure Search(https://lifescience.opensource.epam.com/bingo/user-manual-oracle.html

Actual behavior for example : substructuresearch searched with phenol and indexed O(Br)C1C=CC=CC=1 and phenol, only retrieved phenol

Expected behavior Retrieve O(Br)C1C=CC=CC=1 and phenol

Environment details: elasticsearch version 17.15.2 inidgo version 1.23.0

AlexanderSavelyev commented 1 month ago

could you try to aromatize input query molecule?

jank9201 commented 1 month ago

@AlexanderSavelyev thank your reply very much, I have tested with query molecule of c1ccccc1:[o] (aromatized phenol), it did not retrieve any result, at this time, and I also tested the following example (from https://lifescience.opensource.epam.com/bingo/user-manual-oracle.html#substructure-search) : substructuresearch2 , it still did not working, current exact and similarity search works. the above-mentioned example of my substructure search code is:

        String smiles= "C1CC1.C1CC1";

        IndigoRecord target = Helpers.loadFromSmiles(smiles);  

                List<IndigoRecord> substructureMatchRecords = repository.stream()
                .filter(new SubstructureMatch<>(target))
                .collect(Collectors.toList())
                .stream()
                .filter(SubstructureMatch.substructureMatchAfterChecker(target, indigo))
                .collect(Collectors.toList());

anything is wrong?