Warning in MolSearch

User dfeb81947d

18-05-2005 10:28:02

Dear Support,





When doing MolSearch with JChem 3.0.11 I often get the following warning:
Quote:
StructureSearch.findNext(): Warning:timed out at step 10000001.
I want to check if two structure are identical:


Code:



   private boolean compare() {


      hits = null;


      MolSearch search = new MolSearch();


      search.setSubgraphSearch(false);


      search.setExactBondMatching(true);


      search.setExactChargeMatching(false);


      search.setExactIsotopeMatching(true);


      search.setExactQueryAtomMatching(true);


      search.setExactStereoMatching(true);


      search.setExactRadicalMatching(true);


      search.setQueryAbsoluteStereo(true);


      search.setStereoSearch(true);


      search.setQuery(molecule1);


      search.setTarget(molecule2);


      try {


         hits = search.findAll();


      } catch (SearchException se) {


         se.printStackTrace();


      }


   //if "hits" is not null, it means that the two molecules are identical (for my code example).


      return (hits!=null);


      


   }





what will be the result of the search if there is this warning?





thank you for your help


Kind Regards


Jacques

ChemAxon a3d59b832c

18-05-2005 11:58:59

Jacques wrote:
what will be the result of the search if there is this warning?
MolSearch will return the hits found so far. You can change or switch off the timeout limit using method setTimeOutLimit:





http://www.jchem.com/doc/api/chemaxon/sss/search/Search.html#setTimeoutLimit(int)





But please note that isMatching() is much more efficient, and I recommend to use it if you do not need the mapping between the query and target atoms.





(Explicit hydrogens cause a large combinatorial explosion, and isMatching handles this very well. On the other hand, findAll have to represent H-s explicitly and cannot avoid the combinatorial explosion.)

User dfeb81947d

18-05-2005 12:52:43

thank you so far.


Best regards





Jacques