Search This Blog

Wednesday, June 28, 2006

gaussfield.sh v0.1

It can be very useful to obtain value of some molecular properties in electric field. I.e. you can get dipole moment of excited states from energies in fields F and -F, hyperpolarizability from analytic polarizability etc. But it's quite annoying to create many very similar Gaussian input files, so I wrote short script to created this files:
#!/usr/bin/env bash
for i in $*
do
        name=`basename $i .com`
        sed -e '/^%/d; /^#/s/$/ Field=X-10/' $i > ${name}-x.com
        sed -e "/^%/d; /^#/s/$/ Field=X+10/" $i > ${name}+x.com
done

No comments: