[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] active particles and their restraints



Ben Webb wrote:
Friedrich Foerster wrote:
i tried to deactivate particles and optimize only selected parts of a model. when using the em restraint i observed an oddity: restraints are not evaluated, if ONE particle in the set is not active. i do not think this is a sensible thing, for example my em restraint was not evaluated at all... i attached a patch where a restraint is omitted only if ALL particles are inactive.
if you agree that it makes more sense, please commit it to imp.

I don't think it makes sense to change this in the Restraint base class, since that's a dangerous 'default' behavior. Turning off a particle in IMP effectively deletes it, so it shouldn't interact any more with any other particle. You could change this method just for your EM restraint, but then you'd also have to check inside the restraint whether each particle is active at evaluation time.
the problem goes beyond the EM restraint: the ExcludedVolume restraint is also not evaluated if only one particle is switched off. if the particle switch does evil things, probably it should deleted anyway. i am happy to use set_is_optimized instead - but as it stands now, the switch remains a trap the next person is bound to fall into.
If you just don't want these particles to move, you can call the set_is_optimized method on these particles' x, y and z coordinates.

	Ben


--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Friedrich Foerster                                            %
% Andrej Sali Lab                                               %
% University of California at San Francisco                     %
% MC 2552                                                       %
% Byers Hall Room 501                                           %
% 1700 4th Street                                               %
% San Francisco, CA 94158-2330, USA                             %
%                                                               %
% phone:  +1 (415) 514-4258                                     %
% fax:    +1 (415) 514-4231                                     %
%                                                               %
%   www.salilab.org/~frido                                      %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%