Skip to content

Redundant rotQuat.unit() call in class_Molecule_Complex.cpp #9

Description

@yingyue2030699

In class_Molecule_Complex.cpp line 1071:

      Quat rotQuat{};
      rotQuat.x = (sinX * cosY * cosZ) - (cosX * sinY * sinZ);
      rotQuat.y = (cosX * sinY * cosZ) + (sinX * cosY * sinZ);
      rotQuat.z = (cosX * cosY * sinZ) - (sinX * sinY * cosZ);
      rotQuat.w = (cosX * cosY * cosZ) + (sinX * sinY * sinZ);
      rotQuat.unit(); # <---
      const auto preparedTrajectoryRotation = rotQuat.prepareRotation();

This line produces a redundant matrix:

  1. The math above for rotQuat guarantees the rotQuat to be unit quaternion within double error range.
  2. rotQuat.unit() is only written as a output function, not a overwrite function so this line does nothing to begin with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions