#NEWLINE# def get_dihedrals_for_conformation( self , conformation ) : #NEWLINE# #INDENT# coordsets = self . structure_ensemble . getCoordsets ( ) #NEWLINE# self . structure_ensemble . setCoords ( coordsets [ conformation ] ) #NEWLINE# dihedral_angles = [ ] #NEWLINE# for residue in self . structure_ensemble . iterResidues ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# dihedral_angles . append ( calcPhi ( residue , radian = False , dist = None ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# dihedral_angles . append ( 0 ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# dihedral_angles . append ( calcPsi ( residue , radian = False , dist = None ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# dihedral_angles . append ( 0 ) #NEWLINE# #UNINDENT# #UNINDENT# return dihedral_angles [ 1 : ( - 1 ) ]