File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,27 +123,35 @@ def build_conformational_states(
123123 if level == "united_atom" :
124124 for res_id in range (num_residues ):
125125 key = (group_id , res_id )
126- states_ua [key ] = self ._assign_states (
126+ if len (dihedrals_ua [res_id ]) == 0 :
127+ # No conformational states
128+ states_ua [key ] = []
129+ else :
130+ states_ua [key ] = self ._assign_states (
131+ data_container ,
132+ molecules ,
133+ dihedrals_ua [res_id ],
134+ peaks_ua [res_id ],
135+ start ,
136+ end ,
137+ step ,
138+ )
139+
140+ elif level == "residue" :
141+ if len (dihedrals_res ) == 0 :
142+ # No conformational states
143+ states_res [group_id ] = []
144+ else :
145+ states_res [group_id ] = self ._assign_states (
127146 data_container ,
128147 molecules ,
129- dihedrals_ua [ res_id ] ,
130- peaks_ua [ res_id ] ,
148+ dihedrals_res ,
149+ peaks_res ,
131150 start ,
132151 end ,
133152 step ,
134153 )
135154
136- elif level == "residue" :
137- states_res [group_id ] = self ._assign_states (
138- data_container ,
139- molecules ,
140- dihedrals_res ,
141- peaks_res ,
142- start ,
143- end ,
144- step ,
145- )
146-
147155 progress .advance (task )
148156
149157 return states_ua , states_res
You can’t perform that action at this time.
0 commit comments