Skip to content

Instantly share code, notes, and snippets.

@thisisntnathan
Last active December 27, 2021 19:09
Show Gist options
  • Save thisisntnathan/2aab4e51f1887c2e41feb71b081d5a7f to your computer and use it in GitHub Desktop.
Save thisisntnathan/2aab4e51f1887c2e41feb71b081d5a7f to your computer and use it in GitHub Desktop.
#!/bin/bash
# usage: G16toGV5.sh <output>
#
# takes g16 output files and removes 'Dipole orientation' section making them suitable for viewing in GV5
# written by Dr. Davor Šakić from the University of Zagreb (Croatia)
#
# input: g16out.log - an output file from Gaussian 16 that thows a ParseError in GV5
# output: gv5_g16out.log - an output file openable in GV5
# g16out.arch - a text file helpful for adding your computations to SI
file=`echo $1 | sed 's,.log,,g' | sed 's,.com,,g' | sed 's,.arch,,g' | sed 's,.xyz,,g' `
echo gv5_$file.log $file.arch; cat $file.log | sed '/Dipole orientation/,$d' > gv5_$file.log; csplit -q $file.log %GINC% {1}; mv xx00 $file.arch; cat $file.arch >> gv5_$file.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment