create JChem table without jcman

ChemAxon 60ee1f1328

18-04-2006 09:37:38

Hello again,





I would like to create a JChem table without using jcman tool.





I intend to do this as a java stored procedure but first I have a few questions about the API.





1. I know I should use UpdateHandler.CreateStructureTable to complete the above but it is not clear to me how some of the parameters in the call match the following options in the GUI:





API call:


NumberOfInts


NumberOfOnes


NumberOfEdges


GUI options:


Fingerprint length


bits to be set for pattern


Max pattern length





Please can you tell me which matches which? (Maybe they don't?)





2. chemaxon.jchem.db.DatabaseProperties





Which operations are usually completed when a jchem table is created, I want to make sure I add/complete the same information to JChemProperties!?





3. I would also like to be able to load the tomcat cache for a table from java call? I'm not sure which API to start to look in on this one - please advise where to start.





Thanks for your comments,





Daniel.

ChemAxon aa7c50abf8

18-04-2006 10:48:50

Hi Daniel,
Quote:



how some of the parameters in the call match the following options in the GUI:





API call:


NumberOfInts


NumberOfOnes


NumberOfEdges


GUI options:


Fingerprint length


bits to be set for pattern


Max pattern length
GUI options map to the API calls as follows:


Fingerprint length: NumberOfInts * 32


bits to be set for pattern: NumberOfOnes


Max pattern length: NumberOfEdges
Quote:
Which operations are usually completed when a jchem table is created, I want to make sure I add/complete the same information to JChemProperties!?
Code:
ConnectionHandler conh= new ConnectionHandler();


conh.setPropertyTable(jchemPropertiesTableName);


conh.setConnection(RuntimeContext.getRuntime().getDefaultConnection());


if(!DatabaseProperties.propertyTableExists(conh)) {


    DatabaseProperties.createPropertyTable(conh);


}


UpdateHandler.createStructureTable(


                    conh,


                    tableName,


                    NumberOfInts,


                    NumberOfOnes,


                    NumberOfEdges,


                    coldefs,


                    standardizerConfig, absoluteStereo);


conh.getConnection().commit();



UpdateHandler.createStructureTable will record the necessary data in the jchemproperties table.
Quote:
I would also like to be able to load the tomcat cache for a table from java call? I'm not sure which API to start to look in on this one - please advise where to start.
There is no direct API call for doing this. I suggest to simply perform a substructure search on the desired table with a query structure that you trust to be completely dissimilar to the target structures in the table. Using such a query structure, the structure cache will be loaded with almost no overhead.





Peter

ChemAxon 60ee1f1328

18-04-2006 10:51:51

Thanks Peter, that is most helpful as usual...





Cheers,


Daniel.

ChemAxon 60ee1f1328

18-04-2006 11:09:34

Just a couple more questions...





coldefs presumably means any additional column definitions for table? (fine)





standardizerConfig presumably this is a reference including path to the standardizer.xml file. I would like to make sure this is the same that is used with the jcman tool...does the jcman tool have an associated standardizer.xml file and where does this usually live please. What happens if I submit this parameter as null?





Cheers,


Daniel.

ChemAxon aa7c50abf8

18-04-2006 13:56:36

Quote:
coldefs presumably means any additional column definitions for table? (fine)
Yes.
Quote:
standardizerConfig presumably this is a reference including path to the standardizer.xml file.
No. This is the standardizer configuration itself either in XML- or ActionString-format (http://www.chemaxon.com/jchem/doc/user/StandardizerConfiguration.html).
Quote:
I would like to make sure this is the same that is used with the jcman tool...does the jcman tool have an associated standardizer.xml file and where does this usually live please.
The tool uses a built-in default standardizer configuration (aromatize and strip hydrogenes) unless you explicitly tell it to use one.
Quote:
What happens if I submit this parameter as null?
The built-in default standardizer configuration is used.





Cheers,


Peter

ChemAxon aa7c50abf8

19-04-2006 19:02:34

SQL stored procedures/functions for creating, dropping and listing JChem tables will be available in a new package called jchem_table_pkg in JChem 3.2.





Peter