Added transformation return to orient_principal_components - #934
Added transformation return to orient_principal_components#934nablacart wants to merge 14 commits into
Conversation
Reflect that the RCSB now supports BCIF download of extended PDB IDs
Perf: align_multiple speedup from using typed memoryviews
Set nonzero vina seed for determinism
Remove forward references by using PEP 649 deferred evaluation
Add CLePAPS structural alphabet
… in addition to transformed coordinates.
padix-key
left a comment
There was a problem hiding this comment.
I think this is a good idea 👍. However it changes the function signature, so it would put this into the biotite v2 release (which is already planned after the next release).
Otherwise, I left a minor review comment
| break | ||
| cumulative_rotation = cumulative_rotation @ rotation | ||
| # Apply rotation, keep molecule centered on the origin | ||
| centered = centered @ rotation |
There was a problem hiding this comment.
As we have a AffineTransformation at hand now, I see no reason to carry centered around. Instead we can simply
return transform.apply(atoms), transform
|
I'll change the target branch to |
|
If I see correctly you merged previous PRs from |
Merging this PR will degrade performance by 12.43%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
My apologies, I am inexperienced with contributing from a fork instead of a branch. I did rebase on v2 but may have done so incorrectly, so I'll revert and try again. |
|
No worries, if you prefer I can also rerun the rebase (although I am not sure if GitHub allows me force-pushing to your branch afterwards) |
Modified
transform.orient_principal_componentsto return anAffineTransformationof centering translation and cumulative rotation to align with specified axes, in addition to transformed coordinates. Updated tests to reflect changes.Returning the transformation allows for downstream alignment to a specific component of the input structure.
Validated with:
pixi run -e test test tests/structure/test_transform.py -q: 1135 passed