#!/bin/csh
grep 'P CA' phi.dat | cut -c1-28 > phi1.tmp
grep 'P CA' psi.dat | cut -c1-28 > psi1.tmp
paste phi1.tmp psi1.tmp > PhiPsi.tmp
grep -v '0.0' PhiPsi.tmp > PhiPsi.dat
rm -rf *.tmp
