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
biotite.structure.superimpose()currently returns anAffineTransformation. Multiple aspects could be refactored here:AffineTransformationrepresents actually a rigid transformation, it would be renamed toRigidTransformationapply()fasteralign_vectors()orient_principal_components()__mul__()for combination of transformation__neg__()for to reverse a transformation