#!/usr/local/bin/perl -n
($seg1, $res1, $resnum1, $atom1, $seg2, $res2, $resnum2, $atom2, $d) =
    split(' ', $_);
$seg1 .= ' ' x (length($seg1) < 4 ? 4 - length($seg1) : 0);
$seg2 .= ' ' x (length($seg2) < 4 ? 4 - length($seg2) : 0);
print <<EOP;
assign (segid "$seg1" and resid $resnum1 and name $atom1)
    (segid "$seg2" and resid $resnum2 and name $atom2) $d 0.1 0.1
EOP
