File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,8 @@ def sample_init(self, return_forward_trajectory=False):
317317 self .chain_idx = []
318318 self .idx_pdb = []
319319 all_chains = {contig_ref [0 ] for contig_ref in self .contig_map .ref }
320- available_chains = sorted (list (set (string .ascii_uppercase ) - all_chains ))
320+ available_chains = sorted (list (set (string .ascii_letters ) - all_chains ))
321+
321322 # Iterate over each chain
322323 for last_res in length_bound :
323324 chain_ids = {contig_ref [0 ] for contig_ref in self .contig_map .ref [first_res : last_res ]}
@@ -328,6 +329,10 @@ def sample_init(self, return_forward_trajectory=False):
328329 chain_ids = chain_ids - {"_" }
329330 # If there are no fixed residues that have a chain id, pick the first available letter
330331 if not chain_ids :
332+ if not available_chains :
333+ raise ValueError (f"No available chains! You are trying to design a new chain, and you have "
334+ f"already used all upper- and lower-case chain ids (up to 52 chains): "
335+ f"{ ',' .join (all_chains )} ." )
331336 chain_id = available_chains [0 ]
332337 available_chains .remove (chain_id )
333338 # Otherwise, use the chain of the fixed (motif) residues
You can’t perform that action at this time.
0 commit comments