#!/bin/csh

# need some identifier of out file, aa name, atom name

foreach a (`ls *${1}*out`)

echo $a

perl -nae 'printf "%lf\n", $F[6], $F[2], $ARGV[0], $F[4], $ARGV[1], $F[10] \
if $F[2] eq $ARGV[0] && $F[4] eq $ARGV[1] && $F[10] == 0.0 && $F[6] == $F[8]' $a $2 $3 > $a-$2_$3

end
