you can use DSSP software (http://swift.cmbi.ru.nl/gv/dssp/) to calculate phi and psi dihedral angles of every residue in a protein by giving input as PDB file which contains coordinates. If you have a file which has extension as .xyz then you need to convert it in PDB format.