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

Make coordinate library #28

Merged
merged 5 commits into from
Mar 6, 2020
Merged

Make coordinate library #28

merged 5 commits into from
Mar 6, 2020

Conversation

joaomcteixeira
Copy link
Member

@joaomcteixeira joaomcteixeira commented Nov 22, 2019

Addresses #27

I am currently working on this implementation. I create now this PR so that @AlaaShamandy @RobertVernon can easily follow the progression in real time. Parallel work is taking place at #23.

@joaomcteixeira joaomcteixeira added this to the First release milestone Nov 22, 2019
@joaomcteixeira joaomcteixeira self-assigned this Nov 22, 2019
@joaomcteixeira joaomcteixeira added this to In progress in Conformer Construction via automation Nov 22, 2019
@joaomcteixeira
Copy link
Member Author

joaomcteixeira commented Nov 22, 2019

This PR incorporates the Natural Extension Reference Frame (NeRF) algorithm to place new coordinates in the reference space given a theta and torsion angle and three parent coordinates.

Thanks to @RobertVernon for placing the math initially, here I have cleaned it, document it and implemented the tests.

@AlaaShamandy @RobertVernon please review and accept for Merge.

This PR aids on completing #27.

@joaomcteixeira joaomcteixeira changed the title Conformer Builder library Make coordinate library Nov 24, 2019
src/idpconfgen/libs/libcalc.py Show resolved Hide resolved
@@ -88,10 +90,10 @@ def RT_to_plane(A, B, C):# PARENT, XAXIS, PLANE

v = AXIS_111

return np.dot(b, v), A
return np.dot(b, v)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch :D

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll note that this means the function is no longer "RT_to_plane"

(RT is the shorthand for a pair of Rotation + Translation objects)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment!

@joaomcteixeira
Copy link
Member Author

Thanks for your review @AlaaShamandy .
I will add additional test cases to make sure this implementation follows exactly what was proposed by @RobertVernon on the first script.

* np.dot(v,b) corrected to np.dot(v,b).T
* added additional tests
* Closes #31
@joaomcteixeira
Copy link
Member Author

@RobertVernon @AlaaShamandy this PR is ready for review and merge. Please share your comments

@joaomcteixeira
Copy link
Member Author

Thx @RobertVernon and @AlaaShamandy for your comments. We can have this merge now:

tests/test_libcalc.py::test_make_axis_vectors_1[av0-bv0-cv0-expected0] PASSED                                            [  2%]
tests/test_libcalc.py::test_make_axis_vectors_1[av1-bv1-cv1-expected1] PASSED                                            [  4%]
tests/test_libcalc.py::test_rotation_to_plane[av0-bv0-cv0-expected0] PASSED                                              [  7%]
tests/test_libcalc.py::test_make_coord_from_angles[1-1-1-expected0] PASSED                                               [  9%]
tests/test_libcalc.py::test_make_coord[1-1-1-parent0-xaxis0-yaxis0-expected0] PASSED                                     [ 11%]
tests/test_libcalc.py::test_make_coord[1.1-0.3-4.5-parent1-xaxis1-yaxis1-expected1] PASSED                               [ 14%]
tests/test_libcalc.py::test_make_coord[1-1-1-parent2-xaxis2-yaxis2-expected2] PASSED                                     [ 16%]


src/idpconfgen/libs/libcalc.py             29      0      6      0   100.00%

@joaomcteixeira joaomcteixeira merged commit 940bf4b into julie-forman-kay-lab:develop Mar 6, 2020
@joaomcteixeira joaomcteixeira deleted the i27 branch March 6, 2020 19:26
@joaomcteixeira joaomcteixeira moved this from In progress to Done in Conformer Construction Apr 25, 2022
Oufan75 pushed a commit to Oufan75/IDPConformerGenerator that referenced this pull request Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants