bug in core::Centroid class derivative propagation to fine particles?
I was wondering whether there is a bug in derivative propagation in the core::Centroid class - is anybody else using it?
As it is now, the derivatives of the centroid are copied to the finer particles as is, using the DerivativesToRefinedas class. Shouldn't the derivatives be rescaled first according to the mass contribution of each fine particle to the centroid?
For instance, let p1 and p2 be particles of masses 10 and 20 respectively. Then if a derivative of 3 units is accumulated in C, then right now, a derivative of 3 units is also copied to p1 and p2 each. Shouldn't this be reweighted such that p1 get 1 derivative units and p2 gets 2 derivative units?
On 4/14/14, 2:21 PM, Barak Raveh wrote: > As it is now, the derivatives of the centroid are copied to the finer > particles as is, using the DerivativesToRefinedas class. Shouldn't the > derivatives be rescaled first according to the mass contribution of each > fine particle to the centroid?
Your analysis sounds reasonable to me. See also commit f8ea98f7f2 and the associated issue #775 - may be related.
Ben
Thanks Ben. BTW, I used the term mass, but I meant weight in general, same message nonetheless. Centroid class itself seems to be the unweighted geometric center, and CentroidOfRefined can also take a key for weights (eg, density).
Does any one use Centroid? I am afraid that fixing this would cause trouble in existing code. I will also grep, but in case somebody is using it out of the main repository.
On Mon, Apr 14, 2014 at 2:24 PM, Ben Webb ben@salilab.org wrote:
> On 4/14/14, 2:21 PM, Barak Raveh wrote: > >> As it is now, the derivatives of the centroid are copied to the finer >> particles as is, using the DerivativesToRefinedas class. Shouldn't the >> derivatives be rescaled first according to the mass contribution of each >> fine particle to the centroid? >> > > Your analysis sounds reasonable to me. See also commit f8ea98f7f2 and the > associated issue #775 - may be related. > > 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 >
participants (2)
-
Barak Raveh
-
Ben Webb