Convert mol to smiles

User bb85658163

09-10-2015 11:26:01

I am trying to create a web page to get smiles drawn on marvin js. I have created a page kindly check


http://csircimap.in/marvin%20js/HtmlPage.html


 


Is there any php code i can use to convert the data

ChemAxon f052bdfe3c

12-10-2015 11:59:49

Hello,


As we can see there is no need for additional PHP code, just replace the input parameter of exportStructure function in your code to "smiles". It is the easiest way to get the structure as SMILES from the editor.


However, you need to install a proper JChem Webservice on your server and a valid license. Please email to your sales contact about the license issue.


Best regards,


Efi 

User 47ec854e59

08-03-2016 11:49:18

hi,


We use jboss6 server,we can't incorporate jchem webservices as we don't use tomcat or jetty that supports it.


We want  smile string entered in text box to be displayed as structure in marvin js sketcher window  when we click submit button.


how is it possible by using code ? 

ChemAxon 7c2d26e5cf

10-03-2016 15:51:55

I can recommend the following solutions, please consider which one is the best for you.


1. Setup a Tomcat or Jetty server container and deploy Marvin JS and JChem WS to there. To use Marvin JS in your JBoss application, loads Marvin JS resources from the above server container. To avoid cross-origin HTTP request issues, you can choose from the following solutions:


- Setup JBoss to proxy request via the servlet container (e.g.: mydomain<jboss port>/webservices2 -> mydomain:<tomcat port>/webservices2) to emulate whether the Tomcat would be on the same origin.


- Cross-Origin Resource Sharing (CORS) mechanism.


- Use postMessage API to provide the communication between your JS code on your host page and the remote Marvin JS scripts.


2. Write your own webservices for JBoss that fullfill the same REST API than JChem Webservices. The specification of the services are described here:


https://marvinjs-demo.chemaxon.com/latest/docs/dev/webservices.html


In your WS implementation, you can use Marvin Beans API to convert structures or you can refer JChem WS REST API.