-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_InfraRed_spectra_TURBOMOLE
42 lines (39 loc) · 1.1 KB
/
gen_InfraRed_spectra_TURBOMOLE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
echo "usage sh gen_ir_spec.sh wavenumber_1 wavenumber_2 where wavenumber_1 and wavenumber_2 are the limits on the x axis where you want to plot"
b2t
## Adapted from the script supplied by Turbomole.
wait
vibration -spectrum
file=${PWD##*/}
cat > $file.gnu << EOF
#!/usr/bin/gnuplot -persist
# uncomment the following 2 lines to generate
# a postscript file instead of a plot on the screen:
#
#set term postscript colour
#set output 'vibspec.ps'
set table "vibspec.dat" #generates a file containing data in tabular format
set nokey
set sample 5000
set autoscale
set xrange [ $1: $2]
# definition of a gaus function:
# e - position of the maximum
# o - maximum height
# w - width
expo(x,e,w)=(x-e)*(x-e)/(w*w)
gaus(x,e,o,w)=expo(x,e,w)>50 ? 0.0 : o*exp(-0.5*(x-e)*(x-e)/(w*w))/(w*sqrt(2*pi))
#
#
# change scalfac to scale frequencies
scalfac=1.0
#
# change wfac to adapt the width of the bands:
wfac=4.2
EOF
sed -n 35,10000000p vibspec.gnu >> $file.gnu
gnuplot < $file.gnu
wait
mv vibspec.dat $file.dat
# remove the "i" from the output file to make it cleaner for use in excel
sed -i 's/i//g' $file.dat