Problem with search filtering - chemical terms expression

User 0261d34ad7

31-10-2012 19:08:30

Hi,


I'd like to report a problem we've encountered with filtering searches using chemical terms in JChem search, version 5.7.0.


The issue is that the "match" function incorrectly causes all results to be filtered when used in combination with certain other filter terms.


In our search database, we have the structure "CCOC(=O)C(=O)CC1=CC(F)=C(Cl)N=C1Cl", and we're attempting to filter using the following expressions:









We find that the first two filters work correctly, but that the second two filters do not work. That is, we expect the SMILES to be returned but actually no results are returned. We've tested the filters using the ChemJEP java class and see "true" in every case.


We've tested using 5.7.0, and the beta for 5.7.3 but in both cases see the exactly the same behaviour.


Jim

ChemAxon 9c0afc9aaf

31-10-2012 20:46:54

Hi Mitch,


We could not reproduce the problem so far, e.g.:


 


$ ./jcman c ct

$ ./jcman a ct in.smi

$ ./jcsearch -q "C" DB:ct -e "(acceptorCount() <= 10) && match(\"[#8]C=O\")"

CCOC(=O)C(=O)CC1=CC(F)=C(Cl)N=C1Cl

$ ./jcsearch -q "C" DB:ct -e "(mass() <= 500) && (logP() <= 5) && (donorCount() <= 5) && (acceptorCount() <= 10) && match(\"[#8]C=O\")"

CCOC(=O)C(=O)CC1=CC(F)=C(Cl)N=C1Cl

 


 


Can you reproduce your case with jcsearch ?


If not, please tell us about your environment:


- What ChemAxon software do you use and how ? (API, one of our GUIs, cmdline)


- What are the other parameters of the search ?


-What are the settings for the JChem table or Cartridge index ?


Best regards,


Szilard

User 0261d34ad7

01-11-2012 07:25:46

Hi,


Thanks for the swift reply. To answer your questions:



What ChemAxon software do you use and how ? (API, one of our GUIs, cmdline)


We're using JChem search 5.7.0 via the Java interface, that is we build a chemical structure table using a class called "UpdateHandler" and we search using JChemSearch.


What are the other parameters of the search ?


I'll have to pull these out for you - it will take a little while. I'd have to check, but I believe we're setting both inclusion and exclusion lists for the search. We also see this problem with both substructure search and exact_fragment search. 


What are the settings for the JChem table or Cartridge index ?



This may also take a little time, will post shortly.


J

User 0261d34ad7

01-11-2012 11:20:52

Hi,


Please find below a code fragment that shows the options we are setting on the search. "searcher" is an instance of JChemSearch, "options" is an instance of JChemSearchOptions. 


searcher.setRunMode(JChemSearch.RUN_MODE_ASYNCH_COMPLETE);

options.setImplicitHMatching(SearchConstants.IMPLICIT_H_MATCHING_DEFAULT);
options.setTautomerSearch(SearchConstants.TAUTOMER_SEARCH_DEFAULT);
options.setDissimilarityThreshold(1.0f); 
options.setChemTermsFilter("<chem terms filter goes in here>");

searcher.setFilterIDList([1,2,3,4,5,6,7,8,9]);
searcher.setFilterIDNotList([1,3,5]);
searcher.setSearchOptions(options);

Please note that we make use of both "inclusion" and "exclusion" filter mechanisms, in addition to the chemical terms filter.


The lists of IDs shown above are just examples, in reality the inclusion list is an array of all chemical IDs minus a few "new" compounds that we wish to exclude; the exclusion list contains known bad compounds.  We have to use this approach because of another bug in filtering where exclusion lists only work in conjunction with inclusion lists - please see this topic.


J

User 0261d34ad7

01-11-2012 11:34:57

And here is the fragment of code we used to create the chemical table - I've cut out the extra column definitions and chemical terms on the assumption that they aren't significant:


final StructureTableOptions options = new StructureTableOptions();
options.name = mTable;
options.fp_numberOfInts = 32;
options.fp_numberOfOnes = 2;
options.fp_numberOfEdges = 7;

options.extraColumnDefinitions = "..."
options.standardizerConfig = null;
options.absoluteStereo = true;
options.chemTermColsConfig = ...;
options.mysqlTableType = UpdateHandler.MYSQL_FORCE_INNO_DB;
options.tableType = UpdateHandler.TABLE_TYPE_ANY_STRUCTURES;
UpdateHandler.createStructureTable(mCH, options);

ChemAxon abe887c64e

08-11-2012 11:43:06

Hi,


We could reproduce the problem with JChem 5.7.2 in 'Any' table with the your fingerprint settings (32-2-7).


We have fixed this bug in our new JChem versions, but unfortunately at the moment only two possible ways are available for getting correct results in your search combined with the given chemical terms: use the default fingerprint settings (16-2-6) in JChem 5.7, or upgrade to the last version: JChem 5.11.3. 


Krisztina

ChemAxon abe887c64e

14-11-2012 08:17:38

Hi,


I am wrting to inform you that we have released JChem 5.7.3.


https://www.chemaxon.com/download.php?d=/data/download/jchem/5.7.3/


This version handles your cases - searches combined with chemical
terms expressions in case of tables with non-default fingerprint
settings - correctly.


Kind regards,


Krisztina