Skip to content

Refactor AffineTransformation #844

@padix-key

Description

@padix-key

biotite.structure.superimpose() currently returns an AffineTransformation. Multiple aspects could be refactored here:

  • As AffineTransformation represents actually a rigid transformation, it would be renamed to RigidTransformation
  • Currently it uses two translations and a rotation. However a rigid transformation can always be represented by a single translation and rotation, which would make apply() faster
  • It would make sense if other function also return a transformation instead of already transformed coordinates:
    • align_vectors()
    • orient_principal_components()
  • Add ability to 'compose' transformations:
    • __mul__() for combination of transformation
    • __neg__() for to reverse a transformation

Metadata

Metadata

Assignees

No one assigned

    Labels

    major releasePotentially backwards incompatible changes that should go in to the next major release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions