As with any thing you want to use that is an offset from a value, you
need to keep track of the offset and subtract it when you set the
value. For ease with rigid bodies, compute the centroid in the rigid
body frame (or apply the inverse transform to map a point in external
coordinates) and then rotate the internal coordinates and subtract
them before setting when you want to set the translational part of
the coordinats later. Make sense?
If you don't care what centroid you use, just use the rigid body
center (since it is currently a unwejghted centroid and will at most
change to a weighted centroid).
This is how I solved it now - but I would like to change the
centroid of the rigid body after an optimization stage since it is
part of a bigger optimization protocol.
On May 25, 2009, at 1:54 PM, Daniel Russel wrote:
Assuming you want to transform, say, the input pdb, then just get
the transformation immediately following creation and compose with
that (since the initial transform has not moved the object).