enforced double precision calculations in *Group.center()#1936
enforced double precision calculations in *Group.center()#1936richardjgowers merged 3 commits intoMDAnalysis:developfrom
Conversation
|
@zemanj if you're doing a few you may as well do all the functions in distances (eg |
|
@richardjgowers I only did the ones that were needed to pass the tests since I didn't know whether you guys are ok with what I'm doing. Sure I can do that for the remaining functions as well. |
|
@richardjgowers did you already take this PR into account in your PR #1939? If not, should we merge this one "as is" and then worry about double precision in your PR (rebased) or do a new one to add remaining functionality? |
richardjgowers
left a comment
There was a problem hiding this comment.
needs typecasting on all accessible functions in lib.distances
|
@orbeckst my PR just pushes single angle/etc calculations into the existing functions. This PR makes those existing functions work with double precision arguments. So they're complimentary and non conflicting |
…matic input dtype conversion to apply_PBC and (self_)distance_array
…d tests accordingly
|
Recent changes:
Open questions:
Will add CHANGELOG entry once this passes. |
|
@zemanj I think float32 & 64 is enough |
Fixes #1930 (at least in part)
Changes made in this Pull Request:
*Group.center()to be performed in double precisiondtype=np.float32for input coordinate arrays oflib.distances.apply_PBC(),lib.distances.distance_array(), andlib.distances.self_distance_array()*Group.center()will be ofdtype=np.float64unless(compound != 'group' and pbc==True). This exception could be eliminated by providing a double-precision version oflib.distances.apply_PBC().PR Checklist