Java Grins is a Java based chemical editor that derives SMILES equivalents of sketched molecules and reactions and vice versa. While it attempts to follow in the lines of its predecessors, xvgrins and cgi-grins, its user interface has been completely redesigned to conform with popular chemical sketching programs. With Java Grins version 1.0 one can
As an example of how to use LiveConnect to communicate between say a CGI form and Java consider the html code which represents the JavaGrins example that comes shipped. The page basically has a CGI TextInput field and a JavaGrins applet that communicate. The CGI TextInput field is described by
In this case, while the document is invoked, it starts up and initializes
the CGI field to say
Loading JavaGrins while it loads up JavaGrins.
After completion of loading, the header function
is invoked. This is enabled by the line
<BODY BGCOLOR="#FFFFFF" onLoad="setContentsForm()">
appearing after the header. This function sets the input field to contain the value c1cccc1 in our case. On startup Grins queries and finds this value in the input field and then depicts the corresponding molecule. So if you wished JavaGrins to come up with a different molecule like say progesterone at startup, you could replace c1cccc1 in the header function with the corresponding SMILES. Try it!