File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,27 +97,35 @@ def build_conformational_states(
9797 for level in levels [molecules [0 ]]:
9898 if level == "united_atom" :
9999 for res_id in range (num_residues ):
100- peaks_ua [res_id ] = self ._identify_peaks (
100+ if len (dihedrals_ua [res_id ]) == 0 :
101+ # No dihedrals means no histogram or peaks
102+ peaks_ua [res_id ] = []
103+ else :
104+ peaks_ua [res_id ] = self ._identify_peaks (
105+ data_container ,
106+ molecules ,
107+ dihedrals_ua [res_id ],
108+ bin_width ,
109+ start ,
110+ end ,
111+ step ,
112+ )
113+
114+ elif level == "residue" :
115+ if len (dihedrals_res ) == 0 :
116+ # No dihedrals means no histogram or peaks
117+ peaks_res = []
118+ else :
119+ peaks_res = self ._identify_peaks (
101120 data_container ,
102121 molecules ,
103- dihedrals_ua [ res_id ] ,
122+ dihedrals_res ,
104123 bin_width ,
105124 start ,
106125 end ,
107126 step ,
108127 )
109128
110- elif level == "residue" :
111- peaks_res = self ._identify_peaks (
112- data_container ,
113- molecules ,
114- dihedrals_res ,
115- bin_width ,
116- start ,
117- end ,
118- step ,
119- )
120-
121129 # Assign states for each group
122130 for level in levels [molecules [0 ]]:
123131 if level == "united_atom" :
You can’t perform that action at this time.
0 commit comments