chemaxon.jchem.db.*; questions.

ChemAxon 60ee1f1328

25-10-2006 14:19:37

I would like to understand how the JChemSearch and StructureCache objects are supposed to be used (together/independently?). I see there is a nice example for JChemSearch in the documentation, but perhaps it is not clear where the associated cache actually exists and how it is updated? Is the StructureCache object associated or a separate approach to fast search?


i.e. Does JChemSearch use tomcat server similar to cartridge? If StructureCache is indpendent of JChemSearch can you provide an api example of how to maintain and search StructureCache object? If my line of enquiry seems strange, basically my question is how to best


create a structure cache independent of Oracle/tomcat and subseqently search and update this cache using Molecule objects or Smiles.





Many thanks for your help,


Daniel.

ChemAxon 9c0afc9aaf

25-10-2006 19:00:38

Hi Daniel,





Caching is implemented by JChemSearch.


In fact, the StructureCache calss is not even public API, it is used internally and automatically by JChemSearch.





Since JChem 3.1 the cache is enabled by default, in the older versions you had to turn on caching by calling





Code:
JChemSearch.setStructureCaching(true)






Since JChem 3.1.6 this method is deprecated, and it will be removed later (non-cached mode will not be available).





The cache is stored in a static pool, so it is available to every code in the same JVM, so if you want to cache a table independently, it's easiest to use an other JVM.





In short: as long as you use JChemSearch, the caching is done automatically.


Otherwise we do not provide an API to manipulate a structure cache directly.





Best regards,





Szilard

ChemAxon 60ee1f1328

26-10-2006 09:54:31

Hi Szilard,





Many thanks for your answer.


OK, so another of your colleagues has indicated to me about the


use of StandardizedMolSearch in topic below:





http://www.chemaxon.com/forum/ftopic2102.html





I am just wondering again how StandardizedMolSearch is related to JChemSearch...perhaps you might explain why I should use one over the other...how are they related / why the distinction? Perhaps StandardizedMolSearch is an option in JChemSearch?





Thanks again for your help,


Daniel.

ChemAxon 9c0afc9aaf

26-10-2006 10:00:41

Have you read the API documentation of the mentioned classes yet ? :





http://www.chemaxon.com/jchem/doc/api/





Let me know if something is not clear in the documentation.





Best regards,





Szilard

ChemAxon 60ee1f1328

26-10-2006 13:23:13

Hi Szilard,





I will try to rely more on documentation in future and bug you less...however for now, I just wanted to confirm that if I pass equivalently standardized structures into MolSearch I need not consider using Standardized MolSearch at all...i.e. StandardizedMolSearch is a hybrid of MolSearch and Standardizer class?





Many thanks,


Daniel.

ChemAxon a3d59b832c

26-10-2006 13:29:40

The main difference is that JChemSearch searches on database tables and MolSearch and StandardizedMolSerch search on Molecule objects in the memory.





JChemSearch and StandardizedMolSearch automatically does standardization, but MolSearch does not by default.

ChemAxon a3d59b832c

26-10-2006 13:31:02

inhibox wrote:
if I pass equivalently standardized structures into MolSearch I need not consider using Standardized MolSearch at all...i.e. StandardizedMolSearch is a hybrid of MolSearch and Standardizer class?
That is correct.

ChemAxon 60ee1f1328

26-10-2006 14:03:31

Finally, does the JChemSearch take place within TOMCAT context/memory?





Thanks,


Daniel.

ChemAxon 9c0afc9aaf

07-02-2007 12:30:08

Quote:
Finally, does the JChemSearch take place within TOMCAT context/memory?
I assume you are asking about the cartridge.


Yes, this takes place in the Tomcat JVM, as it's multiple times faster than Oracle' s JVM.





Best regards,





Szilard