IMP  2.4.0
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 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))
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