Sorry about the confusion. The Euler angle support has been added in a fairly ad hoc manner and is not extremely coherent or consistent. I think part of this is intrinsic to Euler angles as there are lots of conventions used in different places. You can see some more discussion about what to do with them at <https://github.com/salilab/imp/issues/303>. We didn't really come to any solid consensus on where to go.


On Mon, Jul 15, 2013 at 6:59 AM, Dan Cohen <bojemoi@gmail.com> wrote:
Hello all,

Please refer to Rotation3D.h
I add my remarks, all starting by XXXXXX :


/** \name Euler Angles
    There are many conventions for how to define Euler angles, based on choices
    of which of the x,y,z axis to use in what order and whether the rotation
    axis is in the body frame (and hence affected by previous rotations) or in
    in a fixed frame. See
    http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
    for a general description.

    - All Euler angles are specified in radians.
    - The names are all \c rotation_from_{fixed/body}_abc() where abc is the
    ordering of x,y,z.
    @{
*/

XXXXXX According to that, functions with the word "fixed" in their name should
XXXXXX Use the Lab fixed axis for rotations and NOT the new axis.

//! Initialize a rotation in x-y-z order from three angles
/** \param[in] xr Rotation around the X axis in radians
    \param[in] yr Rotation around the Y axis in radians
    \param[in] zr Rotation around the Z axis in radians
    \note The three rotations are represented in the original (fixed)
    coordinate frame.
    See Rotation3D
    See FixedXYZ
*/
IMPALGEBRAEXPORT Rotation3D get_rotation_from_fixed_xyz(double xr, double yr,
                                                        double zr);

XXXXXX The above function complies with the above rule

//! Initialize a rotation from euler angles
/**
   \param[in] phi   Rotation around the Z axis in radians
   \param[in] theta Rotation around the X axis in radians
   \param[in] psi   Rotation around the Z axis in radians
   \note The first rotation is by an angle phi about the z-axis.
   The second rotation is by an angle theta in [0,pi] about the
   former x-axis , and the third rotation is by an angle psi
   about the former z-axis.
   See Rotation3D
*/
IMPALGEBRAEXPORT Rotation3D get_rotation_from_fixed_zxz(double phi,
                                                        double theta,
                                                        double psi);

XXXXXX I'm not sure what "former" means here, but probably this function complies too.
XXXXXX Don't understand why angle parameter names are so different here

//! Generate a rotation object from Euler Angles
/** \note The first rotation is by an angle about the z-axis.
    The second rotation is by an angle about the new y-axis.
    The third rotation is by an angle about the new z-axis.
    \param[in] Rot First Euler angle (radians) defining the rotation (Z axis)
    \param[in] Tilt Second Euler angle (radians) defining the rotation (Y axis)
    \param[in] Psi Third Euler angle (radians) defining the rotation (Z axis)
    See Rotation3D
    See FixedZYZ
*/
IMPALGEBRAEXPORT Rotation3D get_rotation_from_fixed_zyz(double Rot, double Tilt,
                                                        double Psi);

XXXXXX This function is also called fixed but clearly says it is using the NEW axis.


I'm confused and add to that , the fact that the results of these functions seem to be different than the ones produced by Chimera's rotate function so I'm in a problem here.

Thank you,
Dany


_______________________________________________
IMP-users mailing list
IMP-users@salilab.org
https://salilab.org/mailman/listinfo/imp-users