Firefly and PC GAMESS-related discussion club

Learn how to ask questions correctly  
We are NATO-free zone

extraction of data from output files

Michal P Krompiec

Questions about extracting data from output files appear now and again, so I'd like to share some examples.

to get the final energy from a DFT or RHF calculation (single point or geometry optimization):
grep "FINAL ENERGY" file.out | tail -n1 | awk '{print $4}'

to extract final geometry from a geometry optimization:
csplit file.out '%EQUILIBRIUM%+1' '%-------%+1' '/-------/'
cat xx00 | grep -P "[0-9]"

split PUNCH file in sections:
csplit PUNCH '/[\$]END/+1' '{*}'

get $vec group:
csplit PUNCH '%VEC%' '/[\$]END/+1'

For more complex tasks, I highly recommend cclib:

Best wishes,

[ Previous ] [ Next ] [ Index ]           Tue Mar 25 '14 5:54pm
[ Reply ] [ Edit ] [ Delete ]           This message read 1270 times