-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add new utility functions #129
Conversation
Opps, yeah. I commented on the PR before thoroughly reading your text. Probably best to merge these two functions since they are so similar.
Is this somehow better than reading and writing JSON? I think this seems a little more fragile because of how the file is parsed.
Good point.
👍 |
This pull request introduces 1 alert when merging 96219fe into 1bfce3a - view on LGTM.com new alerts:
|
This reverts commit f06901b.
@slochower can you take a look at this PR again, I want to move on to implementing the Gromacs support module.
I've decided to keep the two functions (
I use this primarily for parsing restraints from a file generated from VMD. It's more convenient to use the mouse-click in VMD to select bonds, angles and dihedrals and then extract them to a file with a TCL script. I've added an example in the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin' good.
Thanks, that definitely helped clarify things. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to go.
This PR adds and improves on utility functions used to aid in system setup and restraint preparation.
Modified
align.py::zalign
z
to align to. Example,align.py::get_theta
axis
using thealign.py::_return_array
function.align.py::offset_structure
New
align.py::align_principal_axes
align.py::translate_to_origin
align.py::get_rotation_matrix
vector
to a referenceref_vector
.align.py::zalign
andalign.py::align_principal_axes
.align.py::_return_array
axis
ordimension
used a number of functions inalign.py
."x"
), a list ([0,0,1]
) or a numpy array and returns an array.restraints/utils.py::extract_guest_restraints
ref_state_work
. It basically extracts the guest restraints from a list of restraints that is loaded from ajson
file.(r, theta, phi, alpha, beta, gamma)
without user intervention.restraints/utils.py::restraints_from_ascii