Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to use align_principal_axis with a principal axis #1045

Closed
kain88-de opened this issue Oct 21, 2016 · 0 comments
Closed
Assignees
Milestone

Comments

@kain88-de
Copy link
Member

Expected behaviour

Align with first PA should be possible.

pa = ag.principal_axes()
ag.align_principal_axis(0, pa[0])

Then I have my protein in the principal axis reference frame. Note that it would work if align to different principal axes

Actual behaviour

All values in the position array are set to NaN

Why does this happen

The problem for this specific case is that mda.lib.transformations.rotaxis will return NaN if both vectors are the same. The solution is to catch this before and return a fixed axis like [1, 0, 0].

@kain88-de kain88-de added this to the 0.16.0 milestone Oct 21, 2016
@kain88-de kain88-de self-assigned this Oct 21, 2016
@kain88-de kain88-de mentioned this issue Oct 25, 2016
4 tasks
abiedermann pushed a commit to abiedermann/mdanalysis that referenced this issue Jan 5, 2017
* pep8 changes topologyattrs

* pep8 changes test file

* add license to test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant