Hi,
I have noticed an odd thing when trying to shuffle flexible beads decorated with Gaussian particles. The code in IMP.pmi.tools.shuffle_configuration uses
xyz=[fb.get_value(IMP.FloatKey(4)), fb.get_value(IMP.FloatKey(5)), fb.get_value(IMP.FloatKey(6))]
to get the initial XYZ location of the Gaussian fb.
However, this location does not return the same value as
IMP.core.XYZ(fb)
And it looks like IMP.core.XYZ is actually the correct location of the floppy body, leading to some odd results when shuffling based on the fb.get_value() based locations.
What is the correct way to find the location of, and move, a Gaussian decorated flexible bead?
Fergal Duffy Staff Scientist Center for Infectious Disease Researchhttp://www.cidresearch.org/ 307 Westlake Ave N, Suite 500 | Seattle, WA 98109 206.256.7435 | fergal.duffy@cidresearch.orgmailto:fergal.duffy@cidresearch.org
On 01/29/2018 02:12 PM, Fergal Duffy wrote: > The code in IMP.pmi.tools.shuffle_configuration uses > > xyz=[fb.get_value(IMP.FloatKey(4)), fb.get_value(IMP.FloatKey(5)), > fb.get_value(IMP.FloatKey(6))] > > to get the initial XYZ location of the Gaussian fb. > > However, this location does not return the same value as > > IMP.core.XYZ(fb)
While this code is rather ugly[*], it looks correct to me. The former returns local coordinates (i.e. in the reference frame of the owning rigid body) while the latter works in the global reference frame. I wouldn't expect them to be the same unless the rigid body's reference frame was at the origin.
What are the odd results you're referring to?
[*] It should be using fb.get_internal_coordinates() instead, which would make the intention clearer.
Ben