-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several feature improvements and bugfixes (#130)
* Update citations for MMM rotlibs * Update __str__ and add __repr__ method to RotamerEnsemble * Fix reference formatting for MMM rotlibs * Add number of heavy atoms to rotlib_info * Started adding some math utility functions and tests * Added has_cycle and cycle_idxs to Topology objects. Add tests * Add functionality to guess dihedrals when constructing a RotEns from a trajectory * Fix test broken by setting default burn_in=0 for from_trajectory method * Change RotEns default eval_clash to True * Fix bug causing backbone oxygen to mislocate when creating from_trajectory * Add intra_fit method to RotEns * Use weights as fallback in save_io when KDE fails * Add methods to detect rings in molecular topologies and tests * Fix bug iterating over chain_operators and fix behavior to set all frame chain_operators when coming from a list * Fix from_trajectory behavior to retain hydrogens by default and not run protein setup. Fix to_rotlib behavior to align rotlib backbone before saving * update tests and test data * Update tests to run on Python3.11 and bump dev version
- Loading branch information
Showing
23 changed files
with
3,177 additions
and
2,933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
from .protein_utils import * | ||
from .scoring import * | ||
|
||
__version__ = '1.0.0.dev5' | ||
__version__ = '1.0.0.dev6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.12 KB
(100%)
src/chilife/data/rotamer_libraries/user_rotlibs/I1M_rotlib.npz
Binary file not shown.
Binary file modified
BIN
+1.12 KB
(100%)
src/chilife/data/rotamer_libraries/user_rotlibs/M1M_rotlib.npz
Binary file not shown.
Binary file modified
BIN
+1.12 KB
(100%)
src/chilife/data/rotamer_libraries/user_rotlibs/R1M_rotlib.npz
Binary file not shown.
Binary file modified
BIN
+1.12 KB
(100%)
src/chilife/data/rotamer_libraries/user_rotlibs/R7M_rotlib.npz
Binary file not shown.
Binary file modified
BIN
+1.12 KB
(100%)
src/chilife/data/rotamer_libraries/user_rotlibs/V1M_rotlib.npz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import numpy as np | ||
|
||
def normalize_angles(angles): | ||
""" | ||
Parameters | ||
---------- | ||
angles | ||
Returns | ||
------- | ||
""" | ||
return np.arctan2(np.sin(angles), np.cos(angles)) | ||
|
||
|
||
def angle_dist(angle1, angle2): | ||
""" | ||
Parameters | ||
---------- | ||
angle1 | ||
angle2 | ||
Returns | ||
------- | ||
""" | ||
diff = angle1 - angle2 | ||
return np.arctan2(np.sin(diff), np.cos(diff)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import numpy as np | ||
from chilife.math_utils import * | ||
|
||
|
||
def test_normalize_angle(): | ||
angles = [-np.pi, 0, np.pi, 3 * np.pi/2, 2*np.pi] | ||
ans = [-np.pi, 0, np.pi, -np.pi/2, 0] | ||
norm_angles = normalize_angles(angles) | ||
np.testing.assert_almost_equal(norm_angles, ans) | ||
|
||
|
||
def test_angle_dist(): | ||
angles = np.linspace(0, 2*np.pi, 100) | ||
ref = np.zeros(100) | ||
ans = normalize_angles(angles) | ||
dist = angle_dist(angles, ref) | ||
np.testing.assert_almost_equal(dist, ans) | ||
|
||
# Rotate 90 degrees | ||
angles += np.pi/2 | ||
ref += np.pi/2 | ||
dist = angle_dist(angles, ref) | ||
np.testing.assert_almost_equal(dist, ans) |
Oops, something went wrong.