On Sep 14, 2020, at 11:53 AM, I. Camps <ica...@gmail.com> wrote:Hello,I have a system with the following info: the main protein chain (chain name PROA), the ligand (chain name HETA), the solvent (chain name SOLV), and the ions (CLA for Cl and SOD for Na).I want to compute the hydrogen bonds between the protein and the ligand. I played using different atom selection and segment names, but I am getting the same results.
I searched this group about how MDAnalysis treat the chains. Found the post that state that the chains are treat as segments (link),
so I used the command bellow but in the output I got all the Hbonds, not only between the two set I am interested in.
As I am new to MDAnalysis, I would like to know if the output is right.
Also, how do I save to a file this output?
# HBond calculation
hbonds = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(universe=u, between=['segid HETA', 'segid PROA'])
hbonds.run()
hbonds.generate_table()
print(hbonds.table)[( 0. , 1, 11709, 'SER', 0, 'HT1', 'TIP3', 3245, 'OH2', 1.83234625, 152.95088724) ( 0. , 2, 5778, 'SER', 0, 'HT2', 'TIP3', 1268, 'OH2', 1.75276436, 166.28757966) ( 0. , 3, 49, 'SER', 0, 'HT3', 'ASP', 3, 'OD1', 1.80132921, 151.18005171) ... (24.39521679, 27863, 1942, 'TIP3', 8629, 'H2', 'GLU', 116, 'OE1', 2.96604261, 120.7568776 ) (24.39521679, 27863, 1943, 'TIP3', 8629, 'H2', 'GLU', 116, 'OE2', 1.76321545, 161.65524683) (24.39521679, 27874, 1442, 'TIP3', 8633, 'H1', 'GLU', 85, 'OE1', 1.72845742, 170.76333328)]
Number of A-B h-bonds 0 out of 4067861 in total
/home/icamps/anaconda3/lib/python3.8/site-packages/numpy/lib/histograms.py:908: RuntimeWarning: invalid value encountered in true_divide return n/db/n.sum(), bin_edges

--
You received this message because you are subscribed to a topic in the Google Groups "MDnalysis discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mdnalysis-discussion/p1Q6GZuqlEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/BA8B157B-4E76-4751-9825-DF56B78A99CE%40gmail.com.
On Sep 18, 2020, at 10:45 AM, I. Camps <ica...@gmail.com> wrote:
Dear Oliver,One more time, thank you for your help.I moved to the developer MDAnalysis version...After running you code, I got:Number of A-B h-bonds 0 out of 4067861 in total/home/icamps/anaconda3/lib/python3.8/site-packages/numpy/lib/histograms.py:908: RuntimeWarning: invalid value encountered in true_divide return n/db/n.sum(), bin_edges
But, making the Hbond analysis with VMD, I got:
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/CAJXnfq-KP%3DoECX%3DicJAyKQJV0W6%2BYkyPEjPXdHB965jx5HbTwg%40mail.gmail.com.
What version of MDAnalysis are you currently using (what does `print(mda.__version__)` show
and how did you install it?
If it is the development branch then did you use then new between keyword (instead of the filtering of the results that I suggested for MDA 1.0.0)?
On Sep 21, 2020, at 8:45 PM, I. Camps <ica...@gmail.com> wrote:Hello Oliver,What version of MDAnalysis are you currently using (what does `print(mda.__version__)` showIt returns 2.0.0-dev0
and how did you install it?I installed using the info from here: https://userguide.mdanalysis.org/1.0.0/contributing_code.html#create-virtual-environment(but I installed not to a separate environment but to my base environment (because my Jupiter notebooks only work in the base environment)
If it is the development branch then did you use then new between keyword (instead of the filtering of the results that I suggested for MDA 1.0.0)?Yes. I used:hbonds = HBA(universe=u, donors_sel=None, hydrogens_sel=None, acceptors_sel=None, between=['segid HETA', 'segid PROA’])
hbonds.run()
and got as output:<MDAnalysis.analysis.hydrogenbonds.hbond_analysis.HydrogenBondAnalysis at 0x15212191aac0>
But I am stuck here :(
I don't know how to extract any information now. Also, I tried to generate a table using:hbonds.generate_table()and got:AttributeError: 'HydrogenBondAnalysis' object has no attribute ‘generate_table'
I delay in answer you because I was reading the documentation and playing with the examples there.
Regards,Camps