Re: [IMP-dev] set_coordinates_are_optimized function
To: List for IMP development <>
Subject: Re: [IMP-dev] set_coordinates_are_optimized function
From: Daniel Russel <>
Date: Tue, 24 Sep 2013 11:57:30 -0700
Reply-to: List for IMP development <>
There hasn't been any systematic pass through things to make them consistent. That said, I think at this point most (all?) movers move the particles they are told to move.
*Marking an attribute as not optimized has never meant that the attribute will not change during optimization and, similarly, marking it as optimized has never meant that it will necessarily be optimized*. For example the global coordinates of all members of rigid bodies are set as non-optimized, but change. And, marking the z coordinate of something as non-optimized is unlikely to ever make it not change (it may trigger an exception though).
Going the a three state `constant` (changes are dropped on the floor), `computed` (value is the result of a score state, so changes outside of that trigger an error), `variable` (the optimizer can change it if it wants) might make the most sense. I'm not sure how expensive adding a check if things are constant before setting would be in practice.
See issue https://github.com/salilab/imp/issues/255. There was (and to some extent is) a lot of ambiguity about how setting individual coordinates to be optimized interactions with telling MC to move them.
I have a question about the "set_coordinates_are_optimized" function in IMP 2.0.1.
In the IMP versions < 2.0, to set the coordinates of a given particle, e.g., P1 to (0,0,0), I would use the following code:
> fixedP = "1"
> p = ps.get_particle(index)
> if pname == fixedP:
> Â Â d = IMP.core.XYZ(p)
> Â Â d.set_coordinates(IMP.algebra.Vector3D(0,0,0))
> Â Â d.set_coordinates_are_optimized(False)
In IMP 2.0.1, even though, at this point, the coordinates of the particle "fixedP" are set to (0,0,0), the "set_coordinates_are_optimized" does not seem to work anymore (the coordinates of Â"fixedP" Âchange during the optimization). Has this function beed replaced with a new one in the latest IMP version?