User e34a92cce5
21-10-2011 15:51:27
Hi,
I am using PHP + JChemWebServices (5.5) to import structures using importStructures from the DataManipulationWS soap service. The way I do is is to first import structures into a temp table that has been defined in my jchemproperties. After a bunch of verification, I import the 'good' structures into the main compounds table using a simple insert into compounds select * from temp_table. However that does not update the cached structures. While it is not recommended to use the insert statement to update the calculated properties and fingerprints, I am just using what Chemaxon has calculated from the temp table to populate the production table. Is there a way to get around this or do I have to do another export/import from the temp table into the production?
Thanks
User c1ce6b3d19
22-10-2011 15:52:10
Renju,
I'm not sure I understand fully. Are you using the DataManipulationWS soap service to import into a temp JChem table or are you manually inserting compounds into a plain database table?
After you have structures in a temp table, are you using a SQL insert command to put them into a JChem table? This is not recommended and will cause problems as you stated.
Generally, I would suggest using the normal JC Manager or JC Web Services directly to enter and manipulate structures in JChem tables.
Jon
User e34a92cce5
24-10-2011 19:40:52
Well, I am doing both - one after the other. I am first importing into a temp table that has been defined in the jchemproperties table (using the importStructures method). I do some filtering and scrubbing and eventually import the good compounds into a production compounds table (that has also been defined in jchemproperties) by issuing a simple sql command. I was just wondering if I could write an update statement on the jchemproperties table that would delete the cached structures on the production compounds when the web services loads up the next time. That way I was assuming that the newly imported structures will be available for searching against the production compounds table.
User c1ce6b3d19
26-10-2011 12:03:40
Renju,
Manipulating the underlying jchem database tables through channels other than with the Jchem tools (e.g. jcman, JCWS, JChem API), will cause issues such as those you mentioned. Specifically, if you circumvent the tool by importing compounds from one database table to another directly with simple sql commands, the JChem cache mechanism will not be able to handle the changes in state.
My suggestion would be to import the good, "scrubbed" molecules again through appropriate JChem tools into the Production compound tables. (This may require an export, if you have you have changed the molecule you originally inserted. Otherwise you can import the originals) The tools will then activate the cache mechanism and make available the new compounds for searching.
In Web Services, you can use the importStructures method again. Using JChem Manager GUI, use the Import function. With the jcman command line you can use the "a" option.
I moved this to a more suitable topic area as I believe the issue is with the underlying database tables. Please let me know if I've misunderstood your problems.
Jon
User e34a92cce5
26-10-2011 14:49:03
Thanks, Jon. I think you have addressed the issue rightly. I was just hoping to avoid that extra export-import step by manipuating the cache timestamp and it looks like it is a complete no-no.