File: scoring_main.py

package info (click to toggle)
promod3 3.4.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 966,596 kB
  • sloc: cpp: 55,820; python: 18,058; makefile: 85; sh: 51
file content (22 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from ost import io, seq
from promod3 import loop, scoring

# load data
ent = io.LoadPDB("data/1CRN.pdb")
ent_seq = seq.SequenceFromChain('A', ent.FindChain('A'))

# setup score environment linked to entity
score_env = scoring.BackboneScoreEnv(ent_seq)
score_env.SetInitialEnvironment(ent)

# setup scorers attached to that env.
clash_scorer = scoring.ClashScorer()
clash_scorer.AttachEnvironment(score_env)
cbeta_scorer = scoring.LoadCBetaScorer()
cbeta_scorer.AttachEnvironment(score_env)

# calculate scores for 10 residues starting at residue number 23.
# all required structural information comes from the environment
# that can evolve as the modelling proceeds.
print("Clash-Score", clash_scorer.CalculateScore(23, 10))
print("CBeta-Score", cbeta_scorer.CalculateScore(23, 10))