MDAnalysis / binder-notebook

Notebooks for interactive use on https://mybinder.org/
https://mybinder.org/v2/gh/MDAnalysis/binder-notebook/master?filepath=notebooks
GNU General Public License v3.0
4 stars 7 forks source link

Regarding printing the values of Hydrogen bond #7

Closed cy16f01 closed 6 years ago

cy16f01 commented 6 years ago

I have a glycine-water mixture and now i want to calculate the hydrogen bonding between the C-alpha and the Oxygen of water molecules (Calpha-Ow). So, here is my code (I am running with python 3.6 version... with 0.17.0 MDAnalysis version)

import MDAnalysis import MDAnalysis.analysis.hbonds u = MDAnalysis.Universe('nptmd.tpr', 'nptmd.trr') h = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(u, 'name CA', 'name OW', distance=3.0, angle=120.0) h.run() h.generate_table()

I am getting the error as: SelectionWarning: No donors found in selection 1. You might have to specify a custom 'donors' keyword. Selection will update so continuing with fingers crossed. warnings.warn(errmsg, category=SelectionWarning) SelectionWarning: No acceptors found in selection 1. You might have to specify a custom 'acceptors' keyword. Selection will update so continuing with fingers crossed.warnings.warn(errmsg, category=SelectionWarning) And i am not getting any output...even after giving h.generate_table()...

My questions are:

How to solve the above error issue.?? I want the atoms Ow, but i am giving resname OW.. is this fine..?? (can anybody tell how to attach the .gro file..?? i tried but it is showing "We don't support that file type..." ) How do i print the values of this..?? and plot the graph..?? This is my .gro file... 1GLY N 1 0.268 0.266 1.199 1GLY H1 2 0.282 0.164 1.183 1GLY H2 3 0.311 0.291 1.290 1GLY H3 4 0.314 0.323 1.126 1GLY CA 5 0.122 0.298 1.220 1GLY HA1 6 0.104 0.391 1.271 1GLY HA2 7 0.074 0.225 1.283 1GLY C 8 0.036 0.312 1.095 1GLY OT1 9 -0.090 0.336 1.101 1GLY OT2 10 0.088 0.305 0.978 2SOL OW 11 1.017 1.340 0.610 2SOL HW1 12 1.098 1.373 0.561 2SOL HW2 13 1.043 1.263 0.669 3SOL OW 14 0.715 0.377 1.691 3SOL HW1 15 0.677 0.403 1.602 3SOL HW2 16 0.732 0.278 1.692 4SOL OW 17 1.518 2.216 1.252 4SOL HW1 18 1.538 2.157 1.330 4SOL HW2 19 1.438 2.182 1.203 5SOL OW 20 1.751 1.879 2.188 5SOL HW1 21 1.812 1.803 2.169 5SOL HW2 22 1.656 1.848 2.179 ... and so on...

Any suggestions @orbeckst, @richardjgowers, @dotsdl, @arose... are highly appreciated...

Thank you.

kain88-de commented 6 years ago

This repository is only for issues about the binder configuration and example notebooks. Please post usage questions for MDAnalysis to the mailing list.

orbeckst commented 6 years ago

@cy16f01 you might have misunderstood me: In https://github.com/MDAnalysis/mdanalysis/issues/1799#issuecomment-370923602 I said

If you would like to see an example notebook for H-bond analysis then feel free to open an issue at https://github.com/MDAnalysis/binder-notebook/issues where we started posting example code.

I did not say "just re-post your question". As @kain88-de said: this is not about questions on using MDA here, but about examples and specific issues with the posted examples.