Skip to content

Instantly share code, notes, and snippets.

@diphosphane
Created Jul 17, 2020
Embed
What would you like to do?
#!/bin/bash
num=10 # you can modify it to decide how many excited states you want to excerpt
cat ./gaussian-calc/itrain.dat | while read line; do
for i in `seq 1 $num`; do
grep f=0 './all_log/'$line'.log' | grep ' '$i':' | awk '{print $5}' | sed s/f=//g >> 'E'$i
grep f=0 './all_log/'$line'.log' | grep ' '$i':' | awk '{print $9}' | sed s/f=//g >> 'f'$i
done
done
for i in `seq 1 $num`; do
paste ./gaussian-calc/itrain.dat E$i f$i > state$i'.index.E.f'
rm E$i f$i
done
mkdir all_data
mv *.index.E.f all_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment