Friday, 3 February 2012

update spectral library for TargetSearch

Ricardo Silva pointed me to a problem in the GMD spectrum export for the TargetSearch software:
He wrote:
I've started to work with GC-MS analysis on R, and the TargetSearch recomends the golm database, but the librarys don't have Retention Index, is this correct? How do a get a library with Retention Indexes?
Indeed, I found a format error due to the globalisation which led TargetSearch fail to load the textfile.

Thanks Ricardo!

ps.: If you finde any problem, please drop me a line...

Thursday, 2 February 2012

Tweaking ChemDoodle

Patrik Rydberg posted some code to automatically scale a molecule in the ChemDoodle canvas. I was looking for something like this for quite some time. Now I could this improve for my settings having molFile from many different sources by first scaling the molecule with the scaleToAverageBondLength(Number length) function.

See an example here:

My code (taken from Patrik) is below:

structure = ChemDoodle.readMOL(molFile);
size = structure.getDimension();
scale = Math.min(canvas.width / size.x, canvas.height / size.y);
canvas.specs.scale = scale * .9;