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

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



Ben Webb wrote:
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.
I think the current behavior is kind of stupid. As it stands, if you inactivate a particle and forget to update all the restraints, your optimization just silently fails (since some restraints just stop being used). This is really bad (as Frido presumably discovered). We can print warnings if restraints are inactivated, but this is kind of awkward as you then pollute the log for anyone who wants to depend on the "correct" behavior.

In addition, we don't have support for the automatic deactivation in the States, so these now work differently than the Restraints, which is a bit silly.

If we want to think about it like deleting the particle, then we should make it a reported error to touch an inactive particle. This is trivial to implement. It would then be the restraints responsibility to check that the particles are all active.
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.
Agreed.