SMILES Translator

User 2002bb2a09

10-11-2007 18:57:56

Dear Sirs,





Thanks for your great website, but I have one question if anyone can help me and send me the answer to my mail <[email protected]>.





I created a new database and developed a web page to use JME editor to draw molecule structures and covert it to SMILES format then insert it to my database.





Now I have another page for searching molecules in my database, I use the SMILES format to search the molecules, but how can I display the 2d or 3d structure after it finds the molecule. i.e. how can I translate from existing SMILES to 2d or 3d structure.





Note: I already found Marvin View Software but I don't have its source code like JME editor, so can you tell me how can I get it or there is any other program can be use for the previous purpose.





I'm looking to hear from you soon.





Thanks for your attention.





Regards,





Ahmad Klaib

ChemAxon 7c2d26e5cf

12-11-2007 13:10:56

Dear Ahmed,


First of all, Marvin is not an Open Source product. So you can not access its source code. But Marvin usage is free of charge in most cases.


Please read the following document that describes in which cases you can use Marvin without purchase.


http://www.chemaxon.com/prices.html





As I see, your real problem is that you do not know how to download and evaluate MarvinView, is it?


To be able to download any ChemAxon product, you need a forum account on ChemAxon forum.


You must have account (otherwise you could not post any comment on the forum).


Go to the ChemAxon download page and select the required product to download.


On the download page, you can get more info about downloading and evaluation.





You have not written how you would like to use Marvin (from applet, from application or you would like to integrate MarvinView component into your own application).


On the product page of Marvin, you can get more info to deside which package you need.





If you need applet, I recommend to see Marvin and JChem applet example to see how you can integrate applet into a web site:


http://www.chemaxon.com/marvin/examples/applets/


http://www.chemaxon.com/jchem/examples/index.html





If you would like to integrate Marvin into your application, I suggest to see Marvin Beans examples to see how to customize components or refer to Marvin tools (Marvin API) from Java code.


http://www.chemaxon.com/marvin/examples/

User 2002bb2a09

13-11-2007 15:05:59

Dear Tamas,





Thanks for your replying.





Actually I developed a web page using PHP, HTML and Java script.





And I have one text box includes the SMILES of the chemical structure, what I want when I click the submitt button I need to draw the SMILES structure using the Marvin.





Exactly what I want to do the same what I saw in this web page http://cactus.nci.nih.gov/services/translate/


when you write your SMILES then select 2d or 3d then it will open the Marvin and draw the structure.





please if you can help me and tell me how can I do it, I will be very thankfull for you.





Regards,





Ahmad Klaib

ChemAxon 7c2d26e5cf

13-11-2007 15:26:46

The SMILES is in a text field of a form. Submit the form and post it to the result page.


Get the posted SMILES on the result page and insert it into the proper place in the applet code:


Code:
<script language="JavaScript" src="marvin/marvin.js"></script>


<script language="JavaScript">


msketch_begin("MSketch",480,400);


msketch_param("mol","<INSERT SMILES HERE>");


msketch_end();


</script>


User 2002bb2a09

15-11-2007 20:30:42

Dear Tamas,





Thanks again for your replying.





I tried what you mentioned in the previous message, but it gives me a page with applet window and red x inside it. when I put the mouse over the applet window and click the right button it gives me "Open Java Consol" choise when I select it, it gives me this error "load: class JMSketch not found."





And the result in the stauts bar is "Loading Java Applet Faild".





I attached the two php pages, please if you can check it and give me your comments, and please can you tell me what should I do regarding to the error issue?





Thanks for your helping.





Regards,





Ahmad Klaib

ChemAxon 7c2d26e5cf

16-11-2007 21:33:41

Sorry, I've mistyped the code in my previous example.


Here is the correct one:


Code:
<script language="JavaScript" src="marvin/marvin.js"></script>


<script language="JavaScript">


msketch_name = "MSketch";


msketch_begin("marvin",480,400);


msketch_param("mol","<INSERT SMILES HERE>");


msketch_end();


</script>



where "marvin" is the location of the Marvin directory (relatively to the current web page).


I also recommend to see our online examples that demonstrate how to integrate MarvinSketch applet into web pages: MarvinSketch Applet Examples

User 2002bb2a09

19-11-2007 09:52:57

Dear Tamas,





Thanks for your advice .. now its working and I saw the examples also and its very useful.





Now I have another page for searching molecules in my database, when I


draw the molecules using the editor then it will convert to SMILES format. I use this generated SMILES format to search the existing molecules using MySQL statement.





ex: SELECT * FROM Table_Name


WHERE Existing_Smiles=Requested_SMILES





But this one will give me the exact similar SMILES, I mean the exact drawn structure.





But if I want to search sub structures, I mean just to draw part of the requested molecule and search it, it will not work even if I use LIKE condition in MySQL, because when you draw substructure the generated SMILES will be totally different from the original one.





ex: the first structure is : N=C3CCC2CCC1CCC(O)CC1C2C3


the second structure is: C1CCCCC1





Actually in the previous example when you draw the second structure its substructure of the first one, but when you use the SQL to match between them using LIKE statement it will not give you the result.





Can you help me and tell me how can I do the substructure matching using SMILES format, because when you add more elements to the drawn structure the generated SMILES will be different between complex and simple structure.





I'm looking to hear from you soon.





Thanks for your attention.





Regards,





Ahmad Klaib

ChemAxon 7c2d26e5cf

19-11-2007 10:27:03

It is rather JChem question than Marvin. Please, next time post your questions about substructure search in the JChem forum (Structure seach and Chemical database).


Anyway, I forward your question to JChem guys.

ChemAxon e274e1bada

19-11-2007 12:50:18

Dear Ahmad,





String based substructure search in Smiles represented compounds is impossible. We have a database search engine for this problem: JChem Base, I recommend to use this product for structure search.


It is a Java API, but you can use it in a web application by the help of JSP scripts.


You can find information about JChem Base: http://www.chemaxon.com/product/jc_base.html


Here is a simple on-line JSP example: http://www.chemaxon.com/jchem/examples/simple_db_search/index.jsp


This example available downloadable JChem Base package, feel free to improve or modify it.





Moreover we are in a development of web service support for JChem Base, what will allow to use it from other programming languages. (e.g. PHP)





Regards, Edvard

User 2002bb2a09

20-11-2007 15:48:03

Dear Edvard,





Thanks for your efforts.





Actualluy I have a database with name newdb and table with name newdb and column with name SMILES where I stored the SMILES format for my structures.





I have a php page with text field, the user enter the SMILES in this text field then I searched in mysql database.





I want to do do substructure searching, can I use the JChem to search in my database or not, if yes how can I do it beacuse when I searched I only found JSP and ASP code and what I used now is php,html and Java script.





I'm looking to hear from you soon.





Thanks.





Regards,





Ahmad Klaib

ChemAxon e274e1bada

20-11-2007 16:41:59

Dear Ahmad,





Unfortunately you cannot use JChem Base in your webapp without JSP at the moment, but you can improve your php site with a simple JSP interface for JChem (see our simple JSP example I linked above). JSP is also a script language, and is not more difficult than PHP.





We are in a development of a web service support for JChem, and it will allow to access JChem from PHP. We are planning to release it in first quoter of next year





Regards,


Edvard

User 2002bb2a09

14-12-2007 18:09:27

Dear Tamas,





The following code will draw the two dimention structure (2d) for the SMILES, I want to know if its possible to draw the 3d structure, if yes please let me know how can I do that.





<script language="JavaScript" src="marvin/marvin.js"></script>


<script language="JavaScript">


msketch_name = "MSketch";


msketch_begin("marvin",480,400);


msketch_param("mol","<INSERT SMILES HERE>");


msketch_end();


</script>






Thanks,





Regards,





Ahmad Klaib

ChemAxon 7c2d26e5cf

18-12-2007 09:58:26

In MarvinSketch, you can clean the drawn structure in 3D through "Edit/Clean 3D" menu, but you can not do it automatically by loading.


Cleaning into 3D by loading works only in MarvinView.


Code:
mview_begin("marvin",300,300);


mview_param("importConv","c");


mview_param("cleanDim","3");


mview_param("mol","<SMILES HERE>");


mview_end();

ChemAxon 7c2d26e5cf

03-01-2008 21:19:55

3D autoclean in the MarvinSketch applet will work in Marvin 5.0.


Code:
msketch_begin("marvin",300,300);


msketch_param("importConv","c");


msketch_param("cleanDim","3");


msketch_param("mol","<SMILES HERE>");


msketch_end();