
Ummm, same problem as last time on the first one :-)
Keren Lasker wrote: > I am using the latest version, updated an hour ago. > The code is: > Particles r_particles; > for(ParticlesList::iterator it1 = > r.get_interacting_particles().begin(); > it1 != r.get_interacting_particles().end(); it1++){ > std::cout<<it1->size()<std::endl; for(Particles::iterator it2 = it1->begin(); it2 != it1->end(); > it2++) { > r_particles.push_back(*it2); > } > } > > > The size I get from the first one is: 17507811567898 > The restraint is of type > connectivity restraint (active): > > I solved it by using: > Particles r_particles; > ParticlesList pl; > for(ParticlesList::iterator it1 = pl.begin(); > it1 != pl.end(); it1++){ > std::cout<<it1->size()<std::endl; for(Particles::iterator it2 = it1->begin(); it2 != it1->end(); > it2++) { > r_particles.push_back(*it2); > } > } > > > but I think that the first version should work as well - no ?? > > On Aug 21, 2008, at 12:54 AM, Ben Webb wrote: > > >> Keren Lasker wrote: >> >>> ok - so I am using the latest IMP version, which broke my c++ code as >>> now I should use get_interacting_particles., which is fine. >>> The problem is that it is not working for ConnectivityRestraint >>> from c+ >>> +. >>> The first Particles I get in the ParticlesList is garbage. >>> >> What sort of garbage? Invalid pointers, or something else? Can you >> post >> your code? >> >> >>> does it suppose to work on or at this point ? >>> >> Sure, it's supposed to work - at least in the revision at >> https://salilab.org/internal/imp/tests.html >> since that's from the nightly build, and all the tests passed. There >> are >> unit tests for this method. What you should be getting for >> ConnectivityRestraint is the default implementation from Restraint, >> which is a 1-element ParticlesList containing a Particles vector with >> all Particles in the restraint. >> >> Ben >> -- >> ben@salilab.org http://salilab.org/~ben/ >> "It is a capital mistake to theorize before one has data." >> - Sir Arthur Conan Doyle >> _______________________________________________ >> IMP-dev mailing list >> IMP-dev@salilab.org >> https://salilab.org/mailman/listinfo/imp-dev >> > > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev >