# Re: [IMP-dev] maximum diameter restraints

• To: List for IMP development <>
• Subject: Re: [IMP-dev] maximum diameter restraints
• From: Keren Lasker <>
• Date: Wed, 3 Dec 2008 19:54:35 +0100
• Reply-to: List for IMP development <>

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.
```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
--
escramble("ben","salilab.org")benATsalilab.org                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
- Sir Arthur Conan Doyle
_______________________________________________
IMP-dev mailing list
escramble("IMP-dev","salilab.org")IMP-devATsalilab.org
https://salilab.org/mailman/listinfo/imp-dev
```
```

```