smi2gif

Formats a list of SMILES into an HTML document that displays a table of 2d structures with links to Thor for TDTs and to the DayCGI and RasMol for 3d structures.

Syntax

list    smi2gif(list-name)
string  list-name

Description

Format an HTML document that displays a table of 2d images. Each image has three client side image maps. The top map retrieves the Thor datatree, the middle map creates a 3d structure without hydrogen in RasMol and the third creates a 3d structure with hydrogen in RasMol. The HTML document is passed to the browser as parameter and displayed.

Example

The creation of an HTML document with a table of structures is a two step process. The first step is performed by smi_list() which makes G.smi_list, which has three fields: structure id, SMILES, and color. smi_list() also sets G.key to 25 which flags the window trigger to run the following code. This code is placed at the bottom of window trigger. Note that the final HTML document must be written to the client's cache directory and that the local browser must open it. The assignment of paths in the user's initialization file is crucial. The initialization file for a Windows thin client might look like this:

cache_dir    gui!c:\daspects\cache\  # save pdf, html & pdb files on client
path         c:\daspects\cache\     # same as cache_dir, but w/o 'gui!'
browser      c:\Program Files\NETSCAPE\Communicator\PROGRAM\netscape.exe


 list html_list;
 ...
     else if  (G.key == 25){     /* G.key set in 'structures' action    */
       if (G.smi_list)           /* g.smi_list from 'structures' action */
         {                       /* g.smi_list= struct_no,SMILES,color  */
         status(" Displaying "^^list_rows(G.smi_list)
                ^^" structure(s) in browser.");
         html_list=smi2gif(G.smi_list);  /* CONVERT SMILES TO GIFS */
         list_file(html_list,            /* write HTML_list to file*/
           G.cache_dir^^list_curr(g.smi_list,0)^^".htm","a");
         if (!list_find(G.cache_list,0,list_curr(G.smi_list,0)^^".htm"))
           list_mod(G.cache_list,1,list_curr(G.smi_list,0)^^".htm");
         winexec(G.browser^^" "           /* open HTML doc in Browser */
               ^^G.path^^list_curr(G.smi_list,0)^^".htm");
        }
       }
 ...


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999