Skip to content
Snippets Groups Projects
Select Git revision
  • 57df9fafb18906bd7962c9067cbaa24e64b1ed00
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

test_docker.py

Blame
  • user avatar
    Xavier Robin authored
    ef01f4ea
    History
    test_docker.py 991 B
    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!")