Substructure Search on Postegresql 9

User 5aca842213

27-01-2012 15:59:55

Hello


I'm having problems in a substrucure search on postgresql 9.0. The same configuration on postgresql 8 doesn't give any problem.


I load a groups of structures usuing jcman in a database created with the following options:


* Default options + Custom standaritzation [<Aromatize ID="Aromatize" Type="general"/>]  + any structures


Some loaded structures, leave a NULL value at cd_smiles field on the database table.


When I do a search with the following code:


                       JChemSearchOptions searchOptions = new JChemSearchOptions();
                        searchOptions.setSearchType(JChemSearch.SUBSTRUCTURE);
                        searchOptions.setImplicitHMatching(SearchConstants.IMPLICIT_H_MATCHING_DISABLED);

                        JChemSearch searcher = new JChemSearch();
                        searcher.setConnectionHandler(ch);
                        searcher.setQueryStructure(molfile);    
                        searcher.setStructureTable(TABLE_NAME);
                        searcher.setRunMode(JChemSearch.RUN_MODE_ASYNCH_COMPLETE);
                        searcher.setInfoToStdError(true);
                        searcher.setSearchOptions(searchOptions);
                        searcher.setTimeout(6);
                        searcher.run();


in the log I obtain:


chemaxon.formats.MolFormatException: Cannot create record reader for the "chime" format
        at chemaxon.marvin.io.MRecordImporter.<init>(Unknown Source)
        at chemaxon.formats.MolImporter.init(Unknown Source)
        at chemaxon.formats.MolImporter.<init>(Unknown Source)
        at chemaxon.formats.MolImporter.importMol(Unknown Source)
        at chemaxon.formats.MolImporter.importMol(Unknown Source)
        at chemaxon.jchem.db.JChemSearch.retrieveBatchAndSearch(JChemSearch.java:4482)
        at chemaxon.jchem.db.JChemSearch.searchInDB(JChemSearch.java:4355)
        at chemaxon.jchem.db.JChemSearch.searchCore(JChemSearch.java:2203)
        at chemaxon.jchem.db.JChemSearch.search1(JChemSearch.java:2048)
        at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:1853)
        at chemaxon.jchem.db.JChemSearch.access$2600(JChemSearch.java:121)
        at chemaxon.jchem.db.JChemSearch$SearchThread.run(JChemSearch.java:833)
chemaxon.jchem.db.DatabaseSearchException: Error reading molecule from cd_structure.
cd_id: 24
table name: public.molecules
        at chemaxon.jchem.db.JChemSearch.retrieveBatchAndSearch(JChemSearch.java:4488)
        at chemaxon.jchem.db.JChemSearch.searchInDB(JChemSearch.java:4355)
        at chemaxon.jchem.db.JChemSearch.searchCore(JChemSearch.java:2203)
        at chemaxon.jchem.db.JChemSearch.search1(JChemSearch.java:2048)
        at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:1853)
        at chemaxon.jchem.db.JChemSearch.access$2600(JChemSearch.java:121)
        at chemaxon.jchem.db.JChemSearch$SearchThread.run(JChemSearch.java:833)
database exception null


If I eliminate the rows with cd_smiles = null, everything works fine. The same code executed with postgresql 8 works fine in spite of the null values of cd_smiles, but with postgresql 9 gives the exception printed below.


Any suggestion? JCman version : 5.4.0.1


I cannot attach the structure that produces NULLs on cd_smiles, but it's a very complicated structure, with a lot of bounds.


Thank you very much

ChemAxon a9ded07333

01-02-2012 08:42:51

Dear Joan,


In JChem 5.6 we've improved handling null values in database fields, so you may try out a newer version (we are at 5.8 now).


Have you switched to the new (version 9) PostgreSQL JDBC driver, or you
are using the version 8 one? Does your program use the driver in the
[your_JChem_directory]/lib/jdbc directory?


I have also tried to reproduce the error but I really need the sample structure(s) that caused the problem. In case of confidentiality issues please let me know personally on tcsizmazia _at_ chemaxon dot com.


Best regards,
Tamas

User 5aca842213

01-02-2012 15:49:34

Hello


Thank you for your answer.


Yes, I have replaced the driver for a newer one, but the same problem.


Anyway I'll try to update the jchem to 5.8, maybe then, the problem will be solved!


For the moment, I'll try this. If the problem is solved using a more updated version, I'll inform you.


If not, maybe I'll try to send you the structure.


Thank you.