File: test_hbplus.py

package info (click to toggle)
openstructure 2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 206,240 kB
  • sloc: cpp: 188,571; python: 36,686; ansic: 34,298; fortran: 3,275; sh: 312; xml: 146; makefile: 29
file content (26 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (4)
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
import unittest
import sys
from ost import *
from ost import settings
from ost.bindings import hbplus

class TestHBPlusBinding(unittest.TestCase):

  def setUp(self):
    self.protein = io.LoadEntity("testfiles/testprotein.pdb")

  def testHBondList(self):
    hbond_list = hbplus.HBondList(self.protein)
    self.assertEqual(len(hbond_list), 499)

  def testHBondScore(self):
    self.assertEqual(hbplus.HBondScore(self.protein, self.protein), 1.0)

if __name__ == "__main__":
  try:
    settings.Locate("hbplus")
  except:
    print("Could not find hbplus, could not test binding...")
    sys.exit(0)
  from ost import testutils
  testutils.RunTests()