User f5e6ccf034
05-08-2005 15:52:37
Subject says it all. At least in a non-cartridge scenario it is clear
that the search functionality resides outside the db, which only
holds the data. So, is there a way to use JChem w/o a db?
ChemAxon 9c0afc9aaf
05-08-2005 16:18:00
Hi,
A wide range of JChem features can be used without a database.
1. A lot of our API classes are not dependent on database:
http://www.chemaxon.com/jchem/doc/api/
2. Several programs can be used in file mode.
Please see the description of these tools in the user's guide:
http://www.chemaxon.com/jchem/doc/user/
To perform structure searches without a database use the "jcsearch" utility:
http://www.chemaxon.com/jchem/doc/user/Jcsearch.html
Please be aware that searching in files with "jcsearch" is much slower than searching in the database, so it is recommended only for relatively low number of structures.
("jcsearch" can also search in database tables, but that is still not as fast as other applications, because it's a non-persistent application, so it cannot utilize the structure cache)
Best regards,
Szilard
User f5e6ccf034
05-08-2005 20:21:18
> A lot of our API classes are not dependent on database
Yes but I was specifically asking about the search functionality. I know about jcsearch but I want to do this programmatically, not from the command line. That script calls the main method of chemaxon.jchem.search but that is an undocumented class, presumably not meant to be used externally.
ChemAxon 9c0afc9aaf
07-08-2005 11:32:53
User f5e6ccf034
07-08-2005 12:09:07
OK. That sounds very low-level, though, and like one must try one
target at a time, too, which could be inefficient (calling setTarget()
thousands of times). Can you confirm that there is no way to
import all targets at once and perform a single search?
ChemAxon a3d59b832c
08-08-2005 06:43:50
Yes, that's correct, MolSearch can only take one target at a time. However, it is designed in a way that it is not inefficient to call setTarget() thousands of times. JChemSearch and jcsearch both relies on MolSearch, calling setTarget().
You can find an example which uses MolImporter to import molecules in the API documentation of MolSearch:
http://www.chemaxon.com/jchem/doc/api/chemaxon/sss/search/MolSearch.html
If your input is in files, you can also use the main method of jcsearch (chemaxon.jchem.Search) by providing command line parameters for it.
However, you have to be aware that it may call System.exit() if an error occurs, as it was designed to be a standalone program.
All the best,
Szabolcs