Skip to content

Commit

Permalink
minor clean ups
Browse files Browse the repository at this point in the history
- travis.yml
- docs, code style in analysis and analysis tests
  • Loading branch information
kain88-de authored and orbeckst committed Jun 18, 2017
1 parent 1a309eb commit f8d5c5e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ env:
- BUILD_CMD="pip install -v package/ && pip install testsuite/"
- CONDA_DEPENDENCIES="mmtf-python nose=1.3.7 mock six biopython networkx cython joblib nose-timer matplotlib scipy griddataformats"
- CONDA_ALL_DEPENDENCIES="mmtf-python nose=1.3.7 mock six biopython networkx cython joblib nose-timer matplotlib netcdf4 scikit-learn scipy griddataformats seaborn coveralls clustalw=2.1"
- PIP_DEPENDENCIES=""
- CONDA_CHANNELS='biobuilds conda-forge'
- CONDA_CHANNEL_PRIORITY=True
- NUMPY_VERSION=stable
Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/hbonds/hbond_autocorrel.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def solve(self, p_guess=None):
Initial guess for the leastsq fit, must match the shape of the
expected coefficients
Continuous defition results are fitted to a double exponential with
:func:`scipy.optimize.leastsq`, intermittent definition are fit to a
triple exponential.
Expand Down
11 changes: 6 additions & 5 deletions package/MDAnalysis/analysis/psa.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,26 +409,27 @@ def hausdorff(P, Q):
still has to calculate the *symmetric* Hausdorff distance as
`max(directed_hausdorff(P, Q)[0], directed_hausdorff(Q, P)[0])`.
References
----------
.. [Huttenlocher1993] D. P. Huttenlocher, G. A. Klanderman, and
W. J. Rucklidge. Comparing images using the Hausdorff distance. IEEE
Transactions on Pattern Analysis and Machine Intelligence,
15(9):850–863, 1993.
.. [Taha2015] A. A. Taha and A. Hanbury. An efficient algorithm for
calculating the exact Hausdorff distance. IEEE Transactions On Pattern
Analysis And Machine Intelligence, 37:2153-63, 2015.
SeeAlso
-------
See Also
--------
scipy.spatial.distance.directed_hausdorff
"""
N, axis = get_coord_axes(P)
d = get_msd_matrix(P, Q, axis=axis)
return ( max( np.amax(np.amin(d, axis=0)), \
np.amax(np.amin(d, axis=1)) ) / N )**0.5
return (max(np.amax(np.amin(d, axis=0)),
np.amax(np.amin(d, axis=1))) / N)**0.5


def hausdorff_wavg(P, Q):
Expand Down
12 changes: 6 additions & 6 deletions testsuite/MDAnalysisTests/analysis/test_encore.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,18 @@ def test_triangular_matrix():

incremented_triangular_matrix = triangular_matrix + scalar
assert_equal(incremented_triangular_matrix[0,1], expected_value + scalar,
err_msg="Error in TriangularMatrix: addition of scalar gave\
inconsistent results")
err_msg="Error in TriangularMatrix: addition of scalar gave"
"inconsistent results")

triangular_matrix += scalar
assert_equal(triangular_matrix[0,1], expected_value + scalar,
err_msg="Error in TriangularMatrix: addition of scalar gave\
inconsistent results")
err_msg="Error in TriangularMatrix: addition of scalar gave"
"inconsistent results")

multiplied_triangular_matrix_2 = triangular_matrix_2 * scalar
assert_equal(multiplied_triangular_matrix_2[0,1], expected_value * scalar,
err_msg="Error in TriangularMatrix: multiplication by scalar gave\
inconsistent results")
err_msg="Error in TriangularMatrix: multiplication by scalar gave"
"inconsistent results")

triangular_matrix_2 *= scalar
assert_equal(triangular_matrix_2[0,1], expected_value * scalar,
Expand Down

0 comments on commit f8d5c5e

Please sign in to comment.