I don't like proprietary formats for anything. They never, ever benefit anyone other than the software vendor.
Almost as bad as using binary proprietary formats is not providing export facilities to ascii formats.
I may have missed it, but I was using gaussview to look at td-dft calculated uv/vis spectra -- and couldn't find a way of exporting the data. Sure, I could export the graph as a png, svg etc. file. But not double column tab-separated ascii file.
There's a bit of fudging in what I'm doing -- I'll be the first one to admit that.
So here's single line to export the wavelengths and intensities:
cat g03.g03out|grep Excited|grep -v singles|sed 's/=/\t/g'|gawk '{print $7,$10}'>uvvis.dat
You can plot them in gnuplot using
plot 'uvvis.dat' u 1:2 w impulse
The problem is that these are just spikes -- not the smooth uv/vis like spectra we're used to. On the other hand, if I understand things correctly, this is the REAL data, while the smoothed uv/vis spectrum above is more for presentation purposes. I might obviously be wrong, and I am by no stretch a computational or theoretical chemist - I just like their tools.
We've got an immensely powerful tool at our hands: Octave!
data=load('fakeuv.dat');
gauss= @(x,c,r,s) r.*1./(s.*sqrt(2*pi)).*exp(-0.5*((x-c)./s).^2)
x=linspace(250,850,600);
plot(x,cumsum(gauss(x,data(:,1),data(:,2),20)))
where 20 is an abitrary value. Anyway, this is how it looks:
We can try s=30 instead:
outdata=cumsum(gauss(x,data(:,1),data(:,2),30));and plot it in gnuplot
exportdata=[x' outdata'];
save 'uvvis2.sim' exportdata
plot 'uvvis2.sim' u 1:48 w lines
No comments:
Post a Comment