Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyze_bound_poses gives error + typo in script #16

Closed
sheshe9 opened this issue Apr 10, 2021 · 7 comments
Closed

analyze_bound_poses gives error + typo in script #16

sheshe9 opened this issue Apr 10, 2021 · 7 comments

Comments

@sheshe9
Copy link

sheshe9 commented Apr 10, 2021

Using analyze_bound_poses function in the demo script gives

File "python_interaction.py", line 68, in
pose_rmsd_data = li.analyze_bound_poses(binding_site_id=None, pose_format=save_pose_format)
File "/home/asma97/.local/lib/python3.8/site-packages/pylipid/api/api.py", line 869, in analyze_bound_poses
selected_pose_id = [np.random.choice(i_core_sample, 1)[0] for i_core_sample in core_sample_indices]
File "/home/asma97/.local/lib/python3.8/site-packages/pylipid/api/api.py", line 869, in
selected_pose_id = [np.random.choice(i_core_sample, 1)[0] for i_core_sample in core_sample_indices]
File "mtrand.pyx", line 903, in numpy.random.mtrand.RandomState.choice
ValueError: a must be greater than 0 unless no samples are taken

I wonder what could be a possible fix to this.
typo: li.compute_residue_lipidcount instead of li.compute_residue_lipidcout

Thank you.

@wlsong
Copy link
Owner

wlsong commented Apr 10, 2021

Hi,

Thanks for pointing out the typo.. I have corrected.
I have also corrected the issue with the reported error. Please update to the latest version by 'pip install pylipid --upgrade'. Let me know if you have issues with the updated version.

Wanling

@wlsong
Copy link
Owner

wlsong commented Apr 10, 2021

The latest version is 1.4.5.

@sheshe9
Copy link
Author

sheshe9 commented Apr 11, 2021

Hello,

Thanks for your reply.

The error then appears to be fixed but is now in the next function:

File "python_interaction.py", line 69, in
surface_area_data = li.compute_surface_area(binding_site_id=None, radii=radii)
File "/home/asma97/.local/lib/python3.8/site-packages/pylipid/api/api.py", line 946, in compute_surface_area
plot_surface_area(surface_area_data,
File "/home/asma97/.local/lib/python3.8/site-packages/pylipid/plot/plot1d.py", line 349, in plot_surface_area
axes[row_idx, col_idx].plot(df["Time"], df[bs_name], color=colors[col_idx],

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

@wlsong
Copy link
Owner

wlsong commented Apr 12, 2021

In order to fix the error, could you please let me know how many binding sites were calculated by pylipid and how many trajectories were used for calculation?

@wlsong
Copy link
Owner

wlsong commented Apr 12, 2021

My guess is probably just one binding site was detected. I tried to fix the bug based on that. Please update pylipid to 1.4.6 and see if this issue is fixed.

@sheshe9
Copy link
Author

sheshe9 commented Apr 12, 2021

Hi,

One trajectory was used. There were seven BS_id7.pdf files produced. I will test the new update.

@wlsong
Copy link
Owner

wlsong commented Apr 13, 2021

Hi,

I have figured out what issue is and fixed the bug. Please use the 1.4.7 version.

@wlsong wlsong closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants