Skip to content

Commit c0d60c6

Browse files
author
Lenna X. Peterson
committed
MMCIFParser: store models as ints.
1 parent a9eb35a commit c0d60c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Bio/PDB/MMCIFParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _build_structure(self, structure_id):
3434
b_factor_list=mmcif_dict["_atom_site.B_iso_or_equiv"]
3535
occupancy_list=mmcif_dict["_atom_site.occupancy"]
3636
fieldname_list=mmcif_dict["_atom_site.group_PDB"]
37-
model_list = mmcif_dict["_atom_site.pdbx_PDB_model_num"]
37+
model_list = [int(n) for n in mmcif_dict["_atom_site.pdbx_PDB_model_num"]]
3838
try:
3939
aniso_u11=mmcif_dict["_atom_site.aniso_U[1][1]"]
4040
aniso_u12=mmcif_dict["_atom_site.aniso_U[1][2]"]

Tests/test_MMCIF.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_parser(self):
4747
for ppbuild in [PPBuilder(), CaPPBuilder()]:
4848
#==========================================================
4949
#First try allowing non-standard amino acids,
50-
polypeptides = ppbuild.build_peptides(structure['1'], False)
50+
polypeptides = ppbuild.build_peptides(structure[1], False)
5151
self.assertEqual(len(polypeptides), 1)
5252
pp = polypeptides[0]
5353
# Check the start and end positions
@@ -64,7 +64,7 @@ def test_parser(self):
6464
#Now try strict version with only standard amino acids
6565
#Should ignore MSE 151 at start, and then break the chain
6666
#at MSE 185, and MSE 214,215
67-
polypeptides = ppbuild.build_peptides(structure['1'], True)
67+
polypeptides = ppbuild.build_peptides(structure[1], True)
6868
self.assertEqual(len(polypeptides), 3)
6969
#First fragment
7070
pp = polypeptides[0]
@@ -99,7 +99,7 @@ def testModels(self):
9999
for ppbuild in [PPBuilder(), CaPPBuilder()]:
100100
#==========================================================
101101
#First try allowing non-standard amino acids,
102-
polypeptides = ppbuild.build_peptides(structure['1'], False)
102+
polypeptides = ppbuild.build_peptides(structure[1], False)
103103
self.assertEqual(len(polypeptides), 1)
104104
pp = polypeptides[0]
105105
# Check the start and end positions
@@ -114,7 +114,7 @@ def testModels(self):
114114
str(s))
115115
#==========================================================
116116
#Now try strict version with only standard amino acids
117-
polypeptides = ppbuild.build_peptides(structure['1'], True)
117+
polypeptides = ppbuild.build_peptides(structure[1], True)
118118
self.assertEqual(len(polypeptides), 1)
119119
pp = polypeptides[0]
120120
# Check the start and end positions

0 commit comments

Comments
 (0)