Question about StandardizedMolSearch

User f05f6b8c05

27-08-2012 03:19:56

Hi,


I have two fragments (see SDF file).  They seem different to me, but the below API code considers them to be the same.  Is this expected behavior?  I don't understand why the fragments should be considered the same.


Thank you for any help.


Andrew


 


        MolImporter mi = new MolImporter(new File(in_sdf), "sdf");


        Molecule mol = null;


        while ((mol = mi.read()) !=null) {


            mol.setGUIContracted(false);


            Molecule frags[] = mol.findFrags(Molecule.class, MoleculeGraph.FRAG_KEEPING_SGROUPS);


            StandardizedMolSearch s = new StandardizedMolSearch();


            MolSearchOptions so = new MolSearchOptions(SearchConstants.FULL_FRAGMENT);


            so.setQueryAbsoluteStereo(true);


            so.setChargeMatching(SearchConstants.CHARGE_MATCHING_EXACT);


            so.setImplicitHMatching(SearchConstants.IMPLICIT_H_MATCHING_ENABLED);


            so.setDoubleBondStereoMatchingMode(StereoConstants.DBS_ALL);


            so.setExactBondMatching(true);


            so.setStereoSearchType(SearchConstants.STEREO_EXACT);


            so.setTautomerSearch(SearchConstants.TAUTOMER_SEARCH_OFF);


            s.setSearchOptions(so);


            Molecule vm = frags[1];


            s.setQuery(vm);


            Molecule un = frags[0];


            s.setTarget(un);


            int[][] hits = s.findAll();


            if (hits!=null) {


                System.out.println("found");


            } else {


                System.out.println("not found");


            }


        }


        mi.close();


 

ChemAxon 60613ab728

27-08-2012 11:07:22

Dear Andrew,


depending on the query setup, the two fragments can or can not be considered as hits.


It is important to keep in mind that among the search types, only the duplicate search considers implicit hydrogens during the search.


In other search
types - e.g. full, full fragment, etc. - , the search engine sees the molecules in aromatized
form without implicit hydrogens.


Please see my screenshot for your particular example as explanation.


In non-duplicate search types, the implicitHMatching mode option concerns only the matching of the explicit and implicit hydrogens in the query and the target, respectively. The implicitHMatching mode will only have effect if the query or target contains explicit hydrogens drawn.


http://www.chemaxon.com/jchem/doc/user/query_queryfeature_searchoptions.html#implicithmatch


For duplicate search, please find an example here:


http://www.chemaxon.com/jchem/doc/user/query_searchoptions.html#implicitHmatching_examples


The matching will also depend on the option tautomerSearch if the query contains explicite hydrogens.


http://www.chemaxon.com/jchem/doc/user/query_tautomer_searchoptions.html#tautomersearch


Please let me know if you have further questions.


Best Regards,


Miklos

User f05f6b8c05

28-08-2012 01:28:51

Thank you very much for fast and clear explanation!


Best regards,


Andrew