def get_dihedrals_for_conformation(self, conformation):
        coordsets = self.structure_ensemble.getCoordsets()
        
        self.structure_ensemble.setCoords(coordsets[conformation])
        
        dihedral_angles = []
        for residue in self.structure_ensemble.iterResidues():
            try:
                dihedral_angles.append(calcPhi(residue, radian=False, dist=None))
            except __HOLE__:
                dihedral_angles.append(0)

            try:
                dihedral_angles.append(calcPsi(residue, radian=False, dist=None))
            except ValueError:
                dihedral_angles.append(0)

        # 0 links with Nth residue and Nth with 0th. Those values are not needed anyway.
        return dihedral_angles[1:-1]
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/data/handler/protein/proteinEnsembleData.py/ProteinEnsembleData.get_dihedrals_for_conformation