From: <cla...@ya...> - 2005-12-29 17:20:10
|
Dear Stefan Thank you very much. I have looked at the files and I have found some code that I will try to implement (parts of) tomorrow. Some further comments below: >>if you need detailed explanations on code, please ask. that surely might be the case later - thank you >>In NMRShiftDB their names start with DB, so there is a >>DBMoleculeobject representing the molecule table. thats why I couldn't find the sql addressing the molecule table! SubmitingData found it - there are a lot I can get inspiration from/ or reuse >>It then checks for duplicates via SMILES, returns the Ok, that makes the sql a lot easier than the fingerprints. Is that good enough to use smiles for duplicate checking? are you aure to find them all? >When loading, you get a DBMolecule in some way and do a >getAsCDKMolecule on it, which reads atom, bond etc. into a cdk >molecule and returns this. Ok, that is of cause not possible when we don't use a OR-mapper but if we just stick to a molecule table (and don't split it into atoms etc) we can easily get the molecule back from the database and read it into a an object and display that to the user. Searches: the exact/similarity/substructure search is done in GeneralUtils.executeSearch This method does all searches, so it looks complicated. found it. yes a bit complicated but I think I found the relevant parts. >>It uses SMILES and simple sql for exact searches, fingerprints and a >>UDF for similarity search and performs an isomorphism check (via >>cdk objects/methods) for exact substructure search. yes this is going to become the tricky part I hope this makes things clear. A lot thank you. NMRShiftDB really contains code for maintining a structure database. The code is also used on http://www.chemistry-development-kit.org/ for the database, but no serches are implemented here. This uses a torque library a bit newer the nmrshiftdb.org and does not have the spectrum part. It could easily be extended with some search code from nmrshiftdb to form a structure database library. If you think this code could be helpfull, please let me now and we should start to extend the cdkweb code with searches. Absolutely! A lot of us working with chemical information (and not in a computational chemistry setting) simply need to store data in a database for everyone else to query. Our user base do not understand much about code, databases etc so they want and easy interface and then quick answers! So I think an extention of the cdkweb would help others in similar situations like me. Of cause I would be most happy to see you implement insert/search code without the Torque - part as we don't use that ;-) But in general we try to keep all implementations as simple as possible as we have a lot we need to keep running. On the other hand you might be able to convince me that we also need to start mapping the database. Again thank you very much for your help so far Cheers claus |