IMP  2.3.1
The Integrative Modeling Platform
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 
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)
Select non water and non hydrogen atoms.
Definition: pdb.h:197
Various classes to hold sets of particles.
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
Definition: exception.h:73
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
Return all close unordered pairs of particles taken from the SingletonContainer.
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
static bool get_is_setup(const IMP::kernel::ParticleAdaptor &p)
Definition: atom/Atom.h:241
void add_dope_score_data(atom::Hierarchy h)
Functionality for loading, creating, manipulating and scoring atomic structures.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Applies a PairScore to each Pair in a list.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73