import IMP.atom m= IMP.Model() prot= IMP.atom.read_pdb(IMP.atom.get_example_path("example_protein.pdb"), m) bds= IMP.atom.get_internal_bonds(prot) bl= IMP.container.ListSingletonContainer(bds.get_particles()) h= IMP.core.Harmonic(0,1) bs= IMP.atom.BondSingletonScore(h) br= IMP.container.SingletonsRestraint(bs, bl) m.add_restraint(br) print m.evaluate(False)