Sunday, March 07, 2010 8:01:31 AM
Just read this article: http://theplateisbad.blogspot.com/2010/02/this-article-about-idea-of.html, which demonstrates a great idea to use javascript in client browsers as computing resource.
Wednesday, March 03, 2010 7:47:41 PM
One customer has a very interesting user case: he has a SDF file cotaining hundreds structures, and he just want to display the hitted structure by a substructure. We think this could be very useful for others. So here is sample code how you can achieve this:
|
<script type="text/javascript"> var molfile = "... molfile of the substructure query ..."; function filter(molfile, attributes) { if (/* meet my criteria */) return true; // display this record return false; // don't display this record } JsSDF.init("data/sdf4.sdf.txt", { searchable: true, highlight: molfile, filter: filter }, 'div'); </script>
|
Here is the actual display: http://www.chemene.com:8080/ccd/jsdraw/SDFList_filter.htm
Here two important parameters are specified:
- highlight is a molfile used to highlight the substructure in red
- filter is a function used to determine if records will be displayed
For more information about JsSDF, please refer to http://www.chemene.com:8080/ccd/jsdraw/
Thursday, February 25, 2010 11:32:38 PM
One year ago, my impression about Javascript is it is a very simple, and casual language. I say it is casual, because thought it couldn't do anything formal. After my recent work with JSDraw/JsSDF, this impression is totally changed.
With today's browsers, it can do a lot of complicated works that usually only Python, or even C++ and Java, can do. Here are some big implementations using Javascript:
- JSDraw implements substructure search in javascript (demo)
- Gordon implements Flash runtime in javascript (demo)
- qb.js implements QBASIC in javascript (demo)
- Another World JS is totally built on javascript (link), and another javascript game (link)
There are many many more I cannot list them all. But it is good enough to demonstrate you what you can do with javascript.
People may ask why javascript. There is a lot power languages. For me the reason is portability. Can you find any other language that can run on all platforms, including Windows, Mac, Linux, Android, Chrome OS, iPhone(iPad)? Java ... no ... at least it is not supported on Android, Chrome OS and iPhone(iPad). That is the key thing that I love Javascript now.
Wednesday, February 24, 2010 7:20:15 PM
Today my colleage showed me OrganicPad (http://www.clemson.edu/organicpad/). The current version 0.5 looks very interesting, but there is still a lot space to improve.
I remember Egon Willighagen has summerized OCR programs in his BLOG (http://chem-bla-ics.blogspot.com/2007/07/optical-chemical-structure-recognition.html). I tried OSRA last year. The results still needs some improvements.
The reason I am so interested in this is OCR is the key module for a mobile device, such as iPhone, gPhone, and iPad. On such devices, what chemists needs is a free-hand drawing program. There is no toolbar, no menu, just a white box, like a piece of paper. Users can draw structures like drawing on paper. The program can automatically recognize it, clean it up, and show nice 2D pictures.
Tuesday, February 23, 2010 10:31:22 PM
ChemJuice by IDBS - chemical structure editor
ChemMobi by Symyx - connected to Symyx Discovery Gate and ChemSpider
MolPad (http://ynformatics.com/), an Android application
Pocket HyperChem (http://www.cyberchem.com/phc.htm) - 3D visualization and calculation, running on Window Mobile

Molecules (http://www.sunsetlakesoftware.com/molecules) - 3D viewer to view PDB using OpenGL ES 3D
Tuesday, February 23, 2010 9:07:01 PM
Like 2D chemical structures, we need a solution for 3D on the web. Currently we have ActiveX, such as Chem3D, Java Applet, inlcuding JMol and Marvin space. The problem is exactly same as 2D world: 1) Java is not everywhere; 2) the loading performance is slow.
Noel O'Boyle developed TwirlyMol using dojo javascript framework, which runs cross all browsers. But the rendering is not true 3D.
Today I saw ChemDoodle got this working on FireFox, Safari and Chrome (http://web.chemdoodle.com/overview3D.php) using a new technology call WebGL (http://learningwebgl.com/blog/). It is quite impressive - very nice rendering, the same as OpenGL; and the peroformance, including loading and rotating, is quite good. Another most attractive point for me is the WebGL is very close to C++ OpenGL, which means the 3D rendering implementation can be migrated to WebGL with minium efforts. The only thing in the down side is it leaves IE behind. We all knwo IE is not developer friendly, but there is still a big chunck of IE users, especically in industry world. Hopefully Microsoft can pick this up, or WebGL release some plug-in for IE.
Monday, February 15, 2010 9:16:06 PM
- "I already stumbled over JSDraw – very nice! I count it as first real javascript molecule editor because it is the first one to implement all features that I regard as important for a (basic) molecule editor. Really very nice job."
-- Markus (http://cactus.nci.nih.gov/blog/?p=249)
- "Chemene JSDraw,又一个非常优秀的基于javascript的化学结构编辑器 ..."
TRANSLATION: "Chemene JSDraw is an excellent javascript-based chemical structure editor ..."
-- Charlie (http://blog.charliezhu.com/)
- "@Sepp: Thanks for that. It's certainly an interesting development - a fully featured 2D molecular editor in Javascript."
-- Noel (http://baoilleach.blogspot.com/...)
- "Chemene JSDraw - Free javascript-based structure/reaction editor that's cross-browser, cross-platform, and even iPhone-supported. Allows for substructure searching. Import .mol files, and export structures in .mol, .smi and even HTML."
-- (http://ucsd.libguides.com/content.php?pid=43353&sid=502617)
- "those javascript tools look very interesting. I had a quick look and they seem to work very nicely in a browser environment."
-- (Tim, Informatics Matters)
- "More interesting might be, how the substructure matching itself is done with 100% JavaScript. Thanks to JSDraw a pure JavaScript structure editor, which on closer inspection has some more interesting tricks up it's sleeve, notably a substructure matching capability, this is doable now."
-- (http://theplateisbad.blogspot.com/2010/02/this-article-about-idea-of.html)
- "I use JME for this task, essentially to send/receve molecular objects (mol file or smiles) to/from a database. At my first first impression JSDraw appear very fast, light and appealing, so the possibility to use JSDraw in a web-db project should be interesting."
-- (Ottaviano, www.openshell.it)
Monday, February 15, 2010 8:43:28 PM
Finally JSDraw 1.0 release candidate is out. This is a great achievement for out javascript team.

JSDraw/JsSDF made several firsts:
-
The first full-functional javascript chemical structure editor and viewer, completely cross-browser, cross-platform
-
The first javascript substructure search engine
-
The first chemical structure table/spreadsheet
-
JSDraw is the first Cheminformatics software working on Google Chrome OS and Apple iPad
Sunday, February 14, 2010 9:20:18 PM
JSDraw is a web chemical structure editor and viewer, and a compact Cheminformatics librar as well. It implements only following file I/O:
- Molfile - reading and writing, for single molecule
- Rxnfile - reading and writing, for reaction
- JSDraw Html - reading and writing, for chemical sketch
- SMILE - writing only, for generating structure query
You may want to open many other file formats as well, such SMILES, InChI, CDXML, CML etc. Today we just published an integarted web service for this purpose.
If the following script is included in your normal JSDraw web page:
<script type="text/javascript" src='Service.aspx'></script>
you will see 3 more items in File Type dropdown box of Open File dialog:

So when you type a InChI string, SMILES string, or other file formats, JSDraw will send the content to Service.aspx on the server, and the server returns molfile back to JSDraw. You can try this live at: http://www.chemene.com:8080/ccd/jsdraw/
Service.aspx can read SMILES, InChI, CDXML, CML, TGF files. You can implement your own Service.aspx to read your any file your corporation has.
If you have any question, please send email to support(at)nenetech(dot).com.
Saturday, February 13, 2010 6:42:38 PM
Several customers sent emails to ask me how to do substructure search with JSDraw. I think it's better for me to write it down here to share with you.
JSDraw has two methods for structure search:
- sss(target)
- highlight(query)

Here the query can be molfile string, JSDraw object or JsMol object. Both methods return a boolean value to indicate if the search is successful or not. If succeeded, the substructure will be highlighted in red color.
If you like to search a library, you can use JsMol object. JsMol represents a molecule or reaction, but it doesn't have any GUI, so it will be more efficient. JsMol has following two methods for structure search:
- fullstructureMatch(target)
- substructureMatch(target)
The target parameter has to be a JsMol object. If succeeded, both methods return the mapping results:
{ atoms: [{q, t}, {q, t}, ...], bonds: [{q, t}, {q, t}, ...] }
and returns null, if failed.
To create JsMol object from file:
var m = new JsMol();
m.setMolfile(molfile);
JSDraw runs on client browsers, which works pretty well with small compound library. For large compound database, it is less efficient than tranditional C++, Java, C# and other advanced languages.