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