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

[BUG] AmberRst7.box_angles() objects have the wrong units #106

Closed
lohedges opened this issue Sep 20, 2023 · 2 comments · Fixed by #119
Closed

[BUG] AmberRst7.box_angles() objects have the wrong units #106

lohedges opened this issue Sep 20, 2023 · 2 comments · Fixed by #119
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lohedges
Copy link
Contributor

Angles returned by the box_angles() method have length units:

In [1]: import sire as sr

In [2]: s = sr.load_test_files("ala.crd", "ala.top")

In [3]: rst7 = sr.legacy.IO.AmberRst7(s._system)

In [4]: rst7.box_angles()
Out[4]: ( 90 Å, 90 Å, 90 Å )

In [5]: rst7.box_angles()[0].angle()
Out[5]: 0

In [6]: rst7.box_angles()[0].length()
Out[6]: 1
@lohedges lohedges added the bug Something isn't working label Sep 20, 2023
@chryswoods
Copy link
Contributor

Good spot - this is in the python layer only, but is definitely annoying. The Vector class has some Python overrides that add length units to its components. I'll need to either remove these for this class or create a typed-vector interface for angles. For now, use .value() to get the raw doubles representing the angles in degrees.

@lohedges
Copy link
Contributor Author

Great. I assumed it must be a Python layer thing since I've never had an issue with parsing anything, or creating spaces based on the box information. As suggested, I'm currently using .value(), then manually converting to degrees 👍

@chryswoods chryswoods added this to the 2023.5.0 milestone Oct 7, 2023
@chryswoods chryswoods self-assigned this Oct 25, 2023
@chryswoods chryswoods mentioned this issue Oct 25, 2023
@chryswoods chryswoods linked a pull request Oct 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants