Skip to content

Commit afeabef

Browse files
committed
fix bug in return_not_in_zone
1 parent 6e6af0d commit afeabef

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

pdb2sql/StructureSimilarity.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,8 @@ def get_xyz_zone_backbone(pdb_file, resData, return_not_in_zone=False):
929929
pdb_file (str): filename containing the pdb of the molecule
930930
resData (dict): information about the zone residues
931931
return_not_in_zone (bool, optional): Do we return the
932-
backbone atoms not in the zone.
932+
backbone atoms not in the zone and the chains used
933+
in the zone.
933934
934935
Returns:
935936
list(float): XYZ of of backbone atoms in the zone.
@@ -959,8 +960,6 @@ def get_xyz_zone_backbone(pdb_file, resData, return_not_in_zone=False):
959960
if chainID in resData.keys():
960961
if resSeq in resData[chainID] and name in backbone:
961962
xyz_in_zone.append([x, y, z])
962-
elif resSeq not in resData[chainID] and name in backbone:
963-
xyz_not_in_zone.append([x, y, z])
964963
else:
965964
if name in backbone:
966965
xyz_not_in_zone.append([x, y, z])
@@ -979,7 +978,7 @@ def get_data_zone_backbone(pdb_file, resData, return_not_in_zone=False):
979978
pdb_file (str): filename containing the pdb of the molecule
980979
resData (dict): information about the zone residues
981980
return_not_in_zone (bool, optional): Do we return the atoms
982-
not in the zone
981+
not in the zone and the chains used in the zone
983982
984983
Returns:
985984
set(float): data of the backbone atoms in the zone
@@ -1009,10 +1008,6 @@ def get_data_zone_backbone(pdb_file, resData, return_not_in_zone=False):
10091008
if resSeq in resData[chainID] and name in backbone:
10101009
data_in_zone.append((chainID, resSeq, name))
10111010

1012-
elif resSeq not in resData[chainID] and name in backbone:
1013-
data_not_in_zone.append(
1014-
(chainID, resSeq, name))
1015-
10161011
else:
10171012
if name in backbone:
10181013
data_not_in_zone.append(

0 commit comments

Comments
 (0)