Skip to content

Commit

Permalink
Ensure that residue search functions always return residues [ci skip]
Browse files Browse the repository at this point in the history
Do this by using .residues() on the result of the search.
  • Loading branch information
fjclark committed Oct 24, 2023
1 parent 609cca8 commit 0ae9a3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ def getAminoAcids(self, property_map={}):
"""
search_string = "(resname " + ",".join(_prot_res) + ")"
try:
residues = list(self.search(search_string, property_map))
residues = list(self.search(search_string, property_map).residues())
except:
residues = []
return residues
Expand Down Expand Up @@ -2076,7 +2076,7 @@ def getNucleotides(self, property_map={}):
"""
search_string = "(resname " + ",".join(_nucl_res) + ")"
try:
residues = list(self.search(search_string, property_map))
residues = list(self.search(search_string, property_map).residues())
except:
residues = []
return residues
Expand Down
4 changes: 2 additions & 2 deletions python/BioSimSpace/_SireWrappers/_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ def getAminoAcids(self, property_map={}):
"""
search_string = "(resname " + ",".join(_prot_res) + ")"
try:
residues = list(self.search(search_string, property_map))
residues = list(self.search(search_string, property_map).residues())
except:
residues = []
return residues
Expand Down Expand Up @@ -1995,7 +1995,7 @@ def getNucleotides(self, property_map={}):
"""
search_string = "(resname " + ",".join(_nucl_res) + ")"
try:
residues = list(self.search(search_string, property_map))
residues = list(self.search(search_string, property_map).residues())
except:
residues = []
return residues
Expand Down

0 comments on commit 0ae9a3d

Please sign in to comment.