unittesting and readme update
This commit is contained in:
7
Tests/.gitignore
vendored
Normal file
7
Tests/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# Compiled python files
|
||||
*.pka
|
||||
*.out
|
||||
*.propka_input
|
||||
|
||||
|
||||
2073
Tests/pdb/1FTJ-Chain-A.pdb
Normal file
2073
Tests/pdb/1FTJ-Chain-A.pdb
Normal file
File diff suppressed because it is too large
Load Diff
2039
Tests/pdb/1HPX.pdb
Normal file
2039
Tests/pdb/1HPX.pdb
Normal file
File diff suppressed because it is too large
Load Diff
3935
Tests/pdb/4DFR.pdb
Normal file
3935
Tests/pdb/4DFR.pdb
Normal file
File diff suppressed because it is too large
Load Diff
85
Tests/results/1FTJ-Chain-A.dat
Normal file
85
Tests/results/1FTJ-Chain-A.dat
Normal file
@@ -0,0 +1,85 @@
|
||||
3.56
|
||||
3.25
|
||||
2.87
|
||||
3.52
|
||||
3.77
|
||||
3.26
|
||||
3.82
|
||||
3.92
|
||||
3.08
|
||||
3.65
|
||||
4.01
|
||||
4.01
|
||||
6.38
|
||||
4.58
|
||||
4.49
|
||||
4.90
|
||||
3.62
|
||||
4.52
|
||||
5.36
|
||||
4.67
|
||||
3.61
|
||||
3.88
|
||||
4.58
|
||||
4.66
|
||||
4.27
|
||||
3.84
|
||||
4.95
|
||||
4.68
|
||||
3.44
|
||||
6.11
|
||||
5.61
|
||||
12.90
|
||||
10.65
|
||||
99.99
|
||||
99.99
|
||||
15.10
|
||||
10.44
|
||||
14.06
|
||||
11.43
|
||||
19.83
|
||||
9.71
|
||||
12.57
|
||||
10.97
|
||||
12.75
|
||||
15.63
|
||||
11.13
|
||||
21.84
|
||||
12.00
|
||||
10.43
|
||||
10.31
|
||||
10.34
|
||||
10.49
|
||||
10.08
|
||||
10.45
|
||||
10.37
|
||||
10.25
|
||||
10.37
|
||||
11.44
|
||||
9.30
|
||||
10.41
|
||||
10.31
|
||||
10.00
|
||||
10.44
|
||||
10.31
|
||||
10.60
|
||||
10.37
|
||||
11.35
|
||||
10.41
|
||||
10.21
|
||||
10.33
|
||||
9.25
|
||||
11.16
|
||||
10.02
|
||||
12.52
|
||||
12.28
|
||||
13.22
|
||||
13.43
|
||||
12.31
|
||||
12.20
|
||||
12.24
|
||||
12.73
|
||||
7.93
|
||||
11.90
|
||||
1.20
|
||||
7.39
|
||||
49
Tests/results/1HPX.dat
Normal file
49
Tests/results/1HPX.dat
Normal file
@@ -0,0 +1,49 @@
|
||||
5.07
|
||||
3.11
|
||||
4.62
|
||||
2.55
|
||||
9.28
|
||||
1.78
|
||||
4.91
|
||||
2.13
|
||||
4.78
|
||||
3.93
|
||||
3.65
|
||||
3.89
|
||||
4.73
|
||||
3.36
|
||||
4.07
|
||||
3.70
|
||||
2.08
|
||||
2.11
|
||||
6.98
|
||||
7.11
|
||||
9.41
|
||||
11.68
|
||||
9.82
|
||||
11.61
|
||||
9.67
|
||||
9.54
|
||||
10.43
|
||||
10.32
|
||||
11.41
|
||||
10.54
|
||||
10.42
|
||||
10.92
|
||||
10.55
|
||||
11.01
|
||||
11.43
|
||||
10.47
|
||||
10.41
|
||||
11.07
|
||||
13.96
|
||||
12.41
|
||||
14.39
|
||||
12.35
|
||||
12.76
|
||||
12.42
|
||||
13.73
|
||||
12.28
|
||||
8.96
|
||||
8.96
|
||||
4.60
|
||||
107
Tests/results/4DFR.dat
Normal file
107
Tests/results/4DFR.dat
Normal file
@@ -0,0 +1,107 @@
|
||||
3.86
|
||||
5.05
|
||||
3.99
|
||||
2.02
|
||||
3.71
|
||||
4.00
|
||||
3.85
|
||||
4.30
|
||||
3.89
|
||||
3.74
|
||||
4.05
|
||||
4.02
|
||||
2.82
|
||||
3.88
|
||||
4.03
|
||||
3.98
|
||||
2.05
|
||||
4.01
|
||||
3.79
|
||||
3.90
|
||||
3.93
|
||||
4.07
|
||||
3.70
|
||||
4.15
|
||||
4.01
|
||||
2.65
|
||||
4.50
|
||||
4.77
|
||||
3.71
|
||||
2.85
|
||||
3.90
|
||||
4.71
|
||||
4.59
|
||||
4.86
|
||||
4.47
|
||||
4.63
|
||||
4.86
|
||||
4.52
|
||||
3.73
|
||||
2.91
|
||||
4.57
|
||||
4.83
|
||||
4.62
|
||||
4.16
|
||||
3.73
|
||||
4.70
|
||||
3.38
|
||||
3.26
|
||||
6.77
|
||||
4.89
|
||||
6.85
|
||||
5.95
|
||||
4.91
|
||||
6.50
|
||||
4.87
|
||||
6.69
|
||||
7.15
|
||||
4.99
|
||||
10.86
|
||||
9.04
|
||||
10.91
|
||||
9.07
|
||||
14.10
|
||||
13.22
|
||||
11.24
|
||||
11.58
|
||||
14.07
|
||||
13.23
|
||||
11.19
|
||||
11.76
|
||||
10.47
|
||||
10.50
|
||||
10.23
|
||||
10.04
|
||||
10.32
|
||||
10.46
|
||||
10.50
|
||||
10.30
|
||||
10.26
|
||||
10.54
|
||||
10.21
|
||||
10.23
|
||||
12.34
|
||||
12.17
|
||||
12.29
|
||||
12.66
|
||||
11.95
|
||||
13.80
|
||||
13.21
|
||||
11.90
|
||||
12.49
|
||||
12.41
|
||||
12.09
|
||||
12.51
|
||||
12.06
|
||||
13.97
|
||||
12.55
|
||||
12.10
|
||||
12.39
|
||||
7.70
|
||||
7.63
|
||||
4.86
|
||||
4.83
|
||||
4.05
|
||||
4.26
|
||||
4.03
|
||||
4.47
|
||||
47
Tests/runtest.py
Executable file
47
Tests/runtest.py
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
""" Run test for test pdbs """
|
||||
|
||||
from subprocess import call
|
||||
import os, re
|
||||
|
||||
pdbs = ['1FTJ-Chain-A',
|
||||
'1HPX',
|
||||
'4DFR']
|
||||
|
||||
for pdb in pdbs:
|
||||
print('')
|
||||
print('RUNNING '+pdb)
|
||||
|
||||
# Run pka calculation
|
||||
call(['../propka.py','pdb/'+pdb+'.pdb'], stdout = open(pdb+'.out', 'w+'))
|
||||
|
||||
# Test pka predictiona
|
||||
result = open('results/'+pdb+'.dat','r')
|
||||
atpka = False
|
||||
for line in open(pdb+'.pka', 'r').readlines():
|
||||
if not atpka:
|
||||
if "model-pKa" in line:
|
||||
# test pka
|
||||
atpka = True
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
if "-" in line:
|
||||
# done testing
|
||||
atpka = False
|
||||
continue
|
||||
|
||||
r = float(result.readline())
|
||||
m = re.search('([0-9]+\.[0-9]+)', line)
|
||||
|
||||
if(float(m.group(0)) != r):
|
||||
print(" ERR:")
|
||||
print(line)
|
||||
print(" "+"should be: "+str(r))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user