Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_PDB.Exposure Class Reference

List of all members.

Public Member Functions

def setUp
def test_HSExposureCA
def test_HSExposureCB
def test_ExposureCN

Public Attributes

 model
 a_residues
 radius

Detailed Description

Definition at line 678 of file test_PDB.py.


Member Function Documentation

def test_PDB.Exposure.setUp (   self)

Definition at line 680 of file test_PDB.py.

00680 
00681     def setUp(self):
00682         warnings.simplefilter('ignore', PDBConstructionWarning)
00683         pdb_filename = "PDB/a_structure.pdb"
00684         structure=PDBParser(PERMISSIVE=True).get_structure('X', pdb_filename)
00685         warnings.filters.pop()
00686         self.model=structure[1]
00687         #Look at first chain only
00688         a_residues=list(self.model["A"].child_list)
00689         self.assertEqual(86, len(a_residues))
00690         self.assertEqual(a_residues[0].get_resname(), "CYS")
00691         self.assertEqual(a_residues[1].get_resname(), "ARG")
00692         self.assertEqual(a_residues[2].get_resname(), "CYS")
00693         self.assertEqual(a_residues[3].get_resname(), "GLY")
00694         #...
00695         self.assertEqual(a_residues[-3].get_resname(), "TYR")
00696         self.assertEqual(a_residues[-2].get_resname(), "ARG")
00697         self.assertEqual(a_residues[-1].get_resname(), "CYS")
00698         self.a_residues = a_residues
00699         self.radius = 13.0

HSExposureCN.

Definition at line 743 of file test_PDB.py.

00743 
00744     def test_ExposureCN(self):
00745         """HSExposureCN."""
00746         hse = ExposureCN(self.model, self.radius)
00747         residues = self.a_residues
00748         self.assertEqual(0, len(residues[0].xtra))
00749         self.assertEqual(1, len(residues[1].xtra))
00750         self.assertEqual(25, residues[1].xtra["EXP_CN"])
00751         self.assertEqual(1, len(residues[2].xtra))
00752         self.assertEqual(28, residues[2].xtra["EXP_CN"])
00753         self.assertEqual(1, len(residues[3].xtra))
00754         self.assertEqual(29, residues[3].xtra["EXP_CN"])
00755         #...
00756         self.assertEqual(1, len(residues[-2].xtra))
00757         self.assertEqual(48, residues[-2].xtra["EXP_CN"])
00758         self.assertEqual(1, len(residues[-1].xtra))
00759         self.assertEqual(38, residues[-1].xtra["EXP_CN"])

HSExposureCA.

Definition at line 700 of file test_PDB.py.

00700 
00701     def test_HSExposureCA(self):
00702         """HSExposureCA."""
00703         hse = HSExposureCA(self.model, self.radius)
00704         residues = self.a_residues
00705         self.assertEqual(0, len(residues[0].xtra))
00706         self.assertEqual(0, len(residues[1].xtra))
00707         self.assertEqual(3, len(residues[2].xtra))
00708         self.assertAlmostEqual(0.81250973133184456, residues[2].xtra["EXP_CB_PCB_ANGLE"])
00709         self.assertEqual(14, residues[2].xtra["EXP_HSE_A_D"])
00710         self.assertEqual(14, residues[2].xtra["EXP_HSE_A_U"])
00711         self.assertEqual(3, len(residues[3].xtra))
00712         self.assertAlmostEqual(1.3383737, residues[3].xtra["EXP_CB_PCB_ANGLE"])
00713         self.assertEqual(13, residues[3].xtra["EXP_HSE_A_D"])
00714         self.assertEqual(16, residues[3].xtra["EXP_HSE_A_U"])
00715         #...
00716         self.assertEqual(3, len(residues[-2].xtra))
00717         self.assertAlmostEqual(0.77124014456278489, residues[-2].xtra["EXP_CB_PCB_ANGLE"])
00718         self.assertEqual(24, residues[-2].xtra["EXP_HSE_A_D"])
00719         self.assertEqual(24, residues[-2].xtra["EXP_HSE_A_U"])
00720         self.assertEqual(0, len(residues[-1].xtra))

HSExposureCB.

Definition at line 721 of file test_PDB.py.

00721 
00722     def test_HSExposureCB(self):
00723         """HSExposureCB."""
00724         hse = HSExposureCB(self.model, self.radius)
00725         residues = self.a_residues
00726         self.assertEqual(0, len(residues[0].xtra))
00727         self.assertEqual(2, len(residues[1].xtra))
00728         self.assertEqual(20, residues[1].xtra["EXP_HSE_B_D"])
00729         self.assertEqual(5, residues[1].xtra["EXP_HSE_B_U"])
00730         self.assertEqual(2, len(residues[2].xtra))
00731         self.assertEqual(10, residues[2].xtra["EXP_HSE_B_D"])
00732         self.assertEqual(18, residues[2].xtra["EXP_HSE_B_U"])
00733         self.assertEqual(2, len(residues[3].xtra))
00734         self.assertEqual(7, residues[3].xtra["EXP_HSE_B_D"])
00735         self.assertEqual(22, residues[3].xtra["EXP_HSE_B_U"])
00736         #...
00737         self.assertEqual(2, len(residues[-2].xtra))
00738         self.assertEqual(14, residues[-2].xtra["EXP_HSE_B_D"])
00739         self.assertEqual(34, residues[-2].xtra["EXP_HSE_B_U"])
00740         self.assertEqual(2, len(residues[-1].xtra))
00741         self.assertEqual(23, residues[-1].xtra["EXP_HSE_B_D"])
00742         self.assertEqual(15, residues[-1].xtra["EXP_HSE_B_U"])


Member Data Documentation

Definition at line 697 of file test_PDB.py.

Definition at line 685 of file test_PDB.py.

Definition at line 698 of file test_PDB.py.


The documentation for this class was generated from the following file: