Package test_suite :: Package unit_tests :: Package _pipe_control :: Package _structure :: Module test_internal
[hide private]
[frames] | no frames]

Source Code for Module test_suite.unit_tests._pipe_control._structure.test_internal

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2008-2013 Edward d'Auvergne                                   # 
  4  #                                                                             # 
  5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
  6  #                                                                             # 
  7  # This program is free software: you can redistribute it and/or modify        # 
  8  # it under the terms of the GNU General Public License as published by        # 
  9  # the Free Software Foundation, either version 3 of the License, or           # 
 10  # (at your option) any later version.                                         # 
 11  #                                                                             # 
 12  # This program is distributed in the hope that it will be useful,             # 
 13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
 14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
 15  # GNU General Public License for more details.                                # 
 16  #                                                                             # 
 17  # You should have received a copy of the GNU General Public License           # 
 18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
 19  #                                                                             # 
 20  ############################################################################### 
 21   
 22  # Python module imports. 
 23  from os import path, sep 
 24   
 25  # relax module imports. 
 26  from data_store import Relax_data_store; ds = Relax_data_store() 
 27  from pipe_control.reset import reset 
 28  from lib.io import file_root 
 29  from lib.structure.internal.molecules import MolContainer 
 30  from lib.structure.internal.object import Internal 
 31  from status import Status; status = Status() 
 32  from test_suite.unit_tests.base_classes import UnitTestCase 
 33   
 34   
35 -class Test_internal(UnitTestCase):
36 """Unit tests for the functions of the 'pipe_control.structure.internal' module.""" 37
38 - def setUp(self):
39 """Set up for all the internal relax structural object unit tests.""" 40 41 # The path to a PDB file. 42 self.test_pdb_path = status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'structures'+sep+'Ap4Aase_res1-12.pdb' 43 expanded = path.split(self.test_pdb_path) 44 self.test_pdb_dir = expanded[0] 45 self.test_pdb_file_name = expanded[1] 46 self.test_pdb_root = file_root(self.test_pdb_path) 47 48 # Instantiate the structural data object. 49 self.data = Internal() 50 51 # Instantiate a MolContainer object. 52 self.mol_cont = MolContainer()
53 54
55 - def tearDown(self):
56 """Reset the relax data storage object.""" 57 58 # Delete the structural data object. 59 del self.data 60 61 # Reset relax. 62 reset()
63 64
65 - def test__trim_helix1(self):
66 """1st test of the Internal._trim_helix() method.""" 67 68 # The helix metadata of the internal structural object. 69 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 70 71 # Residues deleted before the helix. 72 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 73 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[1, 2, 3, 22], res_data=res_data) 74 75 # Test that nothing has happened. 76 self.assertEqual(helix, new_helix)
77 78
79 - def test__trim_helix2(self):
80 """2nd test of the Internal._trim_helix() method.""" 81 82 # The helix metadata of the internal structural object. 83 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 84 85 # Residues deleted after the helix. 86 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 87 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[51, 52, 53], res_data=res_data) 88 89 # Test that nothing has happened. 90 self.assertEqual(helix, new_helix)
91 92
93 - def test__trim_helix3(self):
94 """3rd test of the Internal._trim_helix() method.""" 95 96 # The helix metadata of the internal structural object. 97 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 98 trimmed_helix = ['H1', 'A', 'GLU', 24, 'A', 'GLU', 34, 1, 11] 99 100 # Trim the start of the helix. 101 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 102 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[21, 22, 23], res_data=res_data) 103 104 # Test the trimming. 105 self.assertEqual(trimmed_helix, new_helix)
106 107
108 - def test__trim_helix4(self):
109 """4th test of the Internal._trim_helix() method.""" 110 111 # The helix metadata of the internal structural object. 112 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 113 trimmed_helix = ['H1', 'A', 'VAL', 26, 'A', 'GLU', 34, 1, 9] 114 115 # Trim the start of the helix. 116 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 117 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[21, 22, 23, 24, 25], res_data=res_data) 118 119 # Test the trimming. 120 self.assertEqual(trimmed_helix, new_helix)
121 122
123 - def test__trim_helix5(self):
124 """5th test of the Internal._trim_helix() method.""" 125 126 # The helix metadata of the internal structural object. 127 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 128 trimmed_helix = ['H1', 'A', 'VAL', 26, 'A', 'GLU', 34, 1, 9] 129 130 # Trim the start of the helix. 131 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 132 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[21, 22, 23, 24, 25, 30], res_data=res_data) 133 134 # Test the trimming. 135 self.assertEqual(trimmed_helix, new_helix)
136 137
138 - def test__trim_helix6(self):
139 """6th test of the Internal._trim_helix() method.""" 140 141 # The helix metadata of the internal structural object. 142 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 143 trimmed_helix = ['H1', 'A', 'VAL', 26, 'A', 'GLU', 34, 1, 9] 144 145 # Trim the start of the helix. 146 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 147 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[21, 22, 23, 24, 25, 40], res_data=res_data) 148 149 # Test the trimming. 150 self.assertEqual(trimmed_helix, new_helix)
151 152
153 - def test__trim_helix7(self):
154 """7th test of the Internal._trim_helix() method.""" 155 156 # The helix metadata of the internal structural object. 157 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 158 trimmed_helix = ['H1', 'A', 'ILE', 23, 'A', 'LYS', 33, 1, 11] 159 160 # Trim the end of the helix. 161 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 162 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[34, 35, 36], res_data=res_data) 163 164 # Test the trimming. 165 self.assertEqual(trimmed_helix, new_helix)
166 167
168 - def test__trim_helix8(self):
169 """8th test of the Internal._trim_helix() method.""" 170 171 # The helix metadata of the internal structural object. 172 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 173 174 # Trim nothing. 175 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 176 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[35, 36], res_data=res_data) 177 178 # Test the trimming. 179 self.assertEqual(helix, new_helix)
180 181
182 - def test__trim_helix9(self):
183 """9th test of the Internal._trim_helix() method.""" 184 185 # The helix metadata of the internal structural object. 186 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 187 trimmed_helix = ['H1', 'A', 'ILE', 23, 'A', 'ILE', 30, 1, 8] 188 189 # Trim the end of the helix. 190 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 191 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[31, 32, 33, 34, 35], res_data=res_data) 192 193 # Test the trimming. 194 self.assertEqual(trimmed_helix, new_helix)
195 196
197 - def test__trim_helix10(self):
198 """10th test of the Internal._trim_helix() method.""" 199 200 # The helix metadata of the internal structural object. 201 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 202 trimmed_helix = ['H1', 'A', 'ILE', 23, 'A', 'GLN', 31, 1, 9] 203 204 # Trim the end of the helix. 205 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 206 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[24, 32, 33, 34, 35], res_data=res_data) 207 208 # Test the trimming. 209 self.assertEqual(trimmed_helix, new_helix)
210 211
212 - def test__trim_helix11(self):
213 """11th test of the Internal._trim_helix() method.""" 214 215 # The helix metadata of the internal structural object. 216 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 217 trimmed_helix = ['H1', 'A', 'ASN', 25, 'A', 'GLN', 31, 1, 7] 218 219 # Trim the both ends of the helix. 220 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 221 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[22, 23, 24, 32, 33, 34, 35], res_data=res_data) 222 223 # Test the trimming. 224 self.assertEqual(trimmed_helix, new_helix)
225 226
227 - def test__trim_helix12(self):
228 """12th test of the Internal._trim_helix() method.""" 229 230 # The helix metadata of the internal structural object. 231 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 232 trimmed_helix = ['H1', 'A', 'ASN', 25, 'A', 'GLN', 31, 1, 7] 233 234 # Trim the both ends of the helix. 235 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 236 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[22, 23, 24, 27, 32, 33, 34, 35], res_data=res_data) 237 238 # Test the trimming. 239 self.assertEqual(trimmed_helix, new_helix)
240 241
242 - def test__trim_helix13(self):
243 """13th test of the Internal._trim_helix() method.""" 244 245 # The helix metadata of the internal structural object. 246 helix = ['H1', 'A', 'ILE', 23, 'A', 'GLU', 34, 1, 12] 247 248 # Trim everything. 249 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 250 new_helix = self.data._trim_helix(helix=helix, trim_res_list=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], res_data=res_data) 251 252 # Test the trimming. 253 self.assertEqual(None, new_helix)
254 255
256 - def test__trim_sheet1(self):
257 """1st test of the Internal._trim_sheet() method.""" 258 259 # The sheet metadata of the internal structural object. 260 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 261 262 # Residues deleted before the sheet. 263 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 264 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[1, 2, 3, 22], res_data=res_data) 265 266 # Test that nothing has happened. 267 self.assertEqual(sheet, new_sheet)
268 269
270 - def test__trim_sheet2(self):
271 """2nd test of the Internal._trim_sheet() method.""" 272 273 # The sheet metadata of the internal structural object. 274 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 275 276 # Residues deleted after the sheet. 277 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 278 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[51, 52, 53], res_data=res_data) 279 280 # Test that nothing has happened. 281 self.assertEqual(sheet, new_sheet)
282 283
284 - def test__trim_sheet3(self):
285 """3rd test of the Internal._trim_sheet() method.""" 286 287 # The sheet metadata of the internal structural object. 288 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 289 trimmed_sheet = [1, 'BET', 5, 'LYS', 'A', 11, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 290 291 # Trim the start of the sheet. 292 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 293 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[8, 9, 10], res_data=res_data) 294 295 # Test the trimming. 296 self.assertEqual(trimmed_sheet, new_sheet)
297 298
299 - def test__trim_sheet4(self):
300 """4th test of the Internal._trim_sheet() method.""" 301 302 # The sheet metadata of the internal structural object. 303 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 304 trimmed_sheet = [1, 'BET', 5, 'ILE', 'A', 13, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 305 306 # Trim the start of the sheet. 307 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 308 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[8, 9, 10, 11, 12], res_data=res_data) 309 310 # Test the trimming. 311 self.assertEqual(trimmed_sheet, new_sheet)
312 313
314 - def test__trim_sheet5(self):
315 """5th test of the Internal._trim_sheet() method.""" 316 317 # The sheet metadata of the internal structural object. 318 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 319 trimmed_sheet = [1, 'BET', 5, 'ILE', 'A', 13, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 320 321 # Trim the start of the sheet. 322 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 323 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[8, 9, 10, 11, 12, 15], res_data=res_data) 324 325 # Test the trimming. 326 self.assertEqual(trimmed_sheet, new_sheet)
327 328
329 - def test__trim_sheet6(self):
330 """6th test of the Internal._trim_sheet() method.""" 331 332 # The sheet metadata of the internal structural object. 333 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 334 trimmed_sheet = [1, 'BET', 5, 'ILE', 'A', 13, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 335 336 # Trim the start of the sheet. 337 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 338 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[8, 9, 10, 11, 12, 30], res_data=res_data) 339 340 # Test the trimming. 341 self.assertEqual(trimmed_sheet, new_sheet)
342 343
344 - def test__trim_sheet7(self):
345 """7th test of the Internal._trim_sheet() method.""" 346 347 # The sheet metadata of the internal structural object. 348 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 349 trimmed_sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'GLU', 'A', 16, None, 0, None, None, None, None, None, None, None, None, None, None] 350 351 # Trim the end of the sheet. 352 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 353 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[17, 18, 19], res_data=res_data) 354 355 # Test the trimming. 356 self.assertEqual(trimmed_sheet, new_sheet)
357 358
359 - def test__trim_sheet8(self):
360 """8th test of the Internal._trim_sheet() method.""" 361 362 # The sheet metadata of the internal structural object. 363 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 364 365 # Trim nothing. 366 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 367 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[18, 19], res_data=res_data) 368 369 # Test the trimming. 370 self.assertEqual(sheet, new_sheet)
371 372
373 - def test__trim_sheet9(self):
374 """9th test of the Internal._trim_sheet() method.""" 375 376 # The sheet metadata of the internal structural object. 377 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 378 trimmed_sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'THR', 'A', 14, None, 0, None, None, None, None, None, None, None, None, None, None] 379 380 # Trim the end of the sheet. 381 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 382 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[15, 16, 17, 18, 19], res_data=res_data) 383 384 # Test the trimming. 385 self.assertEqual(trimmed_sheet, new_sheet)
386 387
388 - def test__trim_sheet10(self):
389 """10th test of the Internal._trim_sheet() method.""" 390 391 # The sheet metadata of the internal structural object. 392 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 393 trimmed_sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'THR', 'A', 14, None, 0, None, None, None, None, None, None, None, None, None, None] 394 395 # Trim the end of the sheet. 396 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 397 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[11, 15, 16, 17, 18, 19], res_data=res_data) 398 399 # Test the trimming. 400 self.assertEqual(trimmed_sheet, new_sheet)
401 402
403 - def test__trim_sheet11(self):
404 """11th test of the Internal._trim_sheet() method.""" 405 406 # The sheet metadata of the internal structural object. 407 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 408 trimmed_sheet = [1, 'BET', 5, 'LYS', 'A', 11, None, 'LEU', 'A', 15, None, 0, None, None, None, None, None, None, None, None, None, None] 409 410 # Trim the both ends of the sheet. 411 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 412 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[9, 10, 16, 17, 18, 19], res_data=res_data) 413 414 # Test the trimming. 415 self.assertEqual(trimmed_sheet, new_sheet)
416 417
418 - def test__trim_sheet12(self):
419 """12th test of the Internal._trim_sheet() method.""" 420 421 # The sheet metadata of the internal structural object. 422 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 423 trimmed_sheet = [1, 'BET', 5, 'LYS', 'A', 11, None, 'LEU', 'A', 15, None, 0, None, None, None, None, None, None, None, None, None, None] 424 425 # Trim the both ends of the sheet. 426 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 427 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[9, 10, 13, 16, 17, 18, 19], res_data=res_data) 428 429 # Test the trimming. 430 self.assertEqual(trimmed_sheet, new_sheet)
431 432
433 - def test__trim_sheet13(self):
434 """13th test of the Internal._trim_sheet() method.""" 435 436 # The sheet metadata of the internal structural object. 437 sheet = [1, 'BET', 5, 'GLY', 'A', 10, None, 'VAL', 'A', 17, None, 0, None, None, None, None, None, None, None, None, None, None] 438 439 # Trim everything. 440 res_data = {1: 'MET', 2: 'GLN', 3: 'ILE', 4: 'PHE', 5: 'VAL', 6: 'LYS', 7: 'THR', 8: 'LEU', 9: 'THR', 10: 'GLY', 11: 'LYS', 12: 'THR', 13: 'ILE', 14: 'THR', 15: 'LEU', 16: 'GLU', 17: 'VAL', 18: 'GLU', 19: 'PRO', 20: 'SER', 21: 'ASP', 22: 'THR', 23: 'ILE', 24: 'GLU', 25: 'ASN', 26: 'VAL', 27: 'LYS', 28: 'ALA', 29: 'LYS', 30: 'ILE', 31: 'GLN', 32: 'ASP', 33: 'LYS', 34: 'GLU'} 441 new_sheet = self.data._trim_sheet(sheet=sheet, trim_res_list=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], res_data=res_data) 442 443 # Test the trimming. 444 self.assertEqual(None, new_sheet)
445 446
447 - def test_atom_loop(self):
448 """Test the Internal.atom_loop() method.""" 449 450 # Load the PDB file. 451 self.data.load_pdb(self.test_pdb_path) 452 453 # Loop over the atoms. 454 atom_count = 0 455 for atom in self.data.atom_loop(): 456 atom_count = atom_count + 1 457 458 # Test the number of atoms looped over. 459 self.assertEqual(atom_count, 150)
460 461
463 """Test the Internal.atom_loop() method with the '#XXX' mol selection.""" 464 465 # Load the PDB file. 466 self.data.load_pdb(self.test_pdb_path) 467 468 # Loop over the atoms. 469 atom_count = 0 470 for atom in self.data.atom_loop(atom_id='#XXX'): 471 atom_count = atom_count + 1 472 473 # Test the number of atoms looped over. 474 self.assertEqual(atom_count, 0)
475 476
478 """Test the Internal.atom_loop() method with the ':8' res selection.""" 479 480 # Load the PDB file. 481 self.data.load_pdb(self.test_pdb_path) 482 483 # Loop over the atoms. 484 atom_count = 0 485 for res_num, res_name in self.data.atom_loop(atom_id=':8', res_num_flag=True, res_name_flag=True): 486 # Test the residue name and number. 487 self.assertEqual(res_num, 8) 488 self.assertEqual(res_name, 'SER') 489 490 # Increment the atom count. 491 atom_count = atom_count + 1 492 493 # Test the number of atoms looped over. 494 self.assertEqual(atom_count, 11)
495 496
498 """Test the Internal.atom_loop() method with the ':PRO' res selection.""" 499 500 # Load the PDB file. 501 self.data.load_pdb(self.test_pdb_path) 502 503 # Loop over the atoms. 504 atom_count = 0 505 for atom in self.data.atom_loop(atom_id=':PRO', res_name_flag=True): 506 # Test the residue name. 507 self.assertEqual(atom, 'PRO') 508 509 # Increment the atom count. 510 atom_count = atom_count + 1 511 512 # Test the number of atoms looped over. 513 self.assertEqual(atom_count, 42)
514 515
517 """Test the Internal.atom_loop() method with the '@CA' spin selection.""" 518 519 # Load the PDB file. 520 self.data.load_pdb(self.test_pdb_path) 521 522 # Loop over the atoms. 523 atom_count = 0 524 for spin_name in self.data.atom_loop(atom_id='@CA', atom_name_flag=True): 525 # Test the spin name. 526 self.assertEqual(spin_name, 'CA') 527 528 # Increment the atom count. 529 atom_count = atom_count + 1 530 531 # Test the number of atoms looped over. 532 self.assertEqual(atom_count, 12)
533 534
536 """Test the Internal.atom_loop() method with the '@163' spin selection.""" 537 538 # Load the PDB file. 539 self.data.load_pdb(self.test_pdb_path) 540 541 # Loop over the atoms. 542 atom_count = 0 543 for mol_name, res_num, res_name, spin_num, spin_name, element, pos in self.data.atom_loop(atom_id='@140', mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True): 544 # Test the spin info. 545 self.assertEqual(mol_name, self.test_pdb_root+'_mol1') 546 self.assertEqual(res_num, 11) 547 self.assertEqual(res_name, 'GLU') 548 self.assertEqual(spin_num, 140) 549 self.assertEqual(spin_name, 'OE1') 550 self.assertEqual(element, 'O') 551 self.assertEqual(pos.shape, (1, 3)) 552 self.assertEqual(pos[0, 0], float('10.055')) 553 self.assertEqual(pos[0, 1], float('-2.74')) 554 self.assertEqual(pos[0, 2], float('-13.193')) 555 556 # Increment the atom count. 557 atom_count = atom_count + 1 558 559 # Test the number of atoms looped over. 560 self.assertEqual(atom_count, 1)
561 562
563 - def test_load_pdb(self):
564 """Load a PDB file using Internal.load_pdb().""" 565 566 # Load the PDB file. 567 self.data.load_pdb(self.test_pdb_path) 568 569 # The ModelContainer and MolContainer. 570 model = self.data.structural_data[0] 571 mol = model.mol[0] 572 573 # Test the structural data. 574 self.assertEqual(len(self.data.structural_data), 1) 575 self.assertEqual(len(model.mol), 1) 576 self.assertEqual(model.num, 1) 577 self.assertEqual(mol.mol_name, self.test_pdb_root+'_mol1') 578 self.assertEqual(mol.file_name, self.test_pdb_file_name) 579 self.assertEqual(mol.file_path, self.test_pdb_dir) 580 self.assertEqual(mol.file_model, 1) 581 self.assertEqual(mol.file_mol_num, 1) 582 583 # The real atomic data. 584 atom_name = ['N', 'CA', '1HA', '2HA', 'C', 'O', '1HT', '2HT', '3HT', 'N', 'CD', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', '1HG', '2HG', '1HD', '2HD', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', 'HG', 'CD1', '1HD1', '2HD1', '3HD1', 'CD2', '1HD2', '2HD2', '3HD2', 'C', 'O', 'N', 'H', 'CA', '1HA', '2HA', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'OG', 'HG', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', '1HG', '2HG', 'SD', 'CE', '1HE', '2HE', '3HE', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', 'OD1', 'OD2', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'OG', 'HG', 'C', 'O', 'N', 'CD', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', '1HG', '2HG', '1HD', '2HD', 'C', 'O', 'N', 'CD', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', '1HG', '2HG', '1HD', '2HD', 'C', 'O', 'N', 'H', 'CA', 'HA', 'CB', '1HB', '2HB', 'CG', '1HG', '2HG', 'CD', 'OE1', 'OE2', 'C', 'O', 'N', 'H', 'CA', '1HA', '2HA', 'C', 'O'] 585 bonded = [[]]*174 586 chain_id = [None]*174 587 element = ['N', 'C', 'H', 'H', 'C', 'O', 'H', 'H', 'H', 'N', 'C', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'H', 'H', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'C', 'H', 'H', 'H', 'C', 'H', 'H', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'O', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'H', 'S', 'C', 'H', 'H', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'C', 'O', 'O', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'O', 'H', 'C', 'O', 'N', 'C', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'H', 'H', 'H', 'C', 'O', 'N', 'C', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'H', 'H', 'H', 'C', 'O', 'N', 'H', 'C', 'H', 'C', 'H', 'H', 'C', 'H', 'H', 'C', 'O', 'O', 'C', 'O', 'N', 'H', 'C', 'H', 'H', 'C', 'O'] 588 pdb_record = ['ATOM']*174 589 res_name = ['GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'LEU', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'MET', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'ASP', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'SER', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'PRO', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLU', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY', 'GLY'] 590 res_num = [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12] 591 seg_id = [None]*174 592 x = [8.442, 7.469, 8.013, 6.825, 6.610, 6.827, 9.398, 8.180, 8.448, 5.613, 5.281, 4.714, 5.222, 3.646, 3.332, 2.800, 4.319, 4.853, 3.587, 6.162, 4.805, 4.075, 3.593, 4.074, 4.475, 3.498, 3.572, 2.025, 1.965, 1.609, 1.176, 1.823, 0.176, 0.096, 0.509, -0.789, 0.474, 0.809, -0.595, 0.707, 4.264, 4.364, 4.809, 4.697, 5.561, 6.220, 6.156, 4.659, 4.746, 3.786, 3.770, 2.851, 2.368, 1.785, 1.177, 1.165, 2.360, 1.690, 3.546, 3.804, 3.814, 3.563, 4.442, 4.984, 5.411, 6.192, 4.872, 6.068, 6.868, 5.332, 6.747, 6.155, 5.409, 6.977, 5.721, 3.369, 2.255, 3.703, 4.604, 2.753, 1.851, 3.329, 4.182, 3.644, 2.319, 1.992, 1.854, 2.419, 1.251, 3.451, 4.359, 3.267, 2.246, 4.223, 4.054, 4.040, 5.573, 6.142, 3.488, 4.276, 2.795, 1.828, 2.929, 2.810, 1.772, 0.912, 2.067, 1.505, 0.464, 2.138, 0.938, 2.273, 4.268, 4.585, 5.076, 4.776, 6.392, 6.925, 7.120, 7.968, 7.464, 6.130, 6.384, 6.135, 4.210, 4.246, 6.325, 5.263, 7.477, 8.281, 7.587, 7.039, 9.047, 9.133, 9.654, 9.590, 10.670, 9.215, 9.190, 10.055, 8.012, 7.007, 7.361, 6.144, 5.925, 5.555, 6.329, 4.814, 4.894, 4.761] 593 y = [10.188, 9.889, 9.712, 10.745, 8.674, 7.991, 10.291, 11.073, 9.416, 8.385, 9.152, 7.243, 6.302, 7.443, 6.483, 7.963, 8.253, 7.605, 8.842, 9.327, 10.088, 7.251, 8.285, 6.099, 5.309, 5.986, 4.953, 6.396, 7.471, 6.106, 5.775, 5.225, 4.796, 4.954, 3.787, 4.949, 6.853, 7.828, 6.775, 6.720, 6.853, 8.068, 6.222, 5.251, 6.956, 6.273, 7.706, 7.634, 8.841, 6.847, 5.889, 7.360, 6.511, 8.230, 7.620, 8.669, 9.269, 9.652, 8.174, 9.362, 7.546, 6.604, 8.253, 9.095, 7.354, 7.976, 6.886, 6.258, 5.824, 5.499, 6.846, 5.570, 5.985, 5.190, 4.766, 8.771, 8.245, 9.789, 10.161, 10.351, 10.605, 11.610, 11.341, 12.287, 12.322, 11.787, 13.410, 9.322, 9.015, 8.776, 9.052, 7.758, 7.826, 7.990, 8.977, 7.248, 7.894, 8.285, 6.370, 6.214, 5.342, 5.431, 3.973, 3.943, 3.230, 3.234, 2.212, 3.991, 3.892, 3.624, 5.960, 5.908, 3.339, 3.179, 2.980, 3.150, 2.375, 2.876, 2.616, 3.262, 1.675, 3.264, 4.305, 2.758, 4.055, 2.299, 0.876, 0.258, 0.312, 0.871, -1.106, -1.253, -1.489, -2.564, -1.049, -1.041, -1.011, -0.052, -1.970, -2.740, -1.931, -2.037, -1.962, -2.949, -2.983, -3.917, -4.588, -4.488, -3.289, -3.932] 594 z = [6.302, 7.391, 8.306, 7.526, 7.089, 6.087, 6.697, 5.822, 5.604, 7.943, 9.155, 7.752, 7.908, 8.829, 9.212, 8.407, 9.880, 10.560, 10.415, 9.754, 8.900, 6.374, 5.909, 5.719, 6.139, 4.391, 4.081, 4.415, 4.326, 5.367, 3.307, 2.640, 3.889, 4.956, 3.700, 3.430, 2.493, 2.814, 2.633, 1.449, 3.403, 3.572, 2.369, 2.281, 1.371, 0.855, 1.868, 0.359, 0.149, -0.269, -0.055, -1.268, -1.726, -0.608, 0.037, -1.377, 0.162, 0.731, -2.354, -2.175, -3.496, -3.603, -4.606, -4.199, -5.387, -5.803, -6.196, -4.563, -5.146, -4.350, -3.001, -1.895, -1.241, -1.307, -2.472, -5.551, -5.582, -6.328, -6.269, -7.274, -6.735, -7.913, -8.518, -7.133, -8.791, -9.871, -8.395, -8.346, -8.584, -8.977, -8.732, -10.002, -10.355, -11.174, -11.584, -11.936, -10.759, -11.425, -9.403, -8.469, -9.921, -11.030, -9.410, -8.336, -10.080, -9.428, -10.291, -11.333, -11.606, -12.128, -10.723, -11.893, -9.781, -10.959, -8.768, -7.344, -8.971, -9.765, -7.642, -7.816, -7.251, -6.715, -6.584, -5.765, -7.175, -6.955, -9.288, -9.222, -9.654, -9.696, -10.009, -10.928, -10.249, -10.194, -9.475, -11.596, -11.540, -11.813, -12.724, -13.193, -13.137, -8.947, -7.774, -9.383, -10.338, -8.477, -8.138, -9.017, -7.265, -6.226] 595 596 # Test the atomic data. 597 for i in range(len(mol.atom_name)): 598 self.assertEqual(mol.atom_name[i], atom_name[i]) 599 self.assertEqual(mol.bonded[i], bonded[i]) 600 self.assertEqual(mol.chain_id[i], chain_id[i]) 601 self.assertEqual(mol.element[i], element[i]) 602 self.assertEqual(mol.pdb_record[i], pdb_record[i]) 603 self.assertEqual(mol.res_name[i], res_name[i]) 604 self.assertEqual(mol.res_num[i], res_num[i]) 605 self.assertEqual(mol.seg_id[i], seg_id[i]) 606 self.assertEqual(mol.x[i], x[i]) 607 self.assertEqual(mol.y[i], y[i]) 608 self.assertEqual(mol.z[i], z[i])
609