-
-
Save diphosphane/88a17efb260e0c30c921ce4665aca33d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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