For small numbers of particles, the quadratic approach should be faster. What small means is less clear :-)
On Dec 3, 2008, at 2:41 PM, "Friedrich Foerster" <foerster@biochem.mpg.de > wrote:
> currently, we do not have too many particles. but of course it'd be > nice to have a faster restraint in any case ;) > > tx > > frido > > On Wed, Dec 3, 2008 at 8:01 PM, Daniel Russel drussel@gmail.com > wrote: > Keren Lasker wrote: > > Ben - I might be missing something here but the centroid changes at > > each optimization step - so this means that the particle will > converge > > slower in the O(N) suggestion than in the O(N^2) suggestion - since > > the centroid of the previous iteration will hold it back. > > > The score state is updated before the restraints are evaluated, so it > will always have the position of the current centroid. > > > On Dec 3, 2008, at 7:36 PM, Ben Webb wrote: > > > > > >> Friedrich Foerster wrote: > >> > >>> for the 26s project i would like to use a maximum diameter > restraint > >>> on the shape of proteins. so it'd be a restraint similar to the > >>> connectivity restraint: all distances in a protein are evaluated > and > >>> if the largest distance is above a specified threshold, a harmonic > >>> restraint would be applied on the respective pair. > >>> > >> The solution already proposed by Daniel looks perfect to me as a > >> literal > >> solution to your problem, but is that really what you want to do: > >> constrain every particle pair in the protein to less than the > >> diameter? > >> If you have a lot of particles, that's going to become expensive > >> rather > >> quickly (O(N^2), obviously). Another option to consider would be to > >> constrain every particle to be less than the radius from the > protein > >> center. That would give you far fewer restraints and scale as O(N). > >> You > >> could do this with a bunch of DistanceToSingletonScores if the > protein > >> center is at a fixed point, or use a GravityCenterScoreState to > >> stick a > >> particle at the center of gravity of your protein, and then use > >> regular > >> distance restraints between each particle and that center. > >> > >> 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 > > > > _______________________________________________ > 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