File: test_docker.py

package info (click to toggle)
openstructure 2.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 205,228 kB
  • sloc: cpp: 188,129; python: 35,361; ansic: 34,298; fortran: 3,275; sh: 286; xml: 146; makefile: 29
file content (33 lines) | stat: -rw-r--r-- 991 bytes parent folder | download | duplicates (2)
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
import ost
from ost.mol.alg import scoring, qsscoring
from ost import conop

lib = conop.GetDefaultLib()
if lib is not None:
    print("You have a valid compound library, last updated on " +
            lib.GetCreationDate())
else:
    ost.LogError("No compound library set as default!")
    print("The compound library is not working properly!")

# load two biounits to compare
ent_full = ost.io.LoadPDB('3ia3', remote=True)
ent_1 = ent_full.Select('cname=A,D')
ent_2 = ent_full.Select('cname=B,C')

# get scores
ost.PushVerbosityLevel(3)    

try:
    scorer = scoring.Scorer(ent_1, ent_2)
    ost.LogScript('lDDT:', str(scorer.lddt))
    ost.LogScript('QSscore:', str(scorer.qs_global))
    ost.LogScript('Chain mapping used:', str(scorer.mapping.GetFlatMapping()))
except Exception as ex:
    # default handling: report failure and set score to 0
    ost.LogError('Scoring failed:', str(ex))
    qs_score = 0
    print("OST is not working properly!")
else:
    print("OST is working!")