IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
assess_dope.py
1
## \example atom/assess_dope.py
2
## The script shows how to assess a protein conformation using DOPE.
3
4
import
IMP
5
import
IMP.atom
6
import
IMP.container
7
8
def
create_representation():
9
m=
IMP.Model
()
10
mp0=
IMP.atom.read_pdb
(
IMP.atom.get_example_path
(
'1fdx.B99990001.pdb'
), m,
IMP.atom.NonWaterNonHydrogenPDBSelector
())
11
prot=
IMP.atom.get_by_type
(mp0, IMP.atom.CHAIN_TYPE)[0]
12
return
(m, prot)
13
14
def
add_dope(m, prot):
15
ps=
IMP.atom.get_by_type
(prot, IMP.atom.ATOM_TYPE)
16
for
p
in
ps:
17
if
not
IMP.atom.Atom.particle_is_instance
(p):
18
print
"Huh?"
, p
19
dpc =
IMP.container.ClosePairContainer
(ps, 15.0, 0.0)
20
# exclude pairs of atoms belonging to the same residue
21
# for consistency with MODELLER DOPE score
22
f=
IMP.atom.SameResiduePairFilter
()
23
dpc.add_pair_filter(f)
24
IMP.atom.add_dope_score_data
(prot)
25
dps=
IMP.atom.DopePairScore
(15.0)
26
# dps= IMP.membrane.DopePairScore(15.0, IMP.membrane.get_data_path("dope_scorehr.lib"))
27
d=
IMP.container.PairsRestraint
(dps, dpc)
28
m.add_restraint(d)
29
30
print
"creating representation"
31
(m,prot)=create_representation()
32
33
print
"creating DOPE score function"
34
add_dope(m,prot)
35
36
IMP.base.set_check_level
(IMP.base.USAGE)
37
print
"DOPE SCORE ::"
,m.evaluate(
False
)