Closed ojeda-e closed 3 years ago
Hello @ojeda-e! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
membrane_curvature/lib/mods.py
: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
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
.
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.
Thanks @orbeckst . Issue opened (#42), the line was changed to calculate with factor = n_cells / max_width
only.
In this PR:
derive_surface
slightly modified from suggestion by @lilyminium to consider different max_width in x
and y
dimensions. i.e. derive_surface(n_cells, selection, max_width_x, max_width_y)
. pytest.mark.parametrize
for get_z_surface
.get_z_surface
.Different binning for x
and y
will be addressed in upcoming issue #35
Function
core_fast_leaflets
split into three functions:Tests added:
[x]
test_get_positions
using dummy coordinates for beads 0 to 8, all of them withz=10
:Using the same number of beads in grids,
[x]
test_avg_unit_cell
added for two systems.z=10
z=10
and number of beads per unit cell as shown below:[x]
test_derive_surface
added for samedummy_coordinates
as intest_get_positions
.