Skip to content
Snippets Groups Projects
Verified Commit fa25403e authored by Xavier Robin's avatar Xavier Robin
Browse files

refactor: update test script to use modern scorer

parent 25d75db1
No related branches found
No related tags found
No related merge requests found
import ost import ost
from ost.mol.alg import qsscoring from ost.mol.alg import scoring, qsscoring
from ost import conop from ost import conop
lib = conop.GetDefaultLib() lib = conop.GetDefaultLib()
...@@ -13,13 +13,15 @@ else: ...@@ -13,13 +13,15 @@ else:
# load two biounits to compare # load two biounits to compare
ent_full = ost.io.LoadPDB('3ia3', remote=True) ent_full = ost.io.LoadPDB('3ia3', remote=True)
ent_1 = ent_full.Select('cname=A,D') ent_1 = ent_full.Select('cname=A,D')
ent_2 = ent_full.Select('cname=B,C') ent_2 = ent_full.Select('cname=B')
# get score # get score
ost.PushVerbosityLevel(3) ost.PushVerbosityLevel(3)
try: try:
qs_scorer = qsscoring.QSscorer(ent_1, ent_2) scorer = scoring.Scorer(ent_1, ent_2)
ost.LogScript('QSscore:', str(qs_scorer.global_score)) ost.LogScript('QSscore:', str(scorer.qs_global))
ost.LogScript('Chain mapping used:', str(qs_scorer.chain_mapping)) ost.LogScript('Chain mapping used:', str(scorer.chain_mapper))
print(dir(scorer.chain_mapper))
ost.LogScript('Chain mapping used:', str(scorer.chain_mapper))
except qsscoring.QSscoreError as ex: except qsscoring.QSscoreError as ex:
# default handling: report failure and set score to 0 # default handling: report failure and set score to 0
ost.LogError('QSscore failed:', str(ex)) ost.LogError('QSscore failed:', str(ex))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment