You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are three functions in lib.distances that were introduced in version 0.18.1 but became obsolete since PR #2048:
calc_distance()
calc_angle()
calc_dihedral()
These functions were intended for use with single coordinates (numpy arrays with shape (3,)) but are no longer needed since the functions calc_bonds(), calc_angles(), and calc_dihedrals() now also accept single coordinates as input (and, likewise, return a single distance / angle / dihedral in that case).
To be precise, we now have the following equivalences:
The obsolete functions are used in the following files:
analysis/hbonds/hbond_analysis.py
analysis/hbonds/wbridge_analysis.py
core/topologyobjects.py
Possible solutions
Leave everything as is (but maybe update the docstrings).
Mark the three functions as deprecated and replace their occurrences in the code according to the equivalent functions as listed above.
Remove the functions and replace them (as in solution 2)
Personally, I'm not in favor of solution 1.
The most important question for me is whether 0.18.1 was an official release, or in other words: Can we choose solution 3 or do we need solution 2?
Current version of MDAnalysis
0.18.1-dev
The text was updated successfully, but these errors were encountered:
Problem description
There are three functions in
lib.distances
that were introduced in version 0.18.1 but became obsolete since PR #2048:calc_distance()
calc_angle()
calc_dihedral()
These functions were intended for use with single coordinates (numpy arrays with shape
(3,)
) but are no longer needed since the functionscalc_bonds()
,calc_angles()
, andcalc_dihedrals()
now also accept single coordinates as input (and, likewise, return a single distance / angle / dihedral in that case).To be precise, we now have the following equivalences:
calc_distance(...)
calc_bonds(...)
calc_angle(...)
np.rad2deg(calc_angles(...))
calc_dihedral(...)
np.rad2deg(calc_dihedrals(...))
The obsolete functions are used in the following files:
analysis/hbonds/hbond_analysis.py
analysis/hbonds/wbridge_analysis.py
core/topologyobjects.py
Possible solutions
Personally, I'm not in favor of solution 1.
The most important question for me is whether 0.18.1 was an official release, or in other words: Can we choose solution 3 or do we need solution 2?
Current version of MDAnalysis
0.18.1-dev
The text was updated successfully, but these errors were encountered: