#-- File: simple_diameter.py --# import IMP import IMP.core import IMP.helper imp_model = IMP.Model() ps = IMP.core.create_xyzr_particles(imp_model, 50, 1.0) diameter = 10 sd = IMP.helper.create_simple_diameter(ps, diameter) r = sd.get_restraint() h = sd.get_harmonic_upper_bound() sd.set_mean(10.0) sd.set_stddev(3.5) sd.set_k(0.1) imp_model.add_restraint(r) r.show() imp_model.evaluate(False)