-
Notifications
You must be signed in to change notification settings - Fork 826
Description
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 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:
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.pyanalysis/hbonds/wbridge_analysis.pycore/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