Skip to content

Commit

Permalink
select multiple cdrs
Browse files Browse the repository at this point in the history
  • Loading branch information
elkoz committed Dec 28, 2023
1 parent 4ae89fe commit 84676be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions proteinflow/data/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,8 @@ def set_cdr(self, cdr):
"""
if not self.sabdab:
cdr = None
if isinstance(cdr, str):
cdr = [cdr]
if cdr == self.cdr:
return
self.cdr = cdr
Expand All @@ -924,12 +926,12 @@ def set_cdr(self, cdr):
print(f"Setting CDR to {cdr}...")
for i, data in tqdm(enumerate(self.data)):
if self.clusters is not None:
if data.split("__")[1] == cdr:
if data.split("__")[1] in cdr:
self.indices.append(i)
else:
add = False
for chain in self.files[data]:
if chain.split("__")[1] == cdr:
if chain.split("__")[1] in cdr:
add = True
break
if add:
Expand Down

0 comments on commit 84676be

Please sign in to comment.