Since the H-bond information for each base pair is arranged in columns, is there a way for the script to define each column for a specific H-bond and if the bond does not exist then it will leave it blank?
The parsing script has
no knowledge of any 'specific H-bond': it just takes H-bonds for each base-pair as a single unit of text string. The H-bond info is calculated with '
analyze', based on purely geometric criteria. Thus for example there can be different A-T pairs: e.g., Watson-Crick pair and Hoogsteen pair, and many other possibilities.
In the example shown in my first reply, note the first two C-G pairs:
1 C-----G [2] O2 - N1 2.99 N4 - O6 2.98
2 C-----G [3] O2 - N2 2.74 N3 - N1 2.84 N4 - O6 3.17
They are based on model #20 of the distributed PDB ensemble '
sample_md0.pdb'. Note specifically, while the 2nd C-G pair is normal with 3 H-bonds, the first C-G pair has 2 H-bonds including the unconventional '
O2 - N1 2.99'.
Overall, I cannot see a sensible, generally applicable way to "define each column for a specific H-bond".
Here is a file to show you what I mean
I realise this is just formatting however it will make life easier to have the script format the output rather than do it manually.
See above. For your example, the first column does not align. Think about all the possible base sequence and pairing patterns, what you are asking for is certainly not just a formatting matter.
0 [3] O2 - N2 2.96 N3 - N1 3.03 N4 - O6 3.49
1 [3] O2 - N2 3.53 N3 - N1 2.97 N4 - O6 2.75
2 [3] O2 - N2 3.01 N3 - N1 2.78 N4 - O6 3.19
3 [3] O2 - N2 3.17 N3 - N1 3.25 N4 - O6 3.53
4 [3] O2 - N2 2.81 N3 - N1 2.97 N4 - O6 3.22
5 [3] O2 - N2 2.86 N3 - N1 2.87 N4 - O6 2.86
6 [1] N3 - N1 3.08
7 [2] N3 - N1 3.25 N4 - O6 2.78
8 [2] O2 - N1 3.07 N4 - O6 3.35
9 [3] O2 - N2 2.96 N3 - N1 2.71 N4 - O6 2.85
10 [3] O2 - N2 3.32 N3 - N1 2.87 N4 - O6 3.09
11 [3] O2 - N2 3 N3 - N1 2.86 N4 - O6 3.18
12 [2] N3 - N1 3.14 N4 - O6 3.04
13 [2] O2 - N2 2.75 N3 - N1 3.29
14 [3] O2 - N2 3.04 N3 - N1 3.06 N4 - O6 3.38
15 [3] O2 - N2 2.85 N3 - N1 2.99 N4 - O6 3.21
16 [3] O2 - N2 3.17 N3 - N1 2.93 N4 - O6 2.98
17 [3] O2 - N2 2.79 N3 - N1 2.74 N4 - O6 2.6
18 [3] O2 - N2 3.03 N3 - N1 2.78 N4 - O6 2.66
19 [2] O2 - N1 2.75 N3 * O6 3.32
20 [2] O2 - N1 2.99 N4 - O6 2.98
I understand you may have a clearly defined goal in hand, and that's where application-specific scripting/programming comes into play. I may be able to help in some way if you make your case more specific.
Xiang-Jun