IMP  2.1.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 import IMP
5 import IMP.atom
6 import IMP.container
7 
8 
9 def create_representation():
10  m = IMP.kernel.Model()
12  '1fdx.B99990001.pdb'), m, IMP.atom.NonWaterNonHydrogenPDBSelector())
13  prot = IMP.atom.get_by_type(mp0, IMP.atom.CHAIN_TYPE)[0]
14  return (m, prot)
15 
16 
17 def add_dope(m, prot):
18  ps = IMP.atom.get_by_type(prot, IMP.atom.ATOM_TYPE)
19  for p in ps:
21  print "Huh?", p
22  dpc = IMP.container.ClosePairContainer(ps, 15.0, 0.0)
23 # exclude pairs of atoms belonging to the same residue
24 # for consistency with MODELLER DOPE score
26  dpc.add_pair_filter(f)
28  dps = IMP.atom.DopePairScore(15.0)
29 # dps= IMP.membrane.DopePairScore(15.0, IMP.membrane.get_data_path("dope_scorehr.lib"))
30  d = IMP.container.PairsRestraint(dps, dpc)
31  m.add_restraint(d)
32 
33 print "creating representation"
34 (m, prot) = create_representation()
35 
36 print "creating DOPE score function"
37 add_dope(m, prot)
38 
39 IMP.base.set_check_level(IMP.base.USAGE)
40 print "DOPE SCORE ::", m.evaluate(False)