#!/usr/bin/perl

# usage :: get-atom.pl  [aa name] [atom name] < input.out > output
# used with comparison output

if(@ARGV != 2)  {
    die "usage :: get-atom.pl  [aa name] [atom name] < input.out > output\n";
}

while($line=<STDIN>)  {
    chop($line); @in=split(' ', $line);

    if($in[2] eq $ARGV[0] && $in[4] eq $ARGV[1] && $in[10] == 0.0 && $in[6] == $in[8]) {
       printf "%lf\n", $in[6];
   }
}
