Re: [AMBER] CPPTRAJ, Counting Per Residue Pair H-Bonding

From: Kenneth Huang <khuang8.student.gsu.edu>
Date: Wed, 16 Mar 2022 14:37:57 +0000

Hi,

I think something like this might do the trick of what you're looking for if I'm understanding your question correctly?

hbond DNA out hbond.DNA.dat :1-46 angle 135 dist 3.0 avgout hbond_avg.DNA.out bridgeout hbond_brid.DNA.dat solventdonor :WAT solventacceptor :WAT.O nointramol

Should automatically get all the hbonds in the residue mask (1-46) so you don't have to do a pairwise matrix by loop, and will dump the breakdown fractions of each combination into the avg.out file, which you can make a lot more readable with

#print out from input in range- defined to avoid solute solvent hbond; solvent starts at line 279 here
awk 'NR>1 && NR<279 {print $1,$3,$5}' hbond_avg.*.out | awk '$3 > .05 {print ;}' > test

#make the output to residue# residue# and Hbond%
awk -F"_" '$1=$1' OFS=" " test | awk -F"." '$1=$1' OFS="\t" | awk '{print $2,$5,$7}' | awk '!_[$1,$2]++' > test2a
Which will get you the fraction of the trajectory the hbond is present- not quite a 'count' per pair, but since the pairs are all unique, you can just count the number of entries to get total, and do some more awk/sort manipulation of the residue numbers to see what residue is involved in multiple hbonds, etc, which I think is what you want?

Best,
Kenneth
________________________________
From: Matthew Guberman-Pfeffer <matthew.guberman-pfeffer.uconn.edu>
Sent: Wednesday, March 16, 2022 9:45 AM
To: AMBER Mailing List <amber.ambermd.org>
Subject: [AMBER] CPPTRAJ, Counting Per Residue Pair H-Bonding

Dear Amber Community,

I need to quantify the total number of H-bonds for each pair of residues in my protein. That would mean a 1321 x 1321 matrix. I am having trouble in writing a bash script to process the CPPTRAJ hbond output (e.g. All.UU.avg.dat) to compute each matrix element. I’ve thought of running CPPTRAJ for every possible pair of donormask and acceptormask, but this is truly an ugly brute-force approach. Does anyone have suggestions on how I can compute the total number of H-bonds between each pair of residues?

Best,
Matthew




_______________________________________________
AMBER mailing list
AMBER.ambermd.org
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.ambermd.org%2Fmailman%2Flistinfo%2Famber&amp;data=04%7C01%7Ckhuang8%40student.gsu.edu%7Cd83d9d06242544e5969d08da0753522c%7C704d822c358a47849a1649e20b75f941%7C0%7C1%7C637830351702821419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=YLUUc1gSRtjCToWpQaNodHXt8d0T1b75Mt%2BAeiSMsV0%3D&amp;reserved=0
CAUTION: This email was sent from someone outside of the university. Do not click links or open attachments unless you recognize the sender and know the content is safe.

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 16 2022 - 08:00:03 PDT
Custom Search