I have some code for you, but the repository appears to be broken. Here is the example: import IMP import IMP.core # This example addes a restraint on bipartite nonbonded interactions # after excluding a set of bonded interactions. m= IMP.Model() # The set of particles lc= IMP.core.ListSingletonContainer(IMP.core.create_xyzr_particles(m, 20, 1.0)) ps = IMP.core.AllPairsPairContainer(lc) # Set up the nonbonded list h=IMP.core.HarmonicUpperBound(10,1) d=IMP.core.DistancePairScore(h) r= IMP.core.PairsRestraint(d, ps) m.add_restraint(r) # Set up optimizer o= IMP.core.ConjugateGradients() o.set_model(m) o.optimize(100) for i in range(0, ps.get_number_of_particle_pairs()): p= ps.get_particle_pair(i) print IMP.core.distance(IMP.core.XYZDecorator(p[0]), IMP.core.XYZDecorator(p[1])) On Dec 1, 2008, at 12:11 AM, Friedrich Foerster wrote:
|