MDL's Enhanced Stereochemical Representation

User 0908c5ccdd

05-09-2007 16:36:25

Our chemists are using Accord for Excel (v6.1) as a front end to a registration system written around the ChemAxon Chemistry Cartridge. Currently the registration macro uses SMILES strings to register new compounds. However we have found that this is not sufficient to deal with the stereochemistry requirements.





Specifically, I'd like to introduce MDL's Enhanced Stereochemical Representation since the chemists use ISIS/Draw to create their structures. This is detailed in a well-written white paper linked below:





www.mdl.com/solutions/white_papers/stereochemistry-white-paper.jsp





I wondered if somebody at ChemAxon could answer my questions on this subject:





1) Does the ChemAxon Chemistry Cartridge fully support MDL's us of ABS, OR and AND enhanced stereochemistry groups? Is it possible to view these stereochemistry groups using a ChemAxon structure renderer?





2) I will no longer be able to send a SMILES string from Accord for Excel to the database for registration. Does the ChemAxon cartidge accept v3000 Mol files? Is it possible to read a mol file from a file server, rather than directly pass as a string to the INSERT command when registering a new compound to the database?





3) Is there a suitable way of displaying ChemAxon structures in a web page created using ASP.NET v2.0? Is it possible to use a Marvin plug-in to do this?





Many thanks in advance.

ChemAxon aa7c50abf8

05-09-2007 18:05:01

Quote:
1) Does the ChemAxon Chemistry Cartridge fully support MDL's us of ABS, OR and AND enhanced stereochemistry groups? Is it possible to view these stereochemistry groups using a ChemAxon structure renderer?
Yes and yes. Please, see http://www.chemaxon.com/jchem/doc/user/Query.html#mdl_enhanced_stereo .
Quote:
Does the ChemAxon cartidge accept v3000 Mol files?
Yes.
Quote:
Is it possible to read a mol file from a file server, rather than directly pass as a string to the INSERT command when registering a new compound to the database?
You can use the jcman tool to read and import files into JChem structure tables. With regular structure tables, you currently have to implement this functionality yourself.
Quote:
3) Is there a suitable way of displaying ChemAxon structures in a web page created using ASP.NET v2.0? Is it possible to use a Marvin plug-in to do this?
Yes, you can use Marvin applets to do this with ASP.NET. There is a sample ASP application in the examples\cartridge\asp directory of the JChem package, which demonstrates how to integrate Marvin applets with JChem Cartridge.





(The limitations of VB-Script as well as the limitations of the database driver available with VB-Script necessitated a number of complex workarounds in the database connectivity part of the sample ASP application. A "modern" ASP.NET version with the same functionality would probably be significantly simpler. Still, the Marvin integration points used with ASP are basically identical with what you will need with an ASP.NET application.)





Thanks


Peter

User 0908c5ccdd

18-09-2007 15:10:21

pkovacs wrote:



Yes, you can use Marvin applets to do this with ASP.NET. There is a sample ASP application in the examples\cartridge\asp directory of the JChem package, which demonstrates how to integrate Marvin applets with JChem Cartridge.





Thanks


Peter
Thanks Peter





I have successfully added the Marvin viewer to my ASP.NET page and I can load and view a simple mol file loaded locally. The problem comes when I try to represent the molecule I want to display as the mol file (or SMILES string) is coming from the database. This means that I have the mol file string (or SMILES string) as a variable in ASP.NET server-side code. I wondered if anybody at ChemAxon, or any other users who view the forum, had any experience of how I can get an ASP.NET server-side variable such as this one populated from a SQL statement in a DataView:





Code:
Dim sSMILES As String


sSMILES = FoundDataView(0)("CD_SMILES").ToString()






into the JavaScript below, need the literal marked 'c1ccccc1' accept the SMILES string from the variable in ASP.NET:





Code:
<div>


<script language= "Javascript1.1" src="Marvin/marvin.js"></script>


<script language="Javascript1.1">


    <!--


     mview_begin("Marvin/", 200, 200);


     mview_param("mol", 'c1ccccc1')


     mview_param("background", "#F5F5FF");


     mview_end();


     !-->


 </script>


 </div>






I'm stuck!

ChemAxon aa7c50abf8

18-09-2007 15:54:43

Have you tried something like:





Code:
<div>


<script language= "Javascript1.1" src="Marvin/marvin.js"></script>


<script language="Javascript1.1">


    <!--


     mview_begin("Marvin/", 200, 200);


     mview_param("mol", "<%= convertForJavaScript(sSMILES) %>")


     mview_param("background", "#F5F5FF");


     mview_end();


     !-->


 </script>


 </div>





where the definition of convertForJavaScript is:





Code:
' Converts a string into a form which can be displayed on


' an HTML page for use by a JavaScript method. This function


' is more specifically used to process a structure string so


' that it can be passed to the Marvin Viewer and Marvin Sketcher


' via JavaScript.


Function convertForJavaScript(t)


   If (Not IsNull(t)) Then


      t=Replace(t,"\","\\")      ' replace \ with \\


      t=Replace(t,vbCrLf,"\n")   ' replace CrLf with \n


      t=Replace(t,vbCr,"\n")      ' replace single Cr with \n


      t=Replace(t,vbLf,"\n")      ' replace single Lf with \n


      t=Replace(t,"""","\""")      ' replace " with \"


      t=Replace(t,"'","\'")      ' replace ' with \'


      convertForJavaScript = t


   End If


End Function



?

User 0908c5ccdd

18-09-2007 16:27:25

Fantastic - that works, many thanks.


Just need to adapt it to my pages now.

ChemAxon aa7c50abf8

18-09-2007 16:42:51

If you need to display more than just half a dozen molecules on one page, I suggest to take a look at the searchresults.asp page which demonstrates how to display multiple molecules in a grid using one single Marvin View applet. It is pretty complicated, but having many Marvin View applets on the same page is rather inefficient.





I also suggest to ask presentation-related questions on the "Structure editing, viewing and file formats" section of this Forum (http://www.chemaxon.com/forum/forum5.html).





Thanks


Peter