Php code for sub structural search using marvin sketch

User 1b64124363

28-03-2012 12:27:47

Hello Sir


I am using developing my own web interface for sub structural search.in PHP using marvin sketch but i am not gtng the accurate results as i am using the mysql query


$query = sprintf("SELECT * FROM mcd_compounds_code WHERE cd_smiles LIKE '%%%s%%' OR cd_smiles LIKE '%%%s%%'",$MolTxt,strrev($MolTxt));


 


Plz check my queryits very urgent


Monica

ChemAxon 7c2d26e5cf

30-03-2012 08:18:01

Please attach the text result that PHP generated.


Probably, the molecule string is not proper that you feed with the SQL statement.

User 1b64124363

30-03-2012 08:59:27

Thanx for your reply sir


 


I am attaching the page where i have generated the results through this query

ChemAxon 5433b8e56b

30-03-2012 11:15:17

Hi,


as i see your query will match every structure that have the molTxt in its smiles representation, or the reverse molTxt in its smiles representation.


In the document you have attached, i see two structures that both contains a benzene ring, so both structure are and should be in the result.


I want to notify you also about that the reversion of a smiles is and usually are not corrent, e.g.: if your structure contans a Cl atom, its reversion will have lC inside the smiles, that is not a chemical atom or compound, besides this the reversion can also cause problems by the representation of rings.


Can you provide more specific data to see what is your exact issue?


Regards,
Istvan

User 1b64124363

30-03-2012 11:21:18

Hi


actually i want to do sub structural search using PHP, so i used to do search by smiles...but i am unable to get acccurate results..


Now i want to do search using fingerprints....but i dont know how to generate fingerprints for query structure(input by user) using marvin sketch


 


plz  help

ChemAxon 5433b8e56b

30-03-2012 11:41:55

In this case i can suggest to use JChem web services on the server side, and search the database with the help of a web service, in this case you will need only the structure, and Jchem will do all the search related database handling, with all the performance optimization we did before.


You can find information and examples on our JChem web services product page.