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 http://gmd.mpimp-golm.mpg.de/download/, 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:
http://gmd.mpimp-golm.mpg.de/Analytes/0a2b3536-2245-4c0e-bdbc-495766eeec67.aspx

My code (taken from Patrik) is below:

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


cheers