#-- File: simple_excluded_volume.py --# import IMP import IMP.core import IMP.atom import IMP.helper m= IMP.Model() sel = IMP.atom.CAlphaPDBSelector() p0 = IMP.atom.read_pdb( IMP.helper.get_example_path("input.pdb"), m, sel) p1 = IMP.atom.read_pdb( IMP.helper.get_example_path("input.pdb"), m, sel) mhs = IMP.atom.Hierarchies() mhs.append(p0) mhs.append(p1) ps = IMP.Particles() for mh in mhs: ps.append(mh.get_particle()) rbs = IMP.helper.set_rigid_bodies(mhs) sev = IMP.helper.create_simple_excluded_volume_on_rigid_bodies(rbs) r = sev.get_restraint() m.add_restraint(r)