IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
simple_excluded_volume.py
1
## \example restrainer/simple_excluded_volume.py
2
## This example shows how to create simple IMP::core::ExcludedVolumeRestraint.
3
##
4
5
#-- File: simple_excluded_volume.py --#
6
7
import
IMP
8
import
IMP.core
9
import
IMP.atom
10
import
IMP.restrainer
11
12
m=
IMP.Model
()
13
14
sel =
IMP.atom.CAlphaPDBSelector
()
15
p0 =
IMP.atom.read_pdb
(
16
IMP.restrainer.get_example_path
(
"input.pdb"
), m, sel)
17
p1 =
IMP.atom.read_pdb
(
18
IMP.restrainer.get_example_path
(
"input.pdb"
), m, sel)
19
20
mhs = IMP.atom.Hierarchies()
21
mhs.append(p0)
22
mhs.append(p1)
23
24
ps = []
25
for
mh
in
mhs:
26
ps.append(mh.get_particle())
27
28
rbs =
IMP.restrainer.set_rigid_bodies
(mhs)
29
30
sev = IMP.restrainer.create_simple_excluded_volume_on_rigid_bodies(rbs)
31
32
r = sev.get_restraint()
33
34
m.add_restraint(r)