Question about MolSearch non-match

User f05f6b8c05

28-05-2014 23:50:08

Hi,


For attached mol files, structures seems to be the same; however, MolSearch shown below does not find them to be the same.  They are found the same if we use StandardizedMolSearch or if we set Tautomer search.  Can you clarify why MolSearch below does not find these structures the same?


We are using JChem Linux API version 5.12.4.


Thank you for any guidance.


Andrew


 


MolImporter mi = new MolImporter(f1);


        Molecule mol1 = mi.read();


        mi.close();


        MolImporter mi2 = new MolImporter(f2);


        Molecule mol2 = mi2.read();


        mi2.close();


 


        //StandardizedMolSearch s = new StandardizedMolSearch();


        MolSearch s = new MolSearch();


        MolSearchOptions so = new MolSearchOptions(SearchConstants.DUPLICATE);


        so.setQueryAbsoluteStereo(true);


        so.setChargeMatching(SearchConstants.CHARGE_MATCHING_EXACT);


        so.setDoubleBondStereoMatchingMode(StereoConstants.DBS_ALL);


        so.setImplicitHMatching(SearchConstants.IMPLICIT_H_MATCHING_ENABLED);


        so.setExactBondMatching(true);


        so.setStereoSearchType(SearchConstants.STEREO_EXACT);


        //so.setTautomerSearch(SearchConstants.TAUTOMER_SEARCH_ON);


        so.setTautomerSearch(SearchConstants.TAUTOMER_SEARCH_OFF);


        s.setSearchOptions(so);


        s.setQuery(mol2);


        s.setTarget(mol1);


        int[][] hits = null;


        hits = s.findAll();


        if (hits == null)


            System.out.println("No hits");


        else {


            System.out.println("Hit");


        }

ChemAxon 044c6721bc

29-05-2014 09:18:04


The question was moved to the appropriate forum section.


The relevant experts will respond soon.


ChemAxon d4fff15f08

29-05-2014 14:14:42

Hi Andrew,


 


We have tested this case and found that this issue was solved in version 6.1.2 (and upwards). So we would recommend you upgrading - if reasonable -, with which you would gain a lot of other bugfixes and improvements too.


Irrespectively to the above, could you help me understand what is driving you to use MolSearch and not StandardizedMolSearch. What is the use case you handle this way?


 


Thanks for your help.


Best regards,


Norbert

User f05f6b8c05

29-05-2014 14:37:50

Thank you for the fast reply! (and for redirecting to the correct section)


An example of why we prefer MolSearch approach here is to test structure that user draws.  We want to fail structure if user draws aromatic bonds instead of kekule structure.  If we use StandardizedMolSearch then we cannot distinguish if user drew kekule or aromatic (unless we also check structure separately for presence of aromatic bonds).


I will try to convince others that we should upgrade soon .. smile.


Andrew

ChemAxon 25dcd765a3

30-05-2014 11:58:34

Hi,


It is not a problem if the following two molecules does not match?


Chemically this would be very strange.


I have attached the modified test code also.


The output is


No hits

User f05f6b8c05

02-06-2014 15:30:39

That is an excellent example .. we would want those to match .. so I think on our end we should first explicitly check for aromatic bonds and then perform StandardizedMolSearch.


Thank you for the clarifying example.


Best,


Andrew