MDAnalysis / membrane-curvature

MDAnalysis tool to calculate membrane curvature.
https://membrane-curvature.readthedocs.io/
GNU General Public License v3.0
29 stars 6 forks source link

Added `derive_surface` and `get_positions` with tests. #40

Closed ojeda-e closed 3 years ago

ojeda-e commented 3 years ago

Function core_fast_leaflets split into three functions:

Tests added:

pep8speaks commented 3 years ago

Hello @ojeda-e! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 40:32: W291 trailing whitespace Line 43:53: W291 trailing whitespace Line 45:53: W291 trailing whitespace Line 49:78: W291 trailing whitespace Line 53:29: W291 trailing whitespace Line 70:9: E741 ambiguous variable name 'l' Line 92:29: W291 trailing whitespace

Comment last updated at 2021-07-05 03:21:02 UTC
codecov[bot] commented 3 years ago

Codecov Report

Merging #40 (4567ed1) into main (97713b3) will decrease coverage by 1.33%. The diff coverage is 88.00%.

ojeda-e commented 3 years ago

After reviews, functions get_positions and grid_map were replaced by single lines in the function derive_surface. Two tests were added for this function. One using previously used small gro file, and passing coordinates as np.arrays in mda.Universe.

orbeckst commented 3 years ago

If you leave the voodoo cast here, raise an issue to investigate further. From the amount of comments you got here you can see that nobody likes code that we don’t understand.

Am 7/3/21 um 12:45 schrieb Estefania Barreto-Ojeda @.***>:

 @ojeda-e commented on this pull request.

In membrane_curvature/lib/mods.py:

  • grid_count_frames = np.zeros([n_cells, n_cells])
  • factor = np.float32(n_cells / max_width) Thanks for highlighting the docstrings, max_width is not int type, it's float. I'll update them. I don't see anything wrong with keeping it anyway. I'll leave and will re-evaluate in a performance test.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ojeda-e commented 3 years ago

Thanks @orbeckst . Issue opened (#42), the line was changed to calculate with factor = n_cells / max_width only.

ojeda-e commented 3 years ago

In this PR:

Different binning for x and y will be addressed in upcoming issue #35