One thing to do is to use the halfwise script available in the perl/scripts package. Another is to use the blastwise script.