IMP logo
IMP Reference Guide  2.10.1
The Integrative Modeling Platform
atom/assess_dope.py

The script shows how to assess a protein conformation using DOPE.

1 ## \example atom/assess_dope.py
2 # The script shows how to assess a protein conformation using DOPE.
3 
4 from __future__ import print_function
5 import IMP
6 import IMP.atom
7 import IMP.container
8 import sys
9 
10 IMP.setup_from_argv(sys.argv, "assess dope")
11 
12 def create_representation():
13  m = IMP.Model()
15  '1fdx.B99990001.pdb'), m, IMP.atom.NonWaterNonHydrogenPDBSelector())
16  prot = IMP.atom.get_by_type(mp0, IMP.atom.CHAIN_TYPE)[0]
17  return (m, prot)
18 
19 
20 def add_dope(m, prot):
21  ps = IMP.atom.get_by_type(prot, IMP.atom.ATOM_TYPE)
22  for p in ps:
24  print("Huh?", p)
25  dpc = IMP.container.ClosePairContainer(ps, 15.0, 0.0)
26 # exclude pairs of atoms belonging to the same residue
27 # for consistency with MODELLER DOPE score
29  dpc.add_pair_filter(f)
31  dps = IMP.atom.DopePairScore(15.0)
32 # dps= IMP.membrane.DopePairScore(15.0, IMP.membrane.get_data_path("dope_scorehr.lib"))
33  d = IMP.container.PairsRestraint(dps, dpc)
34  return d
35 
36 print("creating representation")
37 (m, prot) = create_representation()
38 
39 print("creating DOPE score function")
40 d = add_dope(m, prot)
41 
42 IMP.set_check_level(IMP.USAGE)
43 print("DOPE SCORE ::", d.evaluate(False))