Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MMCIFParser: store models as ints.

  • Loading branch information...
commit c0d60c68c77b7309e9ce18e0030e98686f6f23bc 1 parent a9eb35a
Lenna Peterson lennax authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  Bio/PDB/MMCIFParser.py
  2. +4 −4 Tests/test_MMCIF.py
2  Bio/PDB/MMCIFParser.py
View
@@ -34,7 +34,7 @@ def _build_structure(self, structure_id):
b_factor_list=mmcif_dict["_atom_site.B_iso_or_equiv"]
occupancy_list=mmcif_dict["_atom_site.occupancy"]
fieldname_list=mmcif_dict["_atom_site.group_PDB"]
- model_list = mmcif_dict["_atom_site.pdbx_PDB_model_num"]
+ model_list = [int(n) for n in mmcif_dict["_atom_site.pdbx_PDB_model_num"]]
try:
aniso_u11=mmcif_dict["_atom_site.aniso_U[1][1]"]
aniso_u12=mmcif_dict["_atom_site.aniso_U[1][2]"]
8 Tests/test_MMCIF.py
View
@@ -47,7 +47,7 @@ def test_parser(self):
for ppbuild in [PPBuilder(), CaPPBuilder()]:
#==========================================================
#First try allowing non-standard amino acids,
- polypeptides = ppbuild.build_peptides(structure['1'], False)
+ polypeptides = ppbuild.build_peptides(structure[1], False)
self.assertEqual(len(polypeptides), 1)
pp = polypeptides[0]
# Check the start and end positions
@@ -64,7 +64,7 @@ def test_parser(self):
#Now try strict version with only standard amino acids
#Should ignore MSE 151 at start, and then break the chain
#at MSE 185, and MSE 214,215
- polypeptides = ppbuild.build_peptides(structure['1'], True)
+ polypeptides = ppbuild.build_peptides(structure[1], True)
self.assertEqual(len(polypeptides), 3)
#First fragment
pp = polypeptides[0]
@@ -99,7 +99,7 @@ def testModels(self):
for ppbuild in [PPBuilder(), CaPPBuilder()]:
#==========================================================
#First try allowing non-standard amino acids,
- polypeptides = ppbuild.build_peptides(structure['1'], False)
+ polypeptides = ppbuild.build_peptides(structure[1], False)
self.assertEqual(len(polypeptides), 1)
pp = polypeptides[0]
# Check the start and end positions
@@ -114,7 +114,7 @@ def testModels(self):
str(s))
#==========================================================
#Now try strict version with only standard amino acids
- polypeptides = ppbuild.build_peptides(structure['1'], True)
+ polypeptides = ppbuild.build_peptides(structure[1], True)
self.assertEqual(len(polypeptides), 1)
pp = polypeptides[0]
# Check the start and end positions
Please sign in to comment.
Something went wrong with that request. Please try again.