#! /bin/awk -f # # Author: Michael Seth # Added to Database: 7/02/05 # # Purpose: Calculates the vibrational entropy of a series of harmoic # oscillators as is done in a standard frequency analysis. # # To run: Vibent input.in # # input.in has one line for each vibration containing the vibrational # frequency in cm-1 and the temperature in K. # e.g. # # 1800.0 293.0 # 2800.0 293.0 # {total += 8.31451*log(1/(1-exp((-1*$1*11.9626582)/(8.31451*$2)))); T1=($1*11.9626582)*exp((-1*$1*11.9626582)/(8.31451*$2))/((1-exp((-1*$1*11.9626582)/(8.31451*$2)))); T1=T1/$2; total += T1; print "Vib. entropy of vibration ",NR," in kJ/molK ",T1 #print 8.31451*log(1/(1-exp((-1*$1*11.9626582)/(8.31451*$2)))), #($1*11.9626582)*exp((-1*$1*11.9626582)/(8.31451*$2))/((1-exp((-1*$1*11.9626582)/(8.31451*$2)))),T1 } } END {print "Total Ent. in kJ/molK ",total, " in kcal/molK",total/4.184}